Function menu control method, device and system based on license authorization

By parsing the license data locally on the client device, the limitation of the existing technology requiring a network connection is solved, an offline authorization control function menu is realized, and the convenience and reliability of user access to the software function menu are improved.

CN115834082BActive Publication Date: 2025-09-16上海零念科技有限公司
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202211471135.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-11-23
Publication Date
2025-09-16
Estimated Expiration
2042-11-23

AI Technical Summary

Technical Problem

The existing function menu control method based on license authorization requires the client device to maintain a network connection with the server before use, which cannot meet the user's convenience and emergency needs when there is no network.

Method used

The license data is stored and parsed locally on the client device, and the encrypted user information and function permission information are obtained through the built-in decoder to implement offline authorization control function menu.

Benefits of technology

It enables timely parsing and authorization of user licenses even without a network connection, improves the efficiency and reliability of function menu control, and enhances the convenience and reliability of user access to software function menus.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115834082B_ABST
    Figure CN115834082B_ABST
Patent Text Reader

Abstract

The present application provides a method, device, and system for controlling a function menu based on license authorization. The method includes: obtaining license data of a target user, where the license data is used to represent the encrypted user information of the target user and the encrypted function permission information for the target software; determining whether the network itself is currently connected to a server, and if not, parsing the license data based on a local built-in decoder; and based on the parsed user information and function permission information, after verifying that the license data is currently valid, controlling the function menu of the target software to display the available function data for authorizing the target user to access. The present application enables the client device to parse and authorize the user license in a timely manner even when there is no network connection between the client device and the server, thereby improving the efficiency and reliability of function menu control, thereby improving the convenience, reliability, and effectiveness of user access to the software function menu, and improving the user experience.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of information processing technology, and in particular to a method, device, and system for controlling a function menu based on license authorization. Background Art

[0002] When a user accesses software, the functionality it provides depends on their access rights, which are typically granted by a server in the form of a license. License authorization typically requires the software server to verify and save certain configuration information in the license, such as the expiration date, server ID, and other configuration information. The license is then encrypted to prevent others from identifying the information contained in it, and a signature verification is performed to prevent cracking or tampering.

[0003] Currently, because software license data is stored in a server-side database, users must log in with their username and password for verification. The license data sent by the user is then compared with the data stored in the server-side database. If verification passes, the user's access rights are sent to the user, allowing the client device to control the software's function menu based on the received data to display the available functions. Therefore, existing license-based function menu control methods require a network connection between the user's client device and the software server.

[0004] Therefore, when the client device cannot communicate with the software server, the existing function menu control method based on license authorization cannot be implemented, which limits the convenience of users using the software and cannot meet the user's emergency needs for accessing the software function menu. Summary of the Invention

[0005] In view of this, embodiments of the present application provide a function menu control method, device, and system based on license authorization to eliminate or improve one or more defects in the prior art.

[0006] One aspect of the present application provides a function menu control method based on license authorization, comprising:

[0007] Acquire license data of a target user, where the license data is used to represent encrypted user information of the target user and encryption function permission information for the target software;

[0008] Determine whether the network is currently connected to the server; if not, parse the license data based on a local built-in decoder to obtain user information corresponding to the encrypted user information and function permission information corresponding to the encrypted function permission information;

[0009] Based on the user information and the function permission information, after verifying that the license data is currently valid, the function menu of the target software is controlled to display usable function data authorized for use by the target user.

[0010] In some embodiments of the present application, the license data includes: a start identifier, encrypted user data for representing the encrypted user information, encrypted function permission data for representing the encrypted function permission information, a bit check code, and an end identifier, which are arranged in sequence;

[0011] The bit check code is generated in advance based on the data length of the user data, so that when the decoder parses the license data, it first splits the encrypted user data and the encrypted function permission data according to the parsed bit check code, and then decodes the encrypted user data and the encrypted function permission data respectively.

[0012] In some embodiments of the present application, the encrypted user data and the encrypted function permission data are generated in advance by the server using different encryption methods;

[0013] Correspondingly, the step of obtaining the target user's license data includes:

[0014] Receive license data entered locally by a target user, wherein the license data is pre-generated by the server and sent to the target user.

[0015] In some embodiments of the present application, the encrypted user data includes: a username and password encrypted based on the MD5 encryption algorithm;

[0016] The encrypted function permission data includes: the authorization period and authorized function data for the target software encrypted based on the Base64 encryption algorithm;

[0017] Correspondingly, the server pre-encrypts the user name and password of the target user based on the MD5 encryption algorithm to obtain encrypted user data, encrypts the authorization period and authorized function data of the target user for the target software based on the Base64 encryption algorithm to obtain the encrypted function permission data, and generates a corresponding bit check code according to the data length of the encrypted user data, so as to generate the license data of the target user based on the preset start identifier, the encrypted user data, the encrypted function permission data, the bit check code and the preset end identifier, and sends the license data to the target user.

[0018] In some embodiments of the present application, the parsing of the license data based on a locally built-in decoder to obtain user information corresponding to the encrypted user information and function permission information corresponding to the encrypted function permission information includes:

[0019] Firstly, the bit check code in the license data is parsed based on a local built-in decoder;

[0020] splitting the encrypted user data and the encrypted function permission data in the license data according to the bit check code;

[0021] Decoding the encrypted user data based on a decryption algorithm corresponding to the preset MD5 encryption algorithm to obtain the username and password of the target user;

[0022] Furthermore, the encrypted function permission data is decoded according to the decryption algorithm corresponding to the preset Base64 encryption algorithm to obtain the authorization period and authorized function of the target user for the target software, and based on the authorization period, it is determined whether the license data is currently valid.

[0023] In some embodiments of the present application, further comprising:

[0024] If it is determined that the own network is currently connected to the server, the license data is sent to the server, so that the server parses the license data and verifies that the license data is currently valid based on the parsed result, and then issues the usable function data for authorizing the target user to use the license data;

[0025] The usable function data sent by the server and used to authorize the target user to use the software is received, and the function menu of the target software is controlled to display the usable function data.

[0026] Another aspect of the present application provides a function menu control device based on license authorization, comprising:

[0027] A license acquisition module, configured to acquire license data of a target user, wherein the license data is used to represent encrypted user information of the target user and encrypted function permission information for the target software;

[0028] a local parsing module, configured to determine whether its own network is currently connected to the server; if not, to parse the license data based on a local built-in decoder to obtain user information corresponding to the encrypted user information and function permission information corresponding to the encrypted function permission information;

[0029] The menu authorization module is used to control the function menu of the target software to display the available function data authorized for use by the target user after verifying that the license data is currently valid based on the user information and the function permission information.

[0030] A third aspect of the present application provides an electronic device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the license-authorization-based function menu control method when executing the computer program.

[0031] A fourth aspect of the present application provides a computer-readable storage medium having a computer program stored thereon, which implements the function menu control method based on license authorization when executed by a processor.

[0032] A fifth aspect of the present application provides a function menu control system based on license authorization, including:

[0033] A client device, configured to execute the function menu control method based on license authorization; and upon receiving usable function data sent by a server for authorizing the target user to use, the client device is further configured to control the function menu of the target software to display the usable function data;

[0034] The server is configured to generate license data for the target user and send the license data to the target user; and, upon receiving the license data for the target user sent by the client device, the server is further configured to parse the license data and, after verifying that the license data is currently valid based on the parsing result, send usable function data for authorizing the target user to use to the client device.

[0035] The function menu control method based on license authorization provided by the present application obtains the license data of the target user, which is used to represent the encrypted user information of the target user and the encrypted function permission information for the target software; determines whether its own network is currently connected to the server, and if not, parses the license data based on the local built-in decoder to obtain the user information corresponding to the encrypted user information and the function permission information corresponding to the encrypted function permission information; based on the user information and the function permission information, after verifying that the license data is currently valid, controls the function menu of the target software to display the available function data for authorizing the target user to use, and can store the user's available function information in the license, and then can cooperate with the built-in parser to grant the user the available permission. The present application can realize that when the client device has no network connection with the server, it can also parse and authorize the user license in a timely manner, which can improve the efficiency and reliability of function menu control, and thus can improve the convenience, reliability and effectiveness of the user's access to the software function menu, and improve the user experience.

[0036] Additional advantages, purposes, and features of the present application will be described in part in the following description and will become apparent to those skilled in the art upon study of the following or may be learned from practice of the present application. The purposes and other advantages of the present application may be achieved and obtained by the structures specifically pointed out in the specification and drawings.

[0037] Those skilled in the art will understand that the purposes and advantages that can be achieved by the present application are not limited to the above specific description, and the above and other purposes that can be achieved by the present application will be more clearly understood based on the following detailed description. BRIEF DESCRIPTION OF THE DRAWINGS

[0038] The drawings described herein are intended to provide a further understanding of the present application, constitute a part of the present application, and do not constitute a limitation of the present application. The components in the drawings are not drawn to scale, but are only for the purpose of illustrating the principles of the present application. In order to facilitate the illustration and description of some parts of the present application, the corresponding parts in the drawings may be enlarged, that is, they may become larger than other components in the exemplary device actually manufactured according to the present application. In the drawings:

[0039] Figure 1 This is a first flow chart of a function menu control method based on license authorization in an embodiment of the present application.

[0040] Figure 2 This is an example diagram of license data in an embodiment of the present application.

[0041] Figure 3This is a second flow chart of a function menu control method based on license authorization in an embodiment of the present application.

[0042] Figure 4 This is a structural diagram of a function menu control device based on license authorization in another embodiment of the present application.

[0043] Figure 5 This is a schematic diagram of the server-side implementation process provided in the application example of this application.

[0044] Figure 6 This is a schematic diagram of the network mode authentication process provided in the application example of this application.

[0045] Figure 7 This is a schematic diagram of an example of storing content in the database of a license server provided in the application example of this application.

[0046] Figure 8 This is a schematic diagram of the off-network mode authentication process provided in the application example of this application. DETAILED DESCRIPTION

[0047] In order to make the purpose, technical solutions and advantages of this application more clear, the following further describes this application in detail in conjunction with the embodiments and drawings. Here, the illustrative embodiments of this application and their descriptions are used to explain this application, but are not intended to limit this application.

[0048] It should also be noted here that in order to avoid obscuring the present application due to unnecessary details, the accompanying drawings only show structures and / or processing steps that are closely related to the scheme according to the present application, while other details that are not closely related to the present application are omitted.

[0049] It should be emphasized that the term "include / comprises" when used herein refers to the existence of features, elements, steps or components, but does not exclude the existence or addition of one or more other features, elements, steps or components.

[0050] It should also be noted that, unless otherwise specified, the term "connection" herein may refer not only to a direct connection but also to an indirect connection involving an intermediate.

[0051] Hereinafter, embodiments of the present application will be described with reference to the accompanying drawings. In the accompanying drawings, the same reference numerals represent the same or similar components, or the same or similar steps.

[0052] In one or more embodiments of the present application, a license or license data refers to an agreement between a software author and a user that specifies and restricts the software user's rights to use the software (or its source code) and the obligations of the author.

[0053] In one or more embodiments of the present application, the MD5 encryption algorithm is a widely used cryptographic hash function that can generate a 128-bit (16-byte) hash value to ensure the integrity and consistency of information transmission. It is an irreversible algorithm.

[0054] In one or more embodiments of the present application, the Base64 encryption algorithm is a process from binary to character, which can be used to transmit longer identification information in an HTTP (network communication) environment. Base64 encoding is unreadable and requires decoding before it can be read.

[0055] In one or more embodiments of the present application, authentication refers to detecting that a user has certain usable permissions based on a license program, and authorization refers to granting a user certain usable permissions using a license.

[0056] In one or more embodiments of the present application, the digit check code refers to the length of the MD5 string. The license mentioned in this application is concatenated using MD5 and Base64. The digit check code can be used to split the string and parse the Base64 data information. Specifically, the digit check code means that there is a group of 4 digits at the end, such as 0010, which means that the first 10th digit of this license string (assuming a total of 20 digits) is the MD5 password. The program will then use the corresponding transcoding method to parse these 1 to 10 digits, and the remaining 11 to 20 digits will be transcoded using Base64.

[0057] In one or more embodiments of the present application, the built-in parser refers to a code written inside a local program of the client device to decrypt the license data structure.

[0058] To address the problem that existing license-based function menu control methods cannot implement license-based function menu control when the client device and the software server are unable to communicate, this application first considers local license authentication on the client device. However, since existing licenses only store some configuration information, it is not possible to directly use existing licenses to implement local authentication processing on the client device. Based on this, it is also necessary to make reasonable and usable improvements to the license itself so that it can store user-usable function information and cooperate with the built-in parser in the program to grant users the permissions they can use.

[0059] The details are described in detail through the following examples.

[0060] The present application embodiment provides a function menu control method based on license authorization that can be executed by a client device, see Figure 1The function menu control method based on license authorization specifically includes the following contents:

[0061] Step 100: Acquire license data of a target user, where the license data is used to represent encrypted user information of the target user and encrypted function permission information for target software.

[0062] In step 100, the license data is used to represent the encrypted user information of the target user and the encrypted function permission information for the target software, which is the data basis for the subsequent step 200. By increasing the information content stored in the license data, the decoder built into the local software of the client can obtain information useful for function menu control after decoding the license data, thereby ensuring the effectiveness and reliability of the function menu control.

[0063] Step 200: Determine whether the network is currently connected to the server. If not, parse the license data based on the local built-in decoder to obtain the user information corresponding to the encrypted user information and the function permission information corresponding to the encrypted function permission information.

[0064] In step 200, determining whether the client network is currently connected to the server means that the client device itself is offline and therefore cannot establish a network connection with the server; it can also mean that the client device's network connection is normal, but data transmission cannot be performed between the client device and the server due to server or communication failures.

[0065] Step 300: Based on the user information and the function permission information, after verifying that the license data is currently valid, controlling the function menu of the target software to display available function data authorized for use by the target user.

[0066] In step 300, it is first possible to determine whether the license data is currently valid based on the user information and the functional permission information. If it is determined that the license data is currently invalid, a notification message indicating that the license data is currently invalid is output, so that the user knows that the license data is invalid. If it is determined that the license data is currently valid, the user information and the functional permission information are further used to determine the usable functional data that can be displayed in the function menu of the target software and that the target user is authorized to use. Functional modules can then be deleted or added to the current function menu to form a function menu corresponding to the usable functional data used by the target user. The function menu is then displayed to the user for access and other applications.

[0067] From the above description, it can be seen that the function menu control method based on license authorization provided in the embodiment of the present application can realize timely parsing and authorization of user licenses even when there is no network connection between the client device and the server, thereby improving the efficiency and reliability of function menu control, and thus improving the convenience, reliability and effectiveness of users accessing the software function menu, thereby improving the user experience.

[0068] In order to further improve the reliability of offline decoding, improve the application security of license data, and increase the difficulty of cracking it, in a function menu control method based on license authorization provided in an embodiment of the present application, see Figure 2 The license data includes: a start identifier, encrypted user data for indicating the encrypted user information, encrypted function permission data for indicating the encrypted function permission information, a bit check code, and an end identifier, which are sequentially arranged;

[0069] The bit check code is generated in advance based on the data length of the user data, so that when the decoder parses the license data, it first splits the encrypted user data and the encrypted function permission data according to the parsed bit check code, and then decodes the encrypted user data and the encrypted function permission data respectively.

[0070] exist Figure 2 In the format, "STX" represents the start identifier, which can be abbreviated as 'S'; "Size" represents the data length of the entire license; "USERINFO" represents encrypted user information; "LICENSE-DATA" represents the encrypted authorization period data in the encrypted function permission data; "LICENSE-FUCTIONS" represents the encrypted authorization function data in the encrypted function permission data; "CHECKSUM" represents the digit check code; "ETX" represents the end identifier, which can be abbreviated as 'E', and is a standard network transmission format.

[0071] In order to further improve the application security of the license data, in a function menu control method based on license authorization provided in an embodiment of the present application, the encrypted user data and the encrypted function permission data are generated in advance by the server using different encryption methods; see Figure 3 Step 100 of the license-based authorization function menu control method may specifically include the following:

[0072] Step 110: Receive the license data entered locally by the target user, wherein the license data is pre-generated by the server and sent to the target user.

[0073] In order to further improve the application security of license data and the reliability of offline decoding, in a function menu control method based on license authorization provided in an embodiment of the present application, the encrypted user data at least includes: a user name and password encrypted based on the MD5 encryption algorithm;

[0074] The encrypted function permission data at least includes: the authorization period and authorized function data for the target software encrypted based on the Base64 encryption algorithm. The authorized function data may consist of one or more authorized functions.

[0075] Correspondingly, the server pre-encrypts the user name and password of the target user based on the MD5 encryption algorithm to obtain encrypted user data, encrypts the authorization period and authorized function data of the target user for the target software based on the Base64 encryption algorithm to obtain the encrypted function permission data, and generates a corresponding bit check code according to the data length of the encrypted user data, so as to generate the license data of the target user based on the preset start identifier, the encrypted user data, the encrypted function permission data, the bit check code and the preset end identifier, and sends the license data to the target user.

[0076] In order to further improve the application security of license data and the reliability of offline decoding, in a function menu control method based on license authorization provided in an embodiment of the present application, see Figure 3 Step 200 of the license-based authorization function menu control method may specifically include the following:

[0077] Step 210 : Determine whether the local network is currently connected to the server. If not, execute step 220 .

[0078] Step 220: First parse the bit check code in the license data based on the local built-in decoder.

[0079] Step 230: Split the encrypted user data and the encrypted function permission data in the license data according to the bit check code.

[0080] Step 240: Decode the encrypted user data based on a preset decryption algorithm corresponding to the MD5 encryption algorithm to obtain the username and password of the target user.

[0081] Step 250: Decode the encrypted function permission data according to the decryption algorithm corresponding to the preset Base64 encryption algorithm to obtain the authorization period and authorized function of the target user for the target software, and determine whether the license data is currently valid based on the authorization period.

[0082] In order to further improve the applicability of the function menu control method and be compatible with the original processing flow, in a function menu control method based on license authorization provided in an embodiment of the present application, see Figure 3 Step 200 of the license-based authorization function menu control method may further include the following:

[0083] If it is determined in step 210 that the local network is currently connected to the server, step 260 is executed.

[0084] Step 260: Send the license data to the server, so that the server parses the license data and issues usable function data for authorizing the target user to use the license data after verifying that the license data is currently valid based on the parsing result.

[0085] Step 270: Receive the available function data sent by the server for authorizing the target user to use, and control the function menu of the target software to display the available function data.

[0086] The present application also provides a function menu control device based on license authorization for executing all or part of the function menu control method based on license authorization, see Figure 4 The function menu control device based on license authorization specifically includes the following contents:

[0087] The license acquisition module 10 is used to acquire license data of a target user, where the license data is used to represent the encrypted user information of the target user and the encrypted function permission information for the target software.

[0088] The local parsing module 20 is used to determine whether its own network is currently connected to the server. If not, it parses the license data based on the local built-in decoder to obtain the user information corresponding to the encrypted user information and the function permission information corresponding to the encrypted function permission information.

[0089] The menu authorization module 30 is configured to control the function menu of the target software to display available function data authorized for use by the target user after verifying that the license data is currently valid based on the user information and the function permission information.

[0090] The embodiment of the function menu control device based on license authorization provided in this application can be specifically used to execute the processing flow of the embodiment of the function menu control method based on license authorization in the above-mentioned embodiment. Its functions will not be repeated here, and reference can be made to the detailed description of the embodiment of the function menu control method based on license authorization.

[0091] From the above description, it can be seen that the function menu control device based on license authorization provided in the embodiment of the present application can realize timely parsing and authorization of user licenses even when there is no network connection between the client device and the server, thereby improving the efficiency and reliability of function menu control, and further improving the convenience, reliability and effectiveness of users accessing the software function menu, thereby improving the user experience.

[0092] Based on the above-mentioned function menu control method based on license authorization or function menu control device based on license authorization, the present application further provides a function menu control system based on license authorization, and the function menu control system based on license authorization specifically includes the following contents:

[0093] A client device, configured to execute the function menu control method based on license authorization of the aforementioned embodiment; and upon receiving usable function data sent by the server for authorizing the target user to use, the client device is further configured to control the function menu of the target software to display the usable function data;

[0094] The server is configured to generate license data for the target user and send the license data to the target user; and, upon receiving the license data for the target user sent by the client device, the server is further configured to parse the license data and, after verifying that the license data is currently valid based on the parsing result, send usable function data for authorizing the target user to use to the client device.

[0095] The client device may include a communication module (i.e., a communication unit) that can establish a communication connection with a remote server to implement data transmission with the server. The server may include a server on the task scheduling center side, and in other implementation scenarios, may also include a server on an intermediate platform, such as a server on a third-party server platform that has a communication link with the task scheduling center server. The server may include a single computer device, a server cluster consisting of multiple servers, or a server structure of a distributed device.

[0096] The server and the client device may communicate using any suitable network protocol, including network protocols that have not yet been developed as of the filing date of this application. Examples of such network protocols include TCP / IP, UDP / IP, HTTP, and HTTPS. Furthermore, examples of such network protocols include RPC (Remote Procedure Call Protocol) and REST (Representational State Transfer) protocols, which are used on top of the aforementioned protocols.

[0097] To further illustrate this solution, the present application also provides a specific application example of a function menu control method based on license authorization, which is used to solve the following problems existing in the existing function menu control technology based on license authorization:

[0098] Issue 1: License verification requires network communication. The license information entered by the user is sent to the server and compared with the license information stored in the server database. If there is no network connection, the user will not be able to use the program.

[0099] Problem 2: Traditional licenses store little information. The encryption algorithm used in traditional licenses requires the RSA algorithm as a signature to verify login and authorization period. The RSA symmetric encryption algorithm itself is not suitable for encrypting and decrypting large amounts of data and is more suitable for signature verification.

[0100] Question 3. Traditional license: The existing license generation method is easy to be cracked.

[0101] The function menu control method based on license authorization provided in the application example of this application is mainly intended to generate a license that enables users to perform login verification and permission verification both in the absence of a network and with a network; the license stores information about the functions available to the user, and cooperates with the built-in parser in the program (built-in parser: a code is written inside the program to decrypt the license structure) to grant the user the permissions they can use; a combined encryption algorithm, namely MD5+Base64 encryption and a last-digit check code, is used for encryption, and then the built-in parser in the program is used for parsing and decryption.

[0102] The specific instructions are as follows:

[0103] (1) Basic principles

[0104] 1. Server: Generate a license consisting of 'S' (converted to ASCII code) + username + password + authorization period + authorized functions... + digit check code (fixed length such as 0000 (hexadecimal)) + 'E' (converted to ASCII code).

[0105] Where S is the start identifier, E is the end identifier, the username and password are MD5 encrypted, the authorization period and authorized function... the digit check code is Base64 encrypted, and the digit check code is the length of the username and password after MD5 encryption.

[0106] The server then needs to transmit the license to the user. Specifically, the license is sent to the user automatically or manually by the server after the user purchases the product, and the user then fills in the license in the program.

[0107] 2. Client: The client automatically detects whether it is connected to the network and is divided into two modes: with network and without network:

[0108] (1) With a network connection: The user logs in with their username and password, enters the license, and then transmits the entered data to the server via network communication for comparison. If the verification is successful, the server returns authorization information to the client: the functions that can be used, the validity period of the permission, etc. The client then displays the available functions and interfaces to the user through the returned information.

[0109] (2) No network: When the client detects that the user is without a network, it uses the no network verification mode. The user first enters the username and password and then enters the license. At this time, the client calls the built-in parser to first parse out the digit check code at a fixed position, and then splits out the MD5 (username and password) and Base64 (authorization period and authorized functions...) according to the length of the digit check code. The username and password entered by the user are converted into MD5 format strings and compared with the split MD5 (username and password). If the result is correct, continue with the authorization verification. The split Base64 string is decompiled and parsed to obtain the corresponding usable functions and permission usage period information. The client displays or hides the corresponding functions based on this information.

[0110] The license is sent to the user's contact information after purchasing the product, such as email, text message, or other social media channels. Licenses can only be generated on the server. Traditionally, after the user enters the license, the license is sent to the server over the network, where it is compared with the database and granted user permissions, requiring network access. However, this application eliminates the need to send the license to the server when network access is unavailable; the license is parsed directly on the client.

[0111] (2) Server-side implementation process

[0112] See also Figure 5 , the implementation process on the server side is as follows:

[0113] S1: Encrypt the username and password using MD5 technology. MD5 encryption is a widely used cryptographic hash function that generates a 128-bit (16-byte) hash value to ensure the integrity and consistency of information transmission. It is an irreversible algorithm.

[0114] Here are some examples:

[0115] Username: "zhangsan";

[0116] Password: “123456”;

[0117] The username and password combination is: "zhangsan&123456"; where & is a separator.

[0118] The username and password after MD5 encryption are: "85B9E13C9CB5E358".

[0119] S2: Use Base64 encoding for the authorization period and authorization function. Base64 encoding converts binary data into characters and is used to transmit long identifiers in HTTP (network communication) environments. Base64 encoding is unreadable and requires decoding before it can be read.

[0120] Here are some examples:

[0121] Authorization period (before encryption): "data-30days";

[0122] Function permissions (before encryption): "function1-true&function2-false";

[0123] The authorization period and functional permissions are encrypted with base64 as follows:

[0124] "ZGF0YS0zMGRheXNmdW5jdGlvbjEtdHJ1ZSZmdW5jdGlvbjItZmFsc2U=";

[0125] Concatenate the MD5-encrypted username and password, as well as the base64-encrypted authorization period and functional permissions, in the following format:

[0126] "S006885B9E13C9CB5E358ZGF0YS0zMGRheXNmdW5jdGlvbjEtdHJ1ZSZmdW5jdGlvbjItZmFsc2U=0016E".

[0127] (3) Network mode authentication process

[0128] See also Figure 6 The authentication process in network mode is as follows:

[0129] S1: The user enters the username and password. The client sends the username and password to the server. If the verification is successful, the client proceeds to the next step. If the verification fails, the client prompts that the username or password is incorrect.

[0130] S2: The user enters the license generated previously, and the client sends the license to the server.

[0131] Among them, see Figure 7 The database on the license server also stores the license's permission database fields. "FUNTION1," "FUNTION2," and "FUNTION3" represent different encrypted authorization function data; "TEXT" represents text data; "LICENSEDATA" represents encrypted authorization period data; "ID" represents the user's username; "INTEGER" represents integer data; and "null" indicates invalid.

[0132] Search the database for the corresponding license permissions and permission time and return them to the client

[0133] S3: If the license is within the validity period, proceed to the next step. If the period has expired, a message will appear indicating that the license is invalid and you need to purchase it again. The validity period is the length of time the user purchased the license, for example: 30 days.

[0134] S4: If within the time limit, the available functions are displayed to the user based on the permissions returned by the server.

[0135] (4) Off-network mode authentication process

[0136] See also Figure 8 The off-network mode authentication process is as follows:

[0137] S1: The username and password are concatenated and converted into an MD5 string.

[0138] For the above example:

[0139] "S006885B9E13C9CB5E358ZGF0YS0zMGRheXNmdW5jdGlvbjEtdHJ1ZSZmdW5jdGlvbjItZmFsc2U=0016E" can be split into the following according to the rules:

[0140] Start identifier: "S";

[0141] Total data length: "0068";

[0142] Username and password: "85B9E13C9CB5E358"

[0143] Duration and functional rights:

[0144] "ZGF0YS0zMGRheXNmdW5jdGlvbjEtdHJ1ZSZmdW5jdGlvbjItZmFsc2U=";

[0145] Username and password length: "0016" (that is, 6-22 characters for the username and password);

[0146] End identifier: "E".

[0147] The built-in parser splits the format into two types according to the rules. The parsed username and password are compared with the username and password entered by the user. If the verification passes, the system proceeds to the next step. If not, the system prompts that the username and password are incorrect.

[0148] S3: Analysis of term and functional permissions:

[0149] "ZGF0YS0zMGRheXNmdW5jdGlvbjEtdHJ1ZSZmdW5jdGlvbjItZmFsc2U=";

[0150] Decoding the base64 code of the term and functional permissions is as follows:

[0151] "data-30daysfunction1-true&function2-false";

[0152] Continue to split "days" to get the license period. Split "&" to get the permissions of each function.

[0153] The client displays the functions within the permissions to the user based on the split permission information.

[0154] In summary, the key points of this application example are:

[0155] (1) Two verification modes:

[0156] In case of network connection: use server-side verification;

[0157] In the absence of network, the client's built-in resolver is used for verification.

[0158] (2) License format.

[0159] (3) Authentication mode without network: when the host is not connected to the network, the user's current permissions can be determined based on the license.

[0160] By using the function menu control device and method based on license authorization provided in the application example of this application, users can perform login verification of username and password, and verify the authorization period and function of the license without connecting to the server in the absence of a network.

[0161] The present application also provides an electronic device (i.e., an electronic device), such as a central server, which may include a processor, a memory, a receiver, and a transmitter. The processor is configured to execute the license-based function menu control method described in the above embodiment. The processor and the memory may be connected via a bus or other means, with bus connection being used as an example. The receiver may be connected to the processor and the memory via a wired or wireless means.

[0162] The processor may be a central processing unit (CPU). The processor may also be other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, or a combination of the above chips.

[0163] The memory, as a non-transitory computer-readable storage medium, can be used to store non-transitory software programs, non-transitory computer executable programs, and modules, such as the program instructions / modules corresponding to the license-authorized function menu control method in the embodiments of the present application. The processor executes the non-transitory software programs, instructions, and modules stored in the memory to execute various processor functions and data processing, thereby implementing the license-authorized function menu control method in the above method embodiments.

[0164] The memory may include a program storage area and a data storage area, wherein the program storage area may store an operating system, an application required for at least one function; the data storage area may store data created by the processor, etc. In addition, the memory may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one disk storage device, a flash memory device, or other non-volatile solid-state storage device. In some embodiments, the memory may optionally include a memory remotely located relative to the processor, and these remote memories may be connected to the processor via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.

[0165] The one or more modules are stored in the memory, and when executed by the processor, perform the function menu control method based on license authorization in the embodiment.

[0166] In some embodiments of the present application, the user equipment may include a processor, a memory and a transceiver unit, and the transceiver unit may include a receiver and a transmitter. The processor, memory, receiver and transmitter may be connected through a bus system. The memory is used to store computer instructions, and the processor is used to execute the computer instructions stored in the memory to control the transceiver unit to send and receive signals.

[0167] As an implementation method, the functions of the receiver and transmitter in this application can be considered to be implemented through a transceiver circuit or a dedicated transceiver chip, and the processor can be considered to be implemented through a dedicated processing chip, a processing circuit or a general-purpose chip.

[0168] As another implementation method, it is possible to use a general-purpose computer to implement the server provided in the embodiments of the present application. That is, the program code for implementing the functions of the processor, receiver, and transmitter is stored in a memory, and the general-purpose processor implements the functions of the processor, receiver, and transmitter by executing the code in the memory.

[0169] The present application also provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the steps of the aforementioned license-based function menu control method. The computer-readable storage medium can be a tangible storage medium, such as a random access memory (RAM), a memory, a read-only memory (ROM), an electrically programmable ROM, an electrically erasable programmable ROM, a register, a floppy disk, a hard disk, a removable storage disk, a CD-ROM, or any other form of storage medium known in the art.

[0170] It should be understood by those skilled in the art that the various exemplary components, systems and methods described in conjunction with the embodiments disclosed herein can be implemented in hardware, software or a combination of the two. Whether it is specifically performed in hardware or software 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. When implemented in hardware, it can be, for example, an electronic circuit, an application-specific integrated circuit (ASIC), appropriate firmware, a plug-in, a function card, etc. When implemented in software, the elements of this application are programs or code segments that are used to perform the required tasks. The program or code segment can be stored in a machine-readable medium, or transmitted on a transmission medium or a communication link via a data signal carried in a carrier.

[0171] It should be understood that the present application is not limited to the specific configurations and processes described above and illustrated in the figures. For the sake of brevity, a detailed description of known methods is omitted here. In the above embodiments, several specific steps are described and illustrated as examples. However, the method process of the present application is not limited to the specific steps described and illustrated. Those skilled in the art can make various changes, modifications, and additions, or change the order of the steps after understanding the spirit of the present application.

[0172] In this application, features described and / or illustrated for one embodiment may be used in the same or similar manner in one or more other embodiments, and / or combined with or replace features of other embodiments.

[0173] The above description is merely a preferred embodiment of the present application and is not intended to limit the present application. Those skilled in the art will appreciate that various modifications and variations of the present embodiment are possible. Any modifications, equivalent substitutions, or improvements made within the spirit and principles of the present application shall be included within the scope of protection of the present application.

Claims

1. A function menu control method based on license authorization, characterized in that: Set by a client device, the method includes: Receive license data entered locally by the target user, the license data including: a start identifier set in sequence, encrypted user data for representing encrypted user information, encrypted function permission data for representing encrypted function permission information, a digit check code and an end identifier; the digit check code is pre-generated based on the data length of the encrypted user data; the encrypted user data includes: a user name and password encrypted based on the MD5 encryption algorithm; the encrypted function permission data includes: an authorization period and authorized function data for the target software encrypted based on the Base64 encryption algorithm; determine whether the own network is currently connected to the server, and if not, split the encrypted user data and the encrypted function permission data based on the parsed digit check code based on a local built-in decoder, and then decode the encrypted user data and the encrypted function permission data respectively to obtain user information corresponding to the encrypted user information and function permission information corresponding to the encrypted function permission information; Based on the user information and the function permission information, after verifying that the license data is currently valid, the function menu of the target software is controlled to display the available function data for authorizing the target user to use; wherein, the license data is pre-generated by the server and sent to the target user; correspondingly, the server pre-encrypts the user name and password of the target user based on the MD5 encryption algorithm to obtain encrypted user data, encrypts the authorization period and authorized function data of the target user for the target software based on the Base64 encryption algorithm to obtain the encrypted function permission data, and generates a corresponding bit check code according to the data length of the encrypted user data, so as to generate the license data of the target user based on a preset start identifier, the encrypted user data, the encrypted function permission data, the bit check code and the preset end identifier, and sends the license data to the target user.

2. The function menu control method based on license authorization according to claim 1, characterized in that: The locally built-in decoder is used to parse the license data to obtain user information corresponding to the encrypted user information and function permission information corresponding to the encrypted function permission information, including: Firstly, the bit check code in the license data is parsed based on a local built-in decoder; splitting the encrypted user data and the encrypted function permission data in the license data according to the bit check code; Decoding the encrypted user data based on a decryption algorithm corresponding to the preset MD5 encryption algorithm to obtain the username and password of the target user; Furthermore, the encrypted function permission data is decoded according to the decryption algorithm corresponding to the preset Base64 encryption algorithm to obtain the authorization period and authorized function of the target user for the target software, and based on the authorization period, it is determined whether the license data is currently valid.

3. The function menu control method based on license authorization according to claim 1 or 2, characterized in that: Also includes: If it is determined that the own network is currently connected to the server, the license data is sent to the server, so that the server parses the license data and verifies that the license data is currently valid based on the parsed result, and then issues the usable function data for authorizing the target user to use the license data; The usable function data sent by the server and used to authorize the target user to use the software is received, and the function menu of the target software is controlled to display the usable function data.

4. A function menu control device based on license authorization, characterized in that: include: A license acquisition module is configured to receive license data entered locally by a target user, the license data comprising: a start identifier, encrypted user data representing encrypted user information, encrypted function permission data representing encrypted function permission information, a digit check code, and an end identifier, which are sequentially set; the digit check code is pre-generated based on the data length of the encrypted user data; the encrypted user data comprises a user name and password encrypted using the MD5 encryption algorithm; the encrypted function permission data comprises an authorization period and authorized function data for the target software encrypted using the Base64 encryption algorithm; a local parsing module, configured to determine whether its own network is currently connected to the server; if not, separating the encrypted user data and the encrypted function permission data based on the parsed bit check code using a local built-in decoder, and then decoding the encrypted user data and the encrypted function permission data respectively to obtain user information corresponding to the encrypted user information and function permission information corresponding to the encrypted function permission information; a menu authorization module for controlling a function menu of the target software to display available function data authorized for use by the target user after verifying that the license data is currently valid based on the user information and the function permission information; In which, the license data is pre-generated by the server and sent to the target user; correspondingly, the server pre-encrypts the user name and password of the target user based on the MD5 encryption algorithm to obtain encrypted user data, encrypts the authorization period and authorized function data of the target user for the target software based on the Base64 encryption algorithm to obtain the encrypted function permission data, and generates a corresponding bit check code according to the data length of the encrypted user data, so as to generate the license data of the target user based on a preset start identifier, the encrypted user data, the encrypted function permission data, the bit check code and the preset end identifier, and sends the license data to the target user.

5. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein: When the processor executes the computer program, the function menu control method based on license authorization according to any one of claims 1 to 3 is implemented.

6. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the function menu control method based on license authorization according to any one of claims 1 to 3 is implemented.

7. A function menu control system based on license authorization, characterized in that: include: A client device, configured to execute the function menu control method based on license authorization according to any one of claims 1 to 3; Furthermore, if the available function data for authorizing the target user to use the software is received from the server, the client device is further configured to control the function menu of the target software to display the available function data; a server, configured to generate license data of the target user and send the license data to the target user; Furthermore, if the server receives the license data of the target user sent by the client device, the server is further configured to parse the license data and, after verifying that the license data is currently valid based on the parsing result, send usable function data for authorizing the target user to use to the client device.

Citation Information

Patent Citations

  • License offline authentication method

    CN111651732A

  • License-based information security authorization method and device, electronic equipment and medium

    CN114726630A