CN100410956C - A software function control method and system - Google Patents
A software function control method and system Download PDFInfo
- Publication number
- CN100410956C CN100410956C CNB2006100836095A CN200610083609A CN100410956C CN 100410956 C CN100410956 C CN 100410956C CN B2006100836095 A CNB2006100836095 A CN B2006100836095A CN 200610083609 A CN200610083609 A CN 200610083609A CN 100410956 C CN100410956 C CN 100410956C
- Authority
- CN
- China
- Prior art keywords
- software function
- software
- function
- licence
- license
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Expired - Fee Related
Links
Images
Landscapes
- Storage Device Security (AREA)
Abstract
Description
技术领域 technical field
本发明涉及计算机软件领域,尤其涉及一种软件功能控制方法及系统。The invention relates to the field of computer software, in particular to a software function control method and system.
背景技术 Background technique
一个完整的软件需要由若干功能模块组成,但是并不是每个用户都需要用到所有的功能,或者说不应该免费向用户开放所用的功能,应该有所限制,用户需要付出一定的费用才能使用相应功能,所以需要对软件的功能进行控制。A complete software needs to be composed of several functional modules, but not every user needs to use all the functions, or the functions used should not be open to users for free, there should be some restrictions, and users need to pay a certain fee to use them Corresponding functions, so it is necessary to control the functions of the software.
现有技术中一种软件功能控制方法为采用配置文件实现对软件功能的控制。正常情况下,软件开发商设计的软件提供的功能集合会很多,但是针对不同的客户群体,可能需要不同的软件功能集合。这些不同的功能组合,一般是通过配置文件开关确定的。A method for controlling software functions in the prior art is to use a configuration file to control software functions. Under normal circumstances, the software designed by the software developer will provide many function sets, but for different customer groups, different software function sets may be required. These different function combinations are generally determined by configuration file switches.
但是配置文件一般没有完善的安全手段,一些具有一定经验的用户可能很容易地对配置文件进行非法修改,以便打开其所需要的功能,这样会给软件开发商带来很大的经济损失;另外配置文件很难与用户购买软件时签订的合同挂钩,合同上签订的软件功能可能需要对配置文件进行手工维护才能与之相对应。However, configuration files generally do not have perfect security measures, and some users with certain experience may easily modify configuration files illegally in order to open the functions they need, which will bring great economic losses to software developers; It is difficult for the configuration file to be linked to the contract signed by the user when purchasing the software, and the software functions signed in the contract may require manual maintenance of the configuration file to correspond to it.
发明内容 Contents of the invention
本发明要解决的技术问题是提供一种软件功能控制方法及系统,用于安全、便捷地对软件功能进行控制。The technical problem to be solved by the present invention is to provide a software function control method and system for safely and conveniently controlling software functions.
本发明提供的软件功能控制方法包括步骤:1)根据许可证中软件功能授权信息建立软件功能与软件功能状态的对应关系;2)读取对应关系中软件功能对应的软件功能状态;3)设置当前软件中该软件功能的软件功能状态与对应关系中该软件功能的软件功能状态相同。The software function control method provided by the present invention includes the steps of: 1) establishing the corresponding relationship between the software function and the software function state according to the software function authorization information in the license; 2) reading the software function state corresponding to the software function in the corresponding relationship; 3) setting The software function state of the software function in the current software is the same as the software function state of the software function in the corresponding relationship.
优选地,所述步骤3)之后包括:4)重复步骤2),直至读取完所有软件功能对应的软件功能状态。Preferably, step 3) includes: 4) repeating step 2) until the software function states corresponding to all software functions are read.
优选地,所述步骤1)之前进一步包括步骤:当软件功能启动时,许可证控制单元根据请求下发许可证中软件功能授权信息。Preferably, the step 1) further includes a step: when the software function is started, the license control unit issues authorization information of the software function in the license according to the request.
优选地,所述步骤1)之前进一步包括步骤:对新上传的许可证进行合法性检测,若合法,则下发并使用新许可证中软件功能授权信息,否则使用原许可证中软件功能授权信息。Preferably, the step 1) further includes the step of: checking the validity of the newly uploaded license, if it is legal, then issue and use the software function authorization information in the new license, otherwise use the software function authorization in the original license information.
优选地,所述检测包括:Preferably, the detection includes:
A)判断许可证是否过期,若过期则所述许可证不合法,若未过期则转向步骤B);A) determine whether the license has expired, if expired, the license is illegal, if not expired then turn to step B);
B)对许可证中软件功能授权信息通过校验码进行加密计算,将计算结果与许可证控制单元对其计算的结果进行比较,若符合,则许可证合法,否则不合法。B) Encrypt and calculate the software function authorization information in the license through the check code, compare the calculation result with the calculation result of the license control unit, if they match, the license is legal, otherwise it is not legal.
优选地,所述对应关系存储在映射表中,或者存储在数组中。Preferably, the corresponding relationship is stored in a mapping table, or stored in an array.
本发明提供的软件功能控制系统包括:许可证控制单元,软件控制单元;所述许可证控制单元用于向所述软件控制单元发送许可证中软件功能授权信息,软件控制单元接收到所述信息后,建立软件功能与功能状态的对应关系,并读取对应关系中软件功能对应的软件功能状态,设置当前软件中该软件功能的软件功能状态与对应关系中该软件功能的软件功能状态相同。The software function control system provided by the present invention includes: a license control unit, a software control unit; the license control unit is used to send software function authorization information in the license to the software control unit, and the software control unit receives the information Afterwards, establish the corresponding relationship between the software function and the functional state, and read the software functional state corresponding to the software function in the corresponding relationship, and set the software functional state of the software function in the current software to be the same as the software functional state of the software function in the corresponding relationship.
优选地,所述许可证控制单元还用于当许可证过期,用户重新购买新的许可证进行升级后,对许可证进行重新激活。Preferably, the license control unit is also used to reactivate the license after the user purchases a new license for upgrade after the license expires.
优选地,所述许可证控制单元包括:加载单元,校验单元;所述加载单元加载许可证之后将许可证发送到校验单元,校验单元对许可证进行合法性校验,并将校验通过的许可证中软件功能授权信息下发。Preferably, the license control unit includes: a loading unit and a checking unit; after the loading unit loads the license, the license is sent to the checking unit, and the checking unit checks the validity of the license and sends the check The software function authorization information in the license that has passed the verification is issued.
优选地,所述软件控制单元包括:接收单元,功能解析单元以及软件功能控制单元;所述接收单元获取校验单元下发的软件功能授权信息,并将所述信息发送给功能解析单元,功能解析单元把接收到的软件功能授权信息转换成内部的功能映射表,软件功能控制单元根据软件功能请求查询所述功能映射表以判断所述软件功能是否应该开放,拒绝不开放软件功能的使用请求。Preferably, the software control unit includes: a receiving unit, a function analysis unit and a software function control unit; the receiving unit obtains the software function authorization information issued by the verification unit, and sends the information to the function analysis unit, and the function The parsing unit converts the received software function authorization information into an internal function mapping table, and the software function control unit queries the function mapping table according to the software function request to determine whether the software function should be opened, and rejects the use request of the unopened software function .
以上技术方案可以看出,本发明具有以下优点:As can be seen from the above technical solutions, the present invention has the following advantages:
首先,由于本发明采用许可证对软件功能进行控制,相对于现有技术中采用配置文件对软件功能进行控制而言,本发明中许可证需要有校验的过程,所以安全性得到提高,另外用户与软件开发商签订的合同即保存在许可证中,通过许可证来控制软件功能可以避免手工配置,所以提高了系统效率;First of all, because the present invention uses licenses to control software functions, compared to the prior art using configuration files to control software functions, licenses in the present invention need to have a verification process, so security is improved. In addition The contract signed by the user and the software developer is stored in the license, and the control of software functions through the license can avoid manual configuration, so the system efficiency is improved;
其次,由于本发明既可以适用于软件功能启动时对其进行控制,还可以用于许可证更新加载时对软件功能进行控制,所以本发明适用范围更为广阔;Secondly, since the present invention can be applied to control the software function when it is started, and can also be used to control the software function when the license is updated and loaded, the scope of application of the present invention is wider;
最后,由于本发明在对许可证进行校验之前还有加密的过程,所以进一步提高了许可证的安全性。Finally, since the present invention has an encryption process before verifying the license, the security of the license is further improved.
附图说明 Description of drawings
图1为本发明方法第一实施例流程图;Fig. 1 is the flowchart of the first embodiment of the method of the present invention;
图2为本发明方法第二实施例流程图;Fig. 2 is the flow chart of the second embodiment of the method of the present invention;
图3为本发明方法第三实施例流程图;Fig. 3 is the flowchart of the third embodiment of the method of the present invention;
图4为本发明方法第四实施例流程图;Fig. 4 is the flowchart of the fourth embodiment of the method of the present invention;
图5为本发明方法第五实施例流程图;Fig. 5 is the flowchart of the fifth embodiment of the method of the present invention;
图6为本发明系统示意图。Fig. 6 is a schematic diagram of the system of the present invention.
具体实施方式 Detailed ways
本发明提供了一种软件功能控制方法及系统,其核心思想是利用许可证对软件功能进行控制。The invention provides a software function control method and system, the core idea of which is to control the software function by using a license.
所述许可证是供应商与客户对所销售/购买的产品使用范围、期限等进行授权/被授权的一种合约形式,通过许可证,客户同时也获得供应商所承诺的相应服务。物理形式上表现为许可证授权证书以及许可证文件。The license is a form of contract in which the supplier and the customer authorize/be authorized to use the scope and duration of the products sold/purchased. Through the license, the customer also obtains the corresponding services promised by the supplier. In physical form, it is represented by the license entitlement certificate and the license file.
功能控制是指对提供运营商软件的功能集合的整体控制,能通过开关限制向客户提供指定的软件功能集合。Function control refers to the overall control over the function set of the operator's software, which can limit the provision of specified software function sets to customers through switches.
许可证许可服务功能主要是确认用户的购买服务的使用范围、期限等并进行授权。主要体现确认用户购买商品,确认用户购买商品的使用期限(如试用时间等),到期后停止用户使用。本发明为许可证增加了软件功能控制的信息。The function of the license licensing service is mainly to confirm the scope of use, period, etc. of the service purchased by the user and authorize it. It mainly reflects the confirmation of the user's purchase of the product, the confirmation of the use period of the user's purchase of the product (such as trial time, etc.), and the termination of the user's use after the expiration. The invention adds software function control information to the license.
下面对本发明软件功能控制方法进行详细描述:The software function control method of the present invention is described in detail below:
请参阅图1,本发明方法第一实施例包括:Referring to Fig. 1, the first embodiment of the method of the present invention comprises:
D1)建立对应关系;D1) establish a corresponding relationship;
其中,根据许可证中软件功能授权信息建立软件功能与软件功能状态的对应关系。Wherein, the corresponding relationship between the software function and the state of the software function is established according to the authorization information of the software function in the license.
D2)调整软件功能;D2) Adjust software functions;
其中,调整当前软件功能状态与对应关系中该软件功能状态保持一致。Wherein, adjusting the current software function status is consistent with the software function status in the corresponding relationship.
请参阅图2,本发明方法第二实施例包括:Referring to Fig. 2, the second embodiment of the method of the present invention includes:
P1)建立对应关系;P1) establish a corresponding relationship;
其中,将接收到的许可证中软件功能授权信息转换为内部的功能开关列表,由该列表来保存软件功能与软件功能状态的对应关系,可以理解的是,转换后的对应关系可以以列表的形式保存,还可以以数组的形式保存,或者是其他数据结构保存。Among them, the software function authorization information in the received license is converted into an internal function switch list, and the corresponding relationship between the software function and the software function state is saved by the list. It can be understood that the converted corresponding relationship can be in the form of a list It can also be saved in the form of an array or other data structures.
P2)判断软件功能是否已经打开,若打开,转向步骤P3),否则转向步骤P5);P2) judging whether the software function has been opened, if open, turn to step P3), otherwise turn to step P5);
P3)判断所述软件功能是否应该打开,若是,转向步骤P7),否则转向步骤P4);P3) judge whether described software function should be opened, if so, turn to step P7), otherwise turn to step P4);
其中,查询对应关系中所述软件功能是否应该打开。Wherein, it is inquired whether the software function described in the corresponding relationship should be opened.
P4)关闭所述功能;P4) close the function;
其中,将所述功能关闭,不允许用户使用。Wherein, the function is turned off, and the user is not allowed to use it.
其中步骤P2)~P3)~P4)描述的情况是:当前软件功能已经打开,但对应关系中该软件功能状态应该为关闭,则将该软件功能关闭,不允许用户再使用。The situation described in steps P2)-P3)-P4) is: the current software function has been opened, but the status of the software function in the corresponding relationship should be closed, then the software function is closed and the user is not allowed to use it.
P5)判断所述软件功能是否应该关闭,若是,转向步骤P7),否则转向步骤P6);P5) judging whether the software function should be closed, if so, turn to step P7), otherwise turn to step P6);
其中,查询对应关系中所述软件功能是否应该关闭。Wherein, it is inquired whether the software function described in the corresponding relationship should be closed.
P6)开启所述功能;P6) enabling the function;
其中,将所述功能开启,允许用户使用。Wherein, the function is enabled to allow users to use it.
其中,步骤P2)~P5)~P6)描述的情况是:当前软件功能已经关闭,但对应关系中该软件功能状态应该为开放,则将该软件功能开启,允许用户使用。Wherein, the situation described in steps P2)-P5)-P6) is: the current software function has been closed, but the state of the software function in the corresponding relationship should be open, then the software function is opened and the user is allowed to use it.
P7)判断软件功能状态是否检查完,若是,转向步骤P8),否则转向步骤P2);P7) judge whether the software function status has been checked, if so, turn to step P8), otherwise turn to step P2);
P8)结束。P8) end.
本实施例中细化了调整软件功能的详细流程。In this embodiment, the detailed process of adjusting software functions is refined.
本实施例是通过遍历所有软件功能,判断其状态,然后再与对应关系中该功能的状态进行比较,如果与对应关系中的状态不符合,则修改该软件功能当前状态。同样地,还可以通过如下方式:In this embodiment, all software functions are traversed to determine their status, and then compared with the status of the function in the corresponding relationship. If the status of the corresponding relationship does not match, the current status of the software function is modified. Similarly, you can also use the following methods:
建立对应关系之后,读取对应关系中所有软件功能的状态,然后将当前软件功能的状态设置与对应关系中软件功能的状态一致,即与本实施例的区别在于不对当前软件功能的状态进行判断,同样能够达到本发明的目的。After establishing the corresponding relationship, read the status of all software functions in the corresponding relationship, and then set the status of the current software function to be consistent with the status of the software function in the corresponding relationship, that is, the difference from this embodiment is that the status of the current software function is not judged , can also achieve the purpose of the present invention.
请参阅图3,本发明方法第三实施例包括:Referring to Fig. 3, the third embodiment of the method of the present invention includes:
Q1)软件功能启动;Q1) The software function starts;
其中,软件功能的启动是指一个软件子模块的启动。Wherein, starting a software function refers to starting a software sub-module.
Q2)请求获取;Q2) request acquisition;
其中,软件控制单元向许可证控制单元请求获取许可证中功能授权信息。Wherein, the software control unit requests the license control unit to acquire function authorization information in the license.
Q3)下发信息;Q3) Send information;
其中,许可证控制单元收到软件控制单元的请求后向软件控制单元下发功能授权信息。Wherein, the license control unit sends function authorization information to the software control unit after receiving the request from the software control unit.
Q4)建立对应关系;Q4) establish a corresponding relationship;
其中,将接收到的许可证中软件功能授权信息转换为内部的功能开关列表,由该列表来保存软件功能与软件功能状态的对应关系,可以理解的是,转换后的对应关系可以以列表的形式保存,还可以以数组的形式保存,或者是其他数据结构保存。Among them, the software function authorization information in the received license is converted into an internal function switch list, and the corresponding relationship between the software function and the software function state is saved by the list. It can be understood that the converted corresponding relationship can be in the form of a list It can also be saved in the form of an array or other data structures.
Q5)判断软件功能是否已经打开,若打开,转向步骤Q6),否则转向步骤Q8);Q5) judging whether the software function has been opened, if open, turn to step Q6), otherwise turn to step Q8);
Q6)判断所述软件功能是否应该打开,若是,转向步骤Q10),否则转向步骤Q7);Q6) judge whether described software function should be opened, if so, turn to step Q10), otherwise turn to step Q7);
Q7)关闭所述功能;Q7) close the function;
其中,将所述功能关闭,不允许用户使用。Wherein, the function is turned off, and the user is not allowed to use it.
其中步骤Q5)~Q6)~Q7)描述的情况是:当前软件功能已经打开,但对应关系中该软件功能状态应该为关闭,则将该软件功能关闭,不允许用户再使用。The situation described in steps Q5)-Q6)-Q7) is: the current software function has been opened, but the status of the software function in the corresponding relationship should be closed, then the software function is closed, and the user is not allowed to use it again.
Q8)判断所述软件功能是否应该关闭,若是,转向步骤Q10),否则转向步骤Q9);Q8) judge whether the software function should be closed, if so, turn to step Q10), otherwise turn to step Q9);
Q9)开启所述功能;Q9) Turn on the function;
其中,将所述功能开启,允许用户使用。Wherein, the function is enabled to allow users to use it.
其中,步骤Q5)~Q8)~Q9)描述的情况是:当前软件功能已经关闭,但对应关系中该软件功能状态应该为开放,则将该软件功能开启,允许用户使用。Wherein, the situation described in steps Q5)-Q8)-Q9) is: the current software function has been closed, but the status of the software function in the corresponding relationship should be open, then the software function is opened and the user is allowed to use it.
Q10)判断软件功能状态是否检查完,若是,转向步骤Q11),否则转向步骤Q5);Q10) judge whether the software function status has been checked, if so, turn to step Q11), otherwise turn to step Q5);
Q11)结束。Q11) End.
本实施例遍历所有软件功能,判断其状态,然后再与对应关系中该功能的状态进行比较,如果与对应关系中的状态不符合,则修改该软件功能当前状态。同样地,还可以通过如下方式:This embodiment traverses all software functions, judges their status, and then compares it with the status of the function in the corresponding relationship. If it does not match the status in the corresponding relationship, the current status of the software function is modified. Similarly, you can also use the following methods:
建立对应关系之后,读取对应关系中所有软件功能的状态,然后将当前软件功能的状态设置与对应关系中软件功能的状态一致,即与本实施例的区别在于不对当前软件功能的状态进行判断,同样能够达到本发明的目的。After establishing the corresponding relationship, read the status of all software functions in the corresponding relationship, and then set the status of the current software function to be consistent with the status of the software function in the corresponding relationship, that is, the difference from this embodiment is that the status of the current software function is not judged , can also achieve the purpose of the present invention.
本实施例描述的是本发明软件功能控制方法应用于软件启动时的情况:当一个软件子模块启动后,先向许可证控制单元索取许可证的软件功能授权信息。This embodiment describes the situation when the software function control method of the present invention is applied to software startup: when a software sub-module is started, the software function authorization information of the license is first requested from the license control unit.
获取软件功能授权信息后,将其转换为内部的功能开关列表,一个软件模块在实现或是执行一个功能命令前,将会携带一个软件功能标识符,到功能开关列表中查询该软件功能是否能开放。如果返回yes,则说明该软件功能可以开发,若软件功能控制器返回no,说明该软件功能不开发。软件将要拒绝提供相应地软件功能服务。After obtaining the software function authorization information, it is converted into an internal function switch list. Before a software module implements or executes a function command, it will carry a software function identifier, and check whether the software function can be used in the function switch list. open. If yes is returned, it means that the software function can be developed; if the software function controller returns no, it means that the software function is not developed. The software will refuse to provide corresponding software function services.
请参阅图4,本发明方法第四实施例包括:Referring to Fig. 4, the fourth embodiment of the method of the present invention includes:
R1)更新许可证;R1) update the license;
其中,用户对许可证进行更新。Among other things, the user updates the license.
R2)下发;R2) issued;
其中,许可证控制单元接收用户更新的许可证,并请其下发给软件控制单元。Wherein, the license control unit receives the license updated by the user, and asks it to be issued to the software control unit.
R3)建立对应关系;R3) establishing a corresponding relationship;
其中,将接收到的许可证中软件功能授权信息转换为内部的功能开关列表,由该列表来保存软件功能与软件功能状态的对应关系,可以理解的是,转换后的对应关系可以以列表的形式保存,还可以以数组的形式保存,或者是其他数据结构保存。Among them, the software function authorization information in the received license is converted into an internal function switch list, and the corresponding relationship between the software function and the software function state is saved by the list. It can be understood that the converted corresponding relationship can be in the form of a list It can also be saved in the form of an array or other data structures.
R4)判断软件功能是否已经打开,若打开,转向步骤R5),否则转向步骤R7);R4) judging whether the software function has been opened, if open, turn to step R5), otherwise turn to step R7);
R5)判断所述软件功能是否应该打开,若是,转向步骤R9),否则转向步骤R6);R5) judging whether the software function should be opened, if so, turn to step R9), otherwise turn to step R6);
R6)关闭所述功能;R6) closing the function;
其中,将所述功能关闭,不允许用户使用。Wherein, the function is turned off, and the user is not allowed to use it.
其中步骤R4)~R5)~R6)描述的情况是:当前软件功能已经打开,但对应关系中该软件功能状态应该为关闭,则将该软件功能关闭,不允许用户再使用。The situation described in steps R4)-R5)-R6) is: the current software function has been opened, but the status of the software function in the corresponding relationship should be closed, then the software function is closed, and the user is not allowed to use it again.
R7)判断所述软件功能是否应该关闭,若是,转向步骤R9),否则转向步骤R8);R7) judging whether the software function should be closed, if so, turn to step R9), otherwise turn to step R8);
R8)开启所述功能;R8) enabling the function;
其中,将所述功能开启,允许用户使用。Wherein, the function is enabled to allow users to use it.
其中,步骤R4)~R7)~R8)描述的情况是:当前软件功能已经关闭,但对应关系中该软件功能状态应该为开放,则将该软件功能开启,允许用户使用。Wherein, the situation described in steps R4)-R7)-R8) is: the current software function has been closed, but the state of the software function in the corresponding relationship should be open, then the software function is opened and the user is allowed to use it.
R9)判断软件功能状态是否检查完,若是,转向步骤R10),否则转向步骤R4);R9) judge whether the software function status has been checked, if so, turn to step R10), otherwise turn to step R4);
R10)结束。R10) end.
本实施例遍历所有软件功能,判断其状态,然后再与对应关系中该功能的状态进行比较,如果与对应关系中的状态不符合,则修改该软件功能当前状态。同样地,还可以通过如下方式:This embodiment traverses all software functions, judges their status, and then compares it with the status of the function in the corresponding relationship. If it does not match the status in the corresponding relationship, the current status of the software function is modified. Similarly, you can also use the following methods:
建立对应关系之后,读取对应关系中所有软件功能的状态,然后将当前软件功能的状态设置与对应关系中软件功能的状态一致,即与本实施例的区别在于不对当前软件功能的状态进行判断,同样能够达到本发明的目的。After establishing the corresponding relationship, read the status of all software functions in the corresponding relationship, and then set the status of the current software function to be consistent with the status of the software function in the corresponding relationship, that is, the difference from this embodiment is that the status of the current software function is not judged , can also achieve the purpose of the present invention.
本实施例描述的是本发明软件功能控制方法应用于许可证更新时的情况。This embodiment describes the situation when the software function control method of the present invention is applied to license update.
请参阅图5,本发明方法第五实施例包括:Referring to Fig. 5, the fifth embodiment of the method of the present invention includes:
S1)上传许可证;S1) Upload the license;
其中,用户将新许可证上传到许可证控制单元。Therein, the user uploads a new license to the license control unit.
S2)判断新上传的许可证是否过期,若是,则转向步骤S3),否则转向步骤S4);S2) judge whether the newly uploaded license expires, if so, then turn to step S3), otherwise turn to step S4);
S3)使用原许可证并转向步骤S5);S3) use the original license and turn to step S5);
其中,当用户新上传的许可证已经超过有效期时,丢弃新许可证,继续使用原许可证。Wherein, when the license newly uploaded by the user has expired, the new license is discarded and the original license is continued to be used.
S4)判断校验结果是否相符,若是,转向步骤S5),否则转向步骤S3);S4) judging whether the verification result matches, if so, turn to step S5), otherwise turn to step S3);
其中,许可证文件里面的授权信息都是明文信息,当进行校验时,从环境中自动获得一个物理参数设备序号(ESN:Equipment Serial Number),例如可以用网卡的全球序列号作为ESN校验码,以ESN校验码为key值,将许可证文件中的授权信息进行签名的加密计算,并把计算结果字符串记录到文件的校验字字段中。而许可证控制单元获取到许可证文件后能根据ESN对许可证文件的其他内容进行校验计算,然后比较校验结果和许可证文件里面的校验字字段是否相同,以此判断许可证的合法性。Among them, the authorization information in the license file is plain text information. When performing verification, a physical parameter equipment serial number (ESN: Equipment Serial Number) is automatically obtained from the environment. For example, the global serial number of the network card can be used as the ESN verification Code, with the ESN check code as the key value, the authorization information in the license file is encrypted for signature calculation, and the calculation result string is recorded in the check word field of the file. After obtaining the license file, the license control unit can check and calculate other contents of the license file according to the ESN, and then compare whether the check result is the same as the check word field in the license file, so as to judge the validity of the license. legality.
其中,所述许可证文件中包含对许可证有效期限的描述、对软件功能集合的描述以及校验字字段。Wherein, the license file includes a description of the validity period of the license, a description of the set of software functions, and a checksum field.
其中,对软件功能集合的描述方式为function1=yes|no;function2=yes|no;其中function1、function2为功能项目;yes表示功能开启,no表示功能屏蔽。Wherein, the description method of the software function set is function1=yes|no; function2=yes|no; where function1 and function2 are function items; yes means that the function is enabled, and no means that the function is blocked.
S5)使用新许可证;S5) using the new license;
S6)下发许可证中软件功能授权信息;S6) issuing software function authorization information in the license;
S7)建立对应关系;S7) establishing a corresponding relationship;
其中,将接收到的许可证中软件功能授权信息转换为内部的功能开关列表,由该列表来保存软件功能与软件功能状态的对应关系,可以理解的是,转换后的对应关系可以以列表的形式保存,还可以以数组的形式保存,或者是其他数据结构保存。Among them, the software function authorization information in the received license is converted into an internal function switch list, and the corresponding relationship between the software function and the software function state is saved by the list. It can be understood that the converted corresponding relationship can be in the form of a list It can also be saved in the form of an array or other data structures.
其中,本实施例中所述对应关系存储在映射表中,可以理解的是,所述对应关系还可以存储在数组或者其他数据结构中。Wherein, the corresponding relationship in this embodiment is stored in a mapping table, it can be understood that the corresponding relationship can also be stored in an array or other data structures.
S8)判断软件功能是否已经打开,若打开,转向步骤S9),否则转向步骤S11);S8) judge whether software function has been opened, if open, turn to step S9), otherwise turn to step S11);
S9)判断所述软件功能是否应该打开,若是,转向步骤S13),否则转向步骤S10);S9) judge whether described software function should be opened, if so, turn to step S13), otherwise turn to step S10);
其中,查询对应关系中所述软件功能是否应该打开。Wherein, it is inquired whether the software function described in the corresponding relationship should be opened.
S10)关闭所述功能;S10) closing the function;
其中,将所述功能关闭,不允许用户使用。Wherein, the function is turned off, and the user is not allowed to use it.
其中步骤S8)~S9)~S10)描述的情况是:当前软件功能已经打开,但对应关系中该软件功能状态应该为关闭,则将该软件功能关闭,不允许用户再使用。The situation described in steps S8)-S9)-S10) is: the current software function has been opened, but the status of the software function in the corresponding relationship should be closed, then the software function is closed and the user is not allowed to use it.
S11)判断所述软件功能是否应该关闭,若是,转向步骤S13),否则转向步骤S12);S11) determine whether the software function should be closed, if so, turn to step S13), otherwise turn to step S12);
其中,查询对应关系中所述软件功能是否应该关闭。Wherein, it is inquired whether the software function described in the corresponding relationship should be closed.
S12)开启所述功能;S12) enabling the function;
其中,将所述功能开启,允许用户使用。Wherein, the function is enabled to allow users to use it.
其中,步骤S8)~S11)~S12)描述的情况是:当前软件功能已经关闭,但对应关系中该软件功能状态应该为开放,则将该软件功能开启,允许用户使用。Wherein, the situation described in steps S8)-S11)-S12) is: the current software function has been closed, but the state of the software function in the corresponding relationship should be open, then the software function is opened and the user is allowed to use it.
S13)判断软件功能状态是否检查完,若是,转向步骤S14),否则转向步骤S8);S13) judge whether the software function status has been checked, if so, turn to step S14), otherwise turn to step S8);
S14)结束。S14) ends.
本实施例遍历所有软件功能,判断其状态,然后再与对应关系中该功能的状态进行比较,如果与对应关系中的状态不符合,则修改该软件功能当前状态。同样地,还可以通过如下方式:This embodiment traverses all software functions, judges their status, and then compares it with the status of the function in the corresponding relationship. If it does not match the status in the corresponding relationship, the current status of the software function is modified. Similarly, you can also use the following methods:
建立对应关系之后,读取对应关系中所有软件功能的状态,然后将当前软件功能的状态设置与对应关系中软件功能的状态一致,即与本实施例的区别在于不对当前软件功能的状态进行判断,同样能够达到本发明的目的。After establishing the corresponding relationship, read the status of all software functions in the corresponding relationship, and then set the status of the current software function to be consistent with the status of the software function in the corresponding relationship, that is, the difference from this embodiment is that the status of the current software function is not judged , can also achieve the purpose of the present invention.
本实施例增加对用户上传的许可证的校验流程,确保了许可证的安全性。管理员通过界面上传一个许可证文件后,许可证控制器首先根据时间、ESN校验码对许可证文件的合法性进行校验。校验通过则执行下一步,不通过则拒绝加载。In this embodiment, a verification process for the license uploaded by the user is added to ensure the security of the license. After the administrator uploads a license file through the interface, the license controller first checks the validity of the license file according to the time and ESN check code. If the verification is passed, the next step is executed, and if it is not passed, the loading is refused.
许可证文件校验通过后,许可证控制器将遍历全部与许可证控制器相连的软件控制单元,并将许可证的软件功能授权信息下发给各个软件控制单元。After the verification of the license file is passed, the license controller will traverse all the software control units connected to the license controller, and send the software function authorization information of the license to each software control unit.
软件控制单元接收到下发的许可证软件功能授权信息后,建立软件功能与软件功能状态的对应关系,即是将其转换为内部的功能开关列表,并且根据功能开关列表重新初始化对应功能,更新提供服务。After the software control unit receives the issued license software function authorization information, it establishes the corresponding relationship between the software function and the software function state, that is, converts it into an internal function switch list, and re-initializes the corresponding function according to the function switch list, and updates Provide services.
另外,当许可证过期,用户重新购买新的许可证上传后,校验流程相同,经过校验之后,新的许可证即被激活使用。In addition, when the license expires and the user re-purchases a new license and uploads it, the verification process is the same. After verification, the new license is activated for use.
下面对本发明软件功能控制系统进行详细描述:The software function control system of the present invention is described in detail below:
请参阅图6,本发明系统包括:许可证控制单元100,软件控制单元200;所述许可证控制单元100用于向所述软件控制单元200发送许可证中软件功能授权信息,软件控制单元200接收到所述信息后,建立软件功能与功能状态的对应关系并调整当前软件功能状态与所述对应关系中软件功能状态保持一致。Referring to Fig. 6, the system of the present invention includes: a
其中,所述许可证控制单元100包括:加载单元110,校验单元120;所述加载单元110加载许可证之后将许可证发送到校验单元120,校验单元120对许可证进行合法性校验,并将校验通过的许可证中软件功能授权信息下发。Wherein, the
其中,所述软件控制单元200包括:接收单元210,功能解析单元220以及软件功能控制单元230;所述接收单元210获取校验单元120下发的软件功能授权信息,并将所述信息发送给功能解析单元220,功能解析单元220把接收到的软件功能授权信息转换成内部的功能映射表,软件功能控制单元230根据软件功能请求查询所述功能映射表以判断所述软件功能是否应该开放,拒绝不开放软件功能的使用请求。Wherein, the
其中,所述许可证控制单元100还用于定期根据许可证文件中提供的时间检查当前是否已经超过许可证文件的有效期,若超过许可证指定的有效期,许可证控制单元100将下发许可证过期通知到接收单元210。Wherein, the
当应用于软件启动情况时:When applied to software startup situations:
校验单元120将用户购买软件时软件中附带的许可证文件中软件功能授权信息发送给接收单元210,接收单元210将所述信息发送给功能解析单元220,功能解析单元220根据所述信息建立功能映射表,一个软件模块在实现或是执行一个功能命令前,将会携带一个软件功能标识符,到软件功能控制单元230中询问该软件功能是否能开放。软件功能控制单元230根据功能解析单元220提供的功能映射返回对应的功能开放结果,如果返回yes,则说明该软件功能可以开发,若返回no,说明该软件功能不开放。软件会拒绝提供不开放的软件功能服务。The
当应用于许可证升级更新时:When applied to a license upgrade update:
用户通过加载单元110将新许可证上传,加载单元110将所述许可证发送给校验单元120进行校验,校验单元120根据有效时间和ESN校验码对许可证的合法性进行校验,若校验不通过,则使用原许可证,并丢弃新上传许可证,若校验通过,则将新许可证中软件功能授权信息下发给接收单元210,接收单元210将所述信息发送给功能解析单元220,功能解析单元220,根据所述信息建立功能映射表,软件功能控制单元230根据功能映射表查询所有软件功能状态,使当前软件功能状态与映射表中软件功能状态保持一致。The user uploads the new license through the
在上述软件功能控制系统中,可以包括多个软件控制单元,它们执行的功能相同。In the above software function control system, there may be multiple software control units that perform the same function.
以上对本发明所提供的一种软件功能控制方法及系统进行了详细介绍,本文中应用了具体个例对本发明的原理及实施方式进行了阐述,以上实施例的说明只是用于帮助理解本发明的方法及其核心思想;同时,对于本领域的一般技术人员,依据本发明的思想,在具体实施方式及应用范围上均会有改变之处,综上所述,本说明书内容不应理解为对本发明的限制。A kind of software function control method and system provided by the present invention has been introduced in detail above. In this paper, specific examples are used to illustrate the principle and implementation of the present invention. The description of the above embodiments is only used to help understand the present invention. method and its core idea; at the same time, for those of ordinary skill in the art, according to the idea of the present invention, there will be changes in the specific implementation and application scope. Invention Limitations.
Claims (10)
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CNB2006100836095A CN100410956C (en) | 2006-05-29 | 2006-05-29 | A software function control method and system |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CNB2006100836095A CN100410956C (en) | 2006-05-29 | 2006-05-29 | A software function control method and system |
Publications (2)
| Publication Number | Publication Date |
|---|---|
| CN1967555A CN1967555A (en) | 2007-05-23 |
| CN100410956C true CN100410956C (en) | 2008-08-13 |
Family
ID=38076318
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| CNB2006100836095A Expired - Fee Related CN100410956C (en) | 2006-05-29 | 2006-05-29 | A software function control method and system |
Country Status (1)
| Country | Link |
|---|---|
| CN (1) | CN100410956C (en) |
Families Citing this family (8)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US20120253959A1 (en) * | 2011-03-31 | 2012-10-04 | Microsoft Corporation | License upgrade management |
| CN102930184B (en) * | 2012-10-19 | 2015-11-25 | 华为技术有限公司 | A kind of functional module loading method and device |
| CN103902877A (en) * | 2012-12-24 | 2014-07-02 | 北大方正集团有限公司 | Information system and information system detection method |
| CN105871779A (en) * | 2015-01-20 | 2016-08-17 | 黄红进 | Method and system for managing permission |
| CN111523093A (en) * | 2020-03-20 | 2020-08-11 | 北京元心科技有限公司 | Software license validity checking method and system and corresponding computer equipment |
| CN113934986A (en) * | 2021-10-14 | 2022-01-14 | 杭州溪塔科技有限公司 | A software licensing method and device for functional-level refined authorization |
| CN114756428B (en) * | 2022-04-12 | 2023-03-24 | 广州汽车集团股份有限公司 | Internet of vehicles payment software monitoring method and system thereof |
| CN117061207A (en) * | 2023-08-31 | 2023-11-14 | 深圳市精优达科技有限公司 | Information transmission method and system of grid weather monitoring site |
Citations (3)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| JP2000315177A (en) * | 1999-04-30 | 2000-11-14 | Toshiba Corp | Content management method and content management device |
| CN1334539A (en) * | 2000-07-20 | 2002-02-06 | 国际商业机器公司 | Method, system and program for reuse of software license for new computer hardware |
| CN1345494A (en) * | 1999-03-26 | 2002-04-17 | 摩托罗拉公司 | Secure wireless e-commerce system with digital product certificate and digital license certificate |
-
2006
- 2006-05-29 CN CNB2006100836095A patent/CN100410956C/en not_active Expired - Fee Related
Patent Citations (3)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN1345494A (en) * | 1999-03-26 | 2002-04-17 | 摩托罗拉公司 | Secure wireless e-commerce system with digital product certificate and digital license certificate |
| JP2000315177A (en) * | 1999-04-30 | 2000-11-14 | Toshiba Corp | Content management method and content management device |
| CN1334539A (en) * | 2000-07-20 | 2002-02-06 | 国际商业机器公司 | Method, system and program for reuse of software license for new computer hardware |
Also Published As
| Publication number | Publication date |
|---|---|
| CN1967555A (en) | 2007-05-23 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| KR102426930B1 (en) | Method for managing digital key of mobile device for vehicle-sharing and key server using the same | |
| CN112597447B (en) | In-vehicle service authorization activation method, device and vehicle | |
| US6557105B1 (en) | Apparatus and method for cryptographic-based license management | |
| JP4790021B2 (en) | SRM digital copyright management method and apparatus | |
| CN111475845B (en) | Unstructured data identity authorized access system and method | |
| CN101606351A (en) | Method and apparatus to the communication interface mandate | |
| EP3414697A1 (en) | Dual-signed executable images for customer-provided integrity | |
| US11544354B2 (en) | System for secure provisioning and enforcement of system-on-chip (SOC) features | |
| KR20120051662A (en) | A method for controlling unauthorized software application usage | |
| CN100410956C (en) | A software function control method and system | |
| CN103714273A (en) | Software authorization system and method based on online dynamic authorization | |
| CN109637034B (en) | Vehicle time-sharing leasing method and system based on virtual key | |
| CN108124491A (en) | Diagnosis connector upgrading verification method, device and the diagnosis connector of diagnostic device | |
| JP6894160B1 (en) | Usage right information processing device based on smart contract, usage right information processing system, and usage right information processing method | |
| CN108023907A (en) | Vehicle module upgrade method, device and vehicle | |
| CN114021081A (en) | Product software authorization system and method | |
| CN103186721B (en) | Digital copyright service control, Apparatus and system | |
| CN115795438A (en) | Method and system for authorizing application program and readable storage medium | |
| EP1276066A2 (en) | Licensing method and license providing system | |
| RU2573258C2 (en) | Licence management apparatus and licence management method | |
| EP3268888B1 (en) | Device, system, method and computer program product for adapting the use of an apparatus | |
| KR101098159B1 (en) | Content distribution system and content distribution method | |
| JP2016058035A (en) | Equipment, management module, program, and control method | |
| KR102104470B1 (en) | Method and apparaus for managing license of software using the USB memory | |
| JP2013511090A (en) | Content merge at first access |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| C06 | Publication | ||
| PB01 | Publication | ||
| C10 | Entry into substantive examination | ||
| SE01 | Entry into force of request for substantive examination | ||
| C14 | Grant of patent or utility model | ||
| GR01 | Patent grant | ||
| CF01 | Termination of patent right due to non-payment of annual fee |
Granted publication date: 20080813 |