CN108830072A - System function control method, device and computer readable storage medium - Google Patents
System function control method, device and computer readable storage medium Download PDFInfo
- Publication number
- CN108830072A CN108830072A CN201810360449.7A CN201810360449A CN108830072A CN 108830072 A CN108830072 A CN 108830072A CN 201810360449 A CN201810360449 A CN 201810360449A CN 108830072 A CN108830072 A CN 108830072A
- Authority
- CN
- China
- Prior art keywords
- function
- configuration item
- preset configuration
- shielded
- data
- 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.)
- Pending
Links
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F21/00—Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
- G06F21/30—Authentication, i.e. establishing the identity or authorisation of security principals
- G06F21/45—Structures or tools for the administration of authentication
Landscapes
- Engineering & Computer Science (AREA)
- Computer Security & Cryptography (AREA)
- Theoretical Computer Science (AREA)
- Computer Hardware Design (AREA)
- Software Systems (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Storage Device Security (AREA)
Abstract
The invention discloses a kind of system function control method, device and computer readable storage medium, the method includes:According to preset configuration item data, the license file of binary data format is generated;Wherein, the preset configuration item data include the sequence number value of computer physical address, validity date and function to be shielded;According to the license file, the corresponding computer physical address of the system and current time are examined;When upchecking, the sequence number value of the function to be shielded in the license file is obtained;According to the sequence number value of the function to be shielded, function corresponding with the sequence number value of the function to be shielded in the system is disabled.By the system function control method, the license file that can be generated by customization realizes that the permission or disabling to the function of system control, and without modifying to system version, simplifies exploitation, the deployment of system, reduces the maintenance cost of system.
Description
Technical field
The present invention relates to system function control technology fields, and in particular to a kind of system function control method, device and meter
Calculation machine readable storage medium storing program for executing.
Background technique
One complete software needs several functional modules composition, but is not that each user requires to use institute
Some functions should not open all functions to each user in other words, it should be limited, such as the role that face is different
User, open different function.Currently, software systems are generally using system manager or super keepe as the account of authorization role
Number possessing all permissions to whole system is configured, and it is visible and can operate to control all function menus.But it is a set of soft
Part system will be divided into the version with different function menu and permission, or need to control the computer that software systems can dispose
With the use date time limit, it may be necessary to carry out multiple modification, customized development, compiler and release product, cause the system
Possess more parts of source codes, SQL database script, publication packet and deployment package etc. so that the version of software systems is excessive, are opened
Hair, deployment rather very complicated, while increasing maintenance cost.
Summary of the invention
The object of the present invention is to provide a kind of system function control method, device and computer readable storage mediums, can
The license file generated by customization realizes that the permission or disabling to the function of system control, without carrying out to system version
Modification simplifies exploitation, the deployment of system, reduces the maintenance cost of system.
In order to solve the above technical problems, the embodiment of the invention provides a kind of system function control methods, including:
According to preset configuration item data, the license file of binary data format is generated;Wherein, described preset to match
Set the sequence number value that item data includes computer physical address, validity date and function to be shielded;
According to the license file, the corresponding computer physical address of the system and current time are examined;Work as inspection
Test by when, obtain the sequence number value of the function to be shielded in the license file;
According to the sequence number value of the function to be shielded, function corresponding with the sequence number value of the function to be shielded in disabling system
Energy.
Preferably, described according to preset configuration item data, generate the license file of binary data format;Wherein,
The preset configuration item data include the sequence number value of computer physical address, validity date and function to be shielded, specific to wrap
It includes:
Using JAVA key pair generator, public key and private key corresponding with the public key are generated;
The preset configuration item data is encrypted according to the private key, obtains encryption data;
It is signed according to the private key to the preset configuration item data, obtains signed data;
According to the preset configuration item data, the encryption data and the signed data, the licensing is generated
File.
Preferably, described according to the license file, it examines the corresponding computer physical address of the system and works as
The preceding time;When upchecking, the sequence number value of the function to be shielded in the license file is obtained, is specifically included:
Obtain the encryption data in the license file and the signed data;
According to the public key, verify whether the encryption data, the signed data are illegally distorted;If it is not, according to institute
License file described in public key decryptions is stated, the preset configuration item data in the license file is obtained;
According to the computer physical address in the preset configuration item data, the current computer object of the system is verified
Manage address;If upchecking, the first test value is generated;
According to the validity date in the preset configuration item data, the current time of the system is examined;If examining logical
It crosses, generates the second test value;
When detecting first test value and second test value, confirmation is upchecked, and obtains the licensing
The sequence number value of function to be shielded in file.
Preferably, the computer physical address according in the preset configuration item data, verifies the system
Current computer physical address;If upchecking, the first test value is generated, is specifically included:
When the computer physical address in the preset configuration item data is empty, confirmation is upchecked, described in generation
First test value;
When it is described it is preset configuration item data in computer physical address and the system current computer physically
When location is consistent, confirmation is upchecked, and generates first test value;
When it is described it is preset configuration item data in computer physical address and the system current computer physically
When location is inconsistent, failure is examined in confirmation, generates first state code;
According to the first state code, forbid the login of the system or the disabling system institute functional.
Preferably, it is described according to it is described it is preset configuration item data in validity date, examine the system it is current when
Between;If upchecking, the second test value is generated, is specifically included:
When the current time of the system is before the validity date in the preset configuration item data, confirmation is examined
Pass through, generates second test value;
When the validity date in the preset configuration item data is empty, failure is examined in confirmation, generates the second status code;
When the current time of the system is when after the validity date in the preset configuration item data, confirmation is examined
Failure generates second status code;
According to second status code, forbid the login of the system or the disabling system institute functional.
Preferably, the sequence number value according to the function to be shielded, disable in the system with the function to be shielded
The corresponding function of sequence number value, specifically include:
When the sequence number value of the function to be shielded is empty, allow the institute of the system functional available;
When the sequence number value of the function to be shielded is not sky, using JAVA logical code by the sequence of the function to be shielded
Number value is converted into JAVA array;
By HTTP request filter and blocker, judge the current function of the system whether in the JAVA array model
In enclosing, if so, disabling the current function of the system.
Preferably, described that the preset configuration item data is encrypted according to the private key, encryption data is obtained, is had
Body includes:
According to the private key, the preset configuration item data is encrypted using RSA rivest, shamir, adelman, is obtained
The encryption data.
The embodiment of the invention also provides a kind of system function control devices, including:
License file generation module, for generating the license of binary data format according to preset configuration item data
Demonstrate,prove file;Wherein, the preset configuration item data include the sequence of computer physical address, validity date and function to be shielded
Number value;
Inspection module, for according to the license file, the corresponding computer physical address of checking system and current
Time;When upchecking, the sequence number value of the function to be shielded in the license file is obtained;
System function control module, for the sequence number value according to the function to be shielded, disable in the system with it is described
The corresponding function of the sequence number value of function to be shielded.
The embodiment of the invention also provides a kind of system function control device, including processor, memory and it is stored in
In the memory and it is configured as the computer program executed by the processor, the processor executes the computer journey
Above-mentioned system function control method is realized when sequence.
The embodiment of the invention also provides a kind of computer readable storage medium, the computer readable storage medium includes
The computer program of storage, wherein control in computer program operation and set where the computer readable storage medium
It is standby to execute above-mentioned system function control method.
Compared with the existing technology, a kind of beneficial effect of system function control method provided in an embodiment of the present invention is:
The system function control method, including:According to preset configuration item data, the licensing text of binary data format is generated
Part;Wherein, the preset configuration item data include the serial number of computer physical address, validity date and function to be shielded
Value;According to the license file, the corresponding computer physical address of the system and current time are examined;When upchecking
When, obtain the sequence number value of the function to be shielded in the license file;According to the sequence number value of the function to be shielded, institute is disabled
State function corresponding with the sequence number value of the function to be shielded in system.By the system function control method, can pass through
The license file generated is customized, realizes that the permission or disabling to the function of system control, without modifying to system version,
Exploitation, the deployment for simplifying system, reduce the maintenance cost of system.The embodiment of the invention also provides a kind of system function controls
Device and computer readable storage medium processed.
Detailed description of the invention
Fig. 1 is a kind of flow chart of system function control method provided in an embodiment of the present invention;
Fig. 2 is a kind of schematic diagram of system function control device provided in an embodiment of the present invention.
Specific embodiment
Following will be combined with the drawings in the embodiments of the present invention, and technical solution in the embodiment of the present invention carries out clear, complete
Site preparation description, it is clear that described embodiments are only a part of the embodiments of the present invention, instead of all the embodiments.It is based on
Embodiment in the present invention, it is obtained by those of ordinary skill in the art without making creative efforts every other
Embodiment shall fall within the protection scope of the present invention.
Referring to Fig. 1, it is a kind of flow chart of system function control method provided in an embodiment of the present invention, the system
Control method, including:
S100:According to preset configuration item data, the license file of binary data format is generated;Wherein, described pre-
If configuration item data include computer physical address, validity date and function to be shielded sequence number value;
S200:According to the license file, the corresponding computer physical address of checking system and current time;Work as inspection
Test by when, obtain the sequence number value of the function to be shielded in the license file;
S300:According to the sequence number value of the function to be shielded, the serial number in the system with the function to be shielded is disabled
It is worth corresponding function.
In the present embodiment, such as the configuration item data file config.properties by being pre-filled with can be with
Obtain the preset configuration item data;When the operating system of the system is Windows operating system, use
Codegen.bat script file generates the license file license.data of binary data format;When the system
Operating system when being (SuSE) Linux OS, using codegen.sh script file, generate the described of binary data format and permitted
File can be demonstrate,proved;And it sends the license file in the Resource TOC of the system and saves.When the operation system of the system
When system is Windows operating system, using displaySysInfo.bat script file, the license file is read;Work as institute
When the operating system for stating system is (SuSE) Linux OS, using displaySysInfo.sh script file, the license is read
Demonstrate,prove file;And according to the decoded model for passing through JAVA written in code, the binary data in the license file is read, and will
The binary data update is into specified JAVA code word, to the corresponding computer physical address of the system and currently
Time tests;When passing through inspection, according to the sequence number value of the function to be shielded in the license file got, prohibit
With function corresponding with the sequence number value of the function to be shielded in the system.It, can by the system function control method
The license file generated by customization realizes that the permission or disabling to the function of system control, without carrying out to system version
Modification simplifies exploitation, the deployment of system, reduces the maintenance cost of system.
It is as follows that configuration item data file fills in rule:
Computer physical address Mac:The computer MAC Address run is needed for software program, is computer network interface card
Physical address.This data item can be sky.Every computer, card apparatus of often throwing the net all have globally unique independent address.Number
According to format:Xx-xx-xx-xx-xx-xx, x are one of hexadecimal 15 characters:0/1/2/3/4/5/6/7/8/9/A/B/C/
D/E/F, this value can be learnt by the network linking and network interface card attribute for checking computer.
Validity date Expiry:For date range workable for software program.This data item can not be for sky.Data lattice
Formula:Yyyy-MM-dd, the i.e. date format of year-month-day.
The sequence number value Disabled of function to be shielded:To need the function menu sequence number value shielded.This data item can be
Sky is not filled in, or fills in one or more sequence number values, and multiple sequence number values are separated with English comma, such as:1,2,3 or a, b, c.
The format of sequence number value can be customized, is provided by the function menu sequence number value of software.
In an alternative embodiment, S100:According to preset configuration item data, being permitted for binary data format is generated
File can be demonstrate,proved;Wherein, the preset configuration item data include computer physical address, validity date and function to be shielded
Sequence number value specifically includes:
Using JAVA key pair generator, public key and private key corresponding with the public key are generated;
The preset configuration item data is encrypted according to the private key, obtains encryption data;
It is signed according to the private key to the preset configuration item data, obtains signed data;
According to the preset configuration item data, the encryption data and the signed data, the licensing is generated
File.
In the present embodiment, close using the JAVA key pair generator KeyPairGenerator initialization built in JAVA
Key constructs key pair, generates the public key publicKey and the private key privateKey.The public key is used for ciphertext data,
It needs to be disclosed to third party;Encryption and signature of the private key for license file, can not be disclosed to third party;The public key
It is one-to-one relationship with the private key, rewritable, guarantee license file are not successfully encrypted or decrypted after generation.Example
Such as, the preset configuration item data is encrypted using the private key, obtains encryption data:byte[]encodedData
=RSACoder.encryptByPrivateKey (data, privateKey);Using the private key to described default after encryption
Configuration item data sign, obtain signed data:String sign=RSACoder.sign (encodedData,
privateKey);Binary system is carried out to the encryption data, the signed data and the preset configuration item data respectively
Format conversion, generates the license file of binary data format.
In an alternative embodiment, S200:It is described according to the license file, examine the corresponding meter of the system
Calculation machine physical address and current time;When upchecking, the serial number of the function to be shielded in the license file is obtained
Value, specifically includes:
Obtain the encryption data in the license file and the signed data;
According to the public key, verify whether the encryption data, the signed data are illegally distorted;If it is not, according to institute
License file described in public key decryptions is stated, the preset configuration item data in the license file is obtained;
According to the computer physical address in the preset configuration item data, the current computer object of the system is verified
Manage address;If upchecking, the first test value is generated;
According to the validity date in the preset configuration item data, the current time of the system is examined;If examining logical
It crosses, generates the second test value;
When detecting first test value and second test value, confirmation is upchecked, and obtains the licensing
The sequence number value of function to be shielded in file.
In the present embodiment, encryption data (encodedData) and the signed data in the license file are read
(sign).It illegally distorts using whether public key (publicKey) verification has, if verification does not pass through, not decrypts:
Boolean status=RSAEnCoder.verify (encodedData, publicKey, sign);Verification passes through, then can be with
Data are decrypted using public key (publicKey), obtain the preset configuration item data:
Byte [] decodedData=RSAEnCoder.decryptByPublicKey (encodedData,
publicKey)。
In an alternative embodiment, the computer physical address according in the preset configuration item data,
Verify the current computer physical address of the system;If upchecking, the first test value is generated, is specifically included:
When the computer physical address in the preset configuration item data is empty, confirmation is upchecked, described in generation
First test value;
When it is described it is preset configuration item data in computer physical address and the system current computer physically
When location is consistent, confirmation is upchecked, and generates first test value;
When it is described it is preset configuration item data in computer physical address and the system current computer physically
When location is inconsistent, failure is examined in confirmation, generates first state code;
According to the first state code, forbid the login of the system or the disabling system institute functional.
In an alternative embodiment, the validity date according in the preset configuration item data, inspection institute
State the current time of system;If upchecking, the second test value is generated, is specifically included:
When the current time of the system is before the validity date in the preset configuration item data, confirmation is examined
Pass through, generates second test value;
When the validity date in the preset configuration item data is empty, failure is examined in confirmation, generates the second status code;
When the current time of the system is when after the validity date in the preset configuration item data, confirmation is examined
Failure generates second status code;
According to second status code, forbid the login of the system or the disabling system institute functional.
In an alternative embodiment, S300:According to the sequence number value of the function to be shielded, disable in the system with
The corresponding function of sequence number value of the function to be shielded, specifically includes:
When the sequence number value of the function to be shielded is empty, allow the institute of the system functional available;
When the sequence number value of the function to be shielded is not sky, using JAVA logical code by the sequence of the function to be shielded
Number value is converted into JAVA array;
By HTTP request filter and blocker, judge the current function of the system whether in the JAVA array model
In enclosing, if so, disabling the current function of the system.
It is in an alternative embodiment, described that the preset configuration item data is encrypted according to the private key,
Encryption data is obtained, is specifically included:
According to the private key, the preset configuration item data is encrypted using RSA rivest, shamir, adelman, is obtained
The encryption data.
Referring to Fig. 2, the embodiment of the invention also provides a kind of schematic diagram of system function control device, the system function
Can control device includes:
License file generation module 1, for generating the license of binary data format according to preset configuration item data
Demonstrate,prove file;Wherein, the preset configuration item data include the sequence of computer physical address, validity date and function to be shielded
Number value;
Inspection module 2, for according to the license file, the corresponding computer physical address of checking system and current
Time;When upchecking, the sequence number value of the function to be shielded in the license file is obtained;
System function control module 3, for the sequence number value according to the function to be shielded, disable in the system with it is described
The corresponding function of the sequence number value of function to be shielded.
In the present embodiment, such as the configuration item data file config.properties by being pre-filled with can be with
Obtain the preset configuration item data;When the operating system of the system is Windows operating system, use
Codegen.bat script file generates the license file license.data of binary data format;When the system
Operating system when being (SuSE) Linux OS, using codegen.sh script file, generate the described of binary data format and permitted
File can be demonstrate,proved;And it sends the license file in the Resource TOC of the system and saves.When the operation system of the system
When system is Windows operating system, using displaySysInfo.bat script file, the license file is read;Work as institute
When the operating system for stating system is (SuSE) Linux OS, using displaySysInfo.sh script file, the license is read
Demonstrate,prove file;And according to the decoded model for passing through JAVA written in code, the binary data in the license file is read, and will
The binary data update is into specified JAVA code word, to the corresponding computer physical address of the system and currently
Time tests;When passing through inspection, according to the sequence number value of the function to be shielded in the license file got, prohibit
With function corresponding with the sequence number value of the function to be shielded in the system.It, can by the system function control device
The license file generated by customization realizes that the permission or disabling to the function of system control, without carrying out to system version
Modification simplifies exploitation, the deployment of system, reduces the maintenance cost of system.
It is as follows that configuration item data file fills in rule:
Computer physical address Mac:The computer MAC Address run is needed for software program, is computer network interface card
Physical address.This data item can be sky.Every computer, card apparatus of often throwing the net all have globally unique independent address.Number
According to format:Xx-xx-xx-xx-xx-xx, x are one of hexadecimal 15 characters:0/1/2/3/4/5/6/7/8/9/A/B/C/
D/E/F, this value can be learnt by the network linking and network interface card attribute for checking computer.
Validity date Expiry:For date range workable for software program.This data item can not be for sky.Data lattice
Formula:Yyyy-MM-dd, the i.e. date format of year-month-day.
The sequence number value Disabled of function to be shielded:To need the function menu sequence number value shielded.This data item can be
Sky is not filled in, or fills in one or more sequence number values, and multiple sequence number values are separated with English comma, such as:1,2,3 or a, b, c.
The format of sequence number value can be customized, is provided by the function menu sequence number value of software.
In an alternative embodiment, license file generation module 1 includes:
Key generating unit generates public key and private corresponding with the public key for using JAVA key pair generator
Key;
DEU data encryption unit is encrypted for being encrypted according to the private key to the preset configuration item data
Data;
Data signature unit is signed for being signed according to the private key to the preset configuration item data
Data;
Binary system license file generation unit, for according to the preset configuration item data, the encryption data with
And the signed data, generate the license file.
In the present embodiment, close using the JAVA key pair generator KeyPairGenerator initialization built in JAVA
Key constructs key pair, generates the public key publicKey and the private key privateKey.The public key is used for ciphertext data,
It needs to be disclosed to third party;Encryption and signature of the private key for license file, can not be disclosed to third party;The public key
It is one-to-one relationship with the private key, rewritable, guarantee license file are not successfully encrypted or decrypted after generation.Example
Such as, the preset configuration item data is encrypted using the private key, obtains encryption data:byte[]encodedData
=RSACoder.encryptByPrivateKey (data, privateKey);Using the private key to described default after encryption
Configuration item data sign, obtain signed data:String sign=RSACoder.sign (encodedData,
privateKey);Binary system is carried out to the encryption data, the signed data and the preset configuration item data respectively
Format conversion, generates the license file of binary data format.
In an alternative embodiment, inspection module 2 includes:
First data-reading unit, for obtaining the encryption data and the number of signature in the license file
According to;
First verification unit, for whether illegal verifying the encryption data, the signed data according to the public key
It distorts;If it is not, the license file according to the public key decryptions, obtains the preset configuration in the license file
Item data;
Second verification unit, for according to the computer physical address in the preset configuration item data, described in verification
The current computer physical address of system;If upchecking, the first test value is generated;
Third verification unit, for examining the system according to the validity date in the preset configuration item data
Current time;If upchecking, the second test value is generated;
Second data-reading unit, for when detecting first test value and second test value, confirmation to be examined
It tests and passes through, obtain the sequence number value of the function to be shielded in the license file.
In the present embodiment, encryption data (encodedData) and the signed data in the license file are read
(sign).It illegally distorts using whether public key (publicKey) verification has, if verification does not pass through, not decrypts:
Boolean status=RSAEnCoder.verify (encodedData, publicKey, sign);Verification passes through, then can be with
Data are decrypted using public key (publicKey), obtain the preset configuration item data:
Byte [] decodedData=RSAEnCoder.decryptByPublicKey (encodedData,
publicKey)。
In an alternative embodiment, the second verification unit, for when the calculating in the preset configuration item data
When machine physical address is empty, confirmation is upchecked, and generates first test value;
Second verification unit, for when the preset computer physical address configured in item data and the system
When current computer physical address is consistent, confirmation is upchecked, and generates first test value;
Second verification unit, for when the preset computer physical address configured in item data and the system
When current computer physical address is inconsistent, failure is examined in confirmation, generates first state code;
System function control module 3, for forbidding described in the login or disabling of the system according to the first state code
System institute is functional.
In an alternative embodiment, third verification unit, for the current time when the system described default
Configuration item data in validity date before when, confirmation is upchecked, and second test value is generated;
Third verification unit, for when the validity date in the preset configuration item data is empty, confirmation, which is examined, to be lost
It loses, generates the second status code;
Third verification unit, for effective day of the current time when the system in the preset configuration item data
When after the phase, failure is examined in confirmation, generates second status code;
System function control module 3, for forbidding described in the login or disabling of the system according to second status code
System institute is functional.
In an alternative embodiment, system function control module 3 includes:
First control unit, for when the sequence number value of the function to be shielded is empty, allowing the institute of the system active
It can be available;
Date Conversion Unit, for being incited somebody to action using JAVA logical code when the sequence number value of the function to be shielded is not sky
The sequence number value of the function to be shielded is converted into JAVA array;
Second control unit, for judging that the current function of the system is by HTTP request filter and blocker
It is no in the JAVA array range, if so, disabling the current function of the system.
In an alternative embodiment, the DEU data encryption unit is used to be added according to the private key using RSA is asymmetric
Close algorithm encrypts the preset configuration item data, obtains the encryption data.
The embodiment of the invention also provides a kind of system function control device, including processor, memory and it is stored in
In the memory and it is configured as the computer program executed by the processor, the processor executes the computer journey
Above-mentioned system function control method is realized when sequence.
Illustratively, the computer program can be divided into one or more module/units, one or more
A module/unit is stored in the memory, and is executed by the processor, to complete the present invention.It is one or more
A module/unit can be the series of computation machine program instruction section that can complete specific function, and the instruction segment is for describing institute
State implementation procedure of the computer program in the system function control device.For example, the computer program can be divided
At the functional module in system function control device described in Fig. 2.
The system function control device can be desktop PC, notebook, palm PC and cloud server etc.
Calculate equipment.The system function control device may include, but be not limited only to, processor, memory.Those skilled in the art can
To understand, the schematic diagram is only the example of system function control device, does not constitute the limit to system function control device
It is fixed, it may include perhaps combining certain components or different components, such as the system than illustrating more or fewer components
Function control device of uniting can also include input-output equipment, network access equipment, bus etc..
Alleged processor can be central processing unit (Central Processing Unit, CPU), can also be it
His general processor, digital signal processor (Digital Signal Processor, DSP), specific integrated circuit
(Application Specific Integrated Circuit, ASIC), ready-made programmable gate array (Field-
Programmable Gate Array, FPGA) either other programmable logic device, discrete gate or transistor logic,
Discrete hardware components etc..General processor can be microprocessor or the processor is also possible to any conventional processor
Deng the processor is the control centre of the system function control device, utilizes various interfaces and connection whole system
The various pieces of function control device.
The memory can be used for storing the computer program and/or module, and the processor is by operation or executes
Computer program in the memory and/or module are stored, and calls the data being stored in memory, described in realization
The various functions of system function control device.The memory can mainly include storing program area and storage data area, wherein deposit
Store up program area can application program needed for storage program area, at least one function (for example sound-playing function, image play function
Energy is equal) etc.;Storage data area, which can be stored, uses created data (such as audio data, phone directory etc.) etc. according to mobile phone.
Can also include nonvolatile memory in addition, memory may include high-speed random access memory, for example, hard disk, memory,
Plug-in type hard disk, intelligent memory card (Smart Media Card, SMC), secure digital (Secure Digital, SD) card dodge
Deposit card (Flash Card), at least one disk memory, flush memory device or other volatile solid-state parts.
Wherein, if module/unit that the system function control device integrates is realized in the form of SFU software functional unit
And when sold or used as an independent product, it can store in a computer readable storage medium.Based on such
Understand, the present invention realizes all or part of the process in above-described embodiment method, can also instruct phase by computer program
The hardware of pass is completed, and the computer program can be stored in a computer readable storage medium, which exists
When being executed by processor, it can be achieved that the step of above-mentioned each embodiment of the method.Wherein, the computer program includes computer journey
Sequence code, the computer program code can be source code form, object identification code form, executable file or certain intermediate shapes
Formula etc..The computer-readable medium may include:Any entity or device, note of the computer program code can be carried
Recording medium, USB flash disk, mobile hard disk, magnetic disk, CD, computer storage, read-only memory (ROM, Read-Only Memory),
Random access memory (RAM, Random Access Memory), electric carrier signal, telecommunication signal and software distribution medium
Deng.It should be noted that the content that the computer-readable medium includes can be real according to legislation in jurisdiction and patent
The requirement trampled carries out increase and decrease appropriate, such as in certain jurisdictions, according to legislation and patent practice, computer-readable medium
It does not include electric carrier signal and telecommunication signal.
The embodiment of the invention also provides a kind of computer readable storage medium, the computer readable storage medium includes
The computer program of storage, wherein control in computer program operation and set where the computer readable storage medium
It is standby to execute above-mentioned system function control method.
Compared with the existing technology, a kind of beneficial effect of system function control method provided in an embodiment of the present invention is:
The system function control method, including:According to preset configuration item data, the licensing text of binary data format is generated
Part;Wherein, the preset configuration item data include the serial number of computer physical address, validity date and function to be shielded
Value;According to the license file, the corresponding computer physical address of the system and current time are examined;When upchecking
When, obtain the sequence number value of the function to be shielded in the license file;According to the sequence number value of the function to be shielded, institute is disabled
State function corresponding with the sequence number value of the function to be shielded in system.By the system function control method, can pass through
The license file generated is customized, realizes that the permission or disabling to the function of system control, without modifying to system version,
Exploitation, the deployment for simplifying system, reduce the maintenance cost of system.The embodiment of the invention also provides a kind of system function controls
Device and computer readable storage medium processed.
It is the preferred embodiment of the present invention above, it is noted that for those skilled in the art,
Various improvements and modifications may be made without departing from the principle of the present invention, these improvements and modifications are also considered as this hair
Bright protection scope.
Claims (10)
1. a kind of system function control method, which is characterized in that including:
According to preset configuration item data, the license file of binary data format is generated;Wherein, the preset configuration item
Data include the sequence number value of computer physical address, validity date and function to be shielded;
According to the license file, the corresponding computer physical address of checking system and current time;When upchecking,
Obtain the sequence number value of the function to be shielded in the license file;
According to the sequence number value of the function to be shielded, function corresponding with the sequence number value of the function to be shielded in the system is disabled
Energy.
2. the system as claimed in claim 1 function control method, which is characterized in that it is described according to preset configuration item data,
Generate the license file of binary data format;Wherein, the preset configuration item data include computer physical address, have
The sequence number value for imitating date and function to be shielded, specifically includes:
Using JAVA key pair generator, public key and private key corresponding with the public key are generated;
The preset configuration item data is encrypted according to the private key, obtains encryption data;
It is signed according to the private key to the preset configuration item data, obtains signed data;
According to the preset configuration item data, the encryption data and the signed data, the license file is generated.
3. system function control method as claimed in claim 2, which is characterized in that described according to the license file, inspection
Test the corresponding computer physical address of the system and current time;When upchecking, obtain in the license file
Function to be shielded sequence number value, specifically include:
Obtain the encryption data in the license file and the signed data;
According to the public key, verify whether the encryption data, the signed data are illegally distorted;If it is not, according to the public affairs
Key decrypts the license file, obtains the preset configuration item data in the license file;
According to the computer physical address in the preset configuration item data, the current computer of the system is verified physically
Location;If upchecking, the first test value is generated;
According to the validity date in the preset configuration item data, the current time of the system is examined;It is raw if upchecking
At the second test value;
When detecting first test value and second test value, confirmation is upchecked, and obtains the license file
In function to be shielded sequence number value.
4. system function control method as claimed in claim 3, which is characterized in that described according to the preset configuration item number
Computer physical address in verifies the current computer physical address of the system;If upchecking, generates first and examine
Value, specifically includes:
When the computer physical address in the preset configuration item data is empty, confirmation is upchecked, and generates described first
Test value;
When the current computer physical address one of computer physical address and the system in the preset configuration item data
When cause, confirmation is upchecked, and generates first test value;
When it is described it is preset configuration item data in computer physical address and the system current computer physical address not
When consistent, failure is examined in confirmation, generates first state code;
According to the first state code, forbid the login of the system or the disabling system institute functional.
5. system function control method as claimed in claim 3, which is characterized in that described according to the preset configuration item number
Validity date in examines the current time of the system;If upchecking, the second test value is generated, is specifically included:
When the current time of the system is before the validity date in the preset configuration item data, confirmation is examined logical
It crosses, generates second test value;
When the validity date in the preset configuration item data is empty, failure is examined in confirmation, generates the second status code;
When the current time of the system is when after the validity date in the preset configuration item data, confirmation, which is examined, is lost
It loses, generates second status code;
According to second status code, forbid the login of the system or the disabling system institute functional.
6. the system as claimed in claim 1 function control method, which is characterized in that the sequence according to the function to be shielded
Number value, disable function corresponding with the sequence number value of the function to be shielded in the system, specifically include:
When the sequence number value of the function to be shielded is empty, allow the institute of the system functional available;
When the sequence number value of the function to be shielded is not sky, using JAVA logical code by the sequence number value of the function to be shielded
It is converted into JAVA array;
By HTTP request filter and blocker, judge the current function of the system whether in the JAVA array range
It is interior, if so, disabling the current function of the system.
7. system function control method as claimed in claim 2, which is characterized in that described to be preset according to the private key to described
Configuration item data encrypted, obtain encryption data, specifically include:
According to the private key, the preset configuration item data is encrypted using RSA rivest, shamir, adelman, is obtained described
Encryption data.
8. a kind of system function control device, which is characterized in that including:
License file generation module, for generating the licensing text of binary data format according to preset configuration item data
Part;Wherein, the preset configuration item data include the serial number of computer physical address, validity date and function to be shielded
Value;
Inspection module, for according to the license file, the corresponding computer physical address of checking system and current time;
When upchecking, the sequence number value of the function to be shielded in the license file is obtained;
System function control module disables in the system with described for the sequence number value according to the function to be shielded wait shield
Cover the corresponding function of sequence number value of function.
9. a kind of system function control device, which is characterized in that in the memory including processor, memory and storage
And it is configured as the computer program executed by the processor, the processor is realized when executing the computer program as weighed
Benefit require any one of 1 to 7 described in system function control method.
10. a kind of computer readable storage medium, which is characterized in that the computer readable storage medium includes the calculating of storage
Machine program, wherein equipment where controlling the computer readable storage medium in computer program operation is executed as weighed
Benefit require any one of 1 to 7 described in system function control method.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201810360449.7A CN108830072A (en) | 2018-04-20 | 2018-04-20 | System function control method, device and computer readable storage medium |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201810360449.7A CN108830072A (en) | 2018-04-20 | 2018-04-20 | System function control method, device and computer readable storage medium |
Publications (1)
Publication Number | Publication Date |
---|---|
CN108830072A true CN108830072A (en) | 2018-11-16 |
Family
ID=64154501
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201810360449.7A Pending CN108830072A (en) | 2018-04-20 | 2018-04-20 | System function control method, device and computer readable storage medium |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN108830072A (en) |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN109800563A (en) * | 2018-12-29 | 2019-05-24 | 联想(北京)有限公司 | Cipher set-up method and device, computer readable storage medium and computer system |
CN110941839A (en) * | 2019-11-18 | 2020-03-31 | 中国经济信息社有限公司 | User authority management method and system, equipment and storage medium |
Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN1704863A (en) * | 2004-05-25 | 2005-12-07 | 华为技术有限公司 | Licensing file generating method, software product protection method and system |
CN1874218A (en) * | 2006-01-05 | 2006-12-06 | 华为技术有限公司 | Method, system and equipment for license management |
CN101772026A (en) * | 2010-01-08 | 2010-07-07 | 中兴通讯股份有限公司 | Method and system for controlling authorization according to expansion license |
-
2018
- 2018-04-20 CN CN201810360449.7A patent/CN108830072A/en active Pending
Patent Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN1704863A (en) * | 2004-05-25 | 2005-12-07 | 华为技术有限公司 | Licensing file generating method, software product protection method and system |
CN1874218A (en) * | 2006-01-05 | 2006-12-06 | 华为技术有限公司 | Method, system and equipment for license management |
CN101772026A (en) * | 2010-01-08 | 2010-07-07 | 中兴通讯股份有限公司 | Method and system for controlling authorization according to expansion license |
Cited By (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN109800563A (en) * | 2018-12-29 | 2019-05-24 | 联想(北京)有限公司 | Cipher set-up method and device, computer readable storage medium and computer system |
CN110941839A (en) * | 2019-11-18 | 2020-03-31 | 中国经济信息社有限公司 | User authority management method and system, equipment and storage medium |
CN110941839B (en) * | 2019-11-18 | 2022-10-14 | 中国经济信息社有限公司 | User authority management method and system, equipment and storage medium |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN105391840B (en) | Automatically create destination application | |
US10395012B2 (en) | Media client device authentication using hardware root of trust | |
DK1479187T4 (en) | MANAGEMENT OF ACCESS LEVELS IN PHONES USING CERTIFICATES | |
Zhao et al. | Providing root of trust for ARM TrustZone using on-chip SRAM | |
US8627086B2 (en) | Secure loading and storing of data in a data processing device | |
CN106357672B (en) | A kind of login method and terminal | |
US7953225B2 (en) | Mobile wireless communications device with software installation and verification features and related methods | |
US10325109B2 (en) | Automatic and dynamic selection of cryptographic modules for different security contexts within a computer network | |
CN107464109B (en) | Trusted mobile payment device, system and method | |
CN103955648B (en) | Method and device for verifying legality of system image | |
US20150095652A1 (en) | Encryption and decryption processing method, apparatus, and device | |
CN109992987B (en) | Script file protection method and device based on Nginx and terminal equipment | |
CN109614769A (en) | The secure operating system starting encapsulated according to reference platform inventory and data | |
EP1645931A1 (en) | Secure loading and storing of data in a data processing device | |
CN104915591A (en) | Data processing method and electronic equipment | |
CN111382397B (en) | Configuration method of upgrade software package, software upgrade method, equipment and storage device | |
CN109255210A (en) | The method, apparatus and storage medium of intelligent contract are provided in block chain network | |
CN104246784A (en) | Method, device, and system for protecting and securely delivering media content | |
WO2023240866A1 (en) | Cipher card and root key protection method therefor, and computer readable storage medium | |
CN107315945B (en) | The disk decryption method and device of a kind of electronic equipment | |
US8918653B2 (en) | Protection of interpreted source code in virtual appliances | |
CN108830072A (en) | System function control method, device and computer readable storage medium | |
EP3048553A1 (en) | Method for distributing applets, and entities for distributing applets | |
EP2689367B1 (en) | Data protection using distributed security key | |
CN114936365B (en) | System, method and device for protecting secret data |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
RJ01 | Rejection of invention patent application after publication |
Application publication date: 20181116 |
|
RJ01 | Rejection of invention patent application after publication |