摘要 |
The present invention relates to the technical field of software licenses, and more particularly to a method for verifying a license of a web system based on multiway tree search. The method of the present invention comprises: firstly, recognizing a requested URL; then, taking the URL as an identifier, and writing same into a license file; then, encrypting same into ciphertext and saving same in a web system; when the web system is initialized, decrypting the ciphertext and outputting same to a memory, and then, establishing a multiway tree through the URL of a function in a license; when the web system receives a request for a specific function, taking the URL of the request as a search value to conduct matching search in the multiway tree, and if a corresponding URL is found, it indicates that the function is authorized already, and requesting to conduct the next step of processing until returning a response finally; otherwise, intercepting the request, and immediately returning a response indicating that the request for the function is unauthorized. A mechanism for verifying a license of a web system based on multiway tree search is provided in the present invention, and is suitable for a web system which has a lot of functions and needs to conduct fine-grained authorization and licensing on functions. |