Usage permission verification method and device, software use method and device and terminal equipment
By obtaining hardware information from the terminal device and verifying it using the SM3 algorithm, the dynamic link library only executes operation calls on authorized devices, solving the problem of unrestricted dynamic link library usage permissions and ensuring the security and integrity of user data.
Patent Information
- Application Number
- CN202511026000.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-07-24
- Publication Date
- 2025-09-30
AI Technical Summary
In traditional middleware design, the use permissions of dynamic link libraries are not strictly restricted, resulting in a high risk of data leakage or tampering, making it difficult to ensure the security and integrity of user data.
By obtaining the device hardware information of the terminal device, using the SM3 algorithm to calculate the check value, and comparing it with the pre-stored value, the operation call is executed only when the check passes, ensuring that the dynamic link library works normally on the authorized device and preventing illegal operations.
Effectively prevent third-party software and supporting physical equipment from being stolen, stop tampering with user data and cloning cards, and ensure the security and integrity of user data.
Smart Images

Figure CN120724418A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to a method for verifying usage rights, a method for using software, an apparatus and a terminal device. Background Art
[0002] In the software development field, dynamic link libraries (DLLs), a common technology for sharing functional modules, are widely used in middleware development to achieve code reuse and functional decoupling. In traditional middleware design and use, third-party software can directly operate physical devices by calling interface functions in the DLL, performing key operations such as reading, writing, deleting, or rewriting data in the computer. Summary of the Invention
[0003] The purpose of this application is to provide a usage permission verification method, software usage method, device and terminal device to solve the problem that traditional data operations rely solely on physical devices as security barriers, which are prone to data leakage or data tampering.
[0004] In a first aspect, an embodiment of the present application provides a method for verifying usage rights, which is applied to a dynamic link library in a terminal device. The method comprises: in response to receiving an operation call from application software in the terminal device, obtaining device hardware information of the terminal device; obtaining a check value for the terminal device based on the device hardware information; and using the check value to verify the usage rights of the dynamic link library. A pre-stored value for the terminal device is read from a configuration file of the terminal device. The pre-stored value is a standard value for verifying the usage rights of the dynamic link library. If the check value is consistent with the pre-stored value, executing the operation call of the application software.
[0005] The usage permission verification method provided in the embodiment of the present application is that the dynamic link library uses the device hardware information of the terminal device to perform permission verification on the operation call of the application software in the terminal device. Only when the permission verification is passed will the operation call of the application software be executed. This can ensure that the dynamic link library can work normally and the operation call of the application software can be executed only on the terminal device that is authorized for use. This can effectively prevent third-party software and supporting physical devices containing the dynamic link library from being obtained by others, preventing others from using the dynamic link library to perform actions such as tampering with user data and cloning cards, thereby ensuring the security and integrity of user data.
[0006] In one possible implementation, the device hardware information includes the terminal device's BIOS serial number and hard disk serial number. And / or obtaining a checksum value for the terminal device based on the device hardware information includes: concatenating the device hardware information and a preset identifier in a preset concatenation sequence to obtain a unique identification string for the terminal device; and calculating the unique identification string to obtain the checksum value.
[0007] A possible implementation manner is to calculate the unique identification string to obtain a check value, including: using an SM3 algorithm to calculate the unique identification string to obtain a check value.
[0008] A possible implementation method for obtaining device hardware information of a terminal device includes: based on an operation call, starting a terminal process corresponding to the operation call in the terminal device, and obtaining the device hardware information obtained by the terminal process executing a device information obtaining command.
[0009] In a possible implementation, the device hardware information is transmitted by the terminal process to the dynamic link library through a pipeline in the terminal device.
[0010] In a possible implementation, the usage permission verification method provided in the embodiment of the present application further includes: if the check value is different from the pre-stored value, returning an error signal and terminating the operation call of the application software.
[0011] In a possible implementation, the terminal device is used to connect to a card reader and / or a smart card, and executing the operation call of the application software includes: operating the security module of the card reader and / or the smart card through a dynamic link library.
[0012] In one possible implementation, obtaining device hardware information of a terminal device includes: an interface function of a dynamic link library, in response to an operation call, creating a terminal process. The terminal process executes a device information acquisition command to obtain the device hardware information of the terminal device. The terminal process transmits the device hardware information to the dynamic link library via a pipeline in the terminal device.
[0013] In a second aspect, embodiments of the present application provide a software usage method, applied to application software in a terminal device. The method comprises: in response to a service request submitted by a user through the terminal device, calling a dynamic link library in the terminal device, wherein the dynamic link library executes the usage permission verification method of the first aspect and any possible implementation of the first aspect.
[0014] In the software usage method provided in the embodiments of the present application, application software running on a terminal device calls a dynamic link library in the terminal device in response to a business request submitted by a user, thereby triggering a dynamic link library usage permission verification process. Only after the dynamic link library verifies that the terminal device is an authorized terminal device using the device hardware information of the terminal device can the application software call the dynamic link library to complete the user's operation on the security module and / or smart card in the card reader. This effectively prevents third-party software containing the dynamic link library and its supporting physical devices from being misused after being obtained by others, and prevents others from using the dynamic link library to tamper with user data, clone cards, and other activities, thereby ensuring the security and integrity of user data.
[0015] In a third aspect, an embodiment of the present application provides a usage authorization verification device, which is applied to a dynamic link library in a terminal device. The device includes: an acquisition module, a calculation module, a reading module, and an execution module.
[0016] The acquisition module is used to acquire the device hardware information of the terminal device in response to receiving an operation call from the application software in the terminal device.
[0017] The calculation module is used to obtain the checksum of the terminal device based on the device hardware information. The checksum is used to verify the use permission of the dynamic link library.
[0018] The reading module is used to read the pre-stored value of the terminal device from the configuration file of the terminal device. The pre-stored value is the standard value for the use permission verification of the dynamic link library.
[0019] The execution module is used to execute the operation call of the application software when the verification value is consistent with the pre-stored value.
[0020] In a fourth aspect, embodiments of the present application provide a software usage device for application software in a terminal device. The device includes a calling module configured to call a dynamic link library in the terminal device in response to a service request submitted by the terminal device, wherein the dynamic link library executes the first aspect and any possible method of the first aspect.
[0021] In a fifth aspect, embodiments of the present application provide a terminal device having the functionality to implement the first aspect or any possible implementation of the first aspect, or the second aspect or any possible implementation of the second aspect. The functionality can be implemented via hardware, or via hardware executing corresponding software. The hardware or software includes one or more modules corresponding to the functionality described above.
[0022] In a sixth aspect, an embodiment of the present application provides a computer-readable storage medium, which stores instructions. When the computer-readable storage medium is run on a computer, the computer can execute the above-mentioned first aspect or any possible implementation of the first aspect or the second aspect or any possible implementation of the second aspect.
[0023] In the seventh aspect, an embodiment of the present application provides a computer program product comprising instructions, which, when run on a computer, enables the computer to execute the method of the above-mentioned first aspect or any possible implementation of the first aspect or the second aspect or any possible implementation of the second aspect.
[0024] Among them, the technical effects brought about by any design method in the third to seventh aspects can refer to the technical effects brought about by different possible implementation methods in the first or second aspects, and will not be repeated here. BRIEF DESCRIPTION OF THE DRAWINGS
[0025] In order to more clearly illustrate the specific implementation methods of the present application or the technical solutions in the prior art, the following is a brief introduction to the drawings required for use in the specific implementation methods or the description of the prior art. Obviously, the drawings described below are some implementation methods of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without any creative work.
[0026] Figure 1 A schematic diagram of the structure of a usage authorization verification system provided in an embodiment of the present application; Figure 2 A schematic diagram of the structure of a terminal device provided in an embodiment of the present application; Figure 3 A flowchart of a method for verifying user rights provided in an embodiment of the present application; Figure 4 A schematic diagram of the structure of a usage authorization verification device provided in an embodiment of the present application; Figure 5 Another structural diagram of a usage authorization verification device provided in an embodiment of the present application; Figure 6 Another structural diagram of a usage authority verification system provided in an embodiment of the present application. DETAILED DESCRIPTION
[0027] To make the objectives, technical solutions, and advantages of the embodiments of the present application more clear, the technical solutions in the embodiments of the present application will be clearly and completely described below in conjunction with the accompanying drawings of the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Generally, the components of the embodiments of the present application described and shown in the drawings herein can be arranged and designed in various different configurations.
[0028] Therefore, the following detailed description of the embodiments of the present application provided in the accompanying drawings is not intended to limit the scope of the present application for protection, but merely represents selected embodiments of the present application. All other embodiments obtained by persons of ordinary skill in the art based on the embodiments in the present application without creative work are within the scope of protection of the present application.
[0029] As a crucial component of software systems, dynamic link libraries (DLLs) typically contain a series of interface functions that can be called by application software. These interface functions often involve operations on underlying system resources, hardware devices, and sensitive data. For example, in financial applications, DLLs may be used to process smart card information, encrypt transaction data, and perform other important operations. Without strict restrictions on access to DLLs, if third-party software containing the DLLs and their accompanying physical devices are obtained by others, they can run the software on any computer and exploit the DLLs to perform illegal operations, leading to data leakage or financial loss. For example, a DLL could be used to illegally read smart card information and clone the card, or the software could be run directly on any computer to tamper with user data.
[0030] Based on this, an embodiment of the present application provides a method for verifying usage rights, which is applied to a dynamic link library in a terminal device. The method for verifying usage rights includes: in response to receiving an operation call from application software in the terminal device, obtaining device hardware information of the terminal device. A check value of the terminal device is obtained based on the device hardware information. The check value is used to verify the usage rights of the dynamic link library. A pre-stored value of the terminal device is read from a configuration file of the terminal device. The pre-stored value is a standard value for verifying the usage rights of the dynamic link library. If the check value is consistent with the pre-stored value, the operation call of the application software is executed.
[0031] The dynamic link library in this application is released as an independently executable program. In some embodiments, the application software and the dynamic link library can be developed by different companies, and the application software operates the security module in the card reader and / or the smart card interacting with the card reader by calling the dynamic link library.
[0032] The usage permission verification method provided in the embodiment of the present application is that the dynamic link library uses the device hardware information of the terminal device to perform permission verification on the operation call of the application software in the terminal device. Only when the permission verification is passed will the operation call of the application software be executed to meet the user's business needs. It can ensure that the dynamic link library can work normally and the operation call of the application software can be executed only on the terminal device that is authorized for use. It can effectively prevent the application software and the supporting physical devices containing the dynamic link library from being stolen after being obtained by others, and prevent others from using the dynamic link library to perform actions such as tampering with user data and cloning cards, thereby ensuring the security and integrity of user data.
[0033] In some embodiments, the dynamic link library includes multiple interface functions. When any one of the interface functions is called, the interface function will start an independent terminal process to obtain device hardware information. In the present application, the interface function obtains the device hardware information of the terminal device, such as the BIOS serial number and the disk serial number, by creating and starting an independent terminal process. Starting an independent process can avoid being affected by the application software and prevent abnormal problems that occur through traditional device hardware information acquisition methods, thereby improving the stability and compatibility of the dynamic link library. For example, in the traditional method of obtaining device hardware information through COM components, the COM component can only be initialized once in each process. If the application software has already initialized the COM component, there will be an abnormality when the dynamic link library is initialized again.
[0034] In some embodiments, this application uses the SM3 algorithm to calculate the check value, effectively preventing the check value from being reverse-engineered, making it more difficult for attackers to forge legitimate terminal devices and improving the security of user rights verification. For example, even if an attacker obtains the check value, it is difficult to obtain the original identifier through reverse calculation, making it difficult to forge a legitimate device and bypass the verification mechanism.
[0035] The method provided in the embodiments of the present application will be described below with reference to the accompanying drawings.
[0036] On the one hand, the embodiment of the present application provides a system for verifying user rights. Figure 1 As shown, the use authorization verification system 100 includes a terminal device 101, a card reader 102, and a smart card 103. The terminal device 101 is in communication connection with the card reader 102, and the card reader 102 is in communication connection with the smart card 103.
[0037] The application software in the terminal device 101 is used to provide an interactive interface for the user, and receives the user's business needs through this interactive interface. After receiving the business needs submitted by the user, the application software and dynamic link library installed on the terminal device use the permission verification method provided in the embodiment of the present application to verify the use permission of the dynamic link library in the terminal device. If the use permission verification passes, the user's business needs are completed, such as reading or updating data stored in the security module of the card reader 102, and reading, updating, or deleting operations on the smart card 103 through the card reader 102.
[0038] The card reader 102 can be used to provide a physical interface, enabling the terminal device 101 to communicate with the smart card 103 through this physical interface, thereby completing the reading or updating of data in the smart card 103. The card reader 102 has an integrated security module that can perform operations such as encryption, decryption, and digital signature, thereby ensuring the security and integrity of data during interaction with the terminal device 101 and the smart card 103.
[0039] The smart card 103 is used to store sensitive information such as the user's personal information and account data.
[0040] It should be noted that the above Figure 1 The illustrated usage authorization verification system 100 is merely an example of an application scenario of the present application solution, and is not intended to limit the application scenario of the present application solution.
[0041] On the other hand, the embodiment of the present application provides a terminal device 101. Figure 2 As shown, the terminal device 101 may include application software 201 and a dynamic link library 202 .
[0042] Among them, the application software 201 is used to respond to the user's business needs, and through the use permission verification method provided in the embodiment of the present application, operate the security module and / or smart card of the card reader through the dynamic link library to complete the business needs.
[0043] Upon receiving an operation call submitted by the application software, the dynamic link library 202 is used to verify the dynamic link library's usage permissions using the terminal device's hardware information through the usage permission verification method provided in the embodiments of the present application. This method restricts the dynamic link library's use to designated terminal devices and prevents it from being used on undesignated terminal devices. After the usage permission verification is successful, the application software's operation call is executed to operate the card reader's security module and / or smart card to meet the user's business needs.
[0044] It should be noted that the above Figure 2 The illustrated terminal device 101 is merely an example of an application scenario of the solution of the present application, and is not intended to limit the application scenario of the solution of the present application.
[0045] On the one hand, the embodiment of the present application provides a method for verifying the use of authority, which can be deployed by Figure 2 The terminal device 101 shown Figure 1 The use authorization verification system 100 shown is executed. Figure 3 As shown, the method may include the following steps.
[0046] S301 , the application software calls a dynamic link library in the terminal device in response to a business demand submitted by a user through the terminal device.
[0047] Specifically, the user submits a business request through the interactive interface provided by the application software in the terminal device. The application software responds to the business request by analyzing and processing the business request based on preset business rules and logic, and calls the dynamic link library in the terminal device.
[0048] For example, the business requirement may be to modify user data in a smart card through a card reader, or to activate a card through a card reader.
[0049] S302 : The dynamic link library obtains device hardware information of the terminal device in response to receiving an operation call from application software in the terminal device.
[0050] The device hardware information includes the BIOS serial number and hard disk serial number of the terminal device.
[0051] Specifically, in response to an operation call received from application software on a terminal device, the dynamic link library creates a terminal process corresponding to the operation call on the terminal device. The terminal process executes a device information acquisition command to obtain the device hardware information of the terminal device. The terminal process then transmits the device hardware information to the dynamic link library via a pipeline in the terminal device. The dynamic link library receives the device hardware information.
[0052] In one possible implementation, an interface function in a dynamic link library (DLL) responds to an operation call from application software on a terminal device and creates an independent terminal process on the terminal device. This independent terminal process then executes a WMIC command to retrieve the terminal device's BIOS serial number and disk serial number. The independent terminal process then transmits the retrieved BIOS serial number and disk serial number to the DLL via a pipe between the DLL and the terminal device. The DLL then receives the BIOS serial number and disk serial number from the terminal device.
[0053] In this process, the interface function obtains the BIOS serial number and disk serial number of the terminal device by creating and starting an independent terminal process. The independent terminal process can prevent abnormal problems that may occur through traditional device hardware information acquisition methods, making the dynamic link library more stable and compatible.
[0054] S303, the dynamic link library obtains the checksum of the terminal device according to the device hardware information.
[0055] The checksum is used to check the permission to use the dynamic link library.
[0056] Specifically, after obtaining the device hardware information, the dynamic link library concatenates the device hardware information and the preset identifier according to a preset concatenation order to obtain a unique identification string for the terminal device, and calculates the unique identification string to obtain a check value.
[0057] One possible implementation method is that the dynamic link library concatenates the BIOS serial number, disk serial number and preset identifier in a preset specific order to obtain a unique identification string of the terminal device, uses the SM3 algorithm to calculate the unique identification string, and calculates the hash value of the unique identification string, which is the check value.
[0058] This application uses the terminal device's BIOS serial number, disk serial number, and preset identifier as the basis for verifying the dynamic link library usage rights in the terminal device, and concatenates the BIOS serial number, disk serial number, and preset identifier in a preset specific order to obtain a unique identifier for the terminal device. This unique identifier can accurately identify a specific terminal device. At the same time, by combining the SM3 algorithm to obtain a check value, it can effectively prevent the check value from being reverse-engineered, increasing the difficulty for attackers to forge legitimate terminal devices and improving the security of usage permission verification. For example, even if an attacker obtains the check value, it is difficult to obtain the original identifier used to calculate the hash value through inverse operations, making it impossible to easily forge a legitimate device to bypass the verification mechanism.
[0059] S304: The dynamic link library reads a pre-stored value of the terminal device from a configuration file of the terminal device.
[0060] The pre-stored value is a standard value for verifying the use permission of the dynamic link library. The pre-stored value may be pre-set during initial installation or configuration of the terminal device and stored in a configuration file of the terminal device.
[0061] In a possible implementation, the dynamic link library may access the configuration file of the terminal device through a specific file reading interface and path, and read the pre-stored value of the terminal device from the configuration file.
[0062] S305 , when the check value is consistent with the pre-stored value, the dynamic link library executes the operation call of the application software.
[0063] Specifically, after obtaining the checksum and pre-stored values, the dynamic link library compares them. If the checksum matches the pre-stored value, the terminal device is confirmed to be authorized and meets the required usage rights. The dynamic link library then executes the application software's operation call to complete the corresponding functional operation.
[0064] Furthermore, if the checksum is different from the pre-stored value, the dynamic link library can determine that the terminal device is an unauthorized device and does not meet the usage permission requirements. The dynamic link library will return an error signal to the application software and terminate the application software's operation call.
[0065] During this process, the dynamic link library uses the terminal device's hardware information to perform permission checks on the application software's operation calls in the terminal device. The application software's operation calls will only be executed if the permission check passes. By restricting the use of the dynamic link library, it can be ensured that the dynamic link library can only work properly and execute the application software's operation calls on authorized terminal devices. The use of the dynamic link library is restricted on unauthorized terminal devices.
[0066] S306, the application software calls the dynamic link library to meet the user's business needs.
[0067] Specifically, after the dynamic link library responds to the application's operation call, the application will receive relevant execution result feedback. Based on the result feedback, the application can further complete subsequent operations to meet the user's business needs and display the business operation results to the user through the interactive interface.
[0068] In one possible implementation, the application software operates the security module of the card reader and / or the smart card through a dynamic link library.
[0069] For example, application software can use a dynamic link library to operate the card reader's security module, such as verifying the card reader's legitimacy and encrypting transmitted data, to ensure that data in the card reader can be securely used in business operations. Application software can also use the dynamic link library to perform corresponding operations on smart cards, such as reading or updating user information in the smart card and executing cryptographic signatures, to meet smart card-based business needs such as identity authentication and payment authorization.
[0070] The above mainly introduces the solution provided by the embodiment of the present application from the perspective of the working principle of the device. It is understandable that in order to implement the above functions, the permission verification device includes hardware structures and / or software modules corresponding to the execution of each function. Those skilled in the art should easily realize that, in combination with the algorithm steps of each example described in the embodiments disclosed herein, the present application can be implemented in the form of hardware or a combination of hardware and computer software. Whether a function is executed in the form of hardware or computer software driving hardware depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this application.
[0071] In the embodiment of the present application, the functional modules of the use authorization verification device can be divided according to the above method example. For example, each functional module can be divided according to each function, or two or more functions can be integrated into one processing module. The above integrated modules can be implemented in the form of hardware or software functional modules.
[0072] It should be noted that the division of modules in the embodiment of the present application is schematic and is only a logical function division. In actual implementation, there may be other division methods. Figure 4 A possible schematic diagram of the composition of the use authority verification device involved in the above and embodiments is shown. Figure 4As shown, the usage authorization verification device 400 may include: an acquisition module 401 , a calculation module 402 , a reading module 403 and an execution module 404 .
[0073] The acquisition module 401 is used to support the use of the authority verification device 400 to execute Figure 3 S302 in the illustrated usage authority verification method.
[0074] The calculation module 402 is used to support the use of the authority verification device 400 to execute Figure 3 S303 in the illustrated usage authority verification method.
[0075] Reading module 403, used to support the use of the authority verification device 300 to execute Figure 2 S304 in the illustrated usage authority verification method.
[0076] Execution module 404, used to support the use of the authority verification device 300 to execute Figure 2 S305 in the illustrated usage authority verification method.
[0077] In one possible implementation, the device hardware information includes the terminal device's BIOS serial number and hard disk serial number. Alternatively, the apparatus may be configured to concatenate the device hardware information and a preset identifier in a predetermined concatenation sequence to obtain a unique identification string for the terminal device. The unique identification string is then calculated to obtain a checksum.
[0078] In a possible implementation, the device can also be used to calculate the unique identification string using the SM3 algorithm to obtain a check value.
[0079] In a possible implementation, the apparatus may also be used to start a terminal process corresponding to the operation call in the terminal device based on the operation call, and obtain device hardware information obtained by the terminal process executing a device information acquisition command.
[0080] In a possible implementation, the device hardware information is transmitted by the terminal process to the dynamic link library through a pipeline in the terminal device.
[0081] In a possible implementation, the device may also be configured to return an error signal and terminate the operation call of the application software if the check value is different from the pre-stored value.
[0082] In a possible implementation, the terminal device is used to connect to a card reader and / or a smart card, and the device can also be used to operate the security module of the card reader and / or the smart card through a dynamic link library.
[0083] In one possible implementation, an interface function of a dynamic link library creates a terminal process in response to an operation call. The apparatus can also be used to cause the terminal process to execute a device information acquisition command to obtain device hardware information of the terminal device. The terminal process transmits the device hardware information to the dynamic link library via a pipeline in the terminal device.
[0084] The use authorization verification device 400 provided in the embodiment of the present application is used to perform the above Figure 3 The usage authorization verification method shown can therefore achieve the same effect as the above-mentioned usage authorization verification method.
[0085] like Figure 5 As shown, the embodiment of the present application further provides a software using device, and the software using device 500 may include: a calling module 501.
[0086] Among them, the calling module 501 is used to support the software using device 500 to execute Figure 3 S301 and S306 in the illustrated usage authority verification method.
[0087] It should be noted that all relevant contents of each step involved in the above method embodiment can be referred to the functional description of the corresponding functional module and will not be repeated here.
[0088] The software using device 500 provided in the embodiment of the present application is used to execute the above Figure 3 The usage authorization verification method shown can therefore achieve the same effect as the above-mentioned usage authorization verification method.
[0089] An embodiment of the present application also provides a terminal device, which can execute the authority verification method and related steps in the above method embodiment.
[0090] An embodiment of the present application further provides a computer-readable storage medium having instructions stored thereon, which, when executed, execute the usage authority verification method and related steps in the above method embodiment.
[0091] An embodiment of the present application also provides a computer program product. When the computer program product is run on a computer, it enables the computer to execute the permission verification method and related steps in the above method embodiment.
[0092] In some embodiments, the methods described herein may be implemented as computer program instructions encoded in a machine-readable format on a computer-readable storage medium or on other non-transitory media or articles of manufacture.
[0093] The present application also provides a system for verifying user rights 100. Figure 6As shown, the usage authorization verification system 100 includes at least one processor 601 and at least one interface circuit 602 .
[0094] As an example, when the use authorization verification system 100 includes a processor and an interface circuit, the processor may be Figure 6 The processor 601 shown in the solid line frame (or the processor 601 shown in the dotted line frame) may be Figure 6 The interface circuit 602 shown in the solid line frame (or the interface circuit 602 shown in the dotted line frame). When the use authorization verification system 100 includes two processors and two interface circuits, the two processors include Figure 6 The processor 601 shown in the solid line frame and the processor 601 shown in the dotted line frame, the two interface circuits include Figure 6 The interface circuit 602 shown in the solid line frame and the interface circuit 602 shown in the dotted line frame are not limited to this.
[0095] The processor 601 and the interface circuit 602 can be interconnected via a line. For example, the interface circuit 602 can be used to receive signals. For another example, the interface circuit 602 can be used to send signals to other devices (such as the processor 601). For example, the interface circuit 602 can read computer instructions stored in the memory and send the computer instructions to the processor 601. The processor 601 executes the instructions and, in conjunction with the input and output devices, implements the various steps in the above embodiments, such as implementing Figure 3 Of course, the use authority verification system may also include other discrete components, which are not specifically limited in the embodiments of the present application.
[0096] Through the description of the above implementation methods, technical personnel in the relevant field can clearly understand that for the convenience and simplicity of description, only the division of the above-mentioned functional modules is used as an example. In actual applications, the above-mentioned functions can be assigned to different functional modules as needed, that is, the internal structure of the device can be divided into different functional modules to complete all or part of the functions described above.
[0097] In the several embodiments provided in this application, it should be understood that the disclosed devices and methods can be implemented in other ways. For example, the device embodiments described above are merely schematic. For example, the division of the modules or units is merely a logical function division. In actual implementation, there may be other division methods, such as multiple units or components can be combined or integrated into another device, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.
[0098] The units described as separate components may or may not be physically separate, and the components shown as units may be one physical unit or multiple physical units, that is, they may be located in one place or distributed in multiple places. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0099] In addition, the functional units in the various embodiments of the present application may be integrated into a single processing unit, or each unit may exist physically separately, or two or more units may be integrated into a single unit. The aforementioned integrated units may be implemented in the form of hardware or software functional units.
[0100] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a readable storage medium. Based on this understanding, the technical solution of the embodiment of the present application is essentially or the contributing part or all or part of the technical solution can be embodied in the form of a software product, which is stored in a storage medium and includes several instructions for enabling a device (which can be a single-chip microcomputer, chip, etc.) or a processor to execute all or part of the steps of the method described in each embodiment of the present application. The aforementioned storage medium includes various media that can store program codes, such as a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk.
[0101] The above content is only a specific embodiment of this application, but the scope of protection of this application is not limited to this. Any changes or replacements within the technical scope disclosed in this application should be included in the scope of protection of this application. Therefore, the scope of protection of this application should be based on the scope of protection of the claims.
Claims
1. A method for verifying usage authority, characterized in that: A dynamic link library applied to a terminal device; the method comprises: In response to receiving an operation call from the application software in the terminal device, obtaining device hardware information of the terminal device; Obtaining a checksum value of the terminal device according to the device hardware information; the checksum value is used to verify the use permission of the dynamic link library; Reading a pre-stored value of the terminal device from a configuration file of the terminal device; the pre-stored value is a standard value for verifying the use authority of the dynamic link library; When the verification value is consistent with the pre-stored value, the operation call of the application software is executed.
2. The method according to claim 1, characterized in that The device hardware information includes the BIOS serial number and hard disk serial number of the terminal device; and / or, The obtaining the check value of the terminal device according to the device hardware information includes: Concatenating the device hardware information and a preset identifier according to a preset concatenation order to obtain a unique identification string of the terminal device; The unique identification character string is calculated to obtain the check value.
3. The method according to claim 2, characterized in that The calculating the unique identification string to obtain the check value includes: The unique identification string is calculated using the SM3 algorithm to obtain the check value.
4. The method according to claim 1, wherein The obtaining of the device hardware information of the terminal device includes: Based on the operation call, starting a terminal process corresponding to the operation call in the terminal device; The device hardware information is obtained by the terminal process executing a device information acquisition command.
5. The method according to any one of claims 1 to 4, characterized in that The device hardware information is transmitted to the dynamic link library by a terminal process through a pipeline in the terminal device.
6. The method according to any one of claims 1 to 4, characterized in that The method further comprises: If the check value is different from the pre-stored value, an error signal is returned and the operation call of the application software is terminated.
7. The method according to any one of claims 1 to 4, characterized in that: The terminal device is used to connect to a card reader and / or a smart card, and the operation call for executing the application software includes: The security module of the card reader and / or the smart card are operated through the dynamic link library.
8. The method according to any one of claims 1 to 4, characterized in that The acquiring of the device hardware information of the terminal device includes: The interface function of the dynamic link library creates a terminal process in response to the operation call; The terminal process executes a device information acquisition command to acquire device hardware information of the terminal device; The terminal process transmits the device hardware information to the dynamic link library through a pipeline in the terminal device.
9. A method for using software, characterized in that: Application software applied to a terminal device; the method comprises: In response to a business demand submitted by a user through the terminal device, a dynamic link library in the terminal device is called, wherein the dynamic link library executes the usage authority verification method according to any one of claims 1 to 8.
10. A device for verifying user rights, characterized in that: A dynamic link library applied to a terminal device; the device comprises: an acquisition module, configured to acquire device hardware information of the terminal device in response to receiving an operation call from application software in the terminal device; a calculation module, configured to obtain a checksum value of the terminal device according to the device hardware information; the checksum value is used to verify the use permission of the dynamic link library; A reading module, configured to read a pre-stored value of the terminal device from a configuration file of the terminal device; the pre-stored value is a standard value for verifying the use authority of the dynamic link library; An execution module is used to execute the operation call of the application software when the verification value is consistent with the pre-stored value.
11. A software using device, characterized in that: Application software applied to a terminal device; the device comprises: A calling module is used to call a dynamic link library in the terminal device in response to a business demand submitted by a user through the terminal device, wherein the dynamic link library executes the use authority verification method according to any one of claims 1 to 8.
12. A terminal device, characterized in that: The terminal device includes a processor and a memory, wherein the memory stores machine-executable instructions that can be executed by the processor, and the processor executes the machine-executable instructions to implement the method of any one of claims 1 to 8 or claim 9.
13. A computer-readable storage medium, characterized in that The computer-readable storage medium stores computer-executable instructions. When the computer-executable instructions are called and executed by a processor, the computer-executable instructions cause the processor to implement the method of any one of claims 1 to 8 or claim 9.