Method for verifying web system license based on multi-way tree search
Granted 5 Sep 2017 · 1 office action
Current assignee: G-Cloud Technology Co.Ltd · originally PETAL CLOUD TECHNOLOGY CO., LTD.
Law firm: Law firm · Log in to unlock
Attorney: Attorney · Log in to unlock
Inventors: Zhanpeng Mo, Song Yang, Tongkai Ji · Examiner: Thanhnga B Truong · AU 2438 · TC 2400
Life of the application
7 dated eventsAbstract
A web system license based on multi-way tree search includes steps of: identifying a requiring URL of each function; using the requiring URL of the function as a mark, writing the mark in a license; encrypting the license for generating a cipher text, and storing the cipher text in a web system; during initializing of the web system, decrypting the cipher text and sending to a memory; establishing a multi-way tree according to a URL of an authorized function in the license; and receiving a requirement for a specific function by the web system, using the requiring URL as a searching value and matching in the multi-way tree; wherein if a corresponding URL is found, the function is authorized and further operation is required until response returning; if the corresponding URL is not found, the requirement is intercepted, and a response is returned.
Description
8 parts›CROSS REFERENCE OF RELATED APPLICATION
This is a U.S. National Stage under 35 U.S.C 371 of the International Application PCT/CN2014/094354, filed Dec. 19, 2014, which claims priority under 35 U.S.C. 119(a-d) to CN 201410226500.7, filed May 26, 2014.
›Field of Invention
The present invention relates to a technical field of software license verifying, and more particularly to a method for verifying a web system license based on multi-way tree search.
›Description of Related Arts
After a user buys software, a software system generally restricts functions which can be used by a license. Conventionally, verifying mechanism of software license is as follows:
1, the user provides some information to a software provider, such as version information and license validity;
2, the software provider generates a license for the user, then the user opens the license and put information thereof into the software for verifying;
3, during operation, the software accesses to software version information in the license, such as business version; then a function collection of the version is authorized to the user, but functions out of the function collection are not available.
The method has the following problems:
1, the license returned from the software provider comprises clear message, which is easy to leak;
2, function collection information of a specific version is contained in the software; if the function collection information is modified, the user is able to use functions out of the function collection of the version;
3, flexibility of software verifying is low, controllable granularity is not small enough.
›SUMMARY OF THE PRESENT INVENTION
An object of the present invention is to provide a web system license verifying mechanism, so as to solve problems of the conventional web system that license verifying mechanism is not safe and authorizing granularity is too large.
Accordingly, in order to accomplish the above object, the present invention provides:
a method for verifying a web system license based on multi-way tree search, comprising steps of:
›step 1: identifying a requiring uniform resource locator (URL for short) of each function;
step 2: using the requiring URL of the function as a mark, writing the mark in a license;
step 3: encrypting the license with an asymmetric encryption algorithm for generating a cipher text, and storing the cipher text in a web system;
step 4: during initializing of the web system, decrypting the cipher text with a corresponding asymmetric decryption algorithm, and sending to a memory;
step 5: establishing a multi-way tree according to a URL of an authorized function in the license; and
step 6: receiving a requirement for a specific function by the web system, using the requiring URL as a searching value and matching in the multi-way tree; wherein if a corresponding URL is found, the function is authorized and further operation is required until response returning; if the corresponding URL is not found, the requirement is intercepted, and a response is returned that the specific function required is not authorized.
The requiring URL is a unique identifier for accessing a certain page of the web system or calling a certain interface of the web system; the requiring URL has a multi-level structure, levels thereof are divided with a semicolon, such as http://xx.xx.xx/a/b/c, wherein http://xx.xx.xx doesn't need to be written in the license, and/a/b/c is similar to a file path structure. For example, a and b are both a type of restricting the certain page or calling the certain interface of the web system.
Encrypting with the asymmetric encryption algorithm comprises encrypting the license with a public key; decrypting with the asymmetric decryption algorithm comprises decrypting the license with a private key, for avoiding faking the license, and avoiding failure of the license verifying mechanism due to losing of any of the keys.
Decrypting the cipher text and sending to the memory comprises decrypting the license in the cipher text into a clear text, and storing the clear text as an object of the memory instead of in a file, for avoid stealing.
Establishing the multi-way tree according to the URL of the authorized function in the license comprises steps of:
step 1: dividing each function URL in the license with “/” for forming identifiers with different levels;
step 2: firstly providing a root node “/” of the multi-way tree, secondly inserting the identifiers into the multi-way tree as tree nodes according to the levels; and
step 3: stopping inserting if a same node exists under a same root node, and repeating until all function URLs are treated; then establishing the multi-way tree.
Using the requiring URL as the searching value and matching in the multi-way tree comprises steps of:
step 1: dividing each requiring URL with “/” for forming identifiers with different levels; and
step 2: searching a first-level identifier of the requiring URL in a second-layer node of the multi-way tree, wherein if the first-level identifier is not found, then the requiring URL is not authorized; if the first-level identifier is found, then searching a second-level identifier of the requiring URL in a third-layer node of the multi-way tree, wherein if the second-level identifier is not found, then the requiring URL is not authorized; if the second-level identifier is found, then searching a third-level identifier of the requiring URL in a fourth-layer node of the multi-way tree; and repeating; wherein if a last-level identifier is found, then the requiring URL is authorized, and a corresponding function is also authorized.
Advantages of the present invention are as follows:
1, the license of the present invention is storage in a cipher text form, and after decrypting, the license is difficult to be stolen, which is highly safety.
2, the present invention is able to provide fine granularity authorizing, which is suitable for verifying of a large web system with a lot of functions.
3, according to characteristics of the web system, the method of the present invention establishes a multi-way tree model for a comparison function collection, which significantly improves verifying efficiency of function authorizing, and is better than algorithm complexity O(n) of a conventional one-by-one comparison mechanism; algorithm complexity of the multi-way tree searching of the present invention is similar to algorithm complexity O(log 2 n) of a binary-way tree.
›BRIEF DESCRIPTION OF THE DRAWINGS
Referring to drawings, the present invention is further illustrated.
FIG. 1 is a flow diagram of the present invention.
FIG. 2 is a sketch view of a multi-way tree of the present invention.
›DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENT
Referring to the drawings, there are several asymmetric encryption algorithms, and the present invention use RSA algorithm.
Firstly, a key value of id/path is written into a License. properties. For example:
Claims as granted
2 claimsLog in to read the claims of this application.
Log in to unlockClassifications
3 codes- G06F21/10
- H04L9/06
- H04L29/06
Claim changes
SoonSee which claims were amended, added or cancelled during examination, with every added and removed word marked.
The published claims of this application are not paired with the granted ones in what we hold.
File wrapper
See the full prosecution history — every USPTO and applicant action on this file, in order.
Log in to unlockDocuments
Log in to open the documents of this file: the application as filed, every office action and response, the notice of allowance.
Log in to unlockChain of title
No assignments have been recorded for this application yet.