A method, device, electronic device and storage medium for controlling value-added functions
By generating and parsing license files, using value-added functions to inject management classes to execute business logic, the problem of bundled integration of software functions is solved, flexible control and permission management of value-added functions are realized, and the management convenience and scalability of the software are improved.
Patent Information
- Application Number
- CN202310611525.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-05-26
- Publication Date
- 2024-10-22
- Estimated Expiration
- 2043-05-26
AI Technical Summary
Existing software has rigid code logic implementation in function rights management, resulting in bundled integration of functions, making it difficult to flexibly manage and control the use of value-added functions.
Generate a license file by obtaining function configuration information, and parse the license data instance when the application starts. Use value-added functions to inject management classes to execute business logic, realize dynamic loading and permission control of value-added functions, and use RSA encryption algorithm for data processing to ensure security. .
It realizes flexible management and control of value-added functions, ensures accurate management of functions and effective protection of permissions, supports dynamic loading and updates, and improves the scalability and management convenience of the software.
Smart Images

Figure CN116680005B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of application management technology, and in particular to a method, device, electronic device and storage medium for managing and controlling value-added functions. Background Art
[0002] At present, some software will provide services to customers by selling software services, and this type of sale often has a time limit. In addition to time limits, the software may have restrictions on the use of value-added functions. For example, the basic functions of the software include login, order process and other functions. The software also integrates other functions such as order statistics and logistics management. These functions are sold in a value-added manner based on the specific usage requirements of customers when they are sold or used. However, most of the existing software function permissions are implemented through hard code logic in the programming stage, resulting in the bundled integration of software functions. Summary of the invention
[0003] In view of this, an embodiment of the present invention provides a method, device, electronic device and storage medium for managing and controlling value-added functions, which can efficiently realize the management and control of value-added functions.
[0004] In one aspect, an embodiment of the present invention provides a method for managing and controlling value-added functions, including:
[0005] In response to a request instruction from a target application for configuring a value-added function, obtaining function configuration information; wherein the function configuration information includes a unique identifier of the value-added function to be configured;
[0006] Generate a license file based on the function configuration information;
[0007] Place the license file in the configuration directory of the target application;
[0008] In response to the start-up instruction of the target application, the license file in the configuration directory is parsed to obtain a license data instance; wherein the license data instance is stored in the value-added function injection management class;
[0009] In response to the call instruction of the target value-added function, the target permission data instance is obtained in the value-added function injection management class, and the business logic of the target value-added function is executed based on the target permission data instance.
[0010] Optionally, in response to a request instruction from the target application for configuring a value-added function, obtaining function configuration information includes:
[0011] In response to a request instruction of the target application for the value-added function to be configured, generating an acquisition instruction; wherein the request instruction is generated based on a demand instruction of the target object for the value-added function to be configured executed in the target application; and the acquisition instruction represents an index of the target application and the value-added function to be configured;
[0012] According to the acquisition instructions, obtain the function configuration information of the value-added function to be configured.
[0013] Optionally, generate a license file based on the function configuration information, including:
[0014] Generate the first attribute data in the license data entity class according to the function configuration information;
[0015] The first attribute data is encrypted using an RSA encryption algorithm to obtain a license file.
[0016] Optionally, after the step of placing the license file into the configuration directory of the target application, the method further comprises:
[0017] Place the loading file that executes the value-added function to be configured into the Java loading directory;
[0018] The loaded file is used to execute the business logic of the value-added function to be configured.
[0019] Optionally, the license file is encrypted by using an RSA encryption algorithm, and the license file in the configuration directory is parsed to obtain a license data instance, including:
[0020] Decrypt the license file in the configuration directory using the RSA decryption algorithm to obtain a license data instance;
[0021] Compare the unique identifier of each Java class loaded in the Java loading directory with the unique identifier of the value-added function to be configured corresponding to the license data instance. If the comparison result exists, incorporate the license data instance into the value-added function injection management class;
[0022] The Java loading directory is used to place loading files of various value-added functions.
[0023] Optionally, the method further comprises:
[0024] The license files in the configuration directory are parsed regularly, and the value-added functions are updated and injected into the management class by dynamically loading the license files.
[0025] Optionally, the method further comprises:
[0026] When the target license data instance is not obtained in the value-added function injection management class, the target value-added function is stopped from being called.
[0027] On the other hand, an embodiment of the present invention provides a control device for value-added functions, including:
[0028] The first module is used to obtain function configuration information in response to a request instruction of a target application for configuring a value-added function; wherein the function configuration information includes a unique identifier of the value-added function to be configured;
[0029] The second module is used to generate a license file according to the function configuration information;
[0030] The third module is used to place the license file into the configuration directory of the target application;
[0031] The fourth module is used to parse the license file in the configuration directory in response to the start-up instruction of the target application to obtain a license data instance; wherein the license data instance is stored in the value-added function injection management class;
[0032] The fifth module is used to respond to the call instruction of the target value-added function, obtain the target license data instance in the value-added function injection management class, and execute the business logic of the target value-added function based on the target license data instance.
[0033] Optionally, the system further comprises:
[0034] The sixth module is used to place the loading file for executing the value-added function to be configured into the Java loading directory after the third module;
[0035] The loaded file is used to execute the business logic of the value-added function to be configured.
[0036] Optionally, the system further comprises:
[0037] The seventh module is used to parse the license files in the configuration directory regularly and update the value-added function injection management class by dynamically loading the license files.
[0038] Optionally, the system further comprises:
[0039] The eighth module is used to stop calling the target value-added function when the target license data instance is not obtained in the value-added function injection management class.
[0040] On the other hand, an embodiment of the present invention provides an electronic device, including a processor and a memory;
[0041] The memory is used to store programs;
[0042] The processor executes the program to implement the above method.
[0043] On the other hand, an embodiment of the present invention provides a computer-readable storage medium, wherein the storage medium stores a program, and the program is executed by a processor to implement the above method.
[0044] The embodiment of the present invention also discloses a computer program product or a computer program, which includes a computer instruction stored in a computer-readable storage medium. A processor of a computer device can read the computer instruction from the computer-readable storage medium, and the processor executes the computer instruction, so that the computer device executes the above method.
[0045] The embodiment of the present invention first obtains function configuration information in response to a request instruction of a target application for configuring a value-added function; wherein the function configuration information includes a unique identifier of the value-added function to be configured; generates a license file according to the function configuration information; places the license file in the configuration directory of the target application; in response to a startup instruction of the target application, parses the license file in the configuration directory to obtain a license data instance; wherein the license data instance is stored in a value-added function injection management class; in response to a call instruction of the target value-added function, obtains a target license data instance in the value-added function injection management class, and executes the business logic of the target value-added function based on the target license data instance. The license file generated by the embodiment of the present invention based on the function configuration information can effectively associate and control the value-added function; and the value-added function injection management class is used to realize the storage of license data instances related to the value-added function, and then the file configuration and business logic call of the value-added function are connected based on the unique identifier to ensure accurate control of the value-added function. BRIEF DESCRIPTION OF THE DRAWINGS
[0046] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.
[0047] Figure 1 A flowchart of a method for managing and controlling a value-added function provided by an embodiment of the present invention;
[0048] Figure 2 A schematic diagram of the overall process of a control method based on value-added functions provided by an embodiment of the present invention;
[0049] Figure 3 A structural diagram of a control device for value-added functions provided by an embodiment of the present invention
[0050] Figure 4 A schematic diagram of the framework of an electronic device provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0051] In order to make the purpose, technical solution and advantages of the present invention more clearly understood, the present invention is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present invention and are not intended to limit the present invention.
[0052] On the one hand, if Figure 1 As shown, an embodiment of the present invention provides a method for managing and controlling value-added functions, including:
[0053] S100, in response to a request instruction from a target application for configuring a value-added function, obtaining function configuration information;
[0054] It should be noted that the function configuration information includes a unique identifier of the value-added function to be configured; in some embodiments, step S100 includes: generating an acquisition guide in response to a request instruction of the target application for the value-added function to be configured; wherein the request instruction is generated based on a demand instruction of the value-added function to be configured executed by the target object in the target application; the acquisition guide represents an index of the target application and the value-added function to be configured; and according to the acquisition guide, acquiring the function configuration information of the value-added function to be configured. The function configuration information also includes the authorization time of the value-added function to be configured, the identification number of the target object (such as the company name), and the software version number of the target application.
[0055] Specifically, in some specific embodiments, according to the customer's demand for value-added functions, the corresponding value-added function unique identification data, authorization time, company name (ie, the identification number of the target object), software version number and other data can be entered according to the instructions.
[0056] S200, generating a license file according to the function configuration information;
[0057] It should be noted that, in some embodiments, step S200 includes: generating first attribute data in the license data entity class according to the function configuration information; encrypting the first attribute data by using the RSA encryption algorithm to obtain a license file.
[0058] Specifically, in some specific embodiments, relevant license generation tools can be used to generate attribute data in the license data entity class based on the customer's actual demands for value-added functions, authorization time, software version number, etc., and the corresponding data is combined with the data encrypted by the RSA algorithm to generate the corresponding license file (i.e., function configuration information).
[0059] S300, placing the license file into the configuration directory of the target application;
[0060] It should be noted that, in some embodiments, the method further includes the step of placing a loading file for executing the value-added function to be configured into a Java loading directory; wherein the loading file is used to execute the business logic of the value-added function to be configured.
[0061] Specifically, in some specific embodiments, the generated license file can be placed in the configuration directory corresponding to the application; and the jar file obtained by packaging the corresponding value-added function implementation module can be placed in the specified Java loading directory.
[0062] S400, in response to a start instruction of a target application, parsing a license file in a configuration directory to obtain a license data instance;
[0063] It should be noted that the license data instance is stored in the value-added function injection management class; in some embodiments, the license file is encrypted using the RSA encryption algorithm, and step S400 includes: decrypting the license file in the configuration directory using the RSA decryption algorithm to obtain the license data instance; comparing the unique identifier of each Java class loaded in the Java loading directory with the unique identifier of the value-added function to be configured corresponding to the license data instance, and when the comparison result exists, incorporating the license data instance into the value-added function injection management class; wherein, the Java loading directory is used to place the loading files of each value-added function.
[0064] In some embodiments, the method further comprises the steps of: regularly parsing the license file in the configuration directory, and updating the value-added function injection management class by dynamically loading the license file.
[0065] Specifically, in some specific embodiments, the implementation steps may include:
[0066] (1) Start the application;
[0067] (2) Trigger the relevant license parsing tool class to parse the license file data, and obtain the license data entity instance after decryption using the RSA decryption algorithm;
[0068] (3) During the Java class loading process, the unique identifier in the class that can be loaded to implement the value-added function interface is compared with the unique identifier array attribute of the value-added function plug-in in the license data entity instance obtained in (2) above. If it exists, the corresponding instance is included in the value-added function injection management class attribute;
[0069] (4) Regularly parse the license file to dynamically load license data and update the value-added function plug-in injection management class to meet the scenario where the value-added function plug-in jar exists in the specified directory and the license is not authorized.
[0070] S500 , in response to a call instruction of a target value-added function, obtaining a target license data instance in the value-added function injection management class, and executing the business logic of the target value-added function based on the target license data instance.
[0071] It should be noted that, in some embodiments, the method further comprises the step of: when the target license data instance is not obtained in the value-added function injection management class, stopping calling the target value-added function.
[0072] Specifically, in some specific embodiments, when the value-added function part of the business logic is used, the corresponding instance is obtained from the value-added function plug-in injection management class through the unique identifier of the value-added function plug-in, and the corresponding value-added function business logic is executed after the authentication is passed in combination with the license authentication tool class, wherein:
[0073] (1) If the instance can be obtained, the corresponding logic is executed;
[0074] (2) If the jar file cannot be obtained, the corresponding value-added function has not been introduced or the license does not authorize this value-added function.
[0075] The technical solution of the present invention is further described below in conjunction with some specific embodiments. It is easy to understand that the following is an explanation of the technical principle of the present invention and cannot be regarded as a limitation of the present invention.
[0076] In some specific implementations, a template for executing the method of the embodiment of the present invention can be implemented based on the Java language through the template mode in the design mode. The template may include a value-added function interface, a value-added function implementation module, a value-added function injection management class, a license data entity class, a license generation tool class, a license parsing tool class, and a license authentication tool class, wherein:
[0077] 1. The value-added function interface enables each plug-in module to provide the template method with the unique identifier and name of the function plug-in;
[0078] 2. The value-added function implementation module provides an implementation class to implement the value-added function interface, and provides a business implementation class that needs to be executed for the corresponding business of this value-added function, so as to execute the corresponding business logic in the business process according to whether this value-added function is loaded. Developers can add corresponding implementation modules according to business requirements to meet the needs of quickly implementing new value-added function plug-ins, which has strong extensibility;
[0079] 3. The value-added function injection management class manages the value-added function interface class corresponding to the value-added function implementation module that can be loaded, and provides the ability to obtain the value-added function implementation class instance with the unique identifier of the value-added function;
[0080] 4. The license data entity class is used to carry the parsed license data, and contains attributes such as the unique identification array of the value-added function plug-in, company name, expiration time, software version number, data signature, etc.
[0081] 5. The license generation tool class is used to generate attribute data in the license data entity class according to the customer's actual demands for value-added functions, authorization time, software version number, etc., and generate the corresponding license file by combining the corresponding data with the data obtained after RSA algorithm encryption;
[0082] 6. The license parsing tool class is used to parse the license file and obtain the license data entity instance after decryption using the RSA algorithm;
[0083] 7. The license authentication tool class is used to associate the value-added function plug-in and the decrypted license data, to judge and control the value-added functions, and also to verify the validity of data such as company name, expiration time, version number, etc. in combination with data signature.
[0084] Specifically, Figure 2 As shown, the steps of implementing the method of the embodiment of the present invention through the above template include:
[0085] 1. According to the customer's demand for value-added functions, run the license generation tool class, enter the corresponding value-added function unique identification data, authorization time, company name, software version number and other data according to the instructions, that is, use the license generation tool to generate a license file;
[0086] 2. Place the generated license file in the configuration directory corresponding to the application;
[0087] 3. Start the application, load the value-added function module, and use the license parsing tool class to parse the license file
[0088] (1) Place the jar file obtained by packaging the corresponding value-added function implementation module into the specified Java loading directory;
[0089] (2) Start the application;
[0090] (3) Trigger the license parsing tool class to parse the license file data and obtain the license data entity instance after decryption;
[0091] (4) During the Java class loading process, the unique identifier in the class that can be loaded to implement the value-added function interface is compared with the unique identifier array attribute of the value-added function plug-in in the license data entity instance obtained in 3.3 above. If it exists, the corresponding instance is included in the value-added function injection management class attribute;
[0092] (5) Regularly parse the license file to dynamically load license data and update the value-added function plug-in injection management class to meet the scenario where the value-added function plug-in jar exists in the specified directory and the license is not authorized.
[0093] 4. When using the business logic of the value-added function, obtain the corresponding instance from the value-added function plug-in injection management class through the unique identifier of the value-added function plug-in, and combine it with the license authentication tool class to execute the corresponding value-added function business logic after authentication, where:
[0094] (1) If the instance can be obtained, the corresponding logic is executed;
[0095] (2) If the jar file cannot be obtained, the corresponding value-added function has not been introduced or the license does not authorize this value-added function.
[0096] The embodiment of the present invention uses license to perform associated management and control on the value-added function module, so that the software can more conveniently add or reduce value-added functions and effectively manage and control related functions.
[0097] On the other hand, Figure 3 As shown, an embodiment of the present invention provides a value-added function management and control device 600, including: a first module 610, used to obtain function configuration information in response to a request instruction of a target application for configuring a value-added function; wherein the function configuration information includes a unique identifier of the value-added function to be configured; a second module 620, used to generate a license file according to the function configuration information; a third module 630, used to place the license file in the configuration directory of the target application; a fourth module 640, used to parse the license file in the configuration directory in response to a startup instruction of the target application to obtain a license data instance; wherein the license data instance is stored in a value-added function injection management class; a fifth module 650, used to obtain a target license data instance in the value-added function injection management class in response to a call instruction of the target value-added function, and execute the business logic of the target value-added function based on the target license data instance.
[0098] It should be noted that, in some embodiments, the system further includes:
[0099] The sixth module is used to place the loading file for executing the value-added function to be configured into the Java loading directory after the third module; wherein the loading file is used to execute the business logic of the value-added function to be configured.
[0100] The seventh module is used to parse the license files in the configuration directory regularly and update the value-added function injection management class by dynamically loading the license files.
[0101] The eighth module is used to stop calling the target value-added function when the target license data instance is not obtained in the value-added function injection management class.
[0102] The contents of the method embodiments of the present invention are all applicable to the device embodiments. The functions specifically implemented by the device embodiments are the same as those of the above method embodiments, and the beneficial effects achieved are also the same as those achieved by the above method embodiments.
[0103] like Figure 4 As shown, another aspect of the embodiment of the present invention further provides an electronic device 700, including a processor 710 and a memory 720;
[0104] The memory 720 is used to store programs;
[0105] The processor 710 executes the program to implement the above method.
[0106] The contents of the method embodiments of the present invention are all applicable to the electronic device embodiments. The functions specifically implemented by the electronic device embodiments are the same as those of the above method embodiments, and the beneficial effects achieved are also the same as those achieved by the above method embodiments.
[0107] Another aspect of the embodiments of the present invention further provides a computer-readable storage medium, wherein the storage medium stores a program, and the program is executed by a processor to implement the above method.
[0108] The contents of the method embodiments of the present invention are all applicable to the computer-readable storage medium embodiments. The functions specifically implemented by the computer-readable storage medium embodiments are the same as those of the above method embodiments, and the beneficial effects achieved are also the same as those achieved by the above method embodiments.
[0109] The embodiment of the present invention also discloses a computer program product or a computer program, which includes a computer instruction stored in a computer-readable storage medium. A processor of a computer device can read the computer instruction from the computer-readable storage medium, and the processor executes the computer instruction, so that the computer device executes the above method.
[0110] In some selectable embodiments, the function / operation mentioned in the block diagram may not occur in the order mentioned in the operation diagram. For example, depending on the function / operation involved, the two boxes shown in succession can actually be executed substantially simultaneously or the boxes can sometimes be executed in reverse order. In addition, the embodiment presented and described in the flow chart of the present invention is provided by way of example, for the purpose of providing a more comprehensive understanding of technology. The disclosed method is not limited to the operation and logic flow presented herein. Selectable embodiments are expected, wherein the order of various operations is changed and the sub-operation of a part for which is described as a larger operation is performed independently.
[0111] In addition, although the present invention is described in the context of functional modules, it should be understood that, unless otherwise specified, one or more of the functions and / or features can be integrated into a single physical device and / or software module, or one or more functions and / or features can be implemented in a separate physical device or software module. It is also understood that a detailed discussion of the actual implementation of each module is unnecessary for understanding the present invention. More specifically, in view of the properties, functions and internal relationships of the various functional modules in the device disclosed herein, the actual implementation of the module will be understood within the conventional skills of the engineer. Therefore, those skilled in the art can implement the present invention set forth in the claims without excessive experimentation using ordinary techniques. It is also understood that the specific concepts disclosed are merely illustrative and are not intended to limit the scope of the present invention, which is determined by the full scope of the appended claims and their equivalents.
[0112] If the function is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, or the part that contributes to the prior art, or the part of the technical solution, can be embodied in the form of a software product. The computer software product is stored in a storage medium, including several instructions for a computer device (which can be a personal computer, server, or network device, etc.) to perform all or part of the steps of the methods of each embodiment of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk, etc. Various media that can store program codes.
[0113] The logic and / or steps represented in the flowchart or otherwise described herein, for example, may be considered as an ordered list of executable instructions for implementing logical functions, and may be embodied in any computer-readable medium for use by an instruction execution device, apparatus or device (such as a computer-based device, a device including a processor, or other device that can fetch instructions from an instruction execution device, apparatus or device and execute the instructions), or in conjunction with such instruction execution device, apparatus or device. For purposes of this specification, "computer-readable medium" may be any device that can contain, store, communicate, propagate or transmit a program for use by an instruction execution device, apparatus or device, or in conjunction with such instruction execution device, apparatus or device.
[0114] More specific examples of computer-readable media (a non-exhaustive list) include the following: an electrical connection with one or more wires (electronic device), a portable computer disk case (magnetic device), a random access memory (RAM), a read-only memory (ROM), an erasable and programmable read-only memory (EPROM or flash memory), a fiber optic device, and a portable compact disk read-only memory (CDROM). In addition, the computer-readable medium may even be a paper or other suitable medium on which the program is printed, since the program may be obtained electronically, for example, by optically scanning the paper or other medium, followed by editing, deciphering or, if necessary, processing in another suitable manner, and then stored in a computer memory.
[0115] It should be understood that the various parts of the present invention can be implemented by hardware, software, firmware or a combination thereof. In the above-mentioned embodiments, a plurality of steps or methods can be implemented by software or firmware stored in a memory and executed by a suitable instruction execution device. For example, if implemented by hardware, as in another embodiment, it can be implemented by any one of the following technologies known in the art or their combination: a discrete logic circuit having a logic gate circuit for implementing a logic function for a data signal, a dedicated integrated circuit having a suitable combination of logic gate circuits, a programmable gate array (PGA), a field programmable gate array (FPGA), etc.
[0116] In the description of this specification, the description with reference to the terms "one embodiment", "some embodiments", "examples", "specific examples", or "some examples" means that the specific features, structures, materials or characteristics described in conjunction with the embodiment or example are included in at least one embodiment or example of the present invention. In this specification, the schematic representation of the above terms does not necessarily refer to the same embodiment or example. Moreover, the specific features, structures, materials or characteristics described may be combined in any one or more embodiments or examples in a suitable manner.
[0117] Although the embodiments of the present invention have been shown and described, it will be appreciated by those skilled in the art that various changes, modifications, substitutions and variations may be made to the embodiments without departing from the principles and spirit of the present invention, and that the scope of the present invention is defined by the claims and their equivalents.
[0118] The above is a specific description of the preferred implementation of the present invention, but the present invention is not limited to the embodiments. Those skilled in the art can make various equivalent modifications or substitutions without violating the spirit of the present invention. These equivalent modifications or substitutions are all included in the scope defined by the claims of the present invention.
Claims
1. A method for managing and controlling value-added functions, characterized in that: include: In response to a request instruction of a target application for a value-added function to be configured, obtaining function configuration information; wherein the request instruction is generated based on a demand instruction of the target object for the value-added function to be configured executed in the target application; the function configuration information includes a unique identifier of the value-added function to be configured, an authorization time, an identification number of the target object, and a software version number of the target application; Generate a license file according to the function configuration information; The step of generating a license file according to the function configuration information includes: Generate first attribute data in the license data entity class according to the function configuration information; Encrypting the first attribute data by using an RSA encryption algorithm to obtain a license file; Placing the license file into the configuration directory of the target application; In response to the start-up instruction of the target application, the license file in the configuration directory is parsed to obtain a license data instance; wherein the license data instance is stored in a value-added function injection management class; The license file is encrypted by using an RSA encryption algorithm, and the license file in the configuration directory is parsed to obtain a license data instance, including: Decrypt the license file in the configuration directory using an RSA decryption algorithm to obtain a license data instance; Compare the unique identifier of each Java class loaded in the Java loading directory with the unique identifier of the value-added function to be configured corresponding to the license data instance, and if the comparison result exists, incorporate the license data instance into the value-added function injection management class; Wherein, the Java loading directory is used to place the loading files of various value-added functions; In response to a call instruction of a target value-added function, a target license data instance is obtained in the value-added function injection management class, and the business logic of the target value-added function is executed based on the target license data instance.
2. A method for controlling value-added functions according to claim 1, characterized in that: The step of obtaining function configuration information in response to a request instruction from a target application for configuring a value-added function comprises: In response to a request instruction of the target application for the value-added function to be configured, generating an acquisition guide; wherein the acquisition guide represents an index of the target application and the value-added function to be configured; According to the acquisition guide, the function configuration information of the value-added function to be configured is acquired.
3. A method for controlling value-added functions according to claim 1, characterized in that: After the step of placing the license file into the configuration directory of the target application, the method further comprises: Placing the loading file that executes the value-added function to be configured into the Java loading directory; The loading file is used to execute the business logic of the value-added function to be configured.
4. A method for controlling value-added functions according to claim 1, characterized in that: The method further comprises: The license file in the configuration directory is parsed regularly, and the value-added function injection management class is updated by dynamically loading the license file.
5. A method for controlling value-added functions according to claim 1, characterized in that: The method further comprises: When the target permission data instance is not obtained in the value-added function injection management class, the target value-added function is stopped from being called.
6. A control device for value-added functions, characterized in that: include: The first module is used to obtain function configuration information in response to a request instruction of a target application for a value-added function to be configured; wherein the request instruction is generated based on a demand instruction of the target object for the value-added function to be configured executed by the target application; the function configuration information includes a unique identifier of the value-added function to be configured, an authorization time, an identification number of the target object, and a software version number of the target application; The second module is used to generate a license file according to the function configuration information; The step of generating a license file according to the function configuration information includes: Generate first attribute data in the license data entity class according to the function configuration information; Encrypting the first attribute data by using an RSA encryption algorithm to obtain a license file; The third module is used to place the license file into the configuration directory of the target application; The fourth module is used to parse the license file in the configuration directory in response to the startup instruction of the target application to obtain a license data instance; wherein the license data instance is stored in the value-added function injection management class; The license file is encrypted by using an RSA encryption algorithm, and the license file in the configuration directory is parsed to obtain a license data instance, including: Decrypt the license file in the configuration directory using an RSA decryption algorithm to obtain a license data instance; Compare the unique identifier of each Java class loaded in the Java loading directory with the unique identifier of the value-added function to be configured corresponding to the license data instance, and if the comparison result exists, incorporate the license data instance into the value-added function injection management class; Wherein, the Java loading directory is used to place the loading files of various value-added functions; The fifth module is used to respond to the call instruction of the target value-added function, inject the management class of the value-added function to obtain the target license data instance, and execute the business logic of the target value-added function based on the target license data instance.
7. An electronic device, characterized in that: including a processor and a memory; The memory is used to store programs; The processor executes the program to implement the method according to any one of claims 1 to 5.
8. A computer-readable storage medium, characterized in that: The storage medium stores a program, and the program is executed by a processor to implement the method according to any one of claims 1 to 5.
