A method and system for activating software functions based on unified firmware
By independently setting up the function activation module and NDI function module in the unified firmware, and using symmetric and asymmetric encryption algorithms to generate license files, the software maintenance and license management problems in multi-chip and multi-model scenarios are solved, achieving low-cost and high-security function activation and management.
Patent Information
- Application Number
- CN202611118187.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-07-24
- Publication Date
- 2026-11-27
AI Technical Summary
Existing technologies, in multi-chip solutions and multi-model scenarios, have high software version maintenance costs, are prone to errors during shipment upgrades, have poor flexibility in function expansion, and lack unified authorization management, resulting in complex device management and limited business flexibility.
A software function activation method based on unified firmware is adopted. By setting the function activation module and the NDI function module independently, and combining symmetric encryption and asymmetric encryption algorithms, a license file is generated for authorization control. This ensures that the authorization information is bound to the device's unique identifier, thereby realizing the control of the loading and running status of the function module.
It reduces software maintenance costs, improves the security and flexibility of license management, simplifies the function expansion process, supports multiple activation paths, and achieves unified management of device functions and flexibility in business models.
Smart Images

Figure CN123179366A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of software function activation technology, and specifically to a software function activation method and system based on unified firmware. Background Technology
[0002] With the development of network video transmission technology, the NDI (Network Device Interface) protocol has been widely used in professional cameras, video conferencing, live streaming, and security monitoring due to its low latency, high image quality, and IP network-based transmission characteristics. The NDI protocol supports the transmission of audio and video signals through standard Ethernet, enabling interconnection between devices and greatly simplifying the wiring complexity of traditional video production and transmission systems.
[0003] In camera products, whether or not NDI functionality is supported is typically related to the product model, licensing method, or customer requirements. In existing technology, NDI support is usually determined at the factory stage by differentiating between different software versions or firmware programs; that is, different software programs are maintained for devices that support NDI and those that do not. Specifically, for devices that support NDI, the software integrates a complete NDI function module; for devices that do not support NDI, a software version without this function is used for programming.
[0004] The aforementioned existing technical solutions have the following drawbacks: First, software maintenance costs are high. In scenarios involving multi-chip solutions and parallel development of multiple device models, each model requires maintaining two sets of software programs: one supporting NDI functionality and one not. This results in a significant increase in the number of software versions and a substantial rise in maintenance complexity. When feature updates or bug fixes are involved, multiple software versions need to be verified and released separately, increasing the workload and time costs of R&D and testing.
[0005] Secondly, errors are prone to occur during shipment and upgrades. If the wrong software version is selected for burning or updating during equipment shipment or upgrades, it can easily lead to malfunctions, increasing rework and after-sales risks. Especially in mass production at the factory, software version management and switching can easily cause batch quality problems due to human error.
[0006] Third, the flexibility for post-shipment functional expansion is poor. Because the functions are fixed in the software version at the factory, it is difficult to flexibly enable or manage the NDI function according to customer needs after the equipment is shipped. When customers request new NDI functions, it is usually necessary to upgrade to a new software version that supports NDI functions. This process involves multiple steps such as software replacement, configuration restoration, and function verification, which is complex and time-consuming.
[0007] Fourth, there is a lack of a unified licensing management mechanism. In existing technologies, functions and software versions are tightly coupled, lacking an independent licensing control module, which hinders unified product management and business model expansion. It cannot support multiple licensing models such as per device, per function, or per term, limiting the product's commercial flexibility in areas such as differentiated pricing and feature subscriptions. Summary of the Invention
[0008] The technical problem to be solved by the present invention is to provide a software function activation method and system based on unified firmware to address the above-mentioned defects of the prior art, thereby solving the technical problems of high software version maintenance costs, easy errors in shipment upgrades, poor flexibility in function expansion, and lack of unified authorization management in multi-chip solutions and multi-model scenarios.
[0009] The technical solution adopted by this invention to solve its technical problem is: a software function activation method based on unified firmware, applicable to camera equipment, wherein the camera equipment runs unified firmware, the unified firmware includes a function activation module and an NDI function module, the function activation module and the NDI function module are set independently, and the method includes the following steps: Obtain the unique device identifier information of the camera device; The original authorization request data containing the unique identifier information of the device is encrypted using a symmetric encryption algorithm to generate an authorization request file; The authorization request file is sent to the authorization generation device, which uses a symmetric decryption algorithm corresponding to the symmetric encryption algorithm to decrypt the authorization request file and obtain the device's unique identifier information. The authorization generation device acquires pre-configured authorization control information, which includes at least a function enable flag and function version configuration data, for controlling the enable status and function version of the NDI function module. The device unique identifier information is combined with the authorization control information to generate an authorization data structure. The authorized data structure is encrypted using an asymmetric encryption algorithm to generate a License file; The License file is imported into the camera device. The function activation module performs verification processing on the License file, which includes integrity verification, decryption processing, device identification comparison, and validity judgment. Based on the verification result of the verification process, control the loading and running status of the NDI functional module; The symmetric encryption algorithm is based on a pre-shared key, which is shared in advance by the camera device and the authorization generation device; the symmetric decryption algorithm matches the symmetric encryption algorithm and shares the pre-shared key; the asymmetric encryption algorithm is based on a public key and a private key pair.
[0010] In a preferred embodiment, the function activation module and the NDI function module are independently set in the unified firmware. The function activation module verifies the license file during the operation of the camera device and controls the loading and running status of the NDI function module according to the verification result.
[0011] A preferred embodiment is that the unique device identification information includes at least one of chip identifier, serial number, or media access control address.
[0012] A preferred approach is to pre-set the pre-shared key in the camera device through factory batch burning, after-sales configuration, or user self-binding.
[0013] In a preferred embodiment, the authorization generation device holds the private key, and the camera device holds the public key to perform the verification process.
[0014] A preferred embodiment is that the asymmetric encryption algorithm is the RSA algorithm, which generates an algorithm modulus based on two large prime numbers, and generates a public key and a private key based on the algorithm modulus. The public key contains the algorithm modulus and the encryption exponent, and the private key contains the algorithm modulus and the decryption exponent.
[0015] A preferred embodiment is that the verification process includes: Read the license file from the non-volatile memory of the camera device; Perform an integrity check on the license file; The encrypted data in the License file is decrypted to extract the authorization information; Obtain the current unique device identifier information of the camera device and compare it with the unique device identifier information recorded in the authorization information; Determine the validity of the authorization information.
[0016] A preferred embodiment is that when the verification result determines that the authorization is valid, the function activation module loads and enables the NDI function module; when the verification result determines that the authorization is invalid or abnormal, the function activation module prohibits the loading of the NDI function module.
[0017] A preferred embodiment is that when the NDI function module is loaded and enabled, the management interface of the camera device displays the corresponding function entry and version information; when the NDI function module is disabled, the management interface hides the corresponding function entry.
[0018] The technical solution adopted by this invention to solve its technical problem is: a software function activation system based on unified firmware, applicable to camera equipment, characterized in that it includes: A camera device running unified firmware, the unified firmware including a function activation module and an NDI function module, the function activation module and the NDI function module being set independently; The license generation device is used to receive an license request file, generate a license file, and output it to the camera device. The function activation module is used to obtain the unique device identifier information of the camera device, generate an authorization request file using a symmetric encryption algorithm, and send it to the authorization generation device. The authorization generation device decrypts the authorization request file using a symmetric decryption algorithm, combines the unique device identifier information and authorization control information, and generates the license file using an asymmetric encryption algorithm. The function activation module verifies the imported license file and controls the loading and running status of the NDI function module based on the verification result.
[0019] The beneficial effects of this invention are that, compared with the prior art, this invention achieves the decoupling of function authorization and specific function modules by independently setting the function activation module and the NDI function module in a unified firmware. This allows the same software program to present different function configurations under different authorization states, fundamentally reducing the number of software versions and significantly reducing software maintenance costs in multi-chip solutions and multi-model scenarios.
[0020] By employing an authorization binding mechanism based on unique device identifiers, authorization information is mapped one-to-one with specific device hardware identifiers. This ensures that the same authorization file is applicable only to a specific device, preventing unauthorized copying and cross-device use of authorization files, thus enhancing the security of authorization management. A multi-layered encryption license generation mechanism combining symmetric and asymmetric encryption is used. The device side employs symmetric encryption algorithms to generate authorization request data, which is computationally efficient and suitable for embedded device environments. The authorization generation end uses asymmetric encryption algorithms to sign or encrypt the authorization data, guaranteeing the unforgeability and security of the authorization data.
[0021] Through the linkage control mechanism between the authorization result and the device management interface, the NDI function module is loaded and enabled when the authorization is valid, and the corresponding function entry and version information are displayed in the management interface. When the authorization is invalid or abnormal, the loading of the NDI function module is prohibited, and the corresponding management interface entry is hidden. This achieves intuitive presentation and unified management of the function's enabled status, and avoids users performing invalid function configuration operations in an unauthorized state.
[0022] By supporting a multi-path authorization import mechanism, including batch authorization activation during factory production or burning stages, after-sales authorization activation after device shipment, and customer-side self-activation, the factory burning process is simplified, production costs are reduced, and customers are provided with more flexible function configuration methods. Attached Figure Description
[0023] The present invention will be further described below with reference to the accompanying drawings and embodiments. In the accompanying drawings: Figure 1 This is a schematic diagram of the software function activation method based on unified firmware of the present invention; Figure 2 This is a schematic diagram of the software function activation system based on unified firmware of the present invention; Figure 3 This is a schematic diagram of the verification processing method of the present invention. Detailed Implementation
[0024] The preferred embodiments of the present invention will now be described in detail with reference to the accompanying drawings.
[0025] like Figure 1 and Figure 2 As shown, the present invention provides a preferred embodiment of a software function activation method based on unified firmware.
[0026] A software function activation method based on unified firmware is applicable to a camera device 100, wherein the camera device 100 runs unified firmware, the unified firmware including a function activation module 110 and an NDI function module 120, wherein the function activation module 110 and the NDI function module 120 are set independently, and the method includes the following steps: Step S10: Obtain the unique device identifier information of the camera device 100; Step S20: Encrypt the original authorization request data containing the unique identifier information of the device using a symmetric encryption algorithm to generate an authorization request file; Step S30: The authorization request file is sent to the authorization generation device 200. The authorization generation device 200 uses a symmetric decryption algorithm corresponding to the symmetric encryption algorithm to decrypt the authorization request file and obtain the device's unique identifier information. Step S40: The authorization generation device 200 acquires pre-configured authorization control information, which includes at least a function enable flag and function version configuration data, used to control the enable status and function version of the NDI function module 120, and combines the device unique identifier information with the authorization control information to generate an authorization data structure. Step S50: Encrypt the authorized data structure using an asymmetric encryption algorithm to generate a License file; Step S60: Import the License file into the camera device 100. The function activation module 110 performs verification processing on the License file. The verification processing includes integrity verification, decryption processing, device identification comparison, and validity judgment. Step S70: Based on the verification result of the verification process, control the loading and running status of the NDI function module 120; The symmetric encryption algorithm is based on a pre-shared key, which is shared in advance by the camera device 100 and the authorization generation device 200; the symmetric decryption algorithm matches the symmetric encryption algorithm and shares the pre-shared key; the asymmetric encryption algorithm is based on a public key and a private key pair.
[0027] Specifically, the camera device 100 runs unified firmware, which includes a function activation module 110 and an NDI function module 120. The function activation module 110 and the NDI function module 120 are independently configured and decoupled at the software architecture level. The firmware is a low-level program burned into the hardware. All camera devices 100 have the same low-level program burned into them. This low-level program contains both the function activation module 110, which is responsible for authorization verification, and the NDI function module 120, which is responsible for video transmission. However, whether the NDI function module 120 can function is determined by the function activation module 110. Furthermore, the NDI function module 120 is responsible for video encoding and network transmission related to the NDI protocol. The function activation module 110 controls the loading and running status of the NDI function module 120 according to the authorization verification result. NDI stands for Network Device Interface, a network transmission protocol for professional video transmission protocols. It obtains the unique device identification information of the camera device 100; it uses a symmetric encryption algorithm to encrypt the original authorization request data containing the unique device identification information, generating an authorization request file; it sends the authorization request file to the authorization generation device 200, which uses a symmetric decryption algorithm corresponding to the symmetric encryption algorithm to decrypt the authorization request file, obtaining the unique device identification information; the authorization... The generation device 200 acquires pre-configured authorization control information, which includes at least a function activation flag and function version configuration data, used to control the activation status and function version of the NDI function module 120. It combines the device unique identifier information with the authorization control information to generate an authorization data structure; it encrypts the authorization data structure using an asymmetric encryption algorithm to generate a License file; it imports the License file into the camera device 100, and the function activation module 110 verifies the License file, including integrity verification, decryption processing, device identifier comparison, and validity judgment; based on the verification result, it controls the loading and running status of the NDI function module 120. The symmetric encryption algorithm is based on a pre-shared key, which is pre-shared by the camera device 100 and the authorization generation device 200; the symmetric decryption algorithm matches the symmetric encryption algorithm and shares the pre-shared key; the asymmetric encryption algorithm is based on a public key and private key pair.
[0028] In this embodiment, in step S10, the unique device identification information is hardware-level or firmware-level identification information used to distinguish different camera devices 100. The unique device identification information includes at least one of a chip identifier, serial number, or media access control address. The chip identifier is a unique, unrewritable identifier code burned into the main processor chip of the camera device 100 during the manufacturing stage. The serial number is the device serial number written into the non-volatile memory by the device manufacturer during the device manufacturing stage. The media access control address is the physical address of the network interface of the camera device 100. During the device startup stage or the authorization request generation stage, the function activation module 110 obtains the unique device identification information by reading the device hardware registers or accessing a preset storage area in the non-volatile memory. By binding the authorization with the unique device identification information, it ensures that the same authorization file is only applicable to a specific device, preventing illegal copying and cross-device use of the authorization file, and improving the security of authorization management.
[0029] In this embodiment, in step S20, the original authorization request data is generated by the function activation module 110 based on the device unique identifier information and preset system parameters. The original authorization request data includes at least the device unique identifier information, device type or model information, and a verification field. The verification field is used to verify the integrity of the data during the subsequent decryption process.
[0030] The symmetric encryption algorithm is based on a pre-shared key, which is shared in advance by the camera device 100 and the authorization generation device 200. The pre-shared key is pre-set in the camera device 100 through factory batch programming, after-sales configuration, or user self-binding. In the factory batch programming method, the pre-shared key is written into the secure storage area of the non-volatile memory of the camera device 100 by the programming device during the device production stage; in the after-sales configuration method, engineers write the pre-shared key into the device using a dedicated configuration tool; in the user self-binding method, the user obtains the pre-shared key during initial use or registration by inputting it through the management interface or by being assigned it by the server.
[0031] The function activation module 110 uses the pre-shared key as the encryption key to call a symmetric encryption algorithm to encrypt the original authorization request data, generating encrypted authorization request data. Subsequently, the encrypted authorization request data is encapsulated according to a preset Key file format to generate an authorization request file. The Key file format includes a file header, encrypted data blocks, and file verification information. The file header identifies the file type and version, the encrypted data blocks contain the symmetrically encrypted original authorization request data, and the file verification information is used to check file integrity during transmission or storage.
[0032] In this embodiment, in step S30, the authorization request file is sent to the authorization generation device 200 via wired transmission, wireless transmission, or offline media. In a factory mass production scenario, the authorization request file is sent in batches by the production testing equipment to the authorization generation device 200 via USB or network interface. In an after-sales authorization scenario, the user exports the authorization request file through the management interface of the camera device 100 and sends it to the authorization generation device 200 via email, network upload, or offline copy.
[0033] The authorization generation device 200 holds the pre-shared key, which is consistent with the pre-shared key in the camera device 100. After receiving the authorization request file, the authorization generation device 200 first verifies the file format to confirm that it conforms to the preset Key file format specification. Subsequently, the authorization generation device 200 uses a symmetric decryption algorithm corresponding to the symmetric encryption algorithm and the pre-shared key to decrypt the encrypted data blocks in the authorization request file, recovering the original authorization request data. The symmetric decryption algorithm matches the symmetric encryption algorithm and shares the pre-shared key; that is, the encryption and decryption operations use the same key, and the algorithm structures are inverse operations of each other.
[0034] After decryption, the authorization generation device 200 extracts the device's unique identifier, device type or model information, and verification fields from the original authorization request data, and verifies the verification fields to confirm that the original authorization request data has not been tampered with during transmission. Through the consistency of the pre-shared key and the matching of the symmetric encryption and decryption algorithms, it ensures that only the authorization generation device 200 holding the correct pre-shared key can decrypt and identify the content of the authorization request file, preventing the authorization request information from being illegally intercepted and parsed.
[0035] In this embodiment, in step S40, the authorization control information is a pre-configured set of parameters controlling the activation status and function version of the NDI function module 120. The authorization control information includes at least a function activation flag and function version configuration data. The function activation flag is a binary flag or status code that indicates whether the NDI function module 120 is allowed to be enabled. The function version configuration data is a parameter that identifies the specific version number of the authorized NDI function module 120, and is used to control the function module to call the corresponding version's function interface or configuration parameters when it is loaded.
[0036] The authorization control information may further include authorization extension information, which includes authorization validity period, authorized function combination, or authorization limit. The authorization validity period is used to limit the effective time range of the authorization, the authorized function combination is used to identify other functional modules authorized simultaneously besides the NDI function, and the authorization limit is used to limit the maximum number of times the authorization can be activated or reactivated.
[0037] After acquiring the device's unique identifier and the authorization control information, the authorization generation device 200 combines them according to preset data structure rules to generate an authorization data structure. For example, the device's unique identifier is used as a primary key field, and the authorization control information is embedded as an additional field. A CRC checksum is generated for all the combined data. The primary key field is used to uniquely identify the device corresponding to the authorization in the subsequent verification stage. The additional field is used to carry the specific authorization control content, and the CRC checksum is used to verify the integrity of the authorization data structure in the subsequent stage. By combining the device's unique identifier and the authorization control information to generate the authorization data structure, a one-to-one correspondence between the authorization information and the device is achieved, ensuring the non-replicability of the authorization data structure and the device exclusivity.
[0038] In this embodiment, in step S50, the asymmetric encryption algorithm is implemented based on a public key and a private key pair. The authorization generation device 200 holds the private key, and the camera device 100 holds the public key to perform the verification process. The public key and the private key are mathematically related but composed of different key parameters. The public key is used for encryption or verification, and the private key is used for decryption or signature generation. The separation of the public and private keys allows the public key to be publicly distributed to the device, while the private key is securely stored only by the authorization generation device 200, thereby ensuring the feasibility of authorization verification while preventing the forgery of authorization data.
[0039] Furthermore, the asymmetric encryption algorithm is the RSA algorithm. The RSA algorithm generates an algorithm modulus based on two large prime numbers, and then generates a public key and a private key based on the algorithm modulus. Specifically, the authorization generation device 200 selects two large prime numbers whose lengths meet security requirements, calculates their product as the algorithm modulus; generates the public key based on the algorithm modulus and a selected encryption exponent, the public key containing the algorithm modulus and the encryption exponent; and generates the private key based on the algorithm modulus and a calculated decryption exponent, the private key containing the algorithm modulus and the decryption exponent. The encryption exponent and the decryption exponent satisfy a mathematical inverse relationship, such that data encrypted with the private key can be decrypted and verified using the public key, or data encrypted with the public key can be decrypted and recovered using the private key.
[0040] The authorized data structure is encrypted or signed using the private key to generate a License string. The encryption or signing process involves performing mathematical operations on the digest or complete data of the authorized data structure using the private key to generate a unique and irreversibly derivable ciphertext or signature value. Subsequently, the License string is encoded into a storable and transmittable License file.
[0041] The License file is an authorized license file, which is an encrypted file that carries the legitimate authorization certificate of the device in the activation process of this invention. It is the core carrier that controls whether the NDI function of the camera can be enabled. It is specially generated by the background authorization generation device 200 and sent to the camera. The device side determines whether to unlock the NDI function after verification by the function activation module 110 in the firmware.
[0042] In step S60, the license file is imported into the camera device 100 through multiple activation paths, including: batch authorization activation during factory production or burning, after-sales authorization activation after device shipment, and customer-side self-activation achieved by providing customers with authorization generation capabilities. After being imported, the license file is stored in the non-volatile memory of the camera device 100, and the function activation module 110 performs verification processing on the license file.
[0043] In step S70, the function activation module 110 controls the loading and running state of the NDI function module 120 according to the verification result of the verification process. The function activation module 110 and the NDI function module 120 are independently set in the unified firmware. During the operation of the camera device 100, the function activation module 110 verifies the license file and controls the loading and running state of the NDI function module 120 according to the verification result. When the verification result determines that the authorization is valid, the function activation module 110 loads and enables the NDI function module 120. The function activation module 110 completes the loading and initialization of the NDI function module 120 by calling the system dynamic link library loading interface, executing the module initialization function, or configuring the function enable register. After the NDI function module 120 is loaded, the camera device 100 has the network video transmission capability of the NDI protocol and can send or receive audio and video data to other NDI-compatible devices in the network through the Ethernet interface.
[0044] When the verification result determines that the authorization is invalid or abnormal, the function activation module 110 prohibits the loading of the NDI function module 120. The function activation module 110 skips the loading process of the NDI function module 120 or terminates the already loaded NDI function module 120 process, releasing related system resources. In this state, the function interface of the NDI function module 120 cannot be called, and the camera device 100 does not have the network video transmission capability of the NDI protocol.
[0045] When the NDI function module 120 is loaded and enabled, the management interface of the camera device 100 displays the corresponding function entry and version information. The function entry is an interactive element in the management interface for users to configure and operate the NDI function, and the version information is the version identifier of the currently enabled NDI function module 120. When the NDI function module 120 is disabled, the management interface hides the corresponding function entry, and the user cannot see the relevant configuration options for the NDI function in the management interface.
[0046] The function activation module 110, the authorization generation mechanism, and the function control logic constitute an integrated authorization management system. The authorization request generation, authorization file generation, and authorization verification processes adopt a consistent data structure and processing rules. The function control logic relies on the authorization verification results to make decisions. The authorization status is consistent with the device function module loading status and the management interface display status, so that the authorization mechanism is not only used to control function switching, but also to realize unified management of device function configuration.
[0047] In this embodiment, the pre-shared key is pre-set in the camera device 100 through factory batch programming, after-sales configuration, or user self-binding. During the device production stage, the pre-shared key is written into the secure storage area of the non-volatile memory using a dedicated programming device. This secure storage area has access control to prevent unauthorized programs from reading or tampering with the pre-shared key.
[0048] In this embodiment, the authorization generation device 200 holds the private key, and the camera device 100 holds the public key to perform the verification process. The private key is stored in the secure storage medium of the authorization generation device 200 and has access control and encryption protection mechanisms. The public key is burned into the camera device 100 along with the pre-shared key during the device manufacturing stage, or distributed to the camera device 100 through the secure handshake process when the device first connects to the network. The public key is only used to verify the authorization data signed by the corresponding private key and cannot be used to forge authorization data, thereby ensuring the feasibility of authorization verification while preventing the forgery of authorization data.
[0049] Furthermore, by independently configuring the function activation module 110 and the NDI function module 120 within the unified firmware, the software function and authorization mechanism are decoupled. This allows the same unified firmware to exhibit differentiated functionalities under different authorization configurations, fundamentally reducing the number of software versions and lowering software maintenance costs. Through an authorization binding mechanism based on the device's unique identifier, combined with multiple encryption protections of symmetric and asymmetric encryption, the security and unforgeability of authorized data are ensured. The linkage control between authorization status, function loading status, and management interface display status enables intuitive management and unified control of device function configurations. By supporting multiple activation paths, it adapts to the needs of different application scenarios such as factory production, after-sales service, and customer self-operation.
[0050] like Figure 3 As shown, the present invention provides a preferred embodiment of the verification process.
[0051] The verification process includes: Step S61: Read the License file from the non-volatile memory of the camera device 100; Step S62: Perform integrity verification on the License file; Step S63: Decrypt the encrypted data in the License file and extract the authorization information; Step S64: Obtain the current unique device identifier information of the camera device 100 and compare it with the unique device identifier information recorded in the authorization information; Step S65: Determine the validity of the authorization information.
[0052] In step S61, the non-volatile memory is a storage medium in the camera device 100 used for persistently storing data. The non-volatile memory includes flash memory or electrically erasable programmable read-only memory. The license file is written to a predetermined storage path of the non-volatile memory during the import process. The predetermined storage path is configured by the function activation module 110 during the initialization phase.
[0053] The function activation module 110 first checks whether the license file exists in the predetermined storage path. If the license file exists, the function activation module 110 reads the file header information of the license file, which includes a file identifier field, a version field, and a file length field. The function activation module 110 reads the complete file data based on the file length field and temporarily stores the read file data in the buffer of the volatile memory. If the license file does not exist or the file header information is read abnormally, the function activation module 110 determines that a file access error has occurred, terminates the subsequent verification process, and outputs an error message.
[0054] When reading the license file, the function activation module 110 verifies the access permissions of the non-volatile memory to ensure that the current operation has legitimate permission to read the storage area where the license file is located. By storing the license file in non-volatile memory, the authorization status is not lost after the device is powered off and restarted, maintaining the continuity of function control. By reading the file header information in advance, obvious file format errors can be identified in the early stage of verification, avoiding subsequent invalid calculations and improving verification efficiency.
[0055] In step S62, the integrity verification is a verification process to check whether the License file has been corrupted or tampered with during storage or transmission. File verification information is extracted from the License file, and the file verification information is a verification value calculated based on the file data content during the License file generation stage.
[0056] The function activation module 110 uses the same verification algorithm as the license file generation stage to recalculate the data content in the license file and generate a current verification value. The function activation module 110 compares the current verification value with the original verification value in the file verification information. When the two match, the license file is determined to have passed the integrity verification; when the two do not match, the license file integrity verification is determined to have failed, the subsequent verification process is terminated, and a data anomaly message is output.
[0057] The verification algorithm includes either a Cyclic Redundancy Check (CR) algorithm or a hash digest algorithm. The CR algorithm generates a fixed-length checksum to detect bit errors during data transmission or storage; the hash digest algorithm generates a unique digital fingerprint of the data content to detect data tampering. Through integrity verification, data corruption caused by storage failures, transmission errors, or malicious tampering can be eliminated before authorized data decryption, preventing invalid data from entering subsequent decryption and comparison processes, thus improving system security and reliability.
[0058] In step S63, the encrypted data in the License file is decrypted to extract the authorization information. The encrypted data in the License file is ciphertext data formed by processing the authorization data structure using an asymmetric encryption algorithm. The function activation module 110 extracts the encrypted data from the License file and calls the asymmetric decryption algorithm to perform decryption operations on the encrypted data.
[0059] The asymmetric decryption algorithm is implemented based on a public-key and private-key pair. The camera device 100 holds the public key, and the authorization generation device 200 holds the private key. The function activation module 110 uses the public key to decrypt the encrypted data. The decryption process is the standard operation procedure of the asymmetric decryption algorithm. The public key and the private key have a mathematical correspondence, and data encrypted with the private key can only be decrypted and verified by the corresponding public key. After successful decryption, the function activation module 110 extracts the authorization information from the decryption result. The authorization information includes the device's unique identifier, function activation flag, function version configuration data, and authorization extension information. The authorization extension information includes the authorization validity period, authorized function combination, or authorization frequency limit. When the decryption process fails, including situations such as a mismatch between the public key and the encrypted data, an incorrect ciphertext format, or an abnormal decryption operation, the function activation module 110 determines that the authorization content is invalid, terminates the subsequent verification process, and outputs a decryption failure message.
[0060] By using a public key for decryption and verification on the device side, instead of using a private key for encryption, it is ensured that the camera device 100 only has authorization verification capabilities and not authorization forgery capabilities. Even if the public key is extracted, it cannot be used to generate valid authorization data, fundamentally preventing the illegal copying and forgery of authorization files and safeguarding the security boundary of the authorization system.
[0061] In step S64, the current unique device identifier information of the camera device 100 is obtained and compared with the unique device identifier information recorded in the authorization information. After decrypting and extracting the authorization information, the function activation module 110 obtains the current unique device identifier information of the camera device 100. The method for obtaining the current unique device identifier information is consistent with the method described in step S10, including but not limited to reading the internal identifier register of the processor, accessing the serial number storage area in the non-volatile memory, or querying the address register of the network interface controller.
[0062] The function activation module 110 compares the current device unique identifier information with the device unique identifier information recorded in the authorization information one by one. The comparison process is a precise matching of each character or each digit value. When the current device unique identifier information is completely consistent with the device unique identifier information in the authorization information, the device identifier is determined to match; when there is any difference between the two, it is determined to be a device identifier mismatch state, the subsequent verification process is terminated and an identifier mismatch prompt is output.
[0063] By binding and comparing authorization information with the device's unique identifier, it is ensured that the same authorization file can only pass verification on the specific device corresponding to which the authorization file was generated. Even if the authorization file is copied to other devices, it will be judged as a mismatch during the comparison process because the device's unique identifier information is different. This effectively prevents the unauthorized use of authorization files across devices and protects the device exclusivity of authorization management.
[0064] In step S65, the validity of the authorization information is determined. This validity determination is a comprehensive assessment of whether the content of the authorization information itself meets preset authorization conditions after the authorization information has passed the aforementioned integrity verification, decryption processing, and device identifier comparison. The function activation module 110 verifies the function enable flag in the authorization information, checking whether the function enable flag is in a valid state indicating that the NDI function module 120 is allowed to be enabled. When the function enable flag is invalid or indicates that it is prohibited from being enabled, the authorization is determined to be invalid.
[0065] The function activation module 110 verifies the function version configuration data in the authorization information, checking whether the function version configuration data is compatible with the version of the NDI function module 120 integrated in the current unified firmware. When the version identified by the function version configuration data does not match the current device software version, the authorization is deemed invalid or a version incompatibility message is output. When the authorization information includes an authorization validity period, the function activation module 110 obtains the current system time and compares the current system time with the authorization validity period. When the current system time exceeds the valid time range defined by the authorization validity period, the authorization is deemed expired and invalid.
[0066] When the authorization information includes an authorization count limit, the function activation module 110 reads the authorization activation count recorded in the non-volatile memory and compares the authorization activation count with the authorization count limit. If the authorization activation count reaches or exceeds the authorization count limit, the authorization is deemed invalid. If the function activation flag in the authorization information is valid, the function version is compatible, and the authorization validity period and authorization count limit have not expired, the function activation module 110 determines the authorization information is valid and outputs an authorization valid status. Otherwise, it outputs the corresponding authorization invalid or abnormal status.
[0067] By using multi-dimensional validity assessments, we ensure that the authorization not only has the correct file format and the correct device binding relationship, but also meets the actual authorization usage conditions, preventing the authorization file from being used beyond the scope or duration of authorization, thus achieving refined control of authorization management.
[0068] By directly linking the authorization verification result to the loading status of the functional module, mandatory control over the operation of the function is achieved through the authorization status. When the authorization is valid, the functional module loads and runs normally; when the authorization is invalid, the functional module is forcibly prohibited from running, ensuring that the function is always in an authorized and controllable state and preventing the use of unauthorized functions.
[0069] In this embodiment, when the verification result determines that the authorization is valid, the function activation module 110 loads and enables the NDI function module 120; when the verification result determines that the authorization is invalid or abnormal, the function activation module 110 prohibits the loading of the NDI function module 120.
[0070] When the verification result determines that the authorization is valid, the function activation module 110 executes the loading process of the NDI function module 120. The loading process includes: the function activation module 110 locating the code storage area of the NDI function module 120 in the unified firmware, calling the system dynamic link library loading interface to load the code of the NDI function module 120 into the execution area of the volatile memory, executing the initialization function of the NDI function module 120, and configuring the required operating parameters and network interface parameters of the NDI function module 120. After initialization, the NDI function module 120 is in a ready-to-run state, and the camera device 100 has the ability to transmit network video via the NDI protocol.
[0071] When the verification result determines that the authorization is invalid or abnormal, the function activation module 110 executes a loading prohibition process. The loading prohibition process includes: the function activation module 110 skips the loading step of the NDI function module 120, and does not execute the code loading and initialization operations of the NDI function module 120; if the NDI function module 120 has already been loaded when the authorization was valid, the function activation module 110 calls the system process termination interface or module unloading interface to terminate the running process of the NDI function module 120 and release the system resources it occupies, including memory space, network ports, and processor execution time. After loading is prohibited, the function activation module 110 maintains monitoring of the License file, and restarts the verification process when a new License file is detected being imported.
[0072] By directly linking the authorization verification result to the loading status of the functional module, mandatory control over the operation of the function is achieved through the authorization status. When the authorization is valid, the functional module loads and runs normally; when the authorization is invalid, the functional module is forcibly prohibited from running, ensuring that the function is always in an authorized and controllable state and preventing the use of unauthorized functions.
[0073] In this embodiment, when the NDI function module 120 is loaded and enabled, the management interface of the camera device 100 displays the corresponding function entry and version information; when the NDI function module 120 is disabled, the management interface hides the corresponding function entry. The management interface is an interactive interface provided by the camera device 100 for users to view device status, configure device parameters, and monitor device operation. The management interface includes a web management interface or a local graphical interface. The management interface is rendered by the interface management module in the unified firmware, and the function activation module 110 establishes a status communication connection with the interface management module.
[0074] When the NDI function module 120 is loaded and enabled, the function activation module 110 sends a function activation status notification to the interface management module. This notification includes the NDI function identifier and the currently enabled version information. Upon receiving the notification, the interface management module renders and displays the corresponding function entry in the function configuration area of the management interface. This function entry is an interactive element for users to access the NDI function configuration page. Simultaneously, the interface management module displays the version information in the adjacent area of the function entry. This version information is the version number identifier of the currently enabled NDI function module 120, used to inform the user of the NDI function version currently running on the device.
[0075] When the NDI function module 120 is disabled from loading, the function activation module 110 sends a function disable status notification to the interface management module. This notification includes an NDI function identifier and a disable reason identifier. Upon receiving the notification, the interface management module removes or hides the corresponding function entry in the function configuration area of the management interface, making the NDI function's configuration options invisible to the user when browsing the management interface. Simultaneously, the interface management module may display an "Authorization Not Enabled" status prompt in the system log or status prompt area to inform the user that the device has not yet obtained NDI function authorization.
[0076] The function activation module 110 continuously monitors the authorization status of the license file during the operation of the camera device 100. When the authorization status changes, such as the license expiring or a new valid license being imported, the function activation module 110 immediately updates the control status of the NDI function module 120 and simultaneously sends a status update notification to the interface management module. The interface management module dynamically adjusts the display or hiding status of the function entry based on the status update notification. Through the linkage control between the authorization status and the display status of the management interface, intuitive and visual management of device function configuration is achieved. Users can intuitively understand whether the current device has NDI function authorization and corresponding version information through the management interface, avoiding invalid function configuration operations when the user is not authorized. At the same time, through the dynamic linkage mechanism, it is ensured that the function options presented in the management interface are consistent with the actual authorization status of the device in real time, improving the convenience of user operation and the standardization of device management.
[0077] like Figure 2 As shown, the present invention provides a preferred embodiment of a software function activation system based on unified firmware.
[0078] A software function activation system based on unified firmware, applicable to a camera device 100, includes: a camera device 100 running unified firmware, the unified firmware including a function activation module 110 and an NDI function module 120, the function activation module 110 and the NDI function module 120 being independently configured; and an authorization generation device 200 for receiving an authorization request file, generating a license file, and outputting it to the camera device 100; wherein, the function activation module 110 is used to obtain the unique device identifier information of the camera device 100, generate an authorization request file using a symmetric encryption algorithm, and send it to the authorization generation device 200; the authorization generation device 200 decrypts the authorization request file using a symmetric decryption algorithm, and combines the unique device identifier information with authorization control information to generate the license file using an asymmetric encryption algorithm; the function activation module 110 verifies the imported license file and controls the loading and running state of the NDI function module 120 according to the verification result.
[0079] Specifically, a software function activation system based on unified firmware is applicable to camera device 100, including camera device 100 and license generation device 200.
[0080] The camera device 100 includes a processor, a memory, and a network communication interface. The processor executes program instructions in the unified firmware. The memory includes volatile memory and non-volatile memory; the non-volatile memory is used to persistently store the unified firmware, the license file, and the pre-shared key. The network communication interface is used for data communication with the license generation device 200.
[0081] The unified firmware includes a function activation module 110 and an NDI function module 120, which are set independently. The NDI function module 120 contains an NDI protocol stack implementation for network video transmission; its operating status is controlled by the function activation module 110. The function activation module 110 is used to acquire authorization information, perform encryption calculations, verify licenses, and control functions, and continuously monitors the authorization status during device operation.
[0082] The function activation module 110 includes a device identifier acquisition unit, a request generation unit, a license verification unit, and a function control unit. The device identifier acquisition unit acquires the unique identifier information of the device and outputs it to the request generation unit. The request generation unit generates original authorization request data based on the unique identifier information of the device, encrypts it using a pre-shared key and a symmetric encryption algorithm, encapsulates it into an authorization request file, and sends it to the authorization generation device 200. The license verification unit sequentially performs integrity verification, public key decryption, device identifier comparison, and validity judgment on the imported license file, and outputs the verification result. The function control unit controls the loading and running status of the NDI function module 120 according to the verification result and sends a status notification to the interface management module.
[0083] The authorization generation device 200 includes a processing unit, a storage unit, a communication unit, and a secure storage unit. The secure storage unit stores the pre-shared key and the private key for the asymmetric encryption algorithm. The authorization generation device 200 includes a request decryption unit, an authorization combination unit, and a license generation unit. The request decryption unit uses the pre-shared key to decrypt the authorization request file using a symmetric decryption algorithm, extracting the device's unique identifier information. The authorization combination unit combines the device's unique identifier information with authorization control information to generate an authorization data structure. The license generation unit uses the private key to encrypt and sign the authorization data structure using an asymmetric encryption algorithm, generating a license file and sending it to the camera device 100.
[0084] Data flow includes the following stages: A. Authorization request generation stage: The function activation module 110 on the camera device 100 side obtains the device's unique identification information, generates an authorization request file through symmetric encryption, and sends it to the authorization generation device 200.
[0085] B. Authorization generation stage: The authorization generation device 200 extracts the unique identification information of the device through symmetric decryption, combines it with the authorization control information, generates a License file through asymmetric encryption, and returns it to the camera device 100.
[0086] C. Authorization Verification Phase: The function activation module 110 of the camera device 100 performs integrity verification, public key decryption, device identification comparison, and validity judgment on the License file.
[0087] D. Function control stage: The function control unit loads and enables or disables the loading of the NDI function module 120 according to the verification results, and synchronously updates the function entry display status of the management interface.
[0088] The function activation module 110, the authorization generation device 200, and the function control logic constitute an integrated authorization management system. Authorization request generation, authorization file generation, and authorization verification employ a consistent data structure and processing rules, ensuring that the authorization status is consistent with the function module loading status and interface display status. By independently configuring the function activation module 110 and the NDI function module 120 within a unified firmware, function authorization and function modules are decoupled. The security and unforgeability of authorization data are ensured through device unique identifier binding and a multi-layered encryption mechanism combining symmetric and asymmetric encryption. A systematic module division and clear data flow paths achieve complete closed-loop management from authorization request generation to function control.
[0089] The above description is merely the preferred embodiment of the present invention and is not intended to limit the scope of the present invention. All equivalent changes or modifications made in accordance with the claims of the present invention are covered by the present invention.
Claims
1. A software function activation method based on unified firmware, applicable to camera equipment, characterized in that, The camera device runs unified firmware, which includes a function activation module and an NDI function module. The function activation module and the NDI function module are set independently. The method includes the following steps: Obtain the unique device identifier information of the camera device; The original authorization request data containing the unique identifier information of the device is encrypted using a symmetric encryption algorithm to generate an authorization request file; The authorization request file is sent to the authorization generation device, which uses a symmetric decryption algorithm corresponding to the symmetric encryption algorithm to decrypt the authorization request file and obtain the device's unique identifier information. The authorization generation device acquires pre-configured authorization control information, which includes at least a function enable flag and function version configuration data, for controlling the enable status and function version of the NDI function module. The device unique identifier information is combined with the authorization control information to generate an authorization data structure. The authorized data structure is encrypted using an asymmetric encryption algorithm to generate a License file; The License file is imported into the camera device. The function activation module performs verification processing on the License file, which includes integrity verification, decryption processing, device identification comparison, and validity judgment. Based on the verification result of the verification process, control the loading and running status of the NDI functional module; The symmetric encryption algorithm is based on a pre-shared key, which is shared in advance by the camera device and the authorization generation device; the symmetric decryption algorithm matches the symmetric encryption algorithm and shares the pre-shared key; the asymmetric encryption algorithm is based on a public key and a private key pair.
2. The software function activation method according to claim 1, characterized in that, The function activation module and the NDI function module are independently set in the unified firmware. The function activation module verifies the license file during the operation of the camera device and controls the loading and running status of the NDI function module according to the verification result.
3. The software function activation method according to claim 1 or 2, characterized in that, The unique device identification information includes at least one of the following: chip identifier, serial number, or media access control address.
4. The software function activation method according to claim 1, characterized in that, The pre-shared key is pre-set in the camera device through factory batch burning, after-sales configuration, or user self-binding.
5. The software function activation method according to claim 1, characterized in that, The authorization generation device holds the private key, and the camera device holds the public key to perform the verification process.
6. The software function activation method according to claim 1, characterized in that, The asymmetric encryption algorithm is the RSA algorithm. The RSA algorithm generates an algorithm modulus based on two large prime numbers, and generates a public key and a private key based on the algorithm modulus. The public key contains the algorithm modulus and the encryption exponent, and the private key contains the algorithm modulus and the decryption exponent.
7. The software function activation method according to claim 1, characterized in that, The verification process includes: Read the license file from the non-volatile memory of the camera device; Perform an integrity check on the license file; The encrypted data in the License file is decrypted to extract the authorization information; Obtain the current unique device identifier information of the camera device and compare it with the unique device identifier information recorded in the authorization information; Determine the validity of the authorization information.
8. The software function activation method according to claim 7, characterized in that, When the verification result determines that the authorization is valid, the function activation module loads and enables the NDI function module; when the verification result determines that the authorization is invalid or abnormal, the function activation module prohibits the loading of the NDI function module.
9. The software function activation method according to claim 8, characterized in that, When the NDI function module is loaded and enabled, the management interface of the camera device displays the corresponding function entry and version information; when the NDI function module is disabled, the management interface hides the corresponding function entry.
10. A software function activation system based on unified firmware, applicable to camera equipment, characterized in that, include: A camera device running unified firmware, the unified firmware including a function activation module and an NDI function module, the function activation module and the NDI function module being set independently; The license generation device is used to receive an license request file, generate a license file, and output it to the camera device. The function activation module is used to obtain the unique device identifier information of the camera device, generate an authorization request file using a symmetric encryption algorithm, and send it to the authorization generation device. The authorization generation device decrypts the authorization request file using a symmetric decryption algorithm, combines the unique device identifier information and authorization control information, and generates the license file using an asymmetric encryption algorithm. The function activation module verifies the imported license file and controls the loading and running status of the NDI function module based on the verification result.
