Authorization control method and device, electronic equipment and storage medium

By generating internal files in the server and performing legitimacy checks, the problem of difficult to accurately control the authorization period and number of devices in existing authorization management is solved, and the security and accuracy of authorization are improved.

CN120744896APending Publication Date: 2025-10-03NEW SINGULARITY INT TECHN DEV
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510814243.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-06-18
Publication Date
2025-10-03

AI Technical Summary

Technical Problem

The existing authorization management method is difficult to accurately manage and control the authorization validity period and the connected collection devices, and is easily circumvented, which reduces the security and accuracy of authorization.

Method used

By generating an internal file in the server, which contains the identification, term, number of devices and device identification of the authorized server, and is only accessible to designated programs, combined with time and space restrictions, a legitimacy check is performed, and a read-only and hidden authorization file is generated to ensure the accuracy and security of the authorization.

Benefits of technology

It achieves precise management of authorization period and number of devices, improves the security and accuracy of authorization, and prevents unauthorized use and illegal increase of the number of devices.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120744896A_ABST
    Figure CN120744896A_ABST
Patent Text Reader

Abstract

The invention provides an authorization control method and device, electronic equipment and a storage medium, and the method comprises the steps: starting operation according to a received starting instruction, and detecting whether an internal file exists or not; wherein the authorization information comprises a first identifier of the authorization server, an authorization period, the number of the authorization access devices and a second identifier of each authorization access device; the internal file is only accessed by a specified program; the internal file is generated by decrypting the authorization file; if the internal file exists, checking that the first server and each first device are legal according to the internal file; and allowing the first server and each first device to operate normally. According to the mode, an internal file comprises a first identifier of an authorization server, an authorization time limit, the number of authorization access devices and a second identifier of each authorization access device, and the first server and each first device are checked according to the content in the internal file; the authorization deadline, the first server and the accessed first equipment can be accurately managed and controlled, and the safety and accuracy of authorization are improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of authorization technology, and in particular to an authorization control method, device, electronic device and storage medium. Background Art

[0002] Traditional authorization management methods typically rely on the server's operating hours to control the validity period of authorizations, and manage the scope of use by limiting the number of connected collection devices. However, these methods have significant limitations. On the one hand, for authorization control based on the server's operating hours, users may circumvent time restrictions by modifying the system time. On the other hand, although the space management mechanism sets a limit on the number of connected collection devices, users may circumvent this restriction by replacing different collection devices while keeping the total number of devices unchanged. In summary, existing authorization mechanisms make it difficult to accurately manage and control the validity period of authorizations and the number of connected collection devices according to actual needs, reducing the security and accuracy of authorizations. Summary of the Invention

[0003] The object of the present invention is to provide an authorization control method, device, electronic device and storage medium to accurately manage and control the authorization validity period and the connected collection equipment.

[0004] The present invention provides an authorization control method, which is applied to a first server, and the first server establishes a connection with at least one first device; the method includes: starting operation according to a received startup instruction, and detecting whether an internal file exists; wherein the internal file includes: a first identifier of the authorization server, an authorization period, the number of authorized access devices, and a second identifier of each authorized access device; the internal file is only accessible to designated programs; the internal file is generated by decrypting the authorization file; if the internal file exists, checking whether the first server and each first device are legal according to the internal file; if the first server and each first device are legal, allowing the first server and each first device to operate normally.

[0005] Furthermore, the step of verifying whether the first server and each first device are legal includes: detecting whether the current time is within the authorization period, whether the identifier of the first server matches the first identifier, whether the number of first devices is less than or equal to the number of authorized access devices, and whether the device identifier of each first device belongs to multiple second identifiers; if the current time is within the authorization period, and the identifier of the first server matches the first identifier, and the number of first devices is less than or equal to the number of authorized access devices, and the device identifier of each first device belongs to multiple second identifiers, it is determined that the first server and each first device are legal; if the current time is not within the authorization period, and / or the identifier of the first server does not match the first identifier, and / or the number of first devices is greater than the number of authorized access devices, and / or the device identifier of at least one first device does not belong to multiple second identifiers, it is determined that the first server and each first device are illegal.

[0006] Furthermore, the method also includes: if the first server and each first device are illegal, generating an exception prompt message; wherein, the exception prompt message is used to prompt: decryption of the authorized file failed, and / or, the current time is not within the authorization period, and / or, the identifier of the first server does not match the first identifier, and / or, the number of first devices is greater than the number of authorized access devices, and / or, the device identifier of at least one first device does not belong to multiple second identifiers.

[0007] Furthermore, the method also includes: if the internal file does not exist, reading the identification of the first server; obtaining a random number, encrypting the identification of the first server and the random number according to a first preset encryption method, and obtaining an identification file corresponding to the first server; obtaining the authorization period, the number of authorized access devices and the second identification of each authorized access device through a software authorization tool, and decrypting the identification file; merging the authorization period, the number of authorized access devices, the second identification of each authorized access device and the identification of the first server to obtain merged information; encrypting the merged information according to a second preset encryption method to generate an authorization file; wherein the authorization file is set with read-only attributes and hidden attributes.

[0008] Furthermore, the internal file is generated in the following manner: if an authorization file is detected in the specified directory, the authorization file is decrypted according to the second preset encryption method, and the internal file is generated based on the first identifier of the authorization server, the authorization period, the number of authorized access devices and the second identifier of each authorized access device contained in the decrypted authorization file; the authorization file in the specified directory is deleted.

[0009] Furthermore, the step of detecting whether the current time is within the authorization period includes: obtaining the local time and running time corresponding to the first server; and detecting whether the current time is within the authorization period based on the local time and running time.

[0010] Furthermore, when the first server and each first device are successfully authorized, the authorization period, the number of devices authorized to access, and the operating time since the first server was started are recorded in a preset hidden file; wherein, the authorization period includes: the authorization start time and the authorization end time; the step of detecting whether the current time is within the scope of the authorization period includes: obtaining the operating time from the hidden file; adding the operating time to the local time to calculate the current time; if the current time does not exceed the authorization end time, and the local time is the authorization start time or the time after the authorization start time, then it is determined that the current time is within the scope of the authorization period.

[0011] The present invention provides an authorization control device, which is arranged on a first server, and the first server establishes a connection with at least one first device; the device includes: a detection module, which is used to start operation according to a received startup instruction and detect whether an internal file exists; wherein the internal file includes: a first identification of the authorization server, an authorization period, the number of authorized access devices and a second identification of each authorized access device; the internal file is only accessible to a specified program; the internal file is generated by decrypting the authorization file; a verification module, which is used to verify whether the first server and each first device are legal according to the internal file if the internal file exists; and a permission module, which is used to allow the first server and each first device to operate normally if both are legal.

[0012] An electronic device provided by the present invention includes a processor and a memory, wherein the memory stores machine-executable instructions that can be executed by the processor, and the processor executes the machine-executable instructions to implement any of the above-mentioned authorization control methods.

[0013] The present invention provides a machine-readable storage medium, which stores machine-executable instructions. When the machine-executable instructions are called and executed by a processor, the machine-executable instructions prompt the processor to implement any of the above-mentioned authorization control methods.

[0014] The authorization control method, device, electronic device, and storage medium provided by the present invention start running according to a received startup instruction and detect whether an internal file exists; wherein the internal file includes: a first identifier of an authorization server, an authorization period, the number of authorized access devices, and a second identifier of each authorized access device; the internal file is accessible only to designated programs; the internal file is generated by decrypting the authorization file; if the internal file exists, the first server and each first device are verified to be legal according to the internal file; if the first server and each first device are legal, the first server and each first device are allowed to operate normally. This method includes the first identifier of the authorization server, the authorization period, the number of authorized access devices, and the second identifier of each authorized access device in the internal file, and verifies the first server and each first device according to the content of the internal file. This method can accurately manage and control the authorization period, the first server, and the connected first devices, thereby improving the security and accuracy of authorization. BRIEF DESCRIPTION OF THE DRAWINGS

[0015] In order to more clearly illustrate the specific embodiments of the present invention or the technical solutions in the prior art, the following briefly introduces the drawings required for use in the specific embodiments or the description of the prior art. Obviously, the drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.

[0016] Figure 1 A flowchart of an authorization control method provided by an embodiment of the present invention;

[0017] Figure 2 A flowchart of another authorization control method provided by an embodiment of the present invention;

[0018] Figure 3 A schematic structural diagram of an authorization control device provided by an embodiment of the present invention;

[0019] Figure 4 A schematic structural diagram of an electronic device provided by an embodiment of the present invention. DETAILED DESCRIPTION

[0020] The following will clearly and completely describe the technical solutions of the present invention in conjunction with the embodiments. Obviously, the embodiments described are only some embodiments of the present invention, not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative efforts are within the scope of protection of the present invention.

[0021] Current software authorization mechanisms have flaws, allowing unauthorized users to freely copy software for use in other projects and increase the number of acquisition devices without limit. This can ultimately cause system failures and affect normal use. Therefore, existing authorization mechanisms struggle to accurately manage and control authorization validity periods and connected acquisition devices based on actual project needs, making them susceptible to circumvention. Based on this, embodiments of the present invention provide an authorization control method, apparatus, electronic device, and storage medium. This technology can be applied to application scenarios requiring authorization management.

[0022] To facilitate understanding of this embodiment, an authorization control method disclosed in an embodiment of the present invention is first introduced. The method is applied to a first server, and the first server establishes a connection with at least one first device; the first device can be a collection device, etc. For example, for a perimeter intrusion detection system, each first device is a collection device that can cover a management range of 500 meters, etc. The overall protection range can be determined according to the number of collection devices; Figure 1 As shown, the method includes the following steps:

[0023] Step S102: Start the program according to the received startup instruction and check whether there is an internal file. The internal file includes: a first identifier of the authorization server, an authorization period, the number of authorized access devices, and a second identifier of each authorized access device. The internal file is accessible only to the designated program and is generated by decrypting the authorization file.

[0024] The first identifier may include the hard disk serial number of the authorized server, the MAC address (Media Access Control Address) of the network card, etc.; the authorization period may specifically include information such as the authorization start time, the authorization end time, and the authorization duration, and may be determined based on the server usage period purchased by the user, for example, in years, such as 1 year or 2 years; the number of authorized access devices generally depends on the total number of first devices actually purchased by the user, in units of devices, such as 5, 10, or 30; the second identifier is generally a unique identifier for each authorized access device, for example, the serial number (SN) of each authorized access device may be used as the unique identifier; in actual implementation, the software running on the first server may provide a user operation interface and analyze data uploaded by the first device. When a user needs to use the software running on the first server, the user may issue the startup instruction, and the first server may start running according to the startup instruction. After startup, the first server checks whether there is an internal file. The internal file is only accessible internally by a specified program. In this way, the internal file can be associated and bound with the specified program and used as an internal file of the specified program, preventing other programs from reading the contents of the authorization file, thereby effectively preventing multiple authorizations.

[0025] Step S104: If the internal file exists, verify whether the first server and each first device are legitimate according to the internal file;

[0026] If it is determined through verification that an internal file exists, the legitimacy of the first server and each first device can be verified according to the content of the internal file, for example, whether the identifier of the first server matches the first identifier of the authorization server, whether the device identifier of each first device belongs to multiple second identifiers, etc.

[0027] Step S106: If the first server and each first device are legal, allow the first server and each first device to operate normally.

[0028] If it is confirmed through inspection that the first server and each first device comply with the content in the authorization file, the first server and each first device can be considered legal, and the first server and each first device can be allowed to operate normally.

[0029] The above-mentioned authorization control method starts running according to a received startup instruction and detects whether an internal file exists; wherein the internal file includes: a first identifier of the authorization server, an authorization period, the number of authorized access devices, and a second identifier of each authorized access device; the internal file is accessible only to designated programs; the internal file is generated by decrypting the authorization file; if the internal file exists, the first server and each first device are verified to be legitimate according to the internal file; if the first server and each first device are legitimate, the first server and each first device are allowed to operate normally. This method includes the first identifier of the authorization server, the authorization period, the number of authorized access devices, and the second identifier of each authorized access device in the internal file, and verifies the first server and each first device according to the contents of the internal file. This allows for precise management and control of the authorization period, the first server, and the connected first devices, thereby improving the security and accuracy of authorization.

[0030] The embodiment of the present invention further provides another authorization control method, which is implemented based on the method of the above embodiment and includes the following steps:

[0031] Step 1: Start the program according to the received startup instruction and check whether there is an internal file; the internal file includes: a first identifier of the authorization server, an authorization period, the number of authorized access devices, and a second identifier of each authorized access device; the internal file is accessible only to the designated program; the internal file is generated by decrypting the authorization file;

[0032] In actual implementation, the above internal files can be generated by following steps 10 and 11:

[0033] Step 10: If an authorization file is detected in the designated directory, the authorization file is decrypted using a second preset encryption method, and an internal file is generated based on the first identifier of the authorization server, the authorization period, the number of authorized access devices, and the second identifier of each authorized access device contained in the decrypted authorization file;

[0034] The above-mentioned designated directory can be selected and set according to actual needs; in actual implementation, the user can pre-download the authorization file through the file browsing function, and upload the downloaded authorization file to the designated directory of the first server. The above-mentioned second preset encryption method can be selected according to actual needs. For example, it can be an AES256 encryption algorithm, etc. The AES256 encryption algorithm is a symmetric encryption algorithm with a key length of 256 bits. In actual implementation, if it is determined through inspection that there is an authorization file in the designated directory, since the authorization file is usually encrypted using the second preset encryption method, it is necessary to decrypt the authorization file first to read the content in the authorization file. The first identification of the authorization server, the authorization period, the number of authorized access devices, and the second identification of each authorized access device contained in the decrypted authorization file can be loaded into the memory to generate an internal file that is only accessible to the specified program.

[0035] Step 11: Delete the authorization file in the specified directory.

[0036] After the above internal file is generated, the authorization file stored in the designated directory of the first server can be deleted to ensure that its content will not be accessed externally, prevent multiple authorizations or illegal tampering, and ensure the reliability of the authorization.

[0037] Step 2: If the internal file exists, check whether the current time is within the authorized period, whether the identifier of the first server matches the first identifier, whether the number of first devices is less than or equal to the number of authorized access devices, and whether the device identifier of each first device belongs to multiple second identifiers according to the internal file;

[0038] The process of detecting whether the current time is within the authorized period can be implemented by following steps 20 and 21:

[0039] Step 20: Obtain the local time and running time corresponding to the first server;

[0040] Step 21: Check whether the current time is within the authorized period based on the local time and the running time.

[0041] When the first server and each first device are successfully authorized, the authorization period, the number of devices authorized for access, and the operating time since the first server was started are recorded in a preset hidden file; wherein, the authorization period includes at least: the authorization start time and the authorization end time. By recording the operating time in the hidden file, the operating time can be continued to be read after the first server is restarted.

[0042] The above process of detecting whether the current time is within the authorized period can be implemented by following steps A to C:

[0043] Step A, get the running time from the hidden file;

[0044] Step B, add the running time to the local time to calculate the current time;

[0045] In step C, if the current time does not exceed the authorization end time and the local time is the authorization start time or a time after the authorization start time, it is determined that the current time is within the authorization period.

[0046] When the first server is running in a local area network environment, the first server may not be able to synchronize time with the Internet due to the lack of networking conditions. In this case, the running time of the first server and the local time of the first server can be combined to jointly determine whether the current time is within the authorization period. Specifically, the above-mentioned local time can be the authorization start time corresponding to when the user purchases the first server, and it remains unchanged. The authorization start time, authorization end time and running time can be read from a preset hidden file, and the running time of the first server is added to the local time to calculate the current time, and determine whether the current time is within the authorization period. Specifically, it can be determined whether the current time does not exceed the authorization end time, and whether the local time is the authorization start time or a time after the authorization start time. If the current time does not exceed the authorization end time, and the local time is the authorization start time or a time after the authorization start time, it can be considered that the current time is within the authorization period. Otherwise, it can be considered that the current time is not within the authorization period.

[0047] Step 3: If the current time is within the authorized period, the identifier of the first server matches the first identifier, the number of first devices is less than or equal to the number of authorized access devices, and the device identifier of each first device belongs to multiple second identifiers, the first server and each first device are determined to be legitimate;

[0048] Step four, if the current time is not within the authorization period, and / or the identifier of the first server does not match the first identifier, and / or the number of first devices is greater than the number of authorized access devices, and / or the device identifier of at least one first device does not belong to the multiple second identifiers, determine that the first server and each first device are illegal.

[0049] If the current time is within the authorization period, it can be considered that the user is allowed to use the software in the first server at the current time; if the identifier of the first server matches the first identifier, the first server can be considered to be an authorized server; if the number of first devices is less than or equal to the number of authorized access devices, it can be understood that the number of first devices does not exceed the permitted number; if the device identifier of each first device belongs to multiple second identifiers, it can be considered that each first device is an authorized device; in actual implementation, when each of the above conditions is met, it can be determined that the first server and each first device are legal. In this case, the first server and each first device can be allowed to operate normally; if any one or more conditions are not met, the first server and each first device are generally considered to be illegal. In this case, the first server and each first device are not allowed to run, that is, the authorization fails.

[0050] When matching the identifier of the first server with the first identifier, considering that the first server may be equipped with multiple hard disks and multiple network cards, in this case, it is only necessary to find at least one hard disk serial number and one network card MAC address that match the first identifier of the authorized server recorded in the authorization file, and the match will be considered successful.

[0051] Step five: If the first server and each first device are illegal, an exception prompt message is generated; wherein the exception prompt message is used to prompt: decryption of the authorized file fails, and / or the current time is not within the authorization period, and / or the identifier of the first server does not match the first identifier, and / or the number of first devices is greater than the number of authorized access devices, and / or the device identifier of at least one first device does not belong to multiple second identifiers.

[0052] In actual implementation, if the decryption of the authorization file fails, the first server can generate an exception prompt message to promptly remind the user that the decryption of the authorization file failed; if the current time is not within the authorization period, the identifier of the first server does not match the first identifier, the number of first devices is greater than the number of authorized access devices, and the device identifier of at least one first device does not belong to multiple second identifiers, if any one or more of these four conditions are met, the first server can generate an exception prompt message to promptly remind the user of the relevant abnormal problem.

[0053] Step six: If the first server and each first device are legal, allow the first server and each first device to operate normally.

[0054] Step 7: If the internal file does not exist, read the identifier of the first server;

[0055] The identification of the above-mentioned first server may include the hard disk serial number, network card MAC address, etc. of the first server; in actual implementation, when the first server is started and running, if it is determined through inspection that there are no internal files, an illegal alarm message may be generated to promptly remind the user of the missing internal files, and at the same time, the hard disk serial number, network card MAC and other identifications of the first server may be automatically obtained.

[0056] Step 8: Obtain a random number, and encrypt the identifier of the first server and the random number according to a first preset encryption method to obtain an identifier file corresponding to the first server;

[0057] The above-mentioned random number can be randomly generated data or a timestamp, etc.; the above-mentioned first preset encryption method can be selected according to actual needs, and the first preset encryption method and the second preset encryption method can be the same or different; in actual implementation, a random number can be obtained, and after merging the random number with the identification of the above-mentioned first server, it is encrypted using the first preset encryption method to generate a temporary and unique identification file corresponding to the first server, and the identification file can be sent to the server corresponding to the software developer; the identification file can also be uploaded to another application software platform running on the first server through an API (Application Programming Interface) interface, and the application software platform allows users to download the unique identification file corresponding to the first server through a browser.

[0058] Step nine, obtain the authorization period, the number of authorized access devices and the second identification of each authorized access device through the software authorization tool, and decrypt the identification file; merge the authorization period, the number of authorized access devices, the second identification of each authorized access device with the identification of the first server to obtain merged information; encrypt the merged information according to the second preset encryption method to generate an authorization file; wherein the authorization file is set with read-only attributes and hidden attributes.

[0059] The above-mentioned software authorization tool refers to a tool or system for managing software licenses and authorizations. It can help software developers effectively manage and control their software licenses, ensure the legal use of software and protect intellectual property rights. The software authorization tool usually runs on the server corresponding to the software developer. In actual implementation, due to the lack of internal files, and the internal files are obtained by decrypting the authorization files, it is necessary to generate the authorization files first. Specifically, the staff of the software developer can send the project details to the software authorization tool, including: the authorization period, the number of authorized access devices and the second identification of each authorized access device. The software authorization tool can load the above identification file, decrypt the identification file, and extract the identification of the first server from it. The authorization period, the number of authorized access devices, the second identifier of each authorized access device, and the identifier of the first server are combined to obtain combined information. The combined information is encrypted using a second preset encryption method (such as the AES256 encryption algorithm) to generate a final authorization file. The generated authorization file is sent to the first server. Specifically, it can be saved in a designated directory of the first server and saved with read-only and hidden attributes. The authorization file set to read-only can only be read and cannot be modified or deleted; the authorization file set to hidden is not displayed by default. By hiding the authorization file, user misoperation can be prevented; the authorization file ensures the immutability and security of the authorization information, thereby effectively preventing unauthorized use. Once it is detected that the authorization file has been successfully uploaded, the first server can automatically restart to repeat the process of detecting whether there is an internal file.

[0060] For easier understanding, see Figure 2 Another authorization control method shown is that after the first server is started for the first time, it is determined whether the authorization file is read. If the authorization file is read, an authorization check is performed. The internal file can be obtained by decrypting the authorization file, and the legality is determined according to the internal file. If the decryption of the authorization file fails, an abnormal prompt can be given. If the decryption of the authorization file is successful, the time and space are continued to be detected (corresponding to the above-mentioned detection of whether the current time is within the authorization period, whether the identifier of the first server matches the first identifier, whether the number of first devices is less than or equal to the number of authorized access devices, and whether the device identifier of each first device belongs to multiple second identifiers). The legality is determined based on the detection result. If it is legal, the first server and each first device are allowed to operate normally. If it is illegal, an abnormal prompt can be given.

[0061] like Figure 2As shown, if the authorization file is not read, the hard disk serial number and network card MAC of the first server are read, combined with a random number, and encrypted to generate a unique identification file corresponding to the first server. The identification file is decrypted by the software authorization tool, and time and space authorization are added. After encryption, the authorization file is obtained.

[0062] The above authorization control method first uses the network card MAC and hard disk serial number of the first server as unique identifiers to ensure that the authorization file cannot be arbitrarily copied to other servers for use. Secondly, when the first server is started for the first time, an authorization file with the authorization period recorded can be created on the first server. The authorization file is set to read-only and hidden attributes to prevent users from changing the authorization status by modifying the system time. Finally, the authorization file will clearly record the number of first devices and the unique identifier of each first device to prevent the arbitrary addition of new devices while keeping the total number of devices unchanged. This method not only improves the security and accuracy of authorization, but also effectively prevents illegal use.

[0063] This method uses the Internet of Things devices to implement a space (corresponding to the number of first devices actually purchased by the user) and time (determined based on the usage period of the first server purchased by the user) authorization mechanism. It can achieve precise control of time and space based on a specific first server, ensuring that the system can only be legally used within the authorized time range and only on a specified number of specific first devices. In any case beyond the authorized scope, the system will not operate normally and a prompt for illegal use will be displayed on the user interface. This method prevents illegal copying of software through reasonable authorization management and strictly limits the usage time and space.

[0064] An embodiment of the present invention provides an authorization control device, which is set on a first server, and the first server establishes a connection with at least one first device; Figure 3 As shown, the device includes: a detection module 30, which is used to start running according to the received startup instruction and detect whether there is an internal file; wherein the internal file includes: a first identification of the authorized server, an authorization period, the number of authorized access devices and a second identification of each authorized access device; the internal file is only accessible to designated programs; the internal file is generated by decrypting the authorization file; a verification module 31, which is used to verify whether the first server and each first device are legal according to the internal file if the internal file exists; and a permission module 32, which is used to allow the first server and each first device to operate normally if both are legal.

[0065] The above-mentioned authorization control device contains the first identification of the authorization server, the authorization period, the number of authorized access devices and the second identification of each authorized access device in the internal file. The first server and each first device are checked according to the content in the internal file, and the authorization period, the first server and the accessed first device can be accurately managed and controlled, thereby improving the security and accuracy of the authorization.

[0066] Furthermore, the inspection module is also used to: detect whether the current time is within the authorization period, whether the identifier of the first server matches the first identifier, whether the number of first devices is less than or equal to the number of authorized access devices, and whether the device identifier of each first device belongs to multiple second identifiers; if the current time is within the authorization period, and the identifier of the first server matches the first identifier, and the number of first devices is less than or equal to the number of authorized access devices, and the device identifier of each first device belongs to multiple second identifiers, determine that the first server and each first device are legal; if the current time is not within the authorization period, and / or the identifier of the first server does not match the first identifier, and / or the number of first devices is greater than the number of authorized access devices, and / or the device identifier of at least one first device does not belong to multiple second identifiers, determine that the first server and each first device are illegal.

[0067] Furthermore, the device is also used to: generate an exception prompt message if the first server and each first device are illegal; wherein the exception prompt message is used to prompt: decryption of the authorized file fails, and / or the current time is not within the authorization period, and / or the identifier of the first server does not match the first identifier, and / or the number of first devices is greater than the number of authorized access devices, and / or the device identifier of at least one first device does not belong to multiple second identifiers.

[0068] Furthermore, the device is also used to: if the internal file does not exist, read the identification of the first server; obtain a random number, and encrypt the identification of the first server and the random number according to a first preset encryption method to obtain an identification file corresponding to the first server; obtain the authorization period, the number of authorized access devices and the second identification of each authorized access device through a software authorization tool, and decrypt the identification file; merge the authorization period, the number of authorized access devices, the second identification of each authorized access device with the identification of the first server to obtain merged information; encrypt the merged information according to a second preset encryption method to generate an authorization file; wherein the authorization file is set with read-only attributes and hidden attributes.

[0069] Furthermore, the internal file is generated in the following manner: if an authorization file is detected in the specified directory, the authorization file is decrypted according to the second preset encryption method, and the internal file is generated based on the first identifier of the authorization server, the authorization period, the number of authorized access devices and the second identifier of each authorized access device contained in the decrypted authorization file; the authorization file in the specified directory is deleted.

[0070] Furthermore, the verification module is further configured to: obtain the local time and running time corresponding to the first server; and detect whether the current time is within the authorized period based on the local time and running time.

[0071] Furthermore, when the first server and each first device are successfully authorized, the authorization period, the number of devices authorized to access, and the operating time since the first server was started are recorded in a preset hidden file; wherein the authorization period includes: the authorization start time and the authorization end time; the verification module is also used to: obtain the operating time from the hidden file; add the operating time to the local time to calculate the current time; if the current time does not exceed the authorization end time, and the local time is the authorization start time or the time after the authorization start time, it is determined that the current time is within the authorization period.

[0072] The implementation principle and technical effects of the authorization control device provided in the embodiment of the present invention are the same as those of the aforementioned authorization control method embodiment. For the sake of brief description, for matters not mentioned in the authorization control device embodiment, reference may be made to the corresponding contents in the aforementioned authorization control method embodiment.

[0073] The embodiment of the present invention further provides an electronic device, see Figure 4 As shown, the electronic device includes a processor 130 and a memory 131 , wherein the memory 131 stores machine executable instructions that can be executed by the processor 130 , and the processor 130 executes the machine executable instructions to implement the above authorization control method.

[0074] Further, Figure 4 The electronic device shown further includes a bus 132 and a communication interface 133 , and the processor 130 , the communication interface 133 and the memory 131 are connected via the bus 132 .

[0075] The memory 131 may include a high-speed random access memory (RAM), and may also include a non-volatile memory, such as at least one disk storage. The communication connection between the system network element and at least one other network element is achieved through at least one communication interface 133 (which may be wired or wireless), and the Internet, wide area network, local area network, metropolitan area network, etc. may be used. The bus 132 may be an ISA bus, a PCI bus, or an EISA bus. The bus can be divided into an address bus, a data bus, a control bus, etc. For ease of representation, Figure 4 Only one bidirectional arrow is used in the diagram, but this does not mean that there is only one bus or one type of bus.

[0076] The processor 130 may be an integrated circuit chip with signal processing capabilities. During implementation, each step of the above method can be completed by hardware integrated logic circuits in the processor 130 or by software instructions. The above processor 130 may be a general-purpose processor, including a central processing unit (CPU), a network processor (NP), etc.; it may also be a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components. It can implement or execute the various methods, steps, and logic block diagrams disclosed in the embodiments of the present invention. The general-purpose processor may be a microprocessor or any conventional processor. The steps of the method disclosed in conjunction with the embodiments of the present invention can be directly implemented and executed by a hardware decoding processor, or by a combination of hardware and software modules in the decoding processor. The software module can be located in a storage medium well-known in the art, such as random access memory, flash memory, read-only memory, programmable read-only memory, electrically erasable programmable memory, registers, etc. The storage medium is located in memory 131, and processor 130 reads information in memory 131 and, in conjunction with its hardware, completes the steps of the method of the aforementioned embodiment.

[0077] An embodiment of the present invention also provides a machine-readable storage medium, which stores machine-executable instructions. When the machine-executable instructions are called and executed by the processor, the machine-executable instructions prompt the processor to implement the above-mentioned authorization control method. The specific implementation can be found in the method embodiment and will not be repeated here.

[0078] The computer program product of the authorization control method, device, electronic device and storage medium provided in the embodiments of the present invention includes a computer-readable storage medium storing program code. The instructions included in the program code can be used to execute the methods described in the previous method embodiments. For specific implementation, please refer to the method embodiments and will not be repeated here.

[0079] If the functions are implemented in the form of software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, or the part that contributes to the prior art, or the part of the technical solution, can be embodied in the form of a software product. The computer software product is stored in a storage medium and includes several instructions for enabling a computer device (which can be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes various media that can store program codes, such as a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk, or an optical disk.

[0080] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the above embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the above embodiments, or replace some or all of the technical features therein with equivalents. However, these modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of the present invention.

Claims

1. An authorization control method, characterized in that: The method is applied to a first server, where the first server establishes a connection with at least one first device; the method includes: The program starts running according to the received startup instruction and detects whether an internal file exists; wherein the internal file includes: a first identifier of the authorization server, an authorization period, a number of authorized access devices, and a second identifier of each authorized access device; the internal file is accessible only to a designated program; the internal file is generated by decrypting the authorization file; If the internal file exists, verifying whether the first server and each of the first devices are legitimate according to the internal file; If the first server and each of the first devices are legal, the first server and each of the first devices are allowed to operate normally.

2. The method according to claim 1, characterized in that The step of verifying whether the first server and each of the first devices are legitimate includes: detecting whether the current time is within the authorized period, whether the identifier of the first server matches the first identifier, whether the number of first devices is less than or equal to the number of authorized access devices, and whether the device identifier of each first device belongs to multiple second identifiers; If the current time is within the authorized period, the identifier of the first server matches the first identifier, the number of first devices is less than or equal to the number of authorized access devices, and the device identifier of each first device belongs to multiple second identifiers, the first server and each first device are determined to be legitimate; If the current time is not within the authorization period, and / or the identifier of the first server does not match the first identifier, and / or the number of first devices is greater than the number of authorized access devices, and / or the device identifier of at least one first device does not belong to the multiple second identifiers, it is determined that the first server and each of the first devices are illegal.

3. The method according to claim 1, characterized in that The method further comprises: If the first server and each of the first devices are illegal, an exception prompt message is generated; wherein, the exception prompt message is used to prompt: decryption of the authorization file fails, and / or the current time is not within the authorization period, and / or the identifier of the first server does not match the first identifier, and / or the number of the first devices is greater than the number of authorized access devices, and / or the device identifier of at least one first device does not belong to multiple second identifiers.

4. The method according to claim 1, wherein The method further comprises: If the internal file does not exist, reading the identifier of the first server; Obtaining a random number, and encrypting the identifier of the first server and the random number according to a first preset encryption method to obtain an identifier file corresponding to the first server; Obtain the authorization period, the number of authorized access devices, and the second identification of each authorized access device through a software authorization tool, and decrypt the identification file; merge the authorization period, the number of authorized access devices, the second identification of each authorized access device, and the identification of the first server to obtain merged information; encrypt the merged information according to a second preset encryption method to generate the authorization file; wherein, the authorization file is set to have read-only attributes and hidden attributes.

5. The method according to claim 1, wherein The internal files are generated in the following way: If the authorization file is detected to exist in the designated directory, decrypt the authorization file using a second preset encryption method, and generate an internal file based on the first identifier of the authorization server, the authorization period, the number of authorized access devices, and the second identifier of each authorized access device contained in the decrypted authorization file; Delete the authorization file in the specified directory.

6. The method according to claim 2, characterized in that The step of detecting whether the current time is within the scope of the authorization period includes: Obtain the local time and running time corresponding to the first server; According to the local time and the running time, it is detected whether the current time is within the range of the authorization period.

7. The method according to claim 6, characterized in that When the first server and each of the first devices are successfully authorized, the authorization period, the number of devices authorized to access, and the operating time since the first server was started are recorded in a preset hidden file; wherein the authorization period includes: the authorization start time and the authorization end time; The step of detecting whether the current time is within the scope of the authorization period includes: Obtain the running time from the hidden file; Add the running time to the local time to calculate the current time; If the current time does not exceed the authorization end time, and the local time is the authorization start time or a time after the authorization start time, it is determined that the current time is within the authorization period.

8. An authorization control device, characterized in that: The apparatus is provided on a first server, and the first server establishes a connection with at least one first device; the apparatus includes: a detection module, configured to start running according to the received startup instruction and detect whether an internal file exists; wherein the internal file includes: a first identifier of the authorization server, an authorization period, a number of authorized access devices, and a second identifier of each authorized access device; the internal file is accessible only to a designated program; and the internal file is generated by decrypting the authorization file; a verification module, configured to verify, if the internal file exists, whether the first server and each of the first devices are legitimate according to the internal file; The permission module is configured to allow the first server and each of the first devices to operate normally if both the first server and each of the first devices are legal.

9. An electronic device, characterized in that: The system comprises a processor and a memory, wherein the memory stores machine-executable instructions that can be executed by the processor, and the processor executes the machine-executable instructions to implement the authorization control method according to any one of claims 1 to 7.

10. A machine-readable storage medium, characterized in that The machine-readable storage medium stores machine-executable instructions. When the machine-executable instructions are called and executed by a processor, the machine-executable instructions prompt the processor to implement the authorization control method according to any one of claims 1 to 7.