Off-line permission authorization method, device and equipment based on unmanned aerial vehicle camera and medium

CN122952302APending Publication Date: 2026-10-20XINGLUO INTELLIGENT TECH (NANJING) CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611316780.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-08-27
Publication Date
2026-10-20

Smart Images

  • Figure FT_1
    Figure FT_1
  • Figure FT_2
    Figure FT_2
  • Figure FT_3
    Figure FT_3
Patent Text Reader

Abstract

This invention discloses an offline licensing and authorization method, apparatus, device, and medium based on a drone camera. The method includes: acquiring a target authentication image obtained by capturing an image of a target QR code using a gimbal camera on a drone; encoding the target QR code by the licensor using a target encoding method to obtain concatenated information of the license expiration time and the target message authentication code, wherein the target message authentication code is determined using a target signature method based on the hardware identifier of the edge computing device and the license expiration time; decoding the target authentication image using a target decoding method corresponding to the target encoding method to obtain license authentication information; determining a candidate message authentication code using a target signature method based on the license expiration time and hardware identifier code in the license authentication information; and determining the licensing and authorization result of the edge computing device based on the comparison result between the candidate message authentication code and the target message authentication code. This solution helps improve the efficiency, success rate, and convenience of offline licensing and authorization.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of information security technology, and in particular to an offline licensing method, apparatus, device, and medium based on a drone camera. Background Technology

[0002] Industrial drone systems typically consist of a flight platform, gimbal cameras, and edge computing devices (such as DJI's Manifold). These edge computing devices run algorithms for tasks like inspection, but due to their frequent deployment in outdoor environments such as wind turbines and power transmission lines, authorized configurations face the following typical challenges: (1) Inconvenient network access for edge computing devices: Onboard edge computing devices often lack a stable public or intranet on-site, making it difficult to access online license servers; additional laptops, data cables, or Wi-Fi hotspots are required to log in to edge computing devices; under the circumstances of network setup and login difficulties, the “network activation” or “cloud-based authorization” methods have great limitations.

[0003] (2) Manual input of information is prone to errors: If the authorization token is given to the on-site personnel to input manually in the form of a string (remote control interface, serial port, configuration file editor), since the authorization token usually contains dozens to hundreds of characters, manual input is inefficient and prone to errors. If 1-2 characters are entered incorrectly, the signature verification will fail, and it is difficult to locate the cause on-site. Summary of the Invention

[0004] This invention provides an offline licensing method, apparatus, device, and medium based on a drone camera to solve one of the aforementioned technical problems.

[0005] According to one aspect of the present invention, an offline licensing method based on a drone camera is provided, wherein the drone is equipped with a gimbal camera and an edge computing device, the method being executed by the edge computing device, the method comprising: A target authentication image is obtained by capturing images of a target QR code using a gimbal camera on a drone; wherein the target QR code is obtained by the authorizing party using a target encoding method to encode the license authentication information, the license authentication information is obtained by concatenating the license expiration time with the target message authentication code, and the target message authentication code is determined based on the hardware identification code of the edge computing device and the license expiration time using a target signature method; The target authentication image is decoded using the target decoding method corresponding to the target encoding method to obtain license authentication information, and the license expiration time is extracted from the license authentication information; Based on the license expiration time and the hardware identification code of the edge computing device, the candidate message authentication code is determined using the target signature method; The licensing result of the edge computing device is determined based on the comparison result between the candidate message authentication code and the target message authentication code.

[0006] According to another aspect of the present invention, an offline licensing device based on a drone camera is provided, wherein the drone is equipped with a gimbal camera and an edge computing device, and the device is disposed in the edge computing device, the device comprising: The authentication image acquisition module is used to acquire the target authentication image obtained by capturing the target QR code using the gimbal camera on the drone; wherein, the target QR code is obtained by the authorizing party encoding the license authentication information using the target encoding method, the license authentication information is obtained by concatenating the license expiration time with the target message authentication code, and the target message authentication code is determined based on the hardware identification code of the edge computing device and the license expiration time using the target signature method; The authentication image decoding module is used to decode the target authentication image using the target decoding method corresponding to the target encoding method to obtain license authentication information, and extract the license expiration time from the license authentication information; The authentication code reconstruction module is used to determine the candidate message authentication code based on the license expiration time and the hardware identification code of the edge computing device using the target signature method; The authorization result determination module is used to determine the licensing result of the edge computing device based on the comparison result between the candidate message authentication code and the target message authentication code.

[0007] According to another aspect of the present invention, an electronic device is provided, the electronic device comprising: At least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores a computer program executable by the at least one processor, the computer program being executed by the at least one processor to enable the at least one processor to perform the offline licensing method based on a drone camera according to any embodiment of the present invention.

[0008] According to another aspect of the present invention, a computer-readable storage medium is provided, the computer-readable storage medium storing computer instructions for causing a processor to execute and implement the offline licensing method based on a drone camera as described in any embodiment of the present invention.

[0009] The technical solution of this invention is executed by an edge computing device deployed on a drone. First, a target authentication image is acquired by capturing an image of a target QR code using the drone's gimbal camera. The target QR code is encoded by the licensor using a target encoding method to obtain the license authentication information. This license authentication information is obtained by concatenating the license expiration time with a target message authentication code. The target message authentication code is determined using a target signature method based on the edge computing device's hardware identifier and the license expiration time. Then, the target authentication image is decoded using the target decoding method corresponding to the target encoding method to obtain the license authentication information, from which the license expiration time is extracted. Next, a candidate message authentication code is determined using a target signature method based on the license expiration time and the edge computing device's hardware identifier. Finally, the license authorization result of the edge computing device is determined based on the comparison between the candidate message authentication code and the target message authentication code. This technical solution uses the drone's gimbal camera as the optical multiplexing entry point for offline license authorization configuration of the edge computing device. It achieves efficient license authorization for the edge computing device without requiring network connectivity or external information input devices, reducing the risk of erroneous operations during long string information input and improving the efficiency, success rate, convenience, and flexibility of offline license authorization for edge computing devices.

[0010] It should be understood that the description in this section is not intended to identify key or essential features of the embodiments of the present invention, nor is it intended to limit the scope of the invention. Other features of the invention will become readily apparent from the following description. Attached Figure Description

[0011] To more clearly illustrate the technical solutions in the embodiments of the present invention, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying 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.

[0012] Figure 1 This is a flowchart of an offline licensing method based on a drone camera according to an embodiment of the present invention; Figure 2 This is a flowchart of another offline licensing method based on a drone camera provided according to an embodiment of the present invention; Figure 3 This is a schematic diagram of an offline licensing device based on a drone camera according to an embodiment of the present invention; Figure 4 This is a schematic diagram of the structure of an electronic device that implements an offline licensing method based on a drone camera according to an embodiment of the present invention. Detailed Implementation

[0013] To enable those skilled in the art to better understand the present invention, the technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings of the embodiments of the present invention. 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 should fall within the scope of protection of the present invention.

[0014] It should be noted that the terms "first," "second," "target," etc., used in the specification, claims, and accompanying drawings of this invention are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that embodiments of the invention described herein can be implemented in orders other than those illustrated or described herein. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover a non-exclusive inclusion; for example, a process, method, system, product, or apparatus that comprises a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or apparatus.

[0015] Example 1 Figure 1 This is a flowchart of an offline licensing method based on a drone camera, provided in Embodiment 1 of the present invention. This embodiment is applicable to situations where efficient offline licensing is achieved using a drone camera. The method can be executed by an offline licensing device based on a drone camera, which can be implemented in hardware and / or software. This device can be configured in an electronic device with data processing capabilities. Figure 1 As shown, the method includes: S110: Acquire the target authentication image obtained by using the gimbal camera on the drone to capture the target QR code.

[0016] It should be noted that the drone is equipped with a gimbal camera and an edge computing device. The gimbal camera is used to acquire images, and the edge computing device is used to run the drone's inspection algorithm. The gimbal camera and the edge computing device communicate via an image transmission link. The target QR code is obtained by the authorizing party using target encoding to encode the license authentication information. The license authentication information is obtained by concatenating the license expiration time with the target message authentication code. The target message authentication code is determined using a target signature method based on the hardware identifier code of the edge computing device and the license expiration time.

[0017] The target encoding method refers to an encoding method that can convert binary data into printable characters, and can be set according to actual needs. For example, the target encoding method can be set to Base32, Base58, Base64, or Base64URL. Base32, Base58, and Base64 encoding are encoding methods that represent binary data using 32, 58, and 64 printable characters, respectively. Their core function is to convert arbitrary binary data into plain text format, enabling the secure transmission of content that would otherwise be impossible to transmit in text protocols. Base64URL encoding is a URL-secure variant of standard Base64 encoding, specifically designed to resolve special character conflicts in URLs, filenames, and other scenarios using Base64 encoding. The target signature method can be used to encrypt and sign information. It can be set according to actual needs. For example, the target signature method can be set to symmetric methods such as HMAC-SHA256 (Hash-based Message Authentication Code using SHA-256), AES-CMAC (AES-based Cipher-based Message Authentication Code), HMAC-SHA3 (Keyed-Hash Message Authentication Code with Secure Hash Algorithm 3), and KMAC (KECCAK Message Authentication Code), or asymmetric methods such as Ed25519 (Edwards-curve Digital Signature Algorithm using Curve25519).

[0018] The hardware identifier code can be used to uniquely identify an edge computing device, meaning that each edge computing device corresponds to a unique hardware identifier code. In this embodiment, the hardware identifier code can be generated by the edge computing device. Optionally, the hardware identifier code of the edge computing device is determined as follows: the hardware serial number of the edge computing device is obtained by hash calculation to obtain hardware fingerprint information; the hardware fingerprint information is formatted to obtain the hardware identifier code of the edge computing device.

[0019] Specifically, the hardware serial number of the edge computing device is first read and hashed to generate a unique digital fingerprint corresponding to the hardware serial number, thus avoiding security risks caused by plaintext leakage. The hash calculation method can be flexibly set according to actual needs; this embodiment does not impose specific limitations. For example, FNV-1a 64-bit or SHA-256 methods can be used for hash calculation. Then, the hardware fingerprint information is formatted and converted into a string format as the hardware identifier code of the edge computing device.

[0020] In this embodiment, the licensor needs to generate a compact QR code-style authorization payload offline as the target QR code based on the hardware identifier of the edge computing device and the license expiration time, using a target signature method and a target encoding method. Specifically, the hardware identifier of the edge computing device and the license expiration time are input into an offline signing tool, which uses the offline signing tool to generate a target message authentication code using the target signature method. This target message authentication code can serve as an important basis for determining whether to grant a license. Optionally, the target message authentication code is determined as follows: the hardware identifier of the edge computing device and the license expiration time are concatenated to obtain fused information; the fused information is calculated using HMAC-SHA256 based on a reference key to obtain an initial message authentication code; the initial message authentication code is truncated, and the initial message authentication code with the first target number of bytes is determined as the target message authentication code.

[0021] When determining the target message authentication code, the hardware identifier of the edge computing device and the license expiration time are first concatenated to obtain the fused information. For example, assuming the hardware identifier of the edge computing device is A1B2C3D4E5F6 and the license expiration time is 2026-12-31 00:00:00 (corresponding to Unix 1767139200 in UTC), the concatenated fused information is A1B2C3D4E5F6:1767139200. Here, UTC (Coordinated Universal Time) is the Coordinated Universal Time. Then, based on the reference key, HMAC-SHA256 is performed on the fused information to obtain the initial message authentication code. HMAC-SHA256 is a keyed security authentication algorithm that combines the SHA-256 hash function with a symmetric key; the reference key is a pre-set key according to actual needs. The calculation process of the initial message authentication code is as follows: (1) Reference key standardization: The reference key length is standardized to 64 bytes. If the reference key is too long, it can be compressed into 32 bytes by performing SHA-256 calculation first, and then padded with zeros at the end to make it 64 bytes. If the reference key is too short, it can be padded with zeros at the end to make it 64 bytes. (2) Inner layer hybrid hash calculation: First, the fixed number 0x36 is XORed with the standardized reference key byte by byte to obtain a 64-byte inner layer hybrid pad. Then, the inner layer hybrid pad is concatenated with the fusion information and SHA-256 calculation is performed to obtain a 32-byte intermediate hash result. (3) Outer layer hybrid hash calculation: First, the fixed number 0x5c is XORed with the standardized reference key byte by byte to obtain a 64-byte outer layer hybrid pad. Then, the outer layer hybrid pad is concatenated with the intermediate hash result and SHA-256 calculation is performed. The result is the initial message authentication code. To reduce authentication inefficiency caused by excessively long authentication codes, the initial authentication code can be truncated, with the initial authentication code being the first few bytes (up to the target number of bytes) used as the target authentication code. The target number of bytes can be flexibly set according to actual needs; for example, it can be set to 12 bytes.

[0022] After generating the target message authentication code, an offline issuance tool can be used to sequentially concatenate the license expiration time and the target message authentication code to obtain the license authentication information. This license authentication information includes a 4-byte license expiration time and a 12-byte target message authentication code, totaling 16 bytes. This 16-byte license authentication information is then encoded using a target encoding method (such as Base64URL encoding) to obtain a target QR code of approximately 22 characters. It should be noted that the target QR code does not expose the plaintext information of the hardware identification code, and each target QR code uniquely identifies one edge computing device. This ensures the security of the hardware identification code and the uniqueness of the authorization information binding (i.e., one edge computing device can only be bound to one target QR code).

[0023] In this embodiment, the edge computing device on the drone can acquire the target authentication image obtained by the gimbal camera on the drone capturing the target QR code in real time via a dedicated image transmission link. Specifically, before image acquisition, the visual inference function of the edge computing device needs to be turned off, retaining only the image receiving and decoding functions, thereby freeing up real-time inference resources. The target QR code is placed at a target distance from the gimbal camera, which can be displayed via an electronic screen (such as a mobile phone screen) or a printed document. The target distance can be flexibly set according to actual needs, for example, it can be set within the range of 2-4 meters (such as 3 meters). The gimbal camera is switched to a zoom lens, achieving approximately 2x optical zoom, and the target QR code is manually focused to the maximum telephoto. After focusing, the gimbal camera can then capture the target QR code in real time within the target timeout period, and transmit the captured target authentication image to the edge computing device via the image transmission link. The target timeout period can be used to characterize the maximum duration of image acquisition, for example, the target timeout period can be set to 60 seconds. After the image acquisition time reaches the target timeout period, the image acquisition ends, and the gimbal camera is restored to wide-angle, zoom, and focus modes, without affecting the subsequent UAV inspection vision.

[0024] S120, the target authentication image is decoded using the target decoding method corresponding to the target encoding method to obtain the license authentication information, and the license expiration time is extracted from the license authentication information.

[0025] In this embodiment, after the edge computing device acquires the target authentication image, it first decodes the target authentication image using a target decoding method corresponding to the target encoding method. For example, when the target encoding method is Base64URL encoding, the corresponding target decoding method is Base64URL decoding. By performing Base64URL decoding on the target authentication image, 16 bytes of license authentication information are obtained. Then, the first 4 bytes are extracted from the license authentication information to obtain the license expiration time.

[0026] S130, based on the license expiration time and the hardware identification code of the edge computing device, determines the candidate message authentication code using the target signature method.

[0027] In this embodiment, after the edge computing device obtains the license expiration time, it can read the hardware identifier of the edge computing device. Based on the license expiration time and the hardware identifier of the edge computing device, the message authentication code is reconstructed using a target signature method (such as HMAC-SHA256), and the reconstructed 12-byte message authentication code is used as the candidate message authentication code. The candidate message authentication code and the target message authentication code are calculated using the same method, which will not be elaborated further here.

[0028] S140, determine the licensing result of the edge computing device based on the comparison result between the candidate message authentication code and the target message authentication code.

[0029] In this embodiment, after obtaining the candidate message authentication code, the edge computing device can perform a consistency comparison between the candidate message authentication code and the target message authentication code, and determine the licensing result of the edge computing device based on the comparison result. The comparison result is either consistent or inconsistent, and the licensing result is either successful or failed. Optionally, determining the licensing result of the edge computing device based on the comparison result of the candidate message authentication code and the target message authentication code includes: determining whether the candidate message authentication code and the target message authentication code are consistent; if they are consistent, determining whether the current time has exceeded the license expiration time, and determining the licensing result of the edge computing device based on the time determination result; if they are inconsistent, directly determining the licensing result of the edge computing device as failed.

[0030] Specifically, the process first determines whether the candidate message authentication code and the target message authentication code are consistent. If they are consistent, it further determines whether the current time has exceeded the license expiration time, and determines the licensing result of the edge computing device based on the time determination result. If they are inconsistent, the licensing result of the edge computing device can be directly determined as authorization failure. Optionally, determining the licensing result of the edge computing device based on the time determination result includes: if the current time has exceeded the license expiration time, the licensing result of the edge computing device is determined as authorization failure; if the current time has not exceeded the license expiration time, it determines whether the current time has exceeded the authentication response time of the target QR code; wherein, the authentication response time is determined based on the issuance time of the target QR code and the target response duration; if so, the licensing result of the edge computing device is determined as authorization failure; otherwise, the licensing result of the edge computing device is determined as authorization success.

[0031] Specifically, if the current time exceeds the license expiration time, authentication fails, and the edge computing device's licensing result is confirmed as an authorization failure. If the current time does not exceed the license expiration time, authentication succeeds, and it is necessary to further determine whether the current time exceeds the target QR code's authentication response time. The authentication response time can be used to characterize the maximum time node allowed for binding authorization information, and can be determined based on the target QR code's issuance time and target response duration. The target QR code's issuance time can refer to the time when the authorizing party generates the target QR code offline, i.e., the generation time of the target QR code. The target response duration can be used to characterize the maximum time interval allowed for binding authorization information from the target QR code's issuance time. For example, the target response duration can be set to 7 days, in which case 7 days after the target QR code's issuance time is the target QR code's authentication response time. It should be noted that the target QR code's authentication response time must be later than the target QR code's issuance time but earlier than the target QR code's license expiration time. If the current time exceeds the authentication response time of the target QR code, authorization will not be allowed even if authentication is successful. In this case, the authorization result of the edge computing device can be determined as authorization failure. If the current time does not exceed the authentication response time of the target QR code, the authorization result of the edge computing device can be determined as authorization success.

[0032] This solution determines the licensing and authorization results of edge computing devices by combining the consistency of message authentication codes with the expiration time of the license and the overdue status of the authentication response time. This ensures that authorization information is not tampered with, and that authorization can only be successfully granted if both the license expiration time and authentication response time requirements are met.

[0033] The technical solution of this invention is executed by an edge computing device deployed on a drone. First, a target authentication image is acquired by capturing an image of a target QR code using the drone's gimbal camera. The target QR code is encoded by the licensor using a target encoding method to obtain the license authentication information. This license authentication information is obtained by concatenating the license expiration time with a target message authentication code. The target message authentication code is determined using a target signature method based on the edge computing device's hardware identifier and the license expiration time. Then, the target authentication image is decoded using the target decoding method corresponding to the target encoding method to obtain the license authentication information, from which the license expiration time is extracted. Next, a candidate message authentication code is determined using a target signature method based on the license expiration time and the edge computing device's hardware identifier. Finally, the license authorization result of the edge computing device is determined based on the comparison between the candidate message authentication code and the target message authentication code. This technical solution uses the drone's gimbal camera as the optical multiplexing entry point for offline license authorization configuration of the edge computing device. It achieves efficient license authorization for the edge computing device without requiring network connectivity or external information input devices, reducing the risk of erroneous operations during long string information input and improving the efficiency, success rate, convenience, and flexibility of offline license authorization for edge computing devices.

[0034] In this embodiment, optionally, after determining the licensing result of the edge computing device based on the comparison result of the candidate message authentication code and the target message authentication code, the method further includes: if the licensing result of the edge computing device is a licensing failure, generating licensing failure feedback information; wherein, the licensing failure feedback information includes the hardware identification code of the edge computing device, the licensing failure result, and the licensing failure reason; if the licensing result of the edge computing device is a successful licensing, generating a target key based on the hardware identification code of the edge computing device; using the target key to encrypt the candidate message authentication code to obtain encrypted licensing information, and writing the encrypted licensing information into the licensing configuration file after Base64URL encoding.

[0035] In this embodiment, if the licensing / authorization result of the edge computing device is an authorization failure, authorization failure feedback information can be generated so that administrators can understand the licensing / authorization status in a timely manner. The authorization failure feedback information includes the hardware identifier of the edge computing device, the authorization failure result, and the reason for the authorization failure. For example, the reason for authorization failure can be one of the following: inconsistent message authentication code, authentication failure (i.e., the current time exceeds the license expiration time), or binding failure (i.e., the current time exceeds the authentication response time). If the licensing / authorization result of the edge computing device is an authorization success, a 32-byte key stream is first derived from the hardware identifier of the edge computing device as the target key. This target key is only used for local disk encapsulation of authorization information and does not participate in the authentication and authorization of the target QR code. The target key is determined as follows: the hardware identifier of the edge computing device is used to concatenate the sequence number 0-31 into a header "hardware identifier + "|k|" + sequence number, and after performing an FNV-1a 64-bit hash, only the lowest byte is taken, and finally concatenated to obtain 32 distinct key bytes. Here, |k| is a fixed set of three characters (a vertical bar, the letter 'k', and another vertical bar) used to separate the hardware identifier from the sequence number, indicating that this is a hash used for encapsulation. Then, the candidate message authentication code is encrypted using a bitwise XOR operation with the target key to obtain the encrypted license information. This encrypted license information is then Base64URL encoded and written to the license configuration file for disk encapsulation.

[0036] This solution uses an obfuscated encoding method bound to the hardware identifier to generate the target key, so that different hardware identifiers will result in different target keys. The target key is then used to encrypt and encapsulate the authorization information on disk, which raises the barrier to direct copying and visual reading, and can ensure the security of the authorization information encapsulation and disk encapsulation to a certain extent.

[0037] Example 2 Figure 2This is a flowchart of an offline licensing method based on a drone camera provided in Embodiment 2 of the present invention. This embodiment is an optimization based on the above embodiment. Specifically, the optimization is as follows: the target encoding method is Base64URL encoding; correspondingly, the target authentication image is decoded using the target decoding method corresponding to the target encoding method to obtain license authentication information, including: Base64URL decoding of the target authentication image to obtain first information; if the first information is invalid, the target authentication image is contrast-enhanced to obtain a first image, and Base64URL decoding of the first image to obtain second information; if the second information is invalid, the first image is binarized or inverted to obtain a second image, and Base64URL decoding of the second image to obtain third information; if the third information is invalid, the target authentication image is reacquired within the target timeout period and Base64URL decoding is performed again, and the first valid information after Base64URL decoding is determined as the license authentication information.

[0038] like Figure 2 As shown, the method in this embodiment specifically includes the following steps: S210: Obtain the target authentication image obtained by using the gimbal camera on the drone to capture the target QR code.

[0039] The target QR code is obtained by the authorizing party through Base64URL encoding of the license authentication information. The license authentication information is obtained by concatenating the license expiration time with the target message authentication code. The target message authentication code is determined by the target signature method based on the hardware identification code of the edge computing device and the license expiration time.

[0040] S220: Decode the target authentication image using Base64URL to obtain the first information, and determine whether the first information is invalid.

[0041] In this embodiment, after Base64URL decoding of the target authentication image to obtain the first information, it is necessary to determine whether the first information is invalid. For example, the invalidity of the decoded information can be determined based on the format and content verification results. Format verification can be used to verify whether the data size and format of the decoded information meet preset requirements, and content verification can be used to verify whether the decoded information is null. If the first information is invalid, then S230 is executed; if the first information is valid, then the first information can be directly identified as license authentication information, and then the process jumps directly to S260.

[0042] S230, perform contrast enhancement processing on the target authentication image to obtain a first image, perform Base64URL decoding on the first image to obtain second information, and determine whether the second information is invalid information.

[0043] If the second information is invalid, then S240 is executed; if the second information is valid, it can be directly identified as license authentication information, and then the process jumps directly to S260. For example, CLAHE (Contrast Limited Adaptive Histogram Equalization) can be used for contrast enhancement, which can improve local image details while avoiding excessive amplification of noise.

[0044] S240, the first image is binarized or inverted to obtain the second image, the second image is Base64URL decoded to obtain the third information, and it is determined whether the third information is invalid.

[0045] If the third information is invalid, proceed to step S250; if the third information is valid, it can be directly identified as the license authentication information, and then the process jumps directly to step S260. For example, adaptive Gaussian weighted thresholding binarization can be used for binarization, which can better preserve image details and suppress noise. Color inversion is an operation that inverts the brightness value of each pixel in the image, specifically expressed as: New pixel value = 255 - Original pixel value.

[0046] S250: Within the target timeout period, reacquire the target authentication image and perform Base64URL decoding. The first valid information after Base64URL decoding is determined as the license authentication information.

[0047] If the third piece of information is still invalid, the target authentication image needs to be reacquired within the target timeout period. The newly acquired target authentication image should then be Base64URL decoded using a multi-level decoding strategy as described above, and the first valid information obtained after Base64URL decoding should be identified as the license authentication information. Furthermore, if no valid information is decoded after the target timeout period, a decoding error message (indicating the timeout has ended) should be generated directly, without needing to execute S260-S270.

[0048] S260 determines the candidate message authentication code using the target signature method based on the license expiration time and the hardware identification code of the edge computing device extracted from the license authentication information.

[0049] S270, determine the licensing result of the edge computing device based on the comparison result between the candidate message authentication code and the target message authentication code.

[0050] The technical solution of this invention uses Base64URL encoding as the target encoding method. When decoding the target authentication image to obtain license authentication information using the target decoding method corresponding to the target encoding method, the target authentication image is first Base64URL decoded to obtain first information. If the first information is invalid, the target authentication image undergoes contrast enhancement processing to obtain a first image, and the first image is Base64URL decoded to obtain second information. If the second information is invalid, the first image is binarized or inverted to obtain a second image, and the second image is Base64URL decoded to obtain third information. If the third information is invalid, the target authentication image is reacquired within the target timeout period for Base64URL decoding, and the first valid information after Base64URL decoding is determined as the license authentication information. This technical solution uses a multi-level decoding strategy based on timeout period limitations to Base64URL decode the target authentication image, which can improve the success rate of image decoding, reduce decoding failures caused by imaging quality issues such as image blurring, and help to further improve the efficiency and success rate of offline licensing and authorization for edge computing devices.

[0051] Example 3 Figure 3 This is a schematic diagram of an offline licensing and authorization device based on a drone camera, provided in Embodiment 3 of the present invention. The drone is equipped with a gimbal camera and an edge computing device. This device is located within the edge computing device. This device can execute the offline licensing and authorization method based on a drone camera provided in any embodiment of the present invention, and possesses the corresponding functional modules and beneficial effects of the method. For example... Figure 3 As shown, the device includes: The authentication image acquisition module 310 is used to acquire the target authentication image obtained by capturing the target QR code using the gimbal camera on the drone; wherein, the target QR code is obtained by the authorizing party encoding the license authentication information using the target encoding method, the license authentication information is obtained by concatenating the license expiration time with the target message authentication code, and the target message authentication code is determined based on the hardware identification code of the edge computing device and the license expiration time using the target signature method; The authentication image decoding module 320 is used to decode the target authentication image using the target decoding method corresponding to the target encoding method to obtain license authentication information, and extract the license expiration time from the license authentication information; The authentication code reconstruction module 330 is used to determine the candidate message authentication code based on the license expiration time and the hardware identification code of the edge computing device using the target signature method; The authorization result determination module 340 is used to determine the licensing result of the edge computing device based on the comparison result between the candidate message authentication code and the target message authentication code.

[0052] Optionally, the target encoding method is Base64URL encoding; Accordingly, the authentication image decoding module 320 is specifically used for: The target authentication image is Base64URL decoded to obtain the first information; If the first information is invalid, then the target authentication image is subjected to contrast enhancement processing to obtain the first image, and the first image is Base64URL decoded to obtain the second information; If the second information is invalid, the first image is binarized or inverted to obtain the second image, and the second image is Base64URL decoded to obtain the third information. If the third information is invalid, the target authentication image will be reacquired within the target timeout period and Base64URL decoded. The first valid information after Base64URL decoding will be determined as the license authentication information.

[0053] Optionally, the authorization result determination module 340 is used for: Determine whether the candidate message authentication code and the target message authentication code are consistent; If they match, determine whether the current time has exceeded the license expiration time, and determine the license authorization result of the edge computing device based on the time determination result; If there is a discrepancy, the licensing result of the edge computing device is directly determined as a licensing failure.

[0054] Optionally, the authorization result determination module 340 is further configured to: If the current time exceeds the license expiration time, the license authorization result for the edge computing device is determined to be authorization failure; If the current time has not exceeded the license expiration time, then it is determined whether the current time has exceeded the authentication response time of the target QR code; wherein, the authentication response time is determined based on the issuance time of the target QR code and the target response duration; If so, then the licensing result of the edge computing device is determined to be licensing failure; Otherwise, the licensing result of the edge computing device is determined to be successful.

[0055] Optionally, the apparatus further includes: a license / authorization result processing module, used for: After determining the licensing result of the edge computing device based on the comparison result of the candidate message authentication code and the target message authentication code, if the licensing result of the edge computing device is licensing failure, licensing failure feedback information is generated; wherein, the licensing failure feedback information includes the hardware identification code of the edge computing device, the licensing failure result, and the licensing failure reason; If the licensing result of the edge computing device is successful, then a target key is generated based on the hardware identifier of the edge computing device; The candidate message authentication code is encrypted using the target key to obtain encrypted license information, which is then Base64URL encoded and written into the license configuration file.

[0056] Optionally, the target message authentication code is determined in the following way: The hardware identifier of the edge computing device and the license expiration time are concatenated to obtain fused information; The initial message authentication code is obtained by performing HMAC-SHA256 calculation on the fused information based on the reference key; The initial message authentication code is truncated, and the initial message authentication code with the first target number of bytes is determined as the target message authentication code.

[0057] Optionally, the hardware identifier of the edge computing device is determined in the following way: Obtain the hardware serial number of the edge computing device and perform hash calculation to obtain hardware fingerprint information; The hardware fingerprint information is formatted to obtain the hardware identifier code of the edge computing device.

[0058] The offline licensing device based on a drone camera provided in this embodiment of the invention can execute the offline licensing method based on a drone camera provided in any embodiment of the invention, and has the corresponding functional modules and beneficial effects of the execution method.

[0059] Example 4 Figure 4A schematic diagram of an electronic device 10, which can be used to implement embodiments of the present invention, is shown. The electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device can also represent various forms of mobile devices, such as personal digital processors, cellular phones, smartphones, wearable devices (e.g., helmets, glasses, watches, etc.), and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely illustrative and are not intended to limit the implementation of the invention described and / or claimed herein.

[0060] like Figure 4 As shown, the electronic device 10 includes at least one processor 11 and a memory, such as a read-only memory (ROM) 12 or a random access memory (RAM) 13, communicatively connected to the at least one processor 11. The memory stores computer programs executable by the at least one processor. The processor 11 can perform various appropriate actions and processes based on the computer program stored in the ROM 12 or loaded from storage unit 18 into the RAM 13. The RAM 13 can also store various programs and data required for the operation of the electronic device 10. The processor 11, ROM 12, and RAM 13 are interconnected via a bus 14. An input / output (I / O) interface 15 is also connected to the bus 14.

[0061] Multiple components in electronic device 10 are connected to I / O interface 15, including: input unit 16, such as keyboard, mouse, etc.; output unit 17, such as various types of displays, speakers, etc.; storage unit 18, such as disk, optical disk, etc.; and communication unit 19, such as network card, modem, wireless transceiver, etc. Communication unit 19 allows electronic device 10 to exchange information / data with other devices through computer networks such as the Internet and / or various telecommunications networks.

[0062] Processor 11 can be a variety of general-purpose and / or special-purpose processing components with processing and computing capabilities. Some examples of processor 11 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various special-purpose artificial intelligence (AI) computing chips, various processors running machine learning model algorithms, a digital signal processor (DSP), and any suitable processor, controller, microcontroller, etc. Processor 11 performs the various methods and processes described above, such as an offline licensing method based on a drone camera.

[0063] In some embodiments, the offline licensing method based on a drone camera can be implemented as a computer program tangibly contained in a computer-readable storage medium, such as storage unit 18. In some embodiments, part or all of the computer program can be loaded and / or installed on electronic device 10 via ROM 12 and / or communication unit 19. When the computer program is loaded into RAM 13 and executed by processor 11, one or more steps of the offline licensing method based on a drone camera described above can be performed. Alternatively, in other embodiments, processor 11 can be configured to perform the offline licensing method based on a drone camera by any other suitable means (e.g., by means of firmware).

[0064] Various embodiments of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, field-programmable gate arrays (FPGAs), application-specific integrated circuits (ASICs), application-specific standard products (ASSPs), systems-on-a-chip (SoCs), complex programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various embodiments may include implementations in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which may be a dedicated or general-purpose programmable processor, capable of receiving data and instructions from a storage system, at least one input device, and at least one output device, and transmitting data and instructions to the storage system, the at least one input device, and the at least one output device.

[0065] Computer programs used to implement the methods of the present invention may be written in any combination of one or more programming languages. These computer programs may be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing device, such that when executed by the processor, the computer programs cause the functions / operations specified in the flowcharts and / or block diagrams to be performed. The computer programs may be executed entirely on a machine, partially on a machine, or as a standalone software package, partially on a machine and partially on a remote machine, or entirely on a remote machine or server.

[0066] In the context of this invention, a computer-readable storage medium can be a tangible medium that may contain or store a computer program for use by or in conjunction with an instruction execution system, apparatus, or device. A computer-readable storage medium may include, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, apparatus, or devices, or any suitable combination thereof. Alternatively, a computer-readable storage medium may be a machine-readable signal medium. More specific examples of machine-readable storage media include electrical connections based on one or more wires, portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fibers, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination thereof.

[0067] To provide interaction with a user, the systems and techniques described herein can be implemented on an electronic device having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user; and a keyboard and pointing device (e.g., a mouse or trackball) through which the user provides input to the electronic device. Other types of devices can also be used to provide interaction with the user; for example, feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form (including sound input, voice input, or tactile input).

[0068] The systems and technologies described herein can be implemented in computing systems that include backend components (e.g., as data servers), or middleware components (e.g., application servers), or frontend components (e.g., user computers with graphical user interfaces or web browsers through which users can interact with implementations of the systems and technologies described herein), or any combination of such backend, middleware, or frontend components. The components of the system can be interconnected via digital data communication of any form or medium (e.g., communication networks). Examples of communication networks include local area networks (LANs), wide area networks (WANs), blockchain networks, and the Internet.

[0069] A computing system can include clients and servers. Clients and servers are generally located far apart and typically interact through communication networks. The client-server relationship is created by computer programs running on the respective computers and having a client-server relationship with each other. The server can be a cloud server, also known as a cloud computing server or cloud host, which is a hosting product within the cloud computing service system to address the shortcomings of traditional physical hosts and VPS services, such as high management difficulty and weak business scalability.

[0070] It should be understood that the various forms of processes shown above can be used, with steps reordered, added, or deleted. For example, the steps described in this invention can be executed in parallel, sequentially, or in different orders, as long as the desired result of the technical solution of this invention can be achieved, and this is not limited herein.

[0071] The specific embodiments described above do not constitute a limitation on the scope of protection of this invention. Those skilled in the art should understand that various modifications, combinations, sub-combinations, and substitutions can be made according to design requirements and other factors. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of this invention should be included within the scope of protection of this invention.

Claims

1. An offline licensing method based on a drone camera, characterized in that, The drone is equipped with a gimbal camera and an edge computing device. The method is executed by the edge computing device and includes: A target authentication image is obtained by capturing images of a target QR code using a gimbal camera on a drone; wherein the target QR code is obtained by the authorizing party using a target encoding method to encode the license authentication information, the license authentication information is obtained by concatenating the license expiration time with the target message authentication code, and the target message authentication code is determined based on the hardware identification code of the edge computing device and the license expiration time using a target signature method; The target authentication image is decoded using the target decoding method corresponding to the target encoding method to obtain license authentication information, and the license expiration time is extracted from the license authentication information; Based on the license expiration time and the hardware identification code of the edge computing device, the candidate message authentication code is determined using the target signature method; The licensing result of the edge computing device is determined based on the comparison result between the candidate message authentication code and the target message authentication code.

2. The method according to claim 1, characterized in that, The target encoding method is Base64URL encoding; Accordingly, the target authentication image is decoded using the target decoding method corresponding to the target encoding method to obtain the license authentication information, including: The target authentication image is Base64URL decoded to obtain the first information; If the first information is invalid, then the target authentication image is subjected to contrast enhancement processing to obtain the first image, and the first image is Base64URL decoded to obtain the second information; If the second information is invalid, the first image is binarized or inverted to obtain the second image, and the second image is Base64URL decoded to obtain the third information. If the third information is invalid, the target authentication image will be reacquired within the target timeout period and Base64URL decoded. The first valid information after Base64URL decoding will be determined as the license authentication information.

3. The method according to claim 1, characterized in that, Determining the licensing result of the edge computing device based on the comparison result between the candidate message authentication code and the target message authentication code includes: Determine whether the candidate message authentication code and the target message authentication code are consistent; If they match, determine whether the current time has exceeded the license expiration time, and determine the license authorization result of the edge computing device based on the time determination result; If there is a discrepancy, the licensing result of the edge computing device is directly determined as a licensing failure.

4. The method according to claim 3, characterized in that, Determining the licensing and authorization results of the edge computing device based on the time-based judgment results includes: If the current time exceeds the license expiration time, the license authorization result for the edge computing device is determined to be authorization failure; If the current time has not exceeded the license expiration time, then it is determined whether the current time has exceeded the authentication response time of the target QR code; wherein, the authentication response time is determined based on the issuance time of the target QR code and the target response duration; If so, then the licensing result of the edge computing device is determined to be licensing failure; Otherwise, the licensing result of the edge computing device is determined to be successful.

5. The method according to any one of claims 1-4, characterized in that, After determining the licensing result of the edge computing device based on the comparison result of the candidate message authentication code and the target message authentication code, the method further includes: If the licensing result of the edge computing device is licensing failure, then licensing failure feedback information is generated; wherein, the licensing failure feedback information includes the hardware identification code of the edge computing device, the licensing failure result, and the reason for licensing failure; If the licensing result of the edge computing device is successful, then a target key is generated based on the hardware identifier of the edge computing device; The candidate message authentication code is encrypted using the target key to obtain encrypted license information, which is then Base64URL encoded and written into the license configuration file.

6. The method according to any one of claims 1-4, characterized in that, The target message authentication code is determined in the following way: The hardware identifier of the edge computing device and the license expiration time are concatenated to obtain fused information; The initial message authentication code is obtained by performing HMAC-SHA256 calculation on the fused information based on the reference key; The initial message authentication code is truncated, and the initial message authentication code with the first target number of bytes is determined as the target message authentication code.

7. The method according to any one of claims 1-4, characterized in that, The hardware identifier of the edge computing device is determined in the following way: Obtain the hardware serial number of the edge computing device and perform hash calculation to obtain hardware fingerprint information; The hardware fingerprint information is formatted to obtain the hardware identifier code of the edge computing device.

8. An offline licensing device based on a drone camera, characterized in that, The drone is equipped with a gimbal camera and an edge computing device. The device is disposed within the edge computing device and includes: The authentication image acquisition module is used to acquire the target authentication image obtained by capturing the target QR code using the gimbal camera on the drone; wherein, the target QR code is obtained by the authorizing party encoding the license authentication information using the target encoding method, the license authentication information is obtained by concatenating the license expiration time with the target message authentication code, and the target message authentication code is determined based on the hardware identification code of the edge computing device and the license expiration time using the target signature method; The authentication image decoding module is used to decode the target authentication image using the target decoding method corresponding to the target encoding method to obtain license authentication information, and extract the license expiration time from the license authentication information; The authentication code reconstruction module is used to determine the candidate message authentication code based on the license expiration time and the hardware identification code of the edge computing device using the target signature method; The authorization result determination module is used to determine the licensing result of the edge computing device based on the comparison result between the candidate message authentication code and the target message authentication code.

9. An electronic device, characterized in that, The electronic device includes: At least one processor; and, A memory communicatively connected to the at least one processor; wherein, The memory stores a computer program executable by the at least one processor, which enables the at least one processor to perform the offline licensing method based on a drone camera as described in any one of claims 1-7.

10. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores computer instructions that, when executed by a processor, implement the offline licensing method based on a drone camera as described in any one of claims 1-7.