Software license-based product configuration method and device, equipment and storage medium

By issuing instance and application certificates through root certificates and constructing a red-black tree configuration tree, the problem of inability to achieve fine-grained control and low security in enterprise product deployment is solved, thereby improving product security and enabling refined management.

CN116305050BActive Publication Date: 2026-05-01SHENZHEN FULIN TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
SHENZHEN FULIN TECH CO LTD
Filing Date
2022-12-29
Publication Date
2026-05-01

AI Technical Summary

Technical Problem

In existing technologies, enterprises cannot achieve fine-grained control when deploying multiple products, and there are software product security issues such as later database tampering and log data leakage.

Method used

By issuing instance certificates and application certificates one by one through the root certificate, the configurations of the root program, instance program and application are generated, a red-black tree configuration tree is constructed, and the rules are merged to generate a product configuration set, thereby achieving fine-grained control and improving security.

Benefits of technology

It enables differentiated restrictions and multi-functional control of products in different environments, improves product security and refined management capabilities, and avoids repetitive coding of business code.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116305050B_ABST
    Figure CN116305050B_ABST
Patent Text Reader

Abstract

The application relates to the technical field of software information security, and discloses a product configuration method based on software license, which comprises the following steps: obtaining a root certificate, issuing an instance certificate of a preset instance environment according to the root certificate, and issuing an application certificate of a preset application according to the instance certificate; generating a root program configuration, an instance program configuration and an application program configuration according to the root certificate, the instance certificate and the application certificate; constructing a first configuration tree corresponding to the root program configuration, a second configuration tree corresponding to the instance program configuration and a third configuration tree corresponding to the application program configuration; and performing rule merging on the first configuration tree, the second configuration tree and the third configuration tree to obtain a product configuration set. The application further discloses a product configuration device based on software license, an electronic device and a storage medium. The application can improve the fine control of business deployment and the security of products.
Need to check novelty before this filing date? Find Prior Art

Description

Software-licensed product configuration methods, apparatus, devices, and storage media Technical Field

[0001] This invention relates to the field of software information security technology, and in particular to a product configuration method, apparatus, electronic device, and computer-readable storage medium based on software licenses. Background Technology

[0002] As businesses grow, most are no longer limited to a single product, but rather offer a variety of products across multiple categories, directions, and functions. After abstracting these products into applications, they are typically deployed to different customers by business personnel. Current deployment methods mostly involve structuring the business program as a whole or encapsulating it in a tree structure to achieve structured control over different business functions. However, deployments to different customers lack fine-grained control, and the deployed products often suffer from software security issues such as later database tampering and log data leakage. Summary of the Invention

[0003] This invention provides a product configuration method, apparatus, electronic device, and computer-readable storage medium based on software licenses. Its main purpose is to solve the problems of inability to achieve fine-grained control in business deployment and low product security.

[0004] To achieve the above objectives, the present invention provides a product configuration method based on software licensing, comprising:

[0005] Obtain the root certificate, issue an instance certificate for the preset instance environment based on the root certificate, and issue an application certificate for the preset application based on the instance certificate.

[0006] Generate root program configuration, instance program configuration, and application configuration based on the root certificate, the instance certificate, and the application certificate;

[0007] Construct a first configuration tree corresponding to the root program configuration, a second configuration tree corresponding to the instance program configuration, and a third configuration tree corresponding to the application configuration;

[0008] The first configuration tree, the second configuration tree, and the third configuration tree are merged by rules to obtain the product configuration set.

[0009] Optionally, generating the root program configuration, instance program configuration, and application configuration based on the root certificate, the instance certificate, and the application certificate includes:

[0010] Obtain the executable program contained in the root certificate, the instance certificate, and the application certificate;

[0011] Write an execution script based on the aforementioned program, execute the execution script, and obtain the root program configuration, instance program configuration, and application configuration.

[0012] Optionally, constructing the first configuration tree corresponding to the root program configuration, the second configuration tree corresponding to the instance program configuration, and the third configuration tree corresponding to the application configuration includes:

[0013] Obtain multiple configuration items from the root program configuration, the instance program configuration, and the application configuration, respectively;

[0014] Initialize the root node, and generate and update child nodes and leaf nodes according to the preset node rules, the root node, and the configuration items;

[0015] A first configuration tree, a second configuration tree, and a third configuration tree are generated based on the root node, the updated child node, and the leaf node.

[0016] Optionally, the step of merging the first configuration tree, the second configuration tree, and the third configuration tree according to rules to obtain a product configuration set includes:

[0017] Obtain the nodes of the first configuration tree, the second configuration tree, and the third configuration tree; perform node layer partitioning on the nodes; merge nodes of the same node layer according to the first rule to obtain the initial configuration set tree;

[0018] The characters in the initial configuration set tree are overwritten in one direction to obtain the updated configuration set tree;

[0019] The updated configuration set tree is hierarchically adjusted to obtain the product configuration set.

[0020] Optionally, the hierarchical reconfiguration of the updated configuration set tree to obtain the product configuration set includes:

[0021] Extract the organizational hierarchy, instance hierarchy, and application hierarchy of the updated configuration set tree;

[0022] The product configuration set is obtained by configuring rules at the organization level, the instance level, and the application level respectively.

[0023] Optionally, issuing an instance certificate for a preset instance environment based on the root certificate includes:

[0024] Obtain the instance data and instance public key of the instance environment, and sign the instance public key using the private key of the root certificate to obtain the root certificate signature;

[0025] An instance certificate is generated based on the instance data, the instance public key, and the root certificate signature.

[0026] Optionally, issuing an application certificate for a preset application based on the instance certificate includes:

[0027] Obtain the application data and application public key of the application, and sign the application public key using the private key of the instance certificate to obtain the instance certificate signature;

[0028] An application certificate is generated based on the application data, the application public key, and the instance certificate signature.

[0029] To address the above problems, the present invention also provides a product configuration device based on a software license, the device comprising:

[0030] The certificate issuance module is used to obtain the root certificate, issue an instance certificate for a preset instance environment based on the root certificate, and issue an application certificate for a preset application based on the instance certificate.

[0031] The program configuration generation module is used to generate root program configuration, instance program configuration and application configuration based on the root certificate, the instance certificate and the application certificate.

[0032] A configuration tree building module is used to build a first configuration tree corresponding to the root program configuration, a second configuration tree corresponding to the instance program configuration, and a third configuration tree corresponding to the application configuration.

[0033] The product configuration generation module is used to merge the first configuration tree, the second configuration tree, and the third configuration tree according to rules to obtain a product configuration set.

[0034] To address the above problems, the present invention also provides an electronic device, the electronic device comprising:

[0035] At least one processor; and,

[0036] A memory communicatively connected to the at least one processor; wherein,

[0037] The memory stores a computer program that can be executed by the at least one processor, the computer program being executed by the at least one processor to enable the at least one processor to perform the software license-based product configuration method described above.

[0038] To address the aforementioned problems, the present invention also provides a computer-readable storage medium storing at least one computer program, which is executed by a processor in an electronic device to implement the software-licensed product configuration method described above.

[0039] This invention, through the issuance of instance certificates and application certificates one by one by the root certificate, ensures the security of the encapsulated configuration files, thereby improving product security performance. Through tree-structured configuration, each configuration certificate can enable or disable a subtree controlled by a root node in the configuration tree, and each leaf node in the configuration tree can also finely control the different manifestations of a specific business function. The final generated product configuration set can easily obtain the configuration tree and individual configuration sets corresponding to instances, organizations, and organization members, enabling the configuration of business logic. The configuration tree allows for differentiated restrictions and multi-functional control of the product under different deployment environments. Therefore, the product configuration method, apparatus, electronic device, and computer-readable storage medium based on software licenses proposed in this invention can solve the problems of inability to achieve fine-grained control in business deployment and low product security. Attached Figure Description

[0040] Figure 1 is a flowchart illustrating a product configuration method based on software licensing according to an embodiment of the present invention.

[0041] Figure 2 is a flowchart illustrating the process of constructing a first configuration tree corresponding to the root program configuration, a second configuration tree corresponding to the instance program configuration, and a third configuration tree corresponding to the application configuration, according to an embodiment of the present invention.

[0042] Figure 3 is a schematic diagram of the process of merging the first configuration tree, the second configuration tree and the third configuration tree according to rules to obtain a product configuration set according to an embodiment of the present invention;

[0043] Figure 4 is a functional block diagram of a product configuration device based on software license provided in an embodiment of the present invention;

[0044] Figure 5 is a schematic diagram of the structure of an electronic device that implements the software license-based product configuration method according to an embodiment of the present invention.

[0045] The realization of the objective, functional features and advantages of the present invention will be further explained in conjunction with the embodiments and with reference to the accompanying drawings. Detailed Implementation

[0046] It should be understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention.

[0047] This application provides a product configuration method based on software licenses. The execution entity of the software license-based product configuration method includes, but is not limited to, at least one of the following electronic devices that can be configured to execute the method provided in this application: a server, a terminal, etc. In other words, the software license-based product configuration method can be executed by software or hardware installed on a terminal device or a server device, and the software can be a blockchain platform. The server includes, but is not limited to, a single server, a server cluster, a cloud server, or a cloud server cluster. The server can be an independent server or a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communication, middleware services, domain name services, security services, content delivery networks (CDNs), and big data and artificial intelligence platforms.

[0048] Referring to Figure 1, a flowchart illustrating a software license-based product configuration method according to an embodiment of the present invention is shown. In this embodiment, the software license-based product configuration method includes:

[0049] S1. Obtain the root certificate, issue an instance certificate for the preset instance environment based on the root certificate, and issue an application certificate for the preset application based on the instance certificate.

[0050] In this embodiment of the invention, the root certificate is held by the product provider and is not publicly released; the root certificate is not digitally signed by any upper-level organization, and is a self-signed public key certificate, serving as the starting point of the certificate trust chain. The instance certificate contains instance data, a corresponding second public key, and the root certificate's signature on the data within the instance certificate; the application certificate contains application data, a corresponding third public key, and the instance certificate's signature on the data within the application certificate.

[0051] In this embodiment of the invention, issuing an instance certificate for a preset instance environment based on the root certificate includes:

[0052] Obtain the instance data and instance public key of the instance environment, and sign the instance public key using the private key of the root certificate to obtain the root certificate signature;

[0053] An instance certificate is generated based on the instance data, the instance public key, and the root certificate signature.

[0054] In this embodiment of the invention, issuing an application certificate for a preset application based on the instance certificate includes:

[0055] Obtain the application data and application public key of the application, and sign the application public key using the private key of the instance certificate to obtain the instance certificate signature;

[0056] An application certificate is generated based on the application data, the application public key, and the instance certificate signature.

[0057] In this embodiment of the invention, the instance public key can be obtained from the instance key pair generated based on the instance environment; the application public key can be obtained from the application key pair generated based on the application. Specifically, the instance key pair and the application key pair can be generated using asymmetric encryption.

[0058] In another optional embodiment of the present invention, the instance data in the instance certificate and the application data in the application certificate can be stored in the form of a data digest.

[0059] In this embodiment of the invention, the process of issuing an instance certificate using a root certificate is the process of signing and sealing the public key of the instance certificate using the private key of the root certificate. Correspondingly, the public key of the root certificate can be used by a third party for signature verification. The process of issuing an application certificate using an instance certificate is the process of signing and sealing the public key of the application certificate using the private key of the instance certificate. Correspondingly, the public key of the instance certificate can be used by a third party for signature verification.

[0060] In this embodiment of the invention, the instance certificate is generated by the root certificate and issued along with the deployment of different instance environments. Only one instance certificate is generated for each instance. The application certificate is issued by the instance certificate. Each application certificate corresponds to one application. The application certificate describes the functional scope set of the corresponding application in the instance environment and restricts the use of the application by the client according to the functional rules.

[0061] In this embodiment of the invention, after the validity of each certificate is successfully verified, the data in each certificate (i.e., configuration information, configuration items, etc.) can be read into the business operation program; during the operation of the business program, restrictions can be implemented on the product applications owned by the customer, the validity period of the applications, the maximum number of people authorized for the applications, and the functions of the applications.

[0062] S2. Generate root program configuration, instance program configuration and application configuration based on the root certificate, the instance certificate and the application certificate.

[0063] In this embodiment of the invention, the root program configuration, instance program configuration, and application configuration are configuration files corresponding to the root program, instance environment program, and application, respectively; that is, files that store the configuration information required to run the program. For example, the application configuration may include the name, domain name, and IP address of the application running on the system; the hardware environment parameters of the application running on the client; and the database source required to run the application.

[0064] In this embodiment of the invention, generating the root program configuration, instance program configuration, and application configuration based on the root certificate, the instance certificate, and the application certificate includes:

[0065] Obtain the executable program contained in the root certificate, the instance certificate, and the application certificate;

[0066] Write an execution script based on the aforementioned program, execute the execution script, and obtain the root program configuration, instance program configuration, and application configuration.

[0067] In this embodiment of the invention, an assembly language can be selected based on different instance environments to generate the runtime script. For example, in the OpenStack environment, the runtime script can be written using the Python language.

[0068] In this embodiment of the invention, the product hierarchy decreases from high to low as follows: product version, product certificate (i.e., root certificate, instance certificate, and application certificate), configuration file (i.e., root program configuration, instance program configuration, and application configuration), and configuration items in the configuration file.

[0069] In this embodiment of the invention, the running program can ultimately be loaded into a single configuration; based on different functional points, multiple configuration items at different business levels (instances, organizations within instances, and users within organizations) can achieve fine-grained management, avoiding the need to code different levels separately when developing business code.

[0070] S3. Construct the first configuration tree corresponding to the root program configuration, the second configuration tree corresponding to the instance program configuration, and the third configuration tree corresponding to the application configuration.

[0071] In this embodiment of the invention, the program configuration includes multiple configuration items, each of which can have specific restrictive capabilities. During program execution, it only needs to judge a single configuration item to achieve the purpose of restricting user behavior. The multiple configuration items can include static and dynamic configuration items. Static configuration items refer to those whose corresponding values ​​do not change, such as preset application running system name, domain name and IP address, local hardware environment parameters, etc. Dynamic configuration items refer to those whose corresponding values ​​can change depending on the running environment, such as preset value functions corresponding to preset dynamic configuration items.

[0072] Please refer to Figure 2. In this embodiment of the invention, constructing the first configuration tree corresponding to the root program configuration, the second configuration tree corresponding to the instance program configuration, and the third configuration tree corresponding to the application configuration includes:

[0073] S21. Obtain multiple configuration items from the root program configuration, the instance program configuration, and the application configuration, respectively;

[0074] S22. Initialize the root node, and generate updated child nodes and leaf nodes according to the preset node rules, the root node, and the configuration items;

[0075] S23. Generate a first configuration tree, a second configuration tree, and a third configuration tree based on the root node, the updated child node, and the leaf node.

[0076] In this embodiment of the invention, the first configuration tree is a red-black tree constructed from the configuration items included in the root program configuration, the second configuration tree is a red-black tree constructed from the configuration items included in the instance program configuration, and the third configuration tree is a red-black tree constructed from the configuration items included in the application configuration. Specifically, the red-black tree is a tree data structure, wherein the red nodes in the red-black tree can be root nodes or updating child nodes, and the black nodes in the red-black tree can be leaf nodes.

[0077] In this embodiment of the invention, in the node rules, the root node and the updated child node are Boolean values, and the subtree of the root node is obtained only when the Boolean value is true; the leaf node can be any form of node, representing some business configuration, and can support personalization.

[0078] In this embodiment of the invention, according to the configuration item, branches of the tree are generated downward from the root node. The two ends of the branch can be the root node / updated child node and the updated child node, or the root node / updated child node and the leaf node.

[0079] In a practical application scenario of this invention, taking the domestic and overseas versions of the product as examples, in the configuration tree, the domestic and overseas versions can be updated as child nodes respectively. Under this updated child node, there is a configuration item called "Login Method". The leaf node content of this configuration item can be mobile phone number login or email login in the updated child node of the domestic version, and mobile phone number login, email login, and third-party login in the updated child node of the overseas version.

[0080] In this embodiment of the invention, based on tree configuration, each configuration certificate / configuration tree can enable or disable a subtree managed by a root node, and each leaf node can also finely control the different manifestations of a certain business function.

[0081] S4. Merge the first configuration tree, the second configuration tree, and the third configuration tree according to the rules to obtain the product configuration set.

[0082] Please refer to Figure 3. In this embodiment of the invention, the step of merging the first configuration tree, the second configuration tree, and the third configuration tree according to rules to obtain a product configuration set includes:

[0083] S31. Obtain the nodes of the first configuration tree, the second configuration tree, and the third configuration tree; perform node layer division on the nodes; merge the nodes of the same node layer according to the first rule to obtain the initial configuration set tree.

[0084] S32. Overwrite the characters in the initial configuration set tree in one direction to obtain the updated configuration set tree;

[0085] S33. Perform hierarchical reconfiguration on the updated configuration set tree to obtain the product configuration set.

[0086] In this embodiment of the invention, the first rule for merging lower-level node layers into higher-level node layers must satisfy the following: the root node cannot be changed from False to True; when covering leaf nodes, the value of all root nodes on the path of the leaf node must be True.

[0087] In this embodiment of the invention, when merging characters, for numbers and strings, the unidirectional overlay direction can only be from largest to smallest, while for set types, the intersection is taken.

[0088] In this embodiment of the invention, the hierarchical reconfiguration of the updated configuration set tree to obtain the product configuration set includes:

[0089] Extract the organizational hierarchy, instance hierarchy, and application hierarchy of the updated configuration set tree;

[0090] The product configuration set is obtained by configuring rules at the organization level, the instance level, and the application level respectively.

[0091] In this embodiment of the invention, at the organization configuration level, the organization configuration maintains a list of products owned by the organization, product expiration information, product number limits, and product versions. The configuration format can be: org: "XXX customer", saleRegion: "cn", saleVersion: "3.8", customerCheck: "2DYa2z4sF437T4CQ".

[0092] In this embodiment of the invention, at the instance configuration level, the availability and visibility of the product can be controlled from the perspective of the entire runtime environment. This control remains unchanged regardless of user usage and operation, and is therefore immutable. For example, to control the user's application list and enable / disable the mobile app, the following configuration can be used: ones:instance:apps:"project, wiki, testcase", ones:instance:mobileApp:"false".

[0093] In this embodiment of the invention, at the application (feature set) configuration level, different products can have different versions at the business definition level. Each application configuration must have the following configuration items: appName (application name), edition (version name), priority, and ones:app:{appname}:enable (application startup switch). For example, priority is an integer that specifies the priority of different application versions; only high-priority configurations can override low-priority configurations. Furthermore, within the product-defined application list, app:{appname}:enable can be set to False by default, so users cannot use any application without authorization. An example of an application configuration is as follows: appName: "wiki", edition: "team", priority: "1", config:app:wiki:enable: "true".

[0094] In this embodiment of the invention, the encapsulated product configuration set facilitates the acquisition of the configuration tree and individual configuration set corresponding to instances, organizations, and organization members, thereby enabling the configuration-based implementation of business logic.

[0095] This invention, through the issuance of instance and application certificates sequentially by the root certificate, ensures the security of the encapsulated configuration files, thereby enhancing product security. Using a tree-structured configuration, each configuration certificate can enable or disable a subtree controlled by a root node in the configuration tree, and each leaf node in the configuration tree can finely control the different manifestations of a specific business function. The resulting product configuration set facilitates the retrieval of configuration trees and individual configuration sets corresponding to instances, organizations, and organization members, enabling the configuration of business logic. The configuration tree allows for differentiated restrictions and multi-functional control of the product under different deployment environments. Therefore, the software license-based product configuration method proposed in this invention can solve the problems of inability to achieve fine-grained control and low product security in business deployments.

[0096] Figure 4 shows a functional block diagram of a product configuration device based on software license provided in an embodiment of the present invention.

[0097] The software-licensed product configuration device 100 of this invention can be installed in an electronic device. Depending on the functions implemented, the software-licensed product configuration device 100 may include a certificate issuance module 101, a program configuration generation module 102, a configuration tree construction module 103, and a product configuration generation module 104. The module described in this invention can also be referred to as a unit, which refers to a series of computer program segments that can be executed by the processor of an electronic device and can perform a fixed function, and which are stored in the memory of the electronic device.

[0098] In this embodiment, the functions of each module / unit are as follows:

[0099] The certificate issuance module 101 is used to obtain a root certificate, issue an instance certificate for a preset instance environment based on the root certificate, and issue an application certificate for a preset application based on the instance certificate.

[0100] In this embodiment of the invention, the root certificate is held by the product provider and is not publicly released; the root certificate is not digitally signed by any upper-level organization, and is a self-signed public key certificate, serving as the starting point of the certificate trust chain. The instance certificate contains instance data, a corresponding second public key, and the root certificate's signature on the data within the instance certificate; the application certificate contains application data, a corresponding third public key, and the instance certificate's signature on the data within the application certificate.

[0101] In this embodiment of the invention, when the certificate issuing module 101 performs the function of issuing an instance certificate for a preset instance environment based on the root certificate, it is specifically used for:

[0102] Obtain the instance data and instance public key of the instance environment, and sign the instance public key using the private key of the root certificate to obtain the root certificate signature;

[0103] An instance certificate is generated based on the instance data, the instance public key, and the root certificate signature.

[0104] In this embodiment of the invention, when the certificate issuing module 101 performs the function of issuing an application certificate for a preset application based on the instance certificate, it is specifically used for:

[0105] Obtain the application data and application public key of the application, and sign the application public key using the private key of the instance certificate to obtain the instance certificate signature;

[0106] An application certificate is generated based on the application data, the application public key, and the instance certificate signature.

[0107] In this embodiment of the invention, the instance public key can be obtained from the instance key pair generated based on the instance environment; the application public key can be obtained from the application key pair generated based on the application. Specifically, the instance key pair and the application key pair can be generated using asymmetric encryption.

[0108] In another optional embodiment of the present invention, the instance data in the instance certificate and the application data in the application certificate can be stored in the form of a data digest.

[0109] In this embodiment of the invention, the process of issuing an instance certificate using a root certificate is the process of signing and sealing the public key of the instance certificate using the private key of the root certificate. Correspondingly, the public key of the root certificate can be used by a third party for signature verification. The process of issuing an application certificate using an instance certificate is the process of signing and sealing the public key of the application certificate using the private key of the instance certificate. Correspondingly, the public key of the instance certificate can be used by a third party for signature verification.

[0110] In this embodiment of the invention, the instance certificate is generated by the root certificate and issued along with the deployment of different instance environments. Only one instance certificate is generated for each instance. The application certificate is issued by the instance certificate. Each application certificate corresponds to one application. The application certificate describes the functional scope set of the corresponding application in the instance environment and restricts the use of the application by the client according to the functional rules.

[0111] In this embodiment of the invention, after the validity of each certificate is successfully verified, the data in each certificate (i.e., configuration information, configuration items, etc.) can be read into the business operation program; during the operation of the business program, restrictions can be implemented on the product applications owned by the customer, the validity period of the applications, the maximum number of people authorized for the applications, and the functions of the applications.

[0112] The program configuration generation module 102 is used to generate root program configuration, instance program configuration and application configuration based on the root certificate, the instance certificate and the application certificate.

[0113] In this embodiment of the invention, the root program configuration, instance program configuration, and application configuration are configuration files corresponding to the root program, instance environment program, and application, respectively; that is, files that store the configuration information required to run the program. For example, the application configuration may include the name, domain name, and IP address of the application running on the system; the hardware environment parameters of the application running on the client; and the database source required to run the application.

[0114] In this embodiment of the invention, when the program configuration generation module 102 performs the function of generating root program configuration, instance program configuration, and application configuration based on the root certificate, the instance certificate, and the application certificate, it is specifically used for:

[0115] Obtain the executable program contained in the root certificate, the instance certificate, and the application certificate;

[0116] Write an execution script based on the aforementioned program, execute the execution script, and obtain the root program configuration, instance program configuration, and application configuration.

[0117] In this embodiment of the invention, an assembly language can be selected based on different instance environments to generate the runtime script. For example, in the OpenStack environment, the runtime script can be written using the Python language.

[0118] In this embodiment of the invention, the product hierarchy decreases from high to low as follows: product version, product certificate (i.e., root certificate, instance certificate, and application certificate), configuration file (i.e., root program configuration, instance program configuration, and application configuration), and configuration items in the configuration file.

[0119] In this embodiment of the invention, the running program can ultimately be loaded into a single configuration; based on different functional points, multiple configuration items at different business levels (instances, organizations within instances, and users within organizations) can achieve fine-grained management, avoiding the need to code different levels separately when developing business code.

[0120] The configuration tree construction module 103 is used to construct a first configuration tree corresponding to the root program configuration, a second configuration tree corresponding to the instance program configuration, and a third configuration tree corresponding to the application configuration.

[0121] In this embodiment of the invention, the program configuration includes multiple configuration items, each of which can have specific restrictive capabilities. During program execution, it only needs to judge a single configuration item to achieve the purpose of restricting user behavior. The multiple configuration items can include static and dynamic configuration items. Static configuration items refer to those whose corresponding values ​​do not change, such as preset application running system name, domain name and IP address, local hardware environment parameters, etc. Dynamic configuration items refer to those whose corresponding values ​​can change depending on the running environment, such as preset value functions corresponding to preset dynamic configuration items.

[0122] In this embodiment of the invention, when the configuration tree construction module 103 performs the function of constructing the first configuration tree corresponding to the root program configuration, the second configuration tree corresponding to the instance program configuration, and the third configuration tree corresponding to the application configuration, it is specifically used for:

[0123] Obtain multiple configuration items from the root program configuration, the instance program configuration, and the application configuration, respectively;

[0124] Initialize the root node, and generate and update child nodes and leaf nodes according to the preset node rules, the root node, and the configuration items;

[0125] A first configuration tree, a second configuration tree, and a third configuration tree are generated based on the root node, the updated child node, and the leaf node.

[0126] In this embodiment of the invention, the first configuration tree is a red-black tree constructed from the configuration items included in the root program configuration, the second configuration tree is a red-black tree constructed from the configuration items included in the instance program configuration, and the third configuration tree is a red-black tree constructed from the configuration items included in the application configuration. Specifically, the red-black tree is a tree data structure, wherein the red nodes in the red-black tree can be root nodes or updating child nodes, and the black nodes in the red-black tree can be leaf nodes.

[0127] In this embodiment of the invention, in the node rules, the root node and the updated child node are Boolean values, and the subtree of the root node is obtained only when the Boolean value is true; the leaf node can be any form of node, representing some business configuration, and can support personalization.

[0128] In this embodiment of the invention, according to the configuration item, branches of the tree are generated downward from the root node. The two ends of the branch can be the root node / updated child node and the updated child node, or the root node / updated child node and the leaf node.

[0129] In a practical application scenario of this invention, taking the domestic and overseas versions of the product as examples, in the configuration tree, the domestic and overseas versions can be updated as child nodes respectively. Under this updated child node, there is a configuration item called "Login Method". The leaf node content of this configuration item can be mobile phone number login or email login in the updated child node of the domestic version, and mobile phone number login, email login, and third-party login in the updated child node of the overseas version.

[0130] In this embodiment of the invention, based on tree configuration, each configuration certificate / configuration tree can enable or disable a subtree managed by a root node, and each leaf node can also finely control the different manifestations of a certain business function.

[0131] The product configuration generation module 104 is used to merge the first configuration tree, the second configuration tree and the third configuration tree according to rules to obtain a product configuration set.

[0132] In this embodiment of the invention, when the product configuration generation module 104 performs the function of merging the first configuration tree, the second configuration tree, and the third configuration tree according to rules to obtain a product configuration set, it is specifically used for:

[0133] Obtain the nodes of the first configuration tree, the second configuration tree, and the third configuration tree; perform node layer partitioning on the nodes; merge nodes of the same node layer according to the first rule to obtain the initial configuration set tree;

[0134] The characters in the initial configuration set tree are overwritten in one direction to obtain the updated configuration set tree;

[0135] The updated configuration set tree is hierarchically adjusted to obtain the product configuration set.

[0136] In this embodiment of the invention, the first rule for merging lower-level node layers into higher-level node layers must satisfy the following: the root node cannot be changed from False to True; when covering leaf nodes, the value of all root nodes on the path of the leaf node must be True.

[0137] In this embodiment of the invention, when merging characters, for numbers and strings, the unidirectional overlay direction can only be from largest to smallest, while for set types, the intersection is taken.

[0138] In this embodiment of the invention, when the product configuration generation module 104 performs hierarchical allocation of the updated configuration set tree to obtain the product configuration set, it is specifically used for:

[0139] Extract the organizational hierarchy, instance hierarchy, and application hierarchy of the updated configuration set tree;

[0140] The product configuration set is obtained by configuring rules at the organization level, the instance level, and the application level respectively.

[0141] In this embodiment of the invention, at the organization configuration level, the organization configuration maintains a list of products owned by the organization, product expiration information, product number limits, and product versions. The configuration format can be: org: "XXX customer", saleRegion: "cn", saleVersion: "3.8", customerCheck: "2DYa2z4sF437T4CQ".

[0142] In this embodiment of the invention, at the instance configuration level, the availability and visibility of the product can be controlled from the perspective of the entire runtime environment. This control remains unchanged regardless of user usage and operation, and is therefore immutable. For example, to control the user's application list and enable / disable the mobile app, the following configuration can be used: ones:instance:apps:"project, wiki, testcase", ones:instance:mobileApp:"false".

[0143] In this embodiment of the invention, at the application (feature set) configuration level, different products can have different versions at the business definition level. Each application configuration must have the following configuration items: appName (application name), edition (version name), priority, and ones:app:{appname}:enable (application startup switch). For example, priority is an integer that specifies the priority of different application versions; only high-priority configurations can override low-priority configurations. Furthermore, within the product-defined application list, app:{appname}:enable can be set to False by default, so users cannot use any application without authorization. An example of an application configuration is as follows: appName: "wiki", edition: "team", priority: "1", config:app:wiki:enable: "true".

[0144] In this embodiment of the invention, the encapsulated product configuration set facilitates the acquisition of the configuration tree and individual configuration set corresponding to instances, organizations, and organization members, thereby enabling the configuration-based implementation of business logic.

[0145] Figure 5 shows a schematic diagram of the structure of an electronic device that implements a product configuration method based on software licensing, according to an embodiment of the present invention.

[0146] The electronic device 1 may include a processor 10, a memory 11, a communication bus 12, and a communication interface 13. It may also include a computer program stored in the memory 11 and capable of running on the processor 10, such as a product configuration program based on a software license.

[0147] In some embodiments, the processor 10 may be composed of integrated circuits, such as a single packaged integrated circuit or multiple integrated circuits with the same or different functions, including combinations of one or more central processing units (CPUs), microprocessors, digital processing chips, graphics processors, and various control chips. The processor 10 is the control unit of the electronic device, connecting various components of the entire electronic device through various interfaces and lines. It executes programs or modules stored in the memory 11 (e.g., executing product configuration programs based on software licenses) and calls data stored in the memory 11 to perform various functions of the electronic device and process data.

[0148] The memory 11 includes at least one type of readable storage medium, including flash memory, portable hard drive, multimedia card, card-type memory (e.g., SD or DX memory), magnetic memory, magnetic disk, optical disk, etc. In some embodiments, the memory 11 can be an internal storage unit of an electronic device, such as a portable hard drive. In other embodiments, the memory 11 can be an external storage device of the electronic device, such as a plug-in portable hard drive, Smart Media Card (SMC), Secure Digital (SD) card, Flash Card, etc. Furthermore, the memory 11 can include both internal and external storage units of the electronic device. The memory 11 can be used not only to store application software and various types of data installed on the electronic device, such as code for product configuration programs based on software licenses, but also to temporarily store data that has been output or will be output.

[0149] The communication bus 12 can be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus, etc. This bus can be divided into an address bus, a data bus, a control bus, etc. The bus is configured to enable communication between the memory 11 and at least one processor 10, etc.

[0150] The communication interface 13 is used for communication between the aforementioned electronic device and other devices, including a network interface and a user interface. Optionally, the network interface may include a wired interface and / or a wireless interface (such as a Wi-Fi interface, Bluetooth interface, etc.), typically used to establish communication connections between the electronic device and other electronic devices. The user interface may be a display, an input unit (such as a keyboard), or optionally, a standard wired or wireless interface. Optionally, in some embodiments, the display may be an LED display, a liquid crystal display, a touch-sensitive liquid crystal display, or an OLED (Organic Light-Emitting Diode) touchscreen, etc. The display may also be appropriately referred to as a screen or display unit, used to display information processed in the electronic device and to display a visual user interface.

[0151] Figure 5 only shows an electronic device with components. Those skilled in the art will understand that the structure shown in Figure 5 does not constitute a limitation on the electronic device 1, and may include fewer or more components than shown, or combine certain components, or have different component arrangements.

[0152] For example, although not shown, the electronic device may also include a power supply (such as a battery) to power the various components. Preferably, the power supply can be logically connected to the at least one processor 10 through a power management device, thereby enabling functions such as charging management, discharging management, and power consumption management. The power supply may also include one or more DC or AC power supplies, recharging devices, power fault detection circuits, power converters or inverters, power status indicators, and other arbitrary components. The electronic device may also include various sensors, Bluetooth modules, Wi-Fi modules, etc., which will not be described in detail here.

[0153] It should be understood that the embodiments described are for illustrative purposes only and are not limited to this structure in the scope of the patent application.

[0154] The software-licensed product configuration program stored in the memory 11 of the electronic device 1 is a combination of multiple instructions that, when run in the processor 10, can achieve the following:

[0155] Obtain the root certificate, issue an instance certificate for the preset instance environment based on the root certificate, and issue an application certificate for the preset application based on the instance certificate.

[0156] Generate root program configuration, instance program configuration, and application configuration based on the root certificate, the instance certificate, and the application certificate;

[0157] Construct a first configuration tree corresponding to the root program configuration, a second configuration tree corresponding to the instance program configuration, and a third configuration tree corresponding to the application configuration;

[0158] The first configuration tree, the second configuration tree, and the third configuration tree are merged by rules to obtain the product configuration set.

[0159] Specifically, the specific implementation method of the processor 10 for the above instructions can be referred to the description of the relevant steps in the corresponding embodiment of the accompanying drawings, and will not be repeated here.

[0160] Furthermore, if the modules / units integrated in the electronic device 1 are implemented as software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. The computer-readable storage medium can be volatile or non-volatile. For example, the computer-readable medium may include: any entity or device capable of carrying the computer program code, a recording medium, a USB flash drive, a portable hard drive, a magnetic disk, an optical disk, a computer memory, or a read-only memory (ROM).

[0161] The present invention also provides a computer-readable storage medium storing a computer program, which, when executed by a processor of an electronic device, can perform the following:

[0162] Obtain the root certificate, issue an instance certificate for the preset instance environment based on the root certificate, and issue an application certificate for the preset application based on the instance certificate.

[0163] Generate root program configuration, instance program configuration, and application configuration based on the root certificate, the instance certificate, and the application certificate;

[0164] Construct a first configuration tree corresponding to the root program configuration, a second configuration tree corresponding to the instance program configuration, and a third configuration tree corresponding to the application configuration;

[0165] The first configuration tree, the second configuration tree, and the third configuration tree are merged by rules to obtain the product configuration set.

[0166] In the several embodiments provided by this invention, it should be understood that the disclosed devices, apparatuses, and methods can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative; for instance, the division of modules is only a logical functional division, and other division methods may be used in actual implementation.

[0167] The modules described as separate components may or may not be physically separate. The components shown as modules may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the modules can be selected to achieve the purpose of this embodiment according to actual needs.

[0168] Furthermore, the functional modules in the various embodiments of the present invention can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or in the form of hardware plus software functional modules.

[0169] It will be apparent to those skilled in the art that the present invention is not limited to the details of the exemplary embodiments described above, and that the present invention can be implemented in other specific forms without departing from the spirit or essential characteristics of the present invention.

[0170] Therefore, the embodiments should be considered exemplary and non-limiting in all respects, and the scope of the invention is defined by the appended claims rather than the foregoing description. Thus, all variations falling within the meaning and scope of equivalents of the claims are intended to be embraced within the invention. No appended diagram markings in the claims should be construed as limiting the scope of the claims.

[0171] Furthermore, it is clear that the word "comprising" does not exclude other units or steps, and the singular does not exclude the plural. Multiple units or devices recited in the system claims may also be implemented by a single unit or device through software or hardware. The terms "first," "second," etc., are used to indicate names and do not indicate any specific order.

[0172] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention and are not intended to limit it. Although the present invention has been described in detail with reference to preferred embodiments, those skilled in the art should understand that modifications or equivalent substitutions can be made to the technical solutions of the present invention without departing from the spirit and scope of the technical solutions of the present invention.

Claims

1. A product configuration method based on software license, characterized in that, The method includes: obtaining a root certificate; issuing an instance certificate for a preset instance environment based on the root certificate; and issuing an application certificate for a preset application based on the instance certificate; generating a root program configuration, an instance program configuration, and an application configuration based on the root certificate, the instance certificate, and the application certificate; obtaining multiple configuration items for the root program configuration, the instance program configuration, and the application configuration, respectively; initializing a root node; generating update child nodes and leaf nodes based on preset node rules, the root node, and the configuration items; generating a first configuration tree, a second configuration tree, and a third configuration tree based on the root node, the update child nodes, and the leaf nodes; obtaining the nodes of the first configuration tree, the second configuration tree, and the third configuration tree; performing node layer partitioning on the nodes; merging nodes at the same node layer according to a first rule to obtain an initial configuration set tree; performing unidirectional overwriting on the characters in the initial configuration set tree to obtain an updated configuration set tree; and performing hierarchical reconfiguration on the updated configuration set tree to obtain a product configuration set.

2. The product configuration method based on software license as described in claim 1, characterized in that, The step of generating root program configuration, instance program configuration, and application configuration based on the root certificate, instance certificate, and application certificate includes: obtaining the running program contained in the root certificate, instance certificate, and application certificate; writing a running script based on the running program; executing the running script to obtain the root program configuration, instance program configuration, and application configuration.

3. The product configuration method based on software license as described in claim 2, characterized in that, The step of hierarchically adjusting the updated configuration set tree to obtain a product configuration set includes: extracting the organization level, instance level, and application level of the updated configuration set tree; and configuring rules at the organization level, the instance level, and the application level respectively to obtain the product configuration set.

4. The product configuration method based on software license as described in claim 1, characterized in that, The step of issuing an instance certificate for a preset instance environment based on the root certificate includes: obtaining instance data and an instance public key of the instance environment; signing the instance public key using the private key of the root certificate to obtain a root certificate signature; and generating an instance certificate based on the instance data, the instance public key, and the root certificate signature.

5. The product configuration method based on software licensing as described in any one of claims 1 to 4, characterized in that, The step of issuing an application certificate for a preset application based on the instance certificate includes: obtaining the application data and application public key of the application; signing the application public key using the private key of the instance certificate to obtain an instance certificate signature; and generating an application certificate based on the application data, the application public key, and the instance certificate signature.

6. A product configuration apparatus based on a software license, used to implement the product configuration method based on a software license as described in any one of claims 1 to 5, characterized in that, The apparatus includes: a certificate issuing module, configured to obtain a root certificate, issue an instance certificate for a preset instance environment based on the root certificate, and issue an application certificate for a preset application based on the instance certificate; a program configuration generation module, configured to generate a root program configuration, an instance program configuration, and an application configuration based on the root certificate, the instance certificate, and the application certificate; a configuration tree construction module, configured to construct a first configuration tree corresponding to the root program configuration, a second configuration tree corresponding to the instance program configuration, and a third configuration tree corresponding to the application configuration; and a product configuration generation module, configured to merge the first configuration tree, the second configuration tree, and the third configuration tree according to rules to obtain a product configuration set.

7. An electronic device, characterized in that, The electronic device includes: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores a computer program executable by the at least one processor, the computer program being executed by the at least one processor to enable the at least one processor to perform the software license-based product configuration method as described in any one of claims 1 to 5.

8. A computer-readable storage medium storing a computer program, characterized in that, When the computer program is executed by a processor, it implements the software license-based product configuration method as described in any one of claims 1 to 5.

Citation Information

Patent Citations

  • SaaS resource access control method based on resource permission tree

    CN111935131A

  • Systems and methods for license management in a domain-separated architecture

    US20200257773A1