Data transmission method and related device

By extracting and encoding features from facial images, the facial images and code images are coupled into a whole, solving the problem of insecure data transmission between the front-end and back-end management platforms and improving the security of data transmission.

CN116486451BActive Publication Date: 2026-06-23SHENZHEN INTELLIFUSION TECHNOLOGIES CO LTD

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
SHENZHEN INTELLIFUSION TECHNOLOGIES CO LTD
Filing Date
2023-03-14
Publication Date
2026-06-23

AI Technical Summary

Technical Problem

The existing data transmission between the front-end and back-end management platforms has security issues. Identity information and code information are easily tampered with, resulting in inconsistent information received.

Method used

By extracting features from facial images, facial feature points are obtained. Based on these feature points, the facial image and the code image are encoded to form a coupled whole data transmission to avoid tampering.

Benefits of technology

This improves the security of data transmission, ensures that the correspondence between facial images and QR code images is not tampered with, and enhances the reliability of data transmission.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116486451B_ABST
    Figure CN116486451B_ABST
Patent Text Reader

Abstract

The embodiment of the present application provides a kind of data transmission method, method includes: when the data state of target device is ready to send state, obtain face image and with the code image corresponding to the face image;The feature extraction is carried out to the face image, obtain the face feature point of the face image;Based on the face feature point, the face image and the code image are encoded, and the target data to be sent are obtained, and the target data to be sent are sent to server.Through the feature extraction to face image, obtain face feature point, based on face feature point intersection face image and code image are encoded, obtain the target data to be sent, since face image and code image are encoded according to face feature point, face image and code image can be coupled as a whole, avoid the corresponding relationship of face image and code image to be tampered, improve the security of data transmission.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of data transmission, and more particularly to a data transmission method and related equipment. Background Technology

[0002] Currently, data transmission between the front-end and back-end management platforms typically involves the front-end collecting the target user's identity and code information and uploading it to the back-end management platform for storage. During data transmission, there is a risk of tampering, such as altering the identity and code information, resulting in inconsistencies between the identity and code information received by the back-end management platform. Therefore, there is an insecure data transmission issue between the existing front-end and back-end management platforms. Summary of the Invention

[0003] This invention provides a data transmission method aimed at solving the problem of insecure data transmission between existing front-end and back-end management platforms. By extracting features from a face image to obtain facial feature points, and then encoding the face image and a code image based on these feature points, the target data to be sent is obtained. Since the face image and code image are encoded based on facial feature points, they can be coupled into a whole, preventing the correspondence between the face image and code image from being tampered with, thus improving the security of data transmission.

[0004] In a first aspect, embodiments of the present invention provide a data transmission method, the method comprising:

[0005] When the target device's data status is ready to send, acquire the face image and the code image corresponding to the face image;

[0006] Feature extraction is performed on the face image to obtain the face feature points of the face image;

[0007] Based on the facial feature points, the facial image and the code image are encoded to obtain the target data to be sent, and the target data is sent to the server.

[0008] Optionally, before acquiring the face image and the corresponding code image, the method further includes:

[0009] Collect facial images and QR code images within the first preset area;

[0010] The face image and the code image are associated and stored in the image pool;

[0011] When the image data in the image pool reaches a preset value, or when no new image data is stored in the image pool after a preset time interval, the data status of the target device is determined to be ready to be sent.

[0012] Optionally, associating the face image and the code image includes:

[0013] Acquire images of people within a second preset area, wherein the first preset area is located between the second preset area and the target device;

[0014] Behavior detection is performed on the personnel images to obtain the behavioral information of the target personnel;

[0015] Based on the behavioral information of the target person, the facial image and the code image of the target person are associated.

[0016] Optionally, the step of encoding the face image and the code image based on the face feature points to obtain the target data to be sent includes:

[0017] The face image is divided into a first coding region and a second coding region using the facial feature points, wherein the first coding region includes all the facial feature points;

[0018] The code image is encoded into the second encoding region using a first encoding method to obtain target image data;

[0019] The target image data is encoded using a second encoding method to obtain the target data to be sent.

[0020] Optionally, dividing the face image into a first coding region and a second coding region using the face feature points includes:

[0021] Calculate the center point position corresponding to the facial feature point based on the position of the facial feature point in the facial image;

[0022] The boundaries of the face image are determined based on the positions of the facial feature points and the center point.

[0023] Based on the defined boundaries, the face image is divided into a first coding region and a second coding region.

[0024] Optionally, encoding the code image into the second encoding region using a first encoding method to obtain target image data includes:

[0025] The first encoding method is obtained by matching the encoding methods based on the facial feature points;

[0026] The encoding interval of the second encoding region is determined based on the position of the facial feature points in the facial image;

[0027] The target image data is obtained by encoding the code image in the encoding interval using the first encoding method.

[0028] Optionally, encoding the target image data using a second encoding method to obtain the target data to be sent includes:

[0029] The target image data is encoded using a second encoding method to obtain encoded image data;

[0030] The encoded image data is encrypted using the server's public key to obtain the target data to be sent;

[0031] The target data is decrypted using the server's private key, the encoded image data is decoded using the server's first decoding method, and the encoding interval of the second encoding region is decoded using the second decoding method obtained by matching the facial feature points.

[0032] In a second aspect, embodiments of the present invention provide a data transmission apparatus, the apparatus comprising:

[0033] The acquisition module is used to acquire a face image and a code image corresponding to the face image when the data status of the target device is in the ready-to-send state.

[0034] The feature extraction module is used to extract features from the face image to obtain the face feature points of the face image;

[0035] The processing module is used to encode the face image and the code image based on the face feature points to obtain the target data to be sent, and then send the target data to the server.

[0036] Thirdly, embodiments of the present invention provide an electronic device, including: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the steps in the data transmission method provided in embodiments of the present invention.

[0037] Fourthly, embodiments of the present invention provide a computer-readable storage medium storing a computer program, wherein the computer program, when executed by a processor, implements the steps in the data transmission method provided in the embodiments of the present invention.

[0038] In this embodiment of the invention, when the target device's data state is in a ready-to-send state, a face image and a code image corresponding to the face image are acquired; features are extracted from the face image to obtain facial feature points; based on the facial feature points, the face image and the code image are encoded to obtain the target data to be sent, and the target data to be sent is sent to the server. By extracting features from the face image to obtain facial feature points, and encoding the face image and code image based on the facial feature points to obtain the target data to be sent, since the face image and code image are encoded based on facial feature points, the face image and code image can be coupled into a whole, preventing the correspondence between the face image and code image from being tampered with, and improving the security of data transmission. Attached Figure Description

[0039] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0040] Figure 1 This is a data transmission architecture diagram provided by an embodiment of the present invention;

[0041] Figure 2 This is a flowchart of a data transmission method provided in an embodiment of the present invention;

[0042] Figure 3 This is a schematic diagram of the structure of a data transmission device provided in an embodiment of the present invention;

[0043] Figure 4 This is a schematic diagram of the structure of an electronic device provided in an embodiment of the present invention. Detailed Implementation

[0044] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0045] Please see Figure 1 , Figure 1 This is an architecture diagram of a data transmission system provided in an embodiment of the present invention, such as... Figure 1As shown, this data transmission method is applied to a data transmission system, which includes a target device and a server. The target device and the server are connected via a communication connection. Specifically, the target device and the server can be connected via a wired or wireless method, such as 3G / 4G / 5G.

[0046] The aforementioned target device can be a front-end device with image acquisition function. Specifically, the aforementioned target device can be a front-end device used for authorization verification, such as an access control system, turnstile, smart vending machine, smart food vending machine, ATM, medical guidance equipment, etc., with image acquisition function. The aforementioned server can be a cloud server or a local server.

[0047] Specifically, the target device collects facial images and corresponding QR code images of the target personnel. The target device temporarily stores these images. When the number of temporarily stored facial and QR code images reaches a preset limit, the target device changes its data status to "ready to send." In this state, the target device extracts features from the facial images to obtain corresponding facial feature points. Based on these feature points, the target device encodes the corresponding facial image and QR code image to obtain the target data to be sent, which is then transmitted to the server.

[0048] After receiving the data sent by the target device, the server decodes the data to obtain the face image and the corresponding code image.

[0049] In this embodiment of the invention, facial feature points are obtained by extracting features from a face image. The face image and the code image are then encoded based on the facial feature points to obtain the target data to be sent. Since the face image and the code image are encoded based on facial feature points, the face image and the code image can be coupled into a whole, preventing the correspondence between the face image and the code image from being tampered with and improving the security of data transmission.

[0050] Please see Figure 2 , Figure 2 This is a flowchart of a data transmission method provided in an embodiment of the present invention, such as... Figure 2 As shown, the data transmission method includes the following steps:

[0051] 201. When the target device's data status is ready to send, acquire the face image and the code image corresponding to the face image.

[0052] In this embodiment of the invention, the target device can be a front-end device with image acquisition function. Specifically, the target device can be a front-end device used for authorization verification, such as an access control system, turnstile, smart locker, smart food locker, medical triage device, etc., with image acquisition function. The target device can acquire the facial image and code image of the target person. Specifically, the target device includes a facial image acquisition device and a code image acquisition device. The facial image acquisition device acquires the facial image of the target person, and the code image acquisition device acquires the code image of the target person.

[0053] The aforementioned code image can be a code image with authorization credentials, such as an entry code, reservation code, pickup code, food pickup code, or membership code. For example, if the target device is an access control system or turnstile with image capture capabilities, the corresponding code image can be an entry code, reservation code, or membership code. If the target device is a smart locker with image capture capabilities, the corresponding code image can be a pickup code. If the target device is a smart food pickup locker with image capture capabilities, the corresponding code image can be a food pickup code. If the target device is a medical triage device with image capture capabilities, the aforementioned code image can be a reservation code or a companion code.

[0054] Furthermore, each face image corresponds to a set of code images, and the set of code images includes at least one code image.

[0055] The target device temporarily stores the collected face images and corresponding code images in its local storage space. When the number of face images and code images reaches a preset number, the data status of the target device can be changed to the ready-to-send status.

[0056] When the target device is in the data transmission state, the face image and the corresponding code image can be read from the local storage space.

[0057] 202. Extract features from the face image to obtain the facial feature points.

[0058] In this embodiment of the invention, after the target device reads the face image and the corresponding code image from the local storage space, the face image can be feature extracted to obtain the face feature points of the face image.

[0059] Specifically, features can be extracted from a face image using a pre-trained feature extraction model to obtain facial feature points, such as eye feature points, mouth feature points, eyebrow feature points, nose feature points, and contour feature points.

[0060] The aforementioned feature extraction model can be a feature extraction model based on a convolutional neural network structure. It uses a convolutional neural network structure to perform convolution calculations on face images to extract facial feature points that can represent the target person.

[0061] 203. Based on facial feature points, encode the facial image and the code image to obtain the target data to be sent, and then send the target data to be sent to the server.

[0062] In this embodiment of the invention, the target device stores multiple encoding methods, which are associated with facial feature points. Different encoding methods can be matched for different facial feature point distributions.

[0063] Specifically, after obtaining facial feature points, the corresponding encoding method can be matched based on the distribution of these feature points. Then, the face image and the code image are encoded using the matched encoding method, resulting in a single image that serves as the target data to be sent. The target device then sends this target data to the server.

[0064] Furthermore, the target data includes an encoding method flag. After receiving the target data to be sent, the server finds the decoding method corresponding to the encoding method based on the encoding method flag, and decodes the target data according to the found decoding method to obtain the face image and the code image.

[0065] In this embodiment of the invention, when the target device's data state is in a ready-to-send state, a face image and a corresponding code image are acquired; features are extracted from the face image to obtain facial feature points; based on the facial feature points, the face image and the code image are encoded to obtain the target data to be sent, and the target data to be sent is sent to the server. By extracting features from the face image to obtain facial feature points, and then encoding the face image and the code image based on these facial feature points to obtain the target data to be sent, the face image and the code image can be coupled into a whole, preventing the correspondence between the face image and the code image from being tampered with, thus improving the security of data transmission.

[0066] It is understood that in the specific embodiments of this application, data such as facial images and QR code images of personnel are involved. When the embodiments of this application are applied to specific products or technologies, user permission or consent is required, and the collection, use and processing of related data must comply with the relevant laws, regulations and standards of the relevant countries and regions.

[0067] Optionally, before acquiring the face image and the corresponding code image, a face image and a code image within a first preset area can be acquired; the face image and the code image can be associated and stored in an image pool; when the image data in the image pool reaches a preset value, or when no new image data is stored in the image pool at a preset interval, the data status of the target device is determined to be ready to be sent.

[0068] In this embodiment of the invention, the aforementioned first preset area can be a designated area in front of the target device, such as an area where a person's body length is positioned in front of the target device. Within the preset area, the target person's facial information and QR code information can be collected by the target device.

[0069] In one possible embodiment, the target device acquires a facial image of the target person using a facial image acquisition device, and acquires a code image using a code image acquisition device. The aforementioned target person refers to a person located within a first preset area.

[0070] Furthermore, the target device collects the facial image and QR code image of the target person within two seconds, and associates the facial image and QR code image collected within five seconds. If no facial image or QR code image of the target person is collected within five seconds, the target person is prompted and the next five-second image collection period begins.

[0071] The target device has an image pool for temporarily storing image data. The image pool is used to store face images and code images in a preset order. For example, the same target person is stored in the image pool in the order of face image and code image, while different target persons are stored in the image pool in chronological order. When there are multiple code images, they can be stored after the face images in the order of their acquisition time or in the order of their data volume from smallest to largest.

[0072] The aforementioned preset value can be the number of images of a single target person. For example, if the number of image data for a single target person reaches three (the total number of face images and QR code images), then the target device's data status is determined to be ready to send. Alternatively, the preset value can be the number of image data for multiple target people. For instance, if the image data in the image pool corresponds to five target people, then the target device's data status is determined to be ready to send. This allows the target device to send data in a quantitative manner.

[0073] Alternatively, if no new image data is stored in the image pool at a preset interval, it indicates that the target device is currently in an idle state. This indicates that the target device is in a data ready-to-send state, allowing the target device to use the idle state for data transmission, which can reduce the high concurrency of hardware performance.

[0074] Optionally, in the step of associating the face image and the code image, a person image within a second preset area can be obtained, and a first preset area can be set between the second preset area and the target device; behavior detection can be performed on the person image to obtain the behavior information of the target person; and the face image and the code image of the target person can be associated based on the behavior information of the target person.

[0075] In this embodiment of the invention, the second preset area is set outside the first preset area. The target device performs image acquisition on the target personnel in the second preset area to obtain the personnel image in the second preset area. When the target personnel in the second preset area enter the first preset area from the second preset area, the target device performs face image acquisition and code image acquisition on the target personnel in the first preset area.

[0076] After acquiring images of people in the second preset area, a pre-trained behavior detection model is used to detect the behavior of the people in the images to obtain the behavior information of the target people. The behavior information of the target people includes at least one of the behaviors of opening a mobile phone or showing a QR code image.

[0077] Specifically, the behavior detection model can be trained using a dataset of images showing the action of opening a mobile phone. This allows the model to learn the ability to detect the action of opening a mobile phone during training. The dataset includes images of mobile phone opening actions. Alternatively, the behavior detection model can be trained using a dataset of images showing a QR code. This allows the model to learn the ability to detect the action of showing a QR code. The dataset includes images of QR code showing actions.

[0078] More specifically, if the target person's behavior includes at least one of turning on their phone or presenting a QR code image, then the target person's facial image and QR code image can be associated. This way, by using the target person's behavioral information, it can be determined that the target person has engaged in behavior that meets the requirement of person-QR code consistency with the target device, avoiding person-QR code mismatches and improving the accuracy of associating the target person's facial image and QR code image. If the target person has not turned on their phone or presented a QR code image, then it can be assumed that the target person's QR code image may not truly belong to that target person or may not be their real-time QR code image. For example, if the target person takes out a pre-printed QR code image from their pocket, this QR code image may not be their real-time QR code image or even their actual QR code image.

[0079] Optionally, in the step of encoding the face image and the code image based on face feature points to obtain the target data to be sent, the face image can be divided into a first encoding region and a second encoding region by using face feature points. The first encoding region includes all face feature points. The code image is encoded into the second encoding region using a first encoding method to obtain the target image data. The target image data is then encoded using a second encoding method to obtain the target data to be sent.

[0080] In this embodiment of the invention, the first coding region and the second coding region are combined to obtain a face image. The first coding region includes all facial feature points. The face image is encoded into the second coding region through a first coding method, so that the first coding region can retain all facial feature points.

[0081] The first encoding region in a face image can be determined based on the position coordinates of facial feature points within the image. Specifically, from the position coordinates of all facial feature points, four polar coordinates are extracted: Xmax, Xmin, Ymax, and Ymin. Here, Xmax represents the maximum X-coordinate, Xmin represents the minimum X-coordinate, Ymax represents the maximum Y-coordinate, and Ymin represents the minimum Y-coordinate.

[0082] Using (Xmax, Ymax) as the top right vertex of the first encoding region, (Xmin, Ymax) as the top left vertex of the first encoding region, (Xmax, Ymin) as the bottom right vertex of the first encoding region, and (Xmin, Ymin) as the bottom left vertex of the first encoding region, the rectangle is obtained by connecting the top right vertex, bottom right vertex, bottom left vertex, top left vertex, and top right vertex in sequence, which is used as the first encoding region.

[0083] The target device mentioned above has multiple encoding methods for the second encoding region. The encoding method of the second encoding region can be matched as the first encoding method according to the distribution characteristics of the facial feature points. Each encoding method of the second encoding region can correspond to a facial feature point with a distribution feature type.

[0084] The target image data includes a first encoding region and a second encoding region. The first encoding region encodes a coded image, and the second encoding region includes a face region containing all facial feature points. The target device has a preset second encoding method, which encodes the target image data. The second encoding method can be JPEG encoding.

[0085] In one possible embodiment, the facial feature points in the second encoding region can be enhanced by a preset encoding method to strengthen the salience of the facial feature points. Specifically, the pixel value of the facial feature point can be encoded as the square value of the pixel value.

[0086] By encoding the code image into the first encoding region of the face image using the first encoding method, the code image and the face image can be coupled, eliminating the need for separate transmission of the code image and the face image, thus reducing data bandwidth. The coupling of the code image and the face image also makes it difficult to tamper with the code image. Simultaneously, the second encoding region includes all facial feature points, ensuring that the facial information in the face image is not lost.

[0087] Optionally, in the step of dividing a face image into a first coding region and a second coding region using face feature points, the center point position corresponding to the face feature points can be calculated based on the position of the face feature points in the face image; the division boundary of the face image can be determined based on the position of the face feature points and the center point position; and the face image can be divided into a first coding region and a second coding region based on the division boundary.

[0088] In this embodiment of the invention, the center point is the center point of all facial feature points. Specifically, the position of the center point can be calculated using the following formula:

[0089]

[0090]

[0091] x represents the X-coordinate of the center point, y represents the Y-coordinate of the center point, and N represents the number of facial feature points. n The x-coordinate and y-coordinate of the nth feature point are represented by [x-coordinate and y-coordinate]. n This represents the Y-coordinate of the nth feature point. Correspondingly, the position of the center point mentioned above is (x, y).

[0092] After obtaining the center point location, use the center point as the center of a circle and the distance to the facial feature point farthest from the center point as the radius to obtain the circumference as the dividing boundary. Based on the dividing boundary, the face image is divided into a first coding region and a second coding region, and the facial feature points are retained in the second coding region.

[0093] Optionally, in the step of encoding the code image into the second encoding region using the first encoding method to obtain the target image data, the encoding method can be matched based on facial feature points to obtain the first encoding method; the encoding interval of the second encoding region can be determined based on the position of the facial feature points in the face image; and the code image can be encoded in the encoding interval using the first encoding method to obtain the target image data.

[0094] In this embodiment of the invention, facial feature points can be clustered according to different facial images to obtain clustering results of facial images, with each class of facial images corresponding to a coding method. After the target device extracts the facial feature points of the facial images, it calculates the distance to the cluster center of each class of facial images based on the facial feature points, and selects the coding method corresponding to the closest class of facial images as the first coding method.

[0095] Specifically, the coding interval in the second coding region can be determined based on the position of facial feature points in the face image and the size of the code image, so that the code image can be encoded into the second coding region without occupying the first coding region.

[0096] Furthermore, the above encoding method can be represented by the following formula:

[0097] B i =f(A) i

[0098] Where, f() i B represents the i-th matching encoding method (i.e., the first encoding method). i The encoding result after encoding the code image is shown, where A represents the code image. The above encoding methods can be entropy coding, shift coding, Huffman coding, arithmetic coding, etc.

[0099] By determining the corresponding encoding method based on different facial feature point distributions and using it as the primary encoding method to encode the code image, the security of the code image can be increased, thereby further preventing the code image from being tampered with.

[0100] It should be noted that different encoding methods have their own corresponding decoding methods on the server.

[0101] Optionally, in the step of encoding the target image data using the second encoding method to obtain the target data to be sent, the target image data can be encoded using the second encoding method to obtain encoded image data; the encoded image data can be encrypted using the server's public key to obtain the target data to be sent; wherein, the target data is decrypted using the server's private key, the encoded image data is decoded using the server's first decoding method, and the encoding interval of the second encoding region is decoded using the second decoding method obtained by matching facial feature points.

[0102] In an embodiment of the present invention, after encoding the code image into the second encoding region, target image data including the first encoding region and the second encoding region is obtained, wherein the first encoding region includes face data and the second encoding region includes code image data.

[0103] The target device is also equipped with a second encoding method, which is used to encode the target image data as a whole to obtain the target data to be sent.

[0104] The target device also contains the server's public key, which can be used to encrypt the target data, enabling encrypted transmission and preventing malicious tampering during transmission.

[0105] Specifically, the server contains a private key. The server's public key and private key are a pair of encryption and decryption tools. Target data encrypted with the server's public key can only be correctly decrypted with the corresponding private key.

[0106] After the server receives the target data encrypted with the public key, it decrypts the target data using the server's private key to obtain the target data. Then, it decodes the target data according to the first decoding method corresponding to the second encoding method to obtain target image data including a first encoding region and a second encoding region. The second encoding region includes facial information.

[0107] The server is also equipped with the pre-trained feature extraction model from step 202. After obtaining the target image data, the pre-trained feature extraction model is used to extract features from the face information to obtain the facial feature points. These facial feature points can be eye feature points, mouth feature points, eyebrow feature points, nose feature points, and contour feature points, etc.

[0108] The aforementioned feature extraction model can be a feature extraction model based on a convolutional neural network structure. It uses a convolutional neural network structure to perform convolution calculations on face images to extract facial feature points that can represent the target person.

[0109] The server matches the extracted facial feature points with the corresponding second decoding method, and decodes the second encoding region using the second decoding method to obtain the corresponding code image.

[0110] In this embodiment of the invention, the server can cluster corresponding facial feature points based on different facial information to obtain the clustering results of the facial information. Each type of facial information corresponds to a decoding method, and each decoding method corresponds to an encoding method. After extracting the facial feature points of the facial information, the server calculates the distance to the cluster center of each type of facial information based on the facial feature points, and uses the decoding method corresponding to the closest type of facial information as the second decoding method.

[0111] Furthermore, the above decoding method can be represented by the following formula:

[0112] A = g(B) i ) i

[0113] Among them, g() i B represents the i-th matching decoding method (i.e., the second decoding method). i The encoding result of the code image after being encoded using the first encoding method is denoted as A, where A represents the code image. The above decoding method can be the decoding method corresponding to encoding methods such as entropy coding, shift coding, Huffman coding, and arithmetic coding.

[0114] By determining the corresponding encoding method as the first encoding method to encode the code image based on different facial feature point distributions, and determining the corresponding decoding method as the second decoding method to decode the code image, the security of the code image can be increased, thereby further preventing the code image from being tampered with and improving the security of data transmission.

[0115] It should be noted that the data transmission method provided in this embodiment of the invention can be applied to target devices capable of data transmission, smart access control systems, smartphones, computers, servers, and other devices.

[0116] Optional, please see Figure 3 , Figure 3 This is a schematic diagram of the structure of a data transmission device provided in an embodiment of the present invention, as shown below. Figure 3 As shown, the device includes:

[0117] The acquisition module 301 is used to acquire a face image and a code image corresponding to the face image when the data status of the target device is in the ready-to-send state.

[0118] Feature extraction module 302 is used to extract features from the face image to obtain the face feature points of the face image;

[0119] The processing module 303 is used to encode the face image and the code image based on the face feature points to obtain target data to be sent, and then send the target data to the server.

[0120] Optionally, the device further includes:

[0121] The acquisition module is used to acquire face images and QR code images within a first preset area;

[0122] The association module is used to associate the face image and the code image and store them in the image pool;

[0123] The judgment module is used to determine that the data status of the target device is ready to be sent when the image data in the image pool reaches a preset value, or when no new image data is stored in the image pool at a preset interval.

[0124] Optionally, the associated module includes:

[0125] The acquisition unit is used to acquire images of people within a second preset area, wherein the first preset area is located between the second preset area and the target device;

[0126] The detection unit is used to perform behavior detection on the person image to obtain the behavior information of the target person;

[0127] The association unit is used to associate the facial image and the code image of the target person based on the target person's behavioral information.

[0128] Optionally, the processing module 303 includes:

[0129] A segmentation unit is used to divide the face image into a first coding region and a second coding region based on the face feature points, wherein the first coding region includes all the face feature points;

[0130] The first encoding unit is used to encode the code image into the second encoding region through a first encoding method to obtain target image data;

[0131] The second encoding unit is used to encode the target image data using a second encoding method to obtain the target data to be sent.

[0132] Optionally, the partitioning unit includes:

[0133] The calculation subunit is used to calculate the center point position corresponding to the facial feature point based on the position of the facial feature point in the facial image;

[0134] The first determining subunit is used to determine the division boundary of the face image based on the position of the face feature points and the position of the center point;

[0135] A sub-unit is used to divide the face image into a first coding region and a second coding region according to the division boundary.

[0136] Optionally, the first encoding unit includes:

[0137] A matching subunit is used to perform encoding method matching based on the facial feature points to obtain the first encoding method;

[0138] The second determining subunit is used to determine the encoding interval of the second encoding region based on the position of the facial feature points in the facial image;

[0139] The first encoding subunit is used to encode the code image in the encoding interval using the first encoding method to obtain target image data.

[0140] Optionally, the second encoding unit includes:

[0141] The second encoding subunit is used to encode the target image data using a second encoding method to obtain encoded image data;

[0142] The encryption subunit is used to encrypt the encoded image data using the server's public key to obtain the target data to be sent.

[0143] The target data is decrypted using the server's private key, the encoded image data is decoded using the server's first decoding method, and the encoding interval of the second encoding region is decoded using the second decoding method obtained by matching the facial feature points.

[0144] It should be noted that the data transmission device provided in this embodiment of the invention can be applied to target devices capable of data transmission, smart access control systems, smartphones, computers, servers, and other devices.

[0145] The data transmission apparatus provided in this embodiment of the invention can implement all the processes of the data transmission method in the above-described method embodiments, and can achieve the same beneficial effects. To avoid repetition, further details are omitted here.

[0146] See Figure 4 , Figure 4 This is a schematic diagram of the structure of an electronic device provided in an embodiment of the present invention, such as... Figure 4 As shown, it includes: a memory 402, a processor 401, and a computer program for a data transfer method stored in the memory 402 and executable on the processor 401, wherein:

[0147] The processor 401 is used to call the computer program stored in the memory 402 and perform the following steps:

[0148] When the target device's data status is ready to send, acquire the face image and the code image corresponding to the face image;

[0149] Feature extraction is performed on the face image to obtain the face feature points of the face image;

[0150] Based on the facial feature points, the facial image and the code image are encoded to obtain the target data to be sent, and the target data is sent to the server.

[0151] Optionally, before acquiring the face image and the code image corresponding to the face image, the method executed by the processor 401 further includes:

[0152] Collect facial images and QR code images within the first preset area;

[0153] The face image and the code image are associated and stored in the image pool;

[0154] When the image data in the image pool reaches a preset value, or when no new image data is stored in the image pool after a preset time interval, the data status of the target device is determined to be ready to be sent.

[0155] Optionally, the process of associating the face image and the code image performed by the processor 401 includes:

[0156] Acquire images of people within a second preset area, wherein the first preset area is located between the second preset area and the target device;

[0157] Behavior detection is performed on the personnel images to obtain the behavioral information of the target personnel;

[0158] Based on the behavioral information of the target person, the facial image and the code image of the target person are associated.

[0159] Optionally, the process executed by processor 401 to encode the face image and the code image based on the face feature points to obtain the target data to be sent includes:

[0160] The face image is divided into a first coding region and a second coding region using the facial feature points, wherein the first coding region includes all the facial feature points;

[0161] The code image is encoded into the second encoding region using a first encoding method to obtain target image data;

[0162] The target image data is encoded using a second encoding method to obtain the target data to be sent.

[0163] Optionally, the step of dividing the face image into a first coding region and a second coding region by means of the face feature points executed by the processor 401 includes:

[0164] Calculate the center point position corresponding to the facial feature point based on the position of the facial feature point in the facial image;

[0165] The boundaries of the face image are determined based on the positions of the facial feature points and the center point.

[0166] Based on the defined boundaries, the face image is divided into a first coding region and a second coding region.

[0167] Optionally, the step of processor 401 encoding the code image into the second encoding region using a first encoding method to obtain target image data includes:

[0168] The first encoding method is obtained by matching the encoding methods based on the facial feature points;

[0169] The encoding interval of the second encoding region is determined based on the position of the facial feature points in the facial image;

[0170] The target image data is obtained by encoding the code image in the encoding interval using the first encoding method.

[0171] Optionally, the process executed by processor 401 to encode the target image data using a second encoding method to obtain target data to be sent includes:

[0172] The target image data is encoded using a second encoding method to obtain encoded image data;

[0173] The encoded image data is encrypted using the server's public key to obtain the target data to be sent;

[0174] The target data is decrypted using the server's private key, the encoded image data is decoded using the server's first decoding method, and the encoding interval of the second encoding region is decoded using the second decoding method obtained by matching the facial feature points.

[0175] The electronic device provided in this embodiment of the invention can implement all the processes of the data transmission method in the above-described method embodiments, and can achieve the same beneficial effects. To avoid repetition, further details are omitted here.

[0176] This invention also provides a computer-readable storage medium storing a computer program. When the computer program is executed by a processor, it implements the various processes of the data transmission method or application-side data transmission method provided in this invention and achieves the same technical effect. To avoid repetition, it will not be described again here.

[0177] Those skilled in the art will understand that all or part of the processes in the above embodiments can be implemented by a computer program instructing related hardware. The program can be stored in a computer-readable storage medium, and when executed, it can include the processes of the embodiments of the above methods. The storage medium can be a magnetic disk, optical disk, read-only memory (ROM), or random access memory (RAM), etc.

[0178] The above description discloses only preferred embodiments of the present invention and should not be construed as limiting the scope of the present invention. Therefore, equivalent variations made in accordance with the claims of the present invention are still within the scope of the present invention.

Claims

1. A data transmission method, characterized in that, Includes the following steps: When the target device's data status is ready to send, acquire the face image and the code image corresponding to the face image; Feature extraction is performed on the face image to obtain the face feature points of the face image; Based on the facial feature points, the facial image and the code image are encoded to obtain the target data to be sent, and the target data is sent to the server; The step of encoding the face image and the code image based on the face feature points to obtain the target data to be sent includes: The face image is divided into a first coding region and a second coding region using the facial feature points, wherein the first coding region includes all the facial feature points; The code image is encoded into the second encoding region using a first encoding method to obtain target image data; specifically, the encoding method is matched based on the facial feature points to obtain the first encoding method; the encoding interval of the second encoding region is determined based on the position of the facial feature points in the facial image; the code image is encoded in the encoding interval using the first encoding method to obtain target image data; the target device has multiple preset encoding methods, and the encoding method of the second encoding region is matched as the first encoding method based on the distribution characteristics of the facial feature points, and each encoding method in the second encoding region corresponds to a type of facial feature point with a distribution characteristic. The target image data is encoded using a second encoding method to obtain the target data to be sent.

2. The data transmission method as described in claim 1, characterized in that, Before acquiring the face image and the corresponding code image, the method further includes: Collect facial images and QR code images within the first preset area; The face image and the code image are associated and stored in the image pool; When the image data in the image pool reaches a preset value, or when no new image data is stored in the image pool after a preset time interval, the data status of the target device is determined to be ready to be sent.

3. The data transmission method as described in claim 2, characterized in that, The step of associating the face image and the code image includes: Acquire images of people within a second preset area, wherein the first preset area is located between the second preset area and the target device; Behavior detection is performed on the personnel images to obtain the behavioral information of the target personnel; Based on the behavioral information of the target person, the facial image and the code image of the target person are associated.

4. The data transmission method as described in claim 1, characterized in that, The step of dividing the face image into a first coding region and a second coding region using the face feature points includes: Calculate the center point position corresponding to the facial feature point based on the position of the facial feature point in the facial image; The boundaries of the face image are determined based on the positions of the facial feature points and the center point. Based on the defined boundaries, the face image is divided into a first coding region and a second coding region.

5. The data transmission method as described in claim 4, characterized in that, The step of encoding the target image data using a second encoding method to obtain the target data to be sent includes: The target image data is encoded using a second encoding method to obtain encoded image data; The encoded image data is encrypted using the server's public key to obtain the target data to be sent; The target data is decrypted using the server's private key, the encoded image data is decoded using the server's first decoding method, and the encoding interval of the second encoding region is decoded using the second decoding method obtained by matching the facial feature points.

6. A data transmission device, characterized in that, The device includes: The acquisition module is used to acquire a face image and a code image corresponding to the face image when the data status of the target device is in the ready-to-send state. The feature extraction module is used to extract features from the face image to obtain the face feature points of the face image; The processing module is used to encode the face image and the code image based on the face feature points to obtain the target data to be sent, and send the target data to the server; The step of encoding the face image and the code image based on the face feature points to obtain the target data to be sent includes: The face image is divided into a first coding region and a second coding region using the facial feature points, wherein the first coding region includes all the facial feature points; The code image is encoded into the second encoding region using a first encoding method to obtain target image data; specifically, the encoding method is matched based on the facial feature points to obtain the first encoding method; the encoding interval of the second encoding region is determined based on the position of the facial feature points in the facial image; the code image is encoded in the encoding interval using the first encoding method to obtain target image data; the target device has multiple preset encoding methods, and the encoding method of the second encoding region is matched as the first encoding method based on the distribution characteristics of the facial feature points, and each encoding method in the second encoding region corresponds to a type of facial feature point with a distribution characteristic. The target image data is encoded using a second encoding method to obtain the target data to be sent.

7. An electronic device, characterized in that, include: A memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor, when executing the computer program, implements the steps of the data transmission method as described in any one of claims 1 to 5.

8. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program that, when executed by a processor, implements the steps of the data transmission method as described in any one of claims 1 to 5.