Operating system activation method and device, equipment, medium and product
By introducing automatic detection and cloud platform authentication mechanisms into the operating system, the automatic activation of operating systems for various devices such as screenless devices is achieved, solving the cumbersome and complex problems of existing activation methods, and improving user experience and system stability.
Patent Information
- Application Number
- CN202510202114.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-02-24
- Publication Date
- 2025-06-10
AI Technical Summary
The existing operating system activation methods are cumbersome and easy to operate incorrectly, especially on screenless devices, which cannot meet the convenience and stability requirements of the open source Hongmeng system's extensive adaptation of devices.
By detecting the license status and when the preset automatic authentication conditions are met, the device template name is obtained, and an authentication request is generated is sent to the cloud platform. The cloud platform performs authentication and license authorization file generation, and the device realizes automatic activation based on this file.
It realizes automatic activation of the operating system, simplifies the activation process, improves user convenience, ease of use, fluency and satisfaction, and is suitable for different types of devices.
Smart Images

Figure CN120123010A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of computer technology, and in particular to an activation method, device, equipment, medium and product for an operating system. Background Art
[0002] An operating system is a built-in program used to cooperate with various hardware of a computer to interact with users. Before using the operating system, it is necessary to activate the operating system on the device to obtain corresponding function authorizations.
[0003] Currently, for the existing activation methods of operating systems, usually users need to obtain a key through means such as telephone and optical disc first, and then manually input the key to achieve activation. The activation process is cumbersome and prone to misoperation. Especially for screenless devices, the activation complexity is further increased. In particular, for the open-source HarmonyOS, the types of devices it adapts to are more extensive. It is necessary to consider issues such as user convenience, stability, and ease of use, and at the same time be compatible with more device types. Therefore, the activation scheme it adopts not only needs to consider screen devices, but also needs to consider screenless devices, and needs to minimize user operations as much as possible. The prior art cannot meet the activation requirements of the open-source HarmonyOS. Summary of the Invention
[0004] The present invention provides an activation method, device, equipment, medium and product for an operating system, which can realize the automatic activation of the operating system, simplify the activation process, can realize the activation of the operating systems of different types of devices, and can improve user convenience, ease of use, fluency and satisfaction.
[0005] According to one aspect of the present invention, there is provided an activation method for an operating system, including:
[0006] When it is detected that a preset license detection condition is satisfied, obtain the license status, and when it is detected that the license status satisfies a preset automatic authentication condition, obtain the template name corresponding to the current device;
[0007] Generate an authentication request according to the template name and send it to the cloud platform, so that the cloud platform authenticates the current device according to the template name in the authentication request;
[0008] When it is detected that the authentication passed information fed back by the cloud platform, send the device information of the current device to the cloud platform, so that the cloud platform generates a target license authorization file according to the device information;
[0009] When it is detected that the target license authorization file fed back by the cloud platform, activate the operating system of the current device based on the target license authorization file.
[0010] According to another aspect of the present invention, there is provided an activation device for an operating system, including:
[0011] A license status acquisition module, configured to acquire the license status when it is detected that a preset license detection condition is met, and acquire the template name corresponding to the current device when it is detected that the license status meets a preset automatic authentication condition;
[0012] An authentication request generation module, configured to generate an authentication request according to the template name and send it to a cloud platform, so that the cloud platform authenticates the current device according to the template name in the authentication request;
[0013] A device information sending module, configured to send the device information of the current device to the cloud platform when it is detected that the authentication passed information fed back by the cloud platform, so that the cloud platform generates a target license authorization file according to the device information;
[0014] An operating system activation module, configured to activate the operating system of the current device based on the target license authorization file when it is detected that the target license authorization file fed back by the cloud platform;
[0015] According to another aspect of the present invention, there is provided an electronic device, the electronic device includes:
[0016] At least one processor; and
[0017] A memory communicatively connected to the at least one processor; wherein,
[0018] The memory stores a computer program executable by the at least one processor, and the computer program is executed by the at least one processor so that the at least one processor can execute the activation method of the operating system according to any embodiment of the present invention.
[0019] According to another aspect of the present invention, there is provided a computer-readable storage medium storing a computer program for causing a processor to execute the activation method of the operating system according to any embodiment of the present invention when executed.
[0020] According to another aspect of the present invention, there is provided a computer program product including a computer program, and the computer program implements the activation method of the operating system according to any embodiment of the present invention when executed by a processor.
[0021] In the technical solution of the embodiment of the present invention, when it is detected that the preset license detection condition is satisfied, the license status is obtained, and when it is detected that the license status satisfies the preset automatic authentication condition, the template name corresponding to the current device is obtained; according to the template name, an authentication request is generated and sent to the cloud platform, so that the cloud platform authenticates the current device according to the template name in the authentication request; when the authentication passed information fed back by the cloud platform is detected, the device information of the current device is sent to the cloud platform, so that the cloud platform generates a target license authorization file according to the device information; when the target license authorization file fed back by the cloud platform is detected, the operating system of the current device is activated based on the target license authorization file; by automatically detecting the license status and triggering automatic authentication when the license status satisfies the preset automatic authentication condition, automatic activation of the operating system can be realized, the activation process can be simplified, the operating systems of different types of devices can be activated, and the user convenience, usability, fluency and satisfaction can be improved.
[0022] It should be understood that the content described in this part is not intended to identify the key or important features of the embodiments of the present invention, nor is it used to limit the scope of the present invention. Other features of the present invention will become easily understood through the following description. BRIEF DESCRIPTION OF THE DRAWINGS
[0023] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the following will briefly introduce the drawings required for the description of the embodiments. Obviously, the drawings in the following description are only some embodiments of the present invention, and those of ordinary skill in the art can also obtain other drawings based on these drawings without creative efforts.
[0024] Figure 1 is a flowchart of a method for activating an operating system according to Embodiment 1 of the present invention;
[0025] Figure 2 is a flowchart of another method for activating an operating system according to Embodiment 1 of the present invention;
[0026] Figure 3 is a flowchart of detecting the license status according to Embodiment 1 of the present invention;
[0027] Figure 4 is a flowchart of another method for activating an operating system according to Embodiment 1 of the present invention;
[0028] Figure 5 is a schematic structural diagram of an operating system activation device according to Embodiment 2 of the present invention;
[0029] Figure 6 is a schematic structural diagram of an electronic device for implementing the operating system activation method of the embodiment of the present invention. Detailed implementation mode
[0030] In order to enable those skilled in the art of the present technology to better understand the solution of the present invention, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are only a part of the embodiments of the present invention, rather than all the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those of ordinary skill in the art without creative work shall fall within the protection scope of the present invention.
[0031] It should be noted that the terms "first", "second", "target", etc. in the description and claims of the present invention and the above-mentioned drawings are used to distinguish similar objects, and do not necessarily need to be used to describe a specific order or sequence. It should be understood that such data can be interchanged under appropriate circumstances, so that the embodiments of the present invention described here can be implemented in an order other than those illustrated or described here. In addition, the terms "comprising" and "having" and any variations thereof are intended to cover non-exclusive inclusion. For example, a process, method, system, product or device comprising a series of steps or units does not necessarily have to be limited to those steps or units clearly listed, but may include other steps or units not clearly listed or inherent to these processes, methods, products or devices.
[0032] Embodiment 1
[0033] Figure 1 A flowchart of an activation method for an operating system is provided for Embodiment 1 of the present invention. This embodiment is applicable to the situation of automatically activating the open-source HarmonyOS installed on a terminal device. This method can be executed by an activation device of the operating system. The activation device of the operating system can be implemented in the form of hardware and / or software. Typically, the activation device of the operating system can be configured in an electronic device, such as a computer or a mobile terminal device, etc. As Figure 1 shown, the method includes:
[0034] S110. When it is detected that a preset license detection condition is met, obtain the license status, and when it is detected that the license status meets the preset automatic authentication condition, obtain the template name corresponding to the current device.
[0035] In this embodiment, the activation of the operating system can adopt the license automatic authentication technology. The process of the activation method of the operating system can be as Figure 2As shown, in the network-connected state, without manual operation by the user, the activation process of the device is automatically completed. Typically, the terminal device automatically collects relevant information of the device by establishing a secure connection with the cloud platform server, and generates an activation request for verification. Once the verification is successful, the activation status information will be automatically stored on the local device to complete the device activation.
[0036] Among them, the activation system of the operating system can include the user, the device, and the cloud platform server. The user is used to ensure that the device's network connection is normal. The device is used to periodically self-check the activation status of the license, and when the preset automatic authentication conditions are met, it triggers the automatic application for the license (license). After the application is completed, it downloads the generated unique license authorization file, activates the device after the download is completed, and controls the license automatic application thread to exit. The server is used to process license applications. For rejected applications, specific rejection reasons need to be returned. After the device authentication is passed, according to the uploaded device information, such as template name, device unique code, device type, application time, expiration time, etc., it generates a unique license authorization file exclusive to the device and provides a download link.
[0037] Among them, the preset license detection conditions can be the condition information preset for triggering the license status detection. For example, it can be when the device is powered on, or when the preset self-check time is reached, etc. In this embodiment, when the device is used for the first time, the device needs to be connected to the network and the device network needs to be ensured to be normal. Then, when the device starts up and at 00:00:30 every day after the device starts up, the license detection starts to obtain the license status. The license status can include unactivated status, invalid status, expired status, and approaching expiration status, etc. In this embodiment, for each license status, corresponding condition information can be set respectively. Thus, the device information required to judge the license status can be collected, such as the existing license authorization file, etc., and the current license status can be obtained by judging whether the collected information meets each condition information.
[0038] In this embodiment, the preset automatic authentication conditions can be the condition information preset for triggering automatic authentication. For example, it can be that the license status is one or several specified statuses, etc. Specifically, after obtaining the license status, if it is determined that the license status meets the preset automatic authentication conditions, it means that automatic authentication is required. At this time, the template name corresponding to the current device can be collected. Among them, the template name can be a string identifying the company or enterprise identity to which the device belongs, and can be pre-configured and stored in the device.
[0039] It should be noted that the equipment owner can purchase a certain number of operating systems in advance. The system developer can assign a unique corresponding template name to it, and configure the corresponding available equipment application quota under this template name according to the number of purchases. The corresponding relationship between the template name and the available equipment application quota can be generated and stored in the database of the cloud platform. At the same time, the equipment owner can burn the template name into each piece of equipment. After that, each piece of equipment can automatically apply for the corresponding license authorization file according to this template name. For each successful application of a license, the available equipment application quota corresponding to this template name is automatically reduced by one.
[0040] S120. Generate an authentication request according to the template name and send it to the cloud platform, so that the cloud platform authenticates the current device according to the template name in the authentication request.
[0041] Specifically, the current authentication request can be generated according to the template name in accordance with the preset format of the authentication request. For example, the preset format of the authentication request can be {"deviceNumber":"unique device code","deviceProfileName":"device template name"}. Then, this authentication request can be sent to the cloud platform. After receiving the authentication request, the cloud platform can parse the content of the authentication request to obtain the template name, and determine whether the template name meets the preset authentication passing conditions to obtain the authentication result. For example, the format of the authentication result can be {"credentialsType":"authentication type","credentialsValue":"unique device code","status":"authentication result"}. The authentication result can include authentication passed and authentication failed.
[0042] Exemplarily, the preset authentication passing conditions can be that the template name exists in the database, or the template name conforms to the specified format, etc. Specifically, if the cloud platform determines that the template name has successfully passed the authentication, it can feedback the authentication passed information to the current device; if the template name has not successfully passed the authentication, it can feedback the authentication failed information and the reason for the authentication failure to the current device.
[0043] Optionally, authenticating the current device according to the template name in the authentication request may include:
[0044] If a stored template name that matches the template name is found in the database and there is an available equipment balance under the stored template name, it is determined that the current device authentication has passed.
[0045] In an optional implementation, when performing device authentication based on the template name, the cloud platform can first check whether the template name can be successfully found in the database. If so, it can be determined that there is a stored template name in the database that matches the template name. Then, it can further find the available device quota corresponding to the template name in the database. If the available device quota is greater than 0, it can be determined that there is an available device balance under the stored template name, and it can be determined that the current device authentication is passed.
[0046] The advantage of the above setting is that it can achieve automatic authentication of devices and automatic authentication of batch devices.
[0047] S130. When the authentication passed information fed back by the cloud platform is detected, send the device information of the current device to the cloud platform so that the cloud platform generates a target license authorization file according to the device information.
[0048] Specifically, after receiving the authentication passed information fed back by the cloud platform, the current device can send all the device information to the cloud platform. The cloud platform can automatically generate a target license authorization file according to the device information and the preset authorization file format, and can send the target license authorization file or the corresponding download link to the current device.
[0049] Among them, the device information may include at least one of company name, template name, device type, device unique code, license type, application time, and expiration time. The license type may include commercial, temporary, etc. It can be understood that the device information can be adaptively adjusted according to the actual scenario.
[0050] S140. When the target license authorization file fed back by the cloud platform is detected, activate the operating system of the current device based on the target license authorization file.
[0051] Specifically, after receiving the target license authorization file fed back by the cloud platform, the current device can automatically load the target license authorization file through the system activation program to activate the operating system. Secondly, if the download link of the target license authorization file is sent by the cloud platform, first automatically download the target license authorization file according to the download link, and then activate the device based on the target license authorization file.
[0052] In this embodiment, the activation status (license status) of the device is periodically detected through startup and a timer. When it is detected that the device is not activated and the device is in an online state, the device side will periodically send a license application request to the cloud platform. When the cloud platform receives the request, it can parse the data on the device side and extract information such as the device template name and the unique device code. Then, authentication can be performed to verify the template name, and at the same time, a whitelist is supported, that is, only the devices within the whitelist can apply normally. When both verifications pass, an authentication passed message is replied. After that, the device sends relevant device information to the cloud platform, and the cloud platform generates a license authorization file based on the relevant device information, and replies an application success message to the device, and at the same time issues a download link for the license authorization file. The device side completes the download through the link. Finally, the license application request timer is ended, and the SA service completes actions such as automatically loading the license and updating the license status, and the device is automatically activated and completed.
[0053] The solution of this embodiment can avoid the need for users to perform certain manual operations in the prior art, such as inputting product keys, selecting activation methods, etc., can reduce the operation burden of users, and can reduce the probability of activation failure or delay; secondly, it can avoid enterprises or organizations from needing to manage a large number of activation codes and avoid continuously tracking information such as the usage status, validity period, and remaining quantity of each activation code.
[0054] The technical solution of the embodiment of the present invention, when it is detected that a preset license detection condition is met, obtains the license status, and when it is detected that the license status meets a preset automatic authentication condition, obtains the template name corresponding to the current device; according to the template name, generates an authentication request and sends it to the cloud platform so that the cloud platform authenticates the current device according to the template name in the authentication request; when it is detected that the authentication passed message feedback by the cloud platform, sends the device information of the current device to the cloud platform so that the cloud platform generates a target license authorization file according to the device information; when it is detected that the target license authorization file feedback by the cloud platform, activates the operating system of the current device based on the target license authorization file; by automatically detecting the license status and triggering automatic authentication when the license status meets the preset automatic authentication condition, the automatic activation of the operating system can be realized, the activation process can be simplified, the operating system activation of different types of devices can be realized, and the user convenience, usability, fluency and satisfaction can be improved.
[0055] In an optional implementation manner of this embodiment, obtaining the license status may include:
[0056] Judge whether there is an existing license authorization file in the specified path. If it is detected that there is no existing license authorization file in the specified path, determine that the license status is the unactivated state;
[0057] If it is detected that there is an existing license authorization file in the specified path, when the license type corresponding to the existing license authorization file is detected to be a permanent license, decrypt the existing license authorization file to obtain applicable device information;
[0058] Determine whether the applicable device information matches the current device. If it is detected that the applicable device information does not match the current device, determine that the license status is an invalid status;
[0059] If it is detected that the applicable device information matches the current device, obtain the expiration time corresponding to the existing license authorization file, and when it is detected that the current time is later than the expiration time, determine that the license status is an expired status.
[0060] In a specific example, the detection process of the license status can be as Figure 3 shown. Specifically, first, determine whether the existing license authorization file of the current device can be read in the specified path. If it is determined that the reading fails, determine that the license status is an unactivated status and start the license automatic authentication program for license download. If it is determined that the reading is successful, when the license type is determined to be a permanent license, decrypt the existing license authorization file based on the RSA4096 standard to extract the applicable device information. The applicable device information can be saved in the "key:value" format, with each line saving an option and its value. Then, compare the applicable device information with the device information of the current device item by item. If it is detected that there is one or more corresponding data item values that are not equal between the applicable device information and the device information, it can be determined that the applicable device information does not match the current device, and the license status can be determined to be an invalid status.
[0061] In another case, if it is detected that each corresponding data item value is equal between the applicable device information and the device information, it can be determined that the applicable device information matches the current device. Further, obtain the expiration time corresponding to the existing license authorization file. If the current time is later than the expiration time, it can be determined that the license status is an expired status, and if the current time is earlier than or equal to the expiration time, it can be determined that the license status is an activated status.
[0062] For example, the data items of the device information include the device type and the device unique code. If the corresponding values of the device type and / or the device unique code are not equal between the applicable device information and the current device information, it can be determined that the applicable device information does not match the current device; if the corresponding values of the device type and the device unique code are equal between the applicable device information and the device information, it can be determined that the applicable device information matches the current device.
[0063] Optionally, after detecting that there is an existing license authorization file in the specified path, it may further include:
[0064] If it is detected that the license type corresponding to the existing license authorization file is a non-permanent license, obtain the current time and calculate the duration from the current time to the expiration time corresponding to the existing license authorization file;
[0065] If it is detected that the duration is less than or equal to a preset duration threshold, determine that the license status is an approaching expiration status.
[0066] In another case, after detecting that there is an existing license authorization file in the specified path, if the license type corresponding to the existing license authorization file is a non-permanent license (temporary license), the duration from the current time to the expiration time corresponding to the existing license authorization file can be obtained. If the duration is less than or equal to a preset duration threshold, for example, 60 days, etc., the license status can be determined to be an approaching expiration status.
[0067] The advantage of the above settings is that it can achieve automatic license authentication for different scenarios, improve the stability and reliability of operating system activation, and ensure the availability of the device operating system.
[0068] Optionally, detecting that the license status meets the preset automatic authentication condition may include: If it is detected that the license status is an unactivated status, an invalid status, an expired status, or an approaching expiration status, determine that the preset automatic authentication condition is met.
[0069] In this embodiment, as long as any one of the license statuses of unactivated status, invalid status, expired status, and approaching expiration status is met, automatic authentication can be triggered. Before the operating system of the device is activated, the device is restricted in use and restarted every half hour.
[0070] In a specific implementation manner of this embodiment, the process of the operating system activation method may be as Figure 4 shown. When the user first uses the device, configure a network connection for the device. After the device is powered on or periodically detects the license status, and when the license status is an unactivated status, etc., generate an authentication request according to the template name and send it to the cloud platform. The cloud platform authenticates the current device according to the template name and returns an authentication result. When the device determines that the authentication is passed, send device information to the cloud platform. The cloud platform generates a license authorization file by populating the device information, encrypts it, and sends the download link of the encrypted license authorization file to the device. The device requests to download the license authorization file from the cloud platform according to the received download link, and after the download is successful, use the downloaded license authorization file to complete the device activation.
[0071] In this embodiment, after the device is connected to the network, automatic license authentication and activation can be achieved without manual operation by the user, which can improve the convenience and stability of activation and enhance the user experience. Secondly, when the device is not activated or other scenarios trigger the license automatic authentication program, it can directly interact with the cloud platform through the license SA service to complete data transmission without user interface operation, which can simplify the activation process and improve the activation efficiency. Moreover, the activation processes for devices with screens and without screens are the same, which can solve problems such as complex and difficult operating system copyright protection operations for devices without screens. The device only needs to be connected to the network and can complete device activation without screen operation. The entire process is executed by intelligent background detection with high stability.
[0072] Embodiment 2
[0073] Figure 5 FIG. is a schematic structural diagram of an operating system activation device provided in Embodiment 2 of the present invention. As Figure 5 shown, the device includes: a license status acquisition module 210, an authentication request generation module 220, a device information sending module 230, and an operating system activation module 240; wherein,
[0074] The license status acquisition module 210 is configured to acquire the license status when it is detected that a preset license detection condition is met, and acquire the template name corresponding to the current device when it is detected that the license status meets a preset automatic authentication condition;
[0075] The authentication request generation module 220 is configured to generate an authentication request according to the template name and send it to the cloud platform, so that the cloud platform authenticates the current device according to the template name in the authentication request;
[0076] The device information sending module 230 is configured to send the device information of the current device to the cloud platform when it is detected that the authentication passed information fed back by the cloud platform, so that the cloud platform generates a target license authorization file according to the device information;
[0077] The operating system activation module 240 is configured to activate the operating system of the current device based on the target license authorization file when it is detected that the target license authorization file fed back by the cloud platform;
[0078] In the technical solution of the embodiment of the present invention, when it is detected that the preset license detection condition is met, the license status is obtained, and when it is detected that the license status meets the preset automatic authentication condition, the template name corresponding to the current device is obtained; according to the template name, an authentication request is generated and sent to the cloud platform, so that the cloud platform authenticates the current device according to the template name in the authentication request; when the authentication passed information fed back by the cloud platform is detected, the device information of the current device is sent to the cloud platform, so that the cloud platform generates a target license authorization file according to the device information; when the target license authorization file fed back by the cloud platform is detected, the operating system of the current device is activated based on the target license authorization file; by automatically detecting the license status and triggering automatic authentication when the license status meets the preset automatic authentication condition, automatic activation of the operating system can be achieved, the activation process can be simplified, the operating systems of different types of devices can be activated, and the user convenience, usability, fluency and satisfaction can be improved.
[0079] Optionally, the license status obtaining module 210 is specifically configured to determine whether there is an existing license authorization file in a specified path. If it is detected that there is no existing license authorization file in the specified path, the license status is determined to be an unactivated state;
[0080] If it is detected that there is an existing license authorization file in the specified path, when it is detected that the license type corresponding to the existing license authorization file is a permanent license, the existing license authorization file is decrypted to obtain applicable device information;
[0081] Determine whether the applicable device information matches the current device. If it is detected that the applicable device information does not match the current device, the license status is determined to be an invalid state;
[0082] If it is detected that the applicable device information matches the current device, the expiration time corresponding to the existing license authorization file is obtained, and when it is detected that the current time is later than the expiration time, the license status is determined to be an expired state.
[0083] Optionally, the license status obtaining module 210 is further configured to, if it is detected that the license type corresponding to the existing license authorization file is a non-permanent license, obtain the current time and calculate the duration between the current time and the expiration time corresponding to the existing license authorization file;
[0084] If it is detected that the duration is less than or equal to a preset duration threshold, the license status is determined to be an approaching expiration state.
[0085] Optionally, the license status acquisition module 210 is specifically configured to determine that the preset automatic authentication condition is met if it is detected that the license status is an unactivated status, an invalid status, an expired status, or an approaching expiration status.
[0086] Optionally, the authentication request generation module 220 is specifically configured to determine that the current device authentication is passed if a stored template name matching the template name is found in the database and there is a device balance available for application under the stored template name.
[0087] Optionally, the device information includes at least one of a company name, a template name, a device type, a device unique code, a license type, an application time, and an expiration time.
[0088] The activation device of the operating system provided by the embodiments of the present invention can execute the activation method of the operating system provided by any embodiment of the present invention, and has corresponding function modules and beneficial effects for executing the method.
[0089] In the technical solution of the present disclosure, the collection, storage, use, processing, transmission, provision, and disclosure of the user's personal information comply with the provisions of relevant laws and regulations and do not violate public order and good customs.
[0090] Embodiment III
[0091] Figure 6 FIG. shows a schematic structural diagram of an electronic device 30 that can be used to implement the embodiments of the present invention. The electronic device 30 is intended to represent various forms of digital computers, such as, a laptop computer, a desktop computer, a workbench, a personal digital assistant, a server, a blade server, a mainframe computer, and other suitable computers. The electronic device 30 can also represent various forms of mobile devices, such as, a personal digital processor, a cellular phone, a smart phone, a wearable device (such as a helmet, glasses, a watch, etc.) and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely examples and are not intended to limit the implementation of the present invention described herein and / or claimed.
[0092] As Figure 6As shown, the electronic device 30 includes at least one processor 31 and a memory communicatively connected to the at least one processor 31, such as a read-only memory (ROM) 32, a random access memory (RAM) 33, etc. Among them, the memory stores a computer program executable by the at least one processor. The processor 31 can execute various appropriate actions and processes according to the computer program stored in the read-only memory 32 or the computer program loaded from the storage unit 38 into the random access memory 33. In the RAM 33, various programs and data required for the operation of the electronic device 30 can also be stored. The processor 31, the ROM 32, and the RAM 33 are connected to each other through a bus 34. An input / output (I / O) interface 35 is also connected to the bus 34.
[0093] Multiple components in the electronic device 30 are connected to the I / O interface 35, including: an input unit 36, such as a keyboard, a mouse, etc.; an output unit 37, such as various types of displays, speakers, etc.; a storage unit 38, such as a magnetic disk, an optical disc, etc.; and a communication unit 39, such as a network card, a modem, a wireless communication transceiver, etc. The communication unit 39 allows the electronic device 30 to exchange information / data with other devices through a computer network such as the Internet and / or various telecommunication networks.
[0094] The processor 31 can be various general-purpose and / or special-purpose processing components with processing and computing capabilities. Some examples of the processor 31 include but are not limited to a central processing unit, a graphics processing unit, various dedicated artificial intelligence computing chips, various processors running machine learning model algorithms, a digital signal processor, and any appropriate processor, controller, microcontroller, etc. The processor 31 executes the various methods and processes described above, such as the activation method of the operating system.
[0095] In some embodiments, the activation method of the operating system can be implemented as a computer program, which is tangibly contained in a computer-readable storage medium, such as the storage unit 38. In some embodiments, part or all of the computer program can be loaded and / or installed onto the electronic device 30 via the ROM 32 and / or the communication unit 39. When the computer program is loaded into the RAM 33 and executed by the processor 31, one or more steps of the activation method of the operating system described above can be executed. Alternatively, in other embodiments, the processor 31 can be configured to execute the activation method of the operating system in any other appropriate way (e.g., by means of firmware).
[0096] The various embodiments of the systems and techniques described above in this specification can be implemented in digital electronic circuitry, integrated circuit systems, field programmable gate arrays, application specific integrated circuits, application specific standard products, systems on a chip, programmable logic devices loaded, computer hardware, firmware, software, and / or combinations thereof. These various embodiments can include: being implemented in one or more computer programs that are executable and / or interpretable on a programmable system including at least one programmable processor, which may be a special-purpose or general-purpose programmable processor that receives data and instructions from, and transmits data and instructions to, a storage system, at least one input device, and at least one output device.
[0097] The computer programs for implementing the methods of the present invention can be written in any combination of one or more programming languages. These computer programs can be provided to a processor of a general purpose computer, special purpose computer, or other programmable data processing apparatus, such that the computer programs, when executed by the processor, cause the functions / operations specified in the flowchart and / or block diagram to be implemented. The computer programs can be executed entirely on the machine, partly on the machine, as a stand-alone software package partly on the machine and partly on a remote machine or entirely on the remote machine or server.
[0098] In the context of the present invention, a computer-readable storage medium can be a tangible medium that can contain or store a computer program for use by or in connection with an instruction execution system, apparatus, or device. The computer-readable storage medium can include, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, apparatus, or devices, or any suitable combination of the foregoing. Alternatively, the computer-readable storage medium can be a machine-readable signal medium. More specific examples of the machine-readable storage medium would include an electrical connection based on one or more wires, a portable computer diskette, a hard disk, a random access memory, a read-only memory, an erasable programmable read-only memory, a fiber optic, a portable compact disc read-only memory, an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
[0099] To provide interaction with a user, the systems and techniques described herein can be implemented on an electronic device 30 having: a display device (e.g., a cathode ray tube or a liquid crystal display) for displaying information to the user; and a keyboard and a pointing device (e.g., a mouse or a trackball) through which the user can provide input to the electronic device 30. Other kinds of devices can also be used to provide interaction with the user; for example, the feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form (including acoustic input, voice input, or tactile input).
[0100] The systems and techniques described herein can be implemented in a computing system including backend components (e.g., as a data server), or a computing system including middleware components (e.g., an application server), or a computing system including frontend components (e.g., a user computer having a graphical user interface or a web browser through which the user can interact with an implementation of the systems and techniques described herein), or a computing system including any combination of such backend components, middleware components, or frontend components. The components of the system can be interconnected to each other by digital data communication in any form or medium (e.g., a communication network). Examples of communication networks include: local area networks, wide area networks, blockchain networks, and the Internet.
[0101] The computing system can include a client and a server. The client and the server are generally remote from each other and typically interact through a communication network. The client-server relationship is created by computer programs running on the respective computers and having a client-server relationship with each other. The server can be a cloud server.
[0102] This embodiment can also include a computer program product including a computer program that, when executed by a processor, implements the activation method of the operating system provided in any embodiment of the present invention.
[0103] It should be understood that the various forms of processes shown above can be used, with steps reordered, added, or deleted. For example, the steps recited in the present invention can be executed in parallel, sequentially, or in a different order, as long as the desired results of the technical solution of the present invention can be achieved, and no limitation is made herein.
[0104] The above specific embodiments do not constitute a limitation on the protection scope of the present invention. Those skilled in the art should understand that various modifications, combinations, sub-combinations, and substitutions can be made according to design requirements and other factors. Any modifications, equivalent substitutions, and improvements made within the spirit and principle of the present invention shall be included within the protection scope of the present invention.
Claims
1. A method for activating an operating system, characterized in that: include: When it is detected that the preset license detection condition is met, the license status is obtained, and when it is detected that the license status meets the preset automatic authentication condition, the template name corresponding to the current device is obtained; According to the template name, an authentication request is generated and sent to the cloud platform, so that the cloud platform authenticates the current device according to the template name in the authentication request; When the authentication pass information fed back by the cloud platform is detected, the device information of the current device is sent to the cloud platform, so that the cloud platform generates a target license authorization file according to the device information; When the target license authorization file fed back by the cloud platform is detected, the operating system of the current device is activated based on the target license authorization file.
2. The method according to claim 1, characterized in that Get license status, including: Determine whether there is an existing license authorization file in the specified path. If it is detected that there is no existing license authorization file in the specified path, determine that the license status is in an inactivated state; If it is detected that there is an existing license authorization file under the specified path, then when it is detected that the license type corresponding to the existing license authorization file is a permanent license, the existing license authorization file is decrypted to obtain applicable device information; Determining whether the applicable device information matches the current device, and if it is detected that the applicable device information does not match the current device, determining that the license status is an invalid status; If it is detected that the applicable device information matches the current device, the expiration time corresponding to the existing license authorization file is obtained, and when it is detected that the current time is later than the expiration time, the license status is determined to be expired.
3. The method according to claim 2, characterized in that After detecting that there is an existing license authorization file in the specified path, it also includes: If it is detected that the license type corresponding to the existing license authorization file is a non-permanent license, then obtaining the current time, and calculating the length of time from the current time to the expiration time corresponding to the existing license authorization file; If it is detected that the duration is less than or equal to a preset duration threshold, it is determined that the license status is near expiration.
4. The method according to claim 3, characterized in that Detecting that the license status meets a preset automatic authentication condition includes: If it is detected that the license status is an inactivated status, an invalid status, an expired status, or a near-expiry status, it is determined that a preset automatic authentication condition is met.
5. The method according to claim 1, characterized in that Authenticating the current device according to the template name in the authentication request includes: If a stored template name matching the template name is found in the database, and there is a balance of equipment available for application under the stored template name, it is determined that the current device authentication is passed.
6. The method according to claim 1 or 2, characterized in that: The device information includes at least one of a company name, a template name, a device type, a device unique code, a license type, an application time, and an expiration time.
7. An activation device for an operating system, characterized in that: include: A license status acquisition module, used to acquire the license status when it is detected that a preset license detection condition is met, and to acquire the template name corresponding to the current device when it is detected that the license status meets a preset automatic authentication condition; An authentication request generation module, used to generate an authentication request according to the template name and send it to the cloud platform, so that the cloud platform authenticates the current device according to the template name in the authentication request; A device information sending module, configured to send the device information of the current device to the cloud platform when the authentication pass information fed back by the cloud platform is detected, so that the cloud platform generates a target license authorization file according to the device information; The operating system activation module is used to activate the operating system of the current device based on the target license authorization file when the target license authorization file fed back by the cloud platform is detected.
8. An electronic device, characterized in that: The electronic device comprises: at least one processor, and a memory communicatively connected to the at least one processor; wherein, The memory stores a computer program executable by the at least one processor, and the computer program is executed by the at least one processor so that the at least one processor can execute the method for activating the operating system according to any one of claims 1 to 6.
9. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and the computer program is used to enable a processor to implement the method for activating the operating system according to any one of claims 1 to 6 when executed.
10. A computer program product, characterized in that The invention comprises a computer program, which, when executed by a processor, implements the method for activating the operating system according to any one of claims 1 to 6.