Client activation control method, system and storage medium
By using blockchain technology for distributed storage of activation information between the control end and the client, the problem of low reliability of display device activation control is solved, and the accuracy and consistency of activation information are achieved.
Patent Information
- Application Number
- CN202310296944.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-03-24
- Publication Date
- 2025-09-19
- Estimated Expiration
- 2043-03-24
AI Technical Summary
In the prior art, the reliability of the display device activation control method is low and it is easily affected by malicious tampering of database data, thereby bypassing the upper limit of the number of activatable devices.
Blockchain technology is used for client activation control. Through blockchain verification between the control end and the client, activation information is ensured to be distributedly stored on the control end and the client, achieving consistency and accuracy of the blockchain.
It improves the reliability of client activation control, prevents database data from being maliciously tampered with, and ensures the accuracy and consistency of activation information.
Smart Images

Figure CN118694797B_ABST
Abstract
Description
Technical Field
[0001] The embodiments of the present application relate to the technical field of control methods, and more specifically, to a client activation control method, system, and storage medium. Background Art
[0002] In supermarkets, subway stations and other environments, multiple display devices are often installed to publish various information, such as advertisements and vehicle arrival time reminders. The publication of the above information is centrally controlled by the control terminal.
[0003] Only after the control end activates a display device can it communicate with that device to display published information on that device. Currently, most display device activation control methods utilize a centralized control approach. This means that each time a display device is activated, the control end records the activation in its database until the upper limit on the number of display devices allowed to be activated is reached. However, this approach can lead to malicious tampering of database data to circumvent the upper limit on the number of display devices that can be activated. This means that the reliability of display device activation control is low. Summary of the Invention
[0004] The exemplary embodiments of the present application provide a client activation control method, system, and storage medium, which can improve the reliability of client activation control.
[0005] In a first aspect, the present application provides a client activation control method, wherein the application system includes N clients; wherein N is an integer greater than 1;
[0006] The application system further includes a control terminal; the control terminal and the client both store a blockchain, wherein blocks in the blockchain are used to record activation information, wherein the activation information includes the validity period of the license authorizing the application system to activate the client, the number of remaining activatable clients in the application system, a list of activated clients, and an identifier of the previous block; the control terminal is configured to:
[0007] In response to an activation request from a first client among the N clients, or in response to an instruction triggered when a time for performing an activation operation on the first client has arrived, determining whether to activate the first client based on activation information recorded in a block currently located at the end of the blockchain on the control end;
[0008] If it is determined to activate the first client, a first block indicating the activation of the first client is broadcast to the N clients, so that the control end and the N clients store the first block at the end of their blockchain after the N clients pass the identification verification based on the previous block recorded in the first block.
[0009] In some embodiments, after broadcasting the first block indicating activation of the first client to the N clients, the control end is configured to:
[0010] In response to a blockchain consensus request triggered by a second client among the N clients failing to verify the identifier of the previous block recorded in the first block, updating the tail block in the blockchains of the N clients and the control end through consensus;
[0011] Determine whether to activate the first client again based on the activation information recorded in the block currently located at the end of the blockchain of the control end.
[0012] In some embodiments, the control terminal is configured to:
[0013] Obtaining a license certificate authorizing the application system to activate the client;
[0014] Generate the genesis block of its blockchain based on the license certificate;
[0015] Broadcast the genesis block to the N clients, so that the control end and the N clients construct their blockchains and store the genesis block as the first block of their blockchains.
[0016] In some embodiments, the control terminal is configured to:
[0017] In response to a deactivation request from the first client, or in response to an instruction triggered when a deactivation operation is performed on the first client, determining whether to deactivate the first client based on activation information recorded in a block currently located at the end of the blockchain on the control end;
[0018] If it is determined to deactivate the first client, a second block indicating the deactivation of the first client is broadcast to the N clients, so that the control end and the N clients store the second block at the end of their blockchain after the N clients pass the identification verification based on the previous block recorded in the second block.
[0019] In some embodiments, after broadcasting the second block indicating deactivation of the first client to the N clients, the control end is configured to:
[0020] In response to a blockchain consensus request triggered by a third client among the N clients failing to verify the identifier of the previous block recorded in the second block, updating the tail block in the blockchains of the N clients and the control end through consensus;
[0021] Determine whether to deactivate the first client again based on the activation information recorded in the block currently located at the end of the blockchain of the control end.
[0022] In some embodiments, after determining whether to deactivate the first client, the control end is configured to:
[0023] If it is determined that the first client is in an inactive state, sending a self-check request to the first client; the self-check request is used to request the first client to determine whether the first client is in an active state based on the last block in its blockchain;
[0024] In response to a blockchain consensus request triggered by the first client after determining that it is in an activated state, updating the tail block in the blockchains of the N clients and the control end through consensus;
[0025] Determine whether to deactivate the first client again based on the activation information recorded in the block currently located at the end of the blockchain of the control end.
[0026] In some embodiments, the control terminal is configured to:
[0027] Before performing business communication with the first client, determining whether the first client is in an activated state based on activation information recorded in a block currently located at the end of the blockchain of the control end;
[0028] If it is determined that the first client is in an activated state, performing service communication with the first client;
[0029] If it is determined that the first client is in an inactive state, sending a self-check request to the first client; the self-check request is used to request the first client to determine whether the first client is in an active state based on the last block in its blockchain;
[0030] In response to a blockchain consensus request triggered by the first client after determining that it is in an activated state, updating the tail block in the blockchains of the N clients and the control end through consensus;
[0031] Re-determine whether the first client is in an activated state based on the activation information recorded in the block currently located at the end of the blockchain of the control end.
[0032] In some embodiments, after sending the self-check request to the first client, the control end is configured to:
[0033] In response to the rejection of the communication request returned by the first client when the first client determines that the first client is in an inactive state, service communication with the first client is abandoned.
[0034] In a second aspect, the present application provides an application system, comprising a control terminal and N clients, where N is an integer greater than 1, and wherein both the control terminal and the clients store a blockchain, wherein blocks in the blockchain are used to record activation information, wherein the activation information includes the validity period of a license authorizing the application system to activate the client, the number of remaining activatable clients in the application system, a list of activated clients, and an identifier of a previous block;
[0035] The application system is used to implement the client activation control method as described in any one of the first aspects.
[0036] In a third aspect, the present application provides a client activation control device, wherein the application system includes: a control terminal and N clients; wherein N is an integer greater than 1, the control terminal and the clients both store a blockchain, and the blocks in the blockchain are used to record activation information, wherein the activation information includes the validity period of the license authorizing the application system to activate the client, the number of remaining activatable clients in the application system, a list of activated clients, and an identifier of the previous block; the device is applied to the control terminal, and the device includes:
[0037] a processing module configured to, in response to an activation request from a first client among the N clients, or in response to an instruction triggered when a time has come for performing an activation operation on the first client, determine whether to activate the first client based on activation information recorded in a block currently located at the end of the blockchain on the control end;
[0038] The transceiver module is configured to broadcast a first block indicating activation of the first client to the N clients when it is determined that the first client is to be activated, so that the control end and the N clients store the first block at the end of their blockchain after the N clients pass the identification verification based on the previous block recorded in the first block.
[0039] The client activation control method, system, and storage medium provided in this application include an application system comprising: a control terminal and N clients; both the control terminal and the clients store a blockchain for recording activation information. The control terminal can determine whether to activate a client based on the block at the end of its stored blockchain. If the client is activated, the control terminal broadcasts the block recording the activation information to each client. After verification based on the block is passed, each client and the control terminal store the block at the end of their respective blockchains. Through this method, the activation information recorded in the first block is distributedly stored in the control terminal and each client. At the same time, verification based on the identifier of the previous block of the first block ensures the consistency of the blockchains stored by the control terminal and each client, that is, ensures the accuracy of the activation information stored by each client. Therefore, the activation operation of each client is performed based on accurate activation information, improving the reliability of client activation control. BRIEF DESCRIPTION OF THE DRAWINGS
[0040] In order to more clearly illustrate the implementation methods in the embodiments of the present application or related technologies, the following is a brief introduction to the drawings required for use in the embodiments or related technology descriptions. Obviously, the drawings described below are some embodiments of the present application. For ordinary technicians in this field, other drawings can also be obtained based on these drawings.
[0041] Figure 1 A schematic diagram of the structure of an application system provided for this application;
[0042] Figure 2 A flowchart of a method for constructing a blockchain between a control terminal and a client provided in this application;
[0043] Figure 3 A flowchart of a client activation control method provided in this application;
[0044] Figure 4 A flowchart of another client activation control method provided by this application;
[0045] Figure 5 A flowchart of another client activation control method provided by this application;
[0046] Figure 6 This is a structural diagram of a client activation control device provided in this application. DETAILED DESCRIPTION
[0047] In order to make the purpose, implementation mode and advantages of the present application clearer, the exemplary implementation mode of the present application will be clearly and completely described below in conjunction with the drawings in the exemplary embodiments of the present application. Obviously, the described exemplary embodiments are only part of the embodiments of the present application, not all of the embodiments.
[0048] It should be noted that the brief descriptions of terms in this application are only for the purpose of facilitating the understanding of the embodiments described below, and are not intended to limit the embodiments of this application. Unless otherwise specified, these terms should be understood according to their ordinary and usual meanings.
[0049] In addition, the terms "comprise" and "have" and any variations thereof are intended to cover but not exclude inclusion, for example, a product or device comprising a list of components is not necessarily limited to those components expressly listed but may include other components not expressly listed or inherent to such product or device.
[0050] Currently, information release systems are deployed in supermarkets, subway stations, etc. The information release system includes a control terminal and multiple display devices to release various information, such as advertisements and vehicle arrival time reminders.
[0051] The control terminal obtains a license from the corresponding server of the information publishing system. This license authorizes the information publishing system to activate the display device and control the display device, such as sending information to the display device for display. The license includes the validity period and the total number of display devices that can be activated.
[0052] The control terminal obtains the validity period and the total number of activatable display devices from the license certificate authorizing the application system to activate the display device, and stores the information in a database on the control terminal. For example, the database may include the following: the validity period of the license certificate, the total number of activatable display devices, identifiers of activated display devices, and the number of activated display devices.
[0053] Currently, the control terminal mainly uses a centralized control mechanism to control and activate the display device, which mainly includes the following steps:
[0054] Step 1: After receiving an activation request from a display device, the control terminal determines whether the display device is activated according to an identification of the display device, such as an ID of the display device.
[0055] The control terminal obtains the identification of the display device according to the activation request of the display device, and compares it with the data in the database to determine whether the display device is activated.
[0056] If the display device is in an inactive state, step 2 is executed; if the display device is in an activated state, a response of refusing activation is returned to the display device.
[0057] Step 2: Determine whether the validity period of the license certificate stored in the database has expired.
[0058] If so, it is determined that the display device cannot be activated, and a response of activation rejection is returned to the display device; if not, step 3 is executed.
[0059] Step 3: Determine whether the number of activated display devices stored in the database is greater than or equal to the total number of activatable display devices.
[0060] If so, it is determined that the display device cannot be activated, and a response of activation refusal is returned to the display device; if not, the display device is activated, information representing the activation is sent to the display device, and the activation information is recorded in the database, for example, the identification of the display device is added to the identification of the above-mentioned activated display device, and the number of the above-mentioned activated display devices is increased by 1.
[0061] However, the above method may cause the data in the database to be maliciously tampered with, for example, the number of activated display devices may be modified to bypass the activation limit allowed by the above information release system. That is, the reliability of the above display device activation control method is low.
[0062] Blockchain is a chain data structure that combines blocks containing data in a sequential manner in chronological order, and is a distributed shared accounting book that is tamper-proof and cryptographically guaranteed.
[0063] In light of this, this application proposes a client activation control method. The control end of an application system utilizes blockchain technology to control client activation within the application system. After each client successfully verifies a block containing activation information, the control end and each client store that block to generate their own blockchains for distributed accounting and storage. Because the application system stores each block only after each client successfully verifies the block containing activation information, this effectively prevents tampering of the blockchain within the application system, thereby avoiding the malicious data tampering issues inherent in the aforementioned centralized control mechanism and improving the reliability of client activation control.
[0064] The application system mentioned here can be any system that requires a control terminal to activate and control the client, such as the information publishing system mentioned above, or a system in other application scenarios, etc. This application does not limit its naming.
[0065] Figure 1 This is a schematic diagram of the structure of an application system provided by this application. Figure 1 As shown, the application system includes: a control terminal and N clients. Figure 1 Only three clients are used for illustration.
[0066] The above-mentioned control end can be, for example, a computing device with communication and processing capabilities, such as a server; it can also be application software installed on the computing device, for example, an application (APP), or pre-installed software.
[0067] The above-mentioned client can be, for example, an electronic device with communication, processing capabilities, and output capabilities (display and / or playback), such as a display device. Exemplarily, the display device can be a liquid crystal display, an organic light-emitting diode (OLED) display, or a projection display device. The specific display device type, size, and resolution are not limited. It can be understood by those skilled in the art that the display device can make some changes in performance and configuration as needed. The above-mentioned client can also be application software installed on an electronic device, for example, it can be an APP, or pre-installed software.
[0068] It should be noted that this application does not limit the communication connection method between the above-mentioned control terminal and the above-mentioned clients. For example, it can be wired communication or wireless communication, which is specifically related to the settings of the above-mentioned application system.
[0069] Both the control terminal and the client terminal store a blockchain, and the blocks in the blockchain are used to record activation information. The activation information includes the validity period of the license that authorizes the application system to activate the client (hereinafter referred to as the "validity period of the license"), the number of remaining activatable clients in the application system (hereinafter referred to as the "remaining number of activatable clients"), a list of activated clients, and an identifier of the previous block.
[0070] Optionally, the blocks in the above blockchain may further include at least one or more of the following:
[0071] The timestamp of this block, the total number of activatable clients, the list of deactivated clients, etc.
[0072] It should be noted that in addition to recording activation information, a block can also include other specific information, which can be set according to actual needs.
[0073] For example, a block includes the identifier of the previous block, the timestamp of the current block, the validity period of the license, the number of remaining clients that can be activated, and a list of activated clients. The block content is shown in Table 1.
[0074] Table 1 Block content
[0075] property data The identifier of the previous block Logo 1 Timestamp of this block Timestamp 1 Validity period of the license Time 1 - Time 2 The number of clients remaining for activation 5 Activated Client List Client ID B1
[0076] The validity period of the above-mentioned license certificate can be, for example, the expiration date of the license certificate alone, or the effective start time to the expiration date of the license certificate, or the remaining effective time calculated based on the validity period of the license certificate. This application does not limit this.
[0077] The remaining number of activatable clients can be determined based on the total number of activatable clients in the license authorizing the application system to activate clients (hereinafter referred to as the "total number of activatable clients") and the list of activated clients in the block. For example, if the total number of activatable terminals is 6 and the number in the list of activated clients in the block is 1, then the remaining number of activatable clients in the block is 5.
[0078] The activated client list is a list of identifiers of activated clients. The identifier of the activated client is used to uniquely identify the client, and may be, for example, the client ID, the identifier of the client's hardware device, or the identifier of a central processing unit (CPU), etc., which is not limited in this application. When the control terminal activates a client, the client identifier of the client, for example, client identifier B1, is added to the activated client list of the block.
[0079] The timestamp of the block may be the time of the current control terminal when the block is generated.
[0080] The previous block identifier refers to the identifier of the block immediately preceding the current block. This identifier can be a hash value of the activation information recorded in the previous block. This identifier can be calculated by calculating a hash value based on the activation information recorded in the previous block. Because this hash value includes the timestamp of the previous block, the previous block identifier can be used to sequentially connect the blocks.
[0081] It should be understood that the content included in the above blocks is only a schematic, and the content of each block is specifically related to the block settings.
[0082] The blockchain mentioned above can be a blockchain used only to record the activation information corresponding to the currently used license certificate, or it can be a blockchain covering the activation information corresponding to the license certificates used in the history of the system, as well as the activation information corresponding to the currently used license certificate, or it can be a blockchain covering other information of the system, etc. This application does not limit this.
[0083] Taking the blockchain described above as an example, in which the blockchain is only used to record activation information corresponding to the currently used license certificate, how the control terminal and the client terminal construct the blockchain is explained.
[0084] Figure 2This is a flowchart of a method for building a blockchain between a control terminal and a client provided in this application. Figure 2 As shown, the method is applied to the control end, and the method includes:
[0085] S101. Obtain a license certificate for authorizing an application system to activate a client.
[0086] The license certificate for authorizing the application system to activate the client is provided by the server corresponding to the application system. The license certificate can be distributed to the control terminal online by the server or offline.
[0087] S 102. Generate the genesis block of its blockchain based on the above license certificate.
[0088] The genesis block is the first block in a blockchain. The information contained in the genesis block is consistent with the content of the blocks in the aforementioned blockchain. Certain content related to actual activation and / or blockchain construction in the genesis block is set to default values. For example, the block content shown in Table 1 is represented by the identifier of the previous block and the list of activated clients. For example, the value "null" is used as a default value.
[0089] As mentioned above, the license includes the validity period of the license and the total number of clients that can be activated. The control terminal generates a genesis block on its blockchain based on the license to record the license information for subsequent client activation. The contents of the genesis block are shown in Table 2:
[0090] Table 2 Genesis block content
[0091] property data The identifier of the previous block Null Timestamp of this block Timestamp 4 Validity period of the license Time 1 - Time 2 The number of clients remaining for activation Quantity 6 Activated Client List Null
[0092] S103. Broadcast the genesis block to N clients, so that the control end and the N clients build their blockchains and store the genesis block as the first block of their blockchains.
[0093] The N clients constructing their blockchains refer to constructing a new blockchain, wherein the first block is the genesis block. Regarding how to construct a blockchain, reference can be made to the prior art, and this application does not limit this.
[0094] Optionally, after receiving the genesis block, each client can verify whether it is the genesis block by checking whether the identifier of the previous block in the block is a preset value. If so, the block is determined to be the genesis block, i.e., the block verification has passed, and information indicating that the genesis block verification has passed is sent to the control terminal. If not, the block is determined to be not the genesis block, and whether the block is the tail of other blockchains can be determined based on whether it stores other blockchains, and information indicating that the genesis block verification has failed is returned to the control terminal.
[0095] Optionally, if the control end receives information sent by each client indicating that the genesis block has been verified, the control end constructs the blockchain of the control end and stores the genesis block as the first block of its blockchain. At the same time, the control end returns information indicating that storage is possible to each client, so that each client constructs its blockchain and stores the genesis block as the first block of its blockchain.
[0096] If the control end receives information indicating that the genesis block verification has failed from at least one client, the control end checks whether the generated genesis block is correct. If so, it indicates that the genesis block received by the client is inaccurate, and the control end resends the block to the client for re-genesis block verification. If not, it indicates that the genesis block generated by the control end is inaccurate, and the control end regenerates the genesis block, that is, re-executes step S102.
[0097] In this embodiment, the control end uses the obtained license certificate to generate a genesis block to record the information of the license certificate, and broadcasts the genesis block to each client to build a blockchain, thereby realizing distributed storage of the license certificate information.
[0098] The following detailed description of the technical solution of the present application is provided in conjunction with specific embodiments. The following specific embodiments can be combined with each other, and the same or similar concepts or processes may not be described in detail in some embodiments.
[0099] Figure 3 This is a flow chart of a client activation control method provided by this application. This method is applied to the control end, such as Figure 3 As shown, the method includes the following steps:
[0100] S201. In response to an activation request from a first client among N clients, or in response to an instruction triggered when an activation operation is performed on the first client, determine whether to activate the first client based on activation information recorded in a block currently at the end of the blockchain of the control end.
[0101] The activation request of the first client is sent by the first client to the control terminal. The activation request of the first client is used to apply for activation of the first client and includes the identifier of the first client, such as the identifier of the client mentioned above, which will not be repeated here.
[0102] The time at which the activation operation is performed on the first client is the activation time of the first client determined by the control terminal according to the preset first client activation policy. It should be noted that different clients can have different activation policies or the same activation policy.
[0103] The above-mentioned determining whether to activate the above-mentioned first client based on the activation information recorded in the block currently located at the tail in the blockchain of the control end means determining whether to activate the above-mentioned first client based on the validity period of the license certificate, the remaining number of activatable clients, and the list of activated clients in the above-mentioned activation information.
[0104] This application does not limit the order in which the above three pieces of information are judged, for example, as shown below:
[0105] Step 1: First, determine whether the client identifier of the first client is included in the activated client list in the tail block. If so, indicating that the first client has been activated, the first client is determined to be inactivatable and the activation request is discarded. Optionally, a response rejecting the activation may be returned to the first client. If not, proceed to Step 2.
[0106] Step 2: Determine whether the validity period of the license certificate in the tail block has expired. If so, determine that the first client cannot be activated. Optionally, return a response rejecting activation to the first client. If not, proceed to step 3.
[0107] Step 3: Determine whether the number of remaining activatable clients in the tail block is 0. If so, it indicates that the number of activated clients in the application system has reached the upper limit of the total number of activatable clients and no new clients can be activated. The first client is determined to be inactivatable and the activation request is discarded. Optionally, a response rejecting activation is returned to the first client. If not, it indicates that the number of activated clients in the application system has not reached the upper limit of the total number of activatable clients and new clients can still be activated. The first client is activated and step S202 is executed.
[0108] S202. Broadcasting a first block indicating activation of the first client to the N clients, so that the control end and the N clients store the first block at the end of their blockchains after the N clients pass verification based on the identifier of the previous block recorded in the first block.
[0109] If the first client is determined to be activated, the control end generates a first block including activation information based on the tail block of the blockchain locally stored on the control end and the client identifier of the first client using an encryption algorithm, indicating the activation of the first client. The first block contains activation information for activating the first client. The encryption algorithm can be a symmetric encryption algorithm or an asymmetric encryption algorithm, which is not limited in this application.
[0110] It should be noted that in a blockchain, the encryption algorithm used by the above-mentioned control end to generate each block is consistent, and the encryption algorithm used by each client to store its own blockchain is consistent. The encryption algorithms used by the control end and the client can be the same or different, which is related to the specific settings of the blockchain and is not limited in this application.
[0111] It should be noted that the content attributes included in the first block are consistent with those in the previous block. The number of remaining activatable clients in the first block is calculated by subtracting 1 from the number in the previous block. For example, referring to Table 1, if the number of remaining activatable clients in the previous block was 5, then the number of remaining activatable clients in the first block is 4.
[0112] The client identifier of the first client needs to be added to the activated client list of the first block. For example, the client identifier of the first client is client identifier B2. For example, if the previous block of the first block is the block shown in Table 1, the content of the first block is shown in Table 3.
[0113] Table 3 shows the contents of the first block
[0114] property data The identifier of the previous block Logo 2 Timestamp of this block Timestamp 2 Validity period of the license Time 1 - Time 2 The number of clients remaining for activation 4 Activated Client List Client ID B1, Client ID B2
[0115] The N clients verify based on the identifier of the previous block recorded in the first block, which means that each client verifies whether the identifier of the previous block recorded in the first block is consistent with the identifier of the tail block of the blockchain stored locally. The verification here is to verify whether the first block can be sequentially connected with the tail blocks of the blockchain stored by each client to generate a blockchain, that is, to verify the legitimacy of the first block. At the same time, it also verifies whether the tail blocks of the blockchain stored by each client are consistent with the tail blocks of the blockchain stored by the control end, and then it can be determined whether the blockchains stored in the above-mentioned application system are consistent, that is, whether the activation information stored in each blockchain in the above-mentioned application system is accurate.
[0116] If the identifier of the tail block of the blockchain stored by a client is inconsistent with the identifier of the previous block recorded in the first block, it means that the blockchain stored by the client is inconsistent with the blockchain stored by the control end (the tail block of the blockchain stored by the client and / or the tail block of the blockchain stored by the control end may have been tampered with), so that the first block generated based on the tail block of the blockchain stored by the control end cannot be connected with the tail block of the blockchain stored by the client to generate a blockchain. At the same time, it means that the activation information recorded in the respective blockchains of the client and / or the control end is inaccurate. In this case, the client fails the verification based on the identifier of the previous block recorded in the first block;
[0117] If the identifier of the tail block of the blockchain stored by a client is consistent with the identifier of the previous block recorded in the first block, it means that the blockchain stored by the client is consistent with the blockchain stored by the control end, and the first block can be connected with the tail block of the blockchain stored by the client to generate a blockchain. In this case, the client passes the verification based on the identifier of the previous block recorded in the first block.
[0118] If all of the above-mentioned clients pass the identification verification based on the previous block recorded in the first block, it means that the first block is legal, that is, the blockchains stored in the above-mentioned application systems are consistent, and further indicates that the activation information recorded in the blockchains stored in the application systems is accurate. Therefore, the control end activates the first client. At the same time, the control end and each client store the first block at the end of their respective stored blockchains.
[0119] Through this verification method, the control end will activate the first block only after ensuring that all clients have passed the identification verification based on the previous block recorded in the first block. Therefore, the activation information stored using the method provided by this embodiment cannot be maliciously tampered with.
[0120] Optionally, if the verification of at least one of the above-mentioned clients fails, it means that the first block is illegal (the tail block of the blockchain stored by the above-mentioned control end is tampered with), and / or the tail block of the blockchain stored by the above-mentioned client is tampered with, that is, the blockchains stored in the above-mentioned application systems are inconsistent, which further indicates that the activation information recorded in the respective blockchains stored in the application systems is inaccurate. Therefore, the control end will initiate a blockchain consensus to update the respective blockchains stored in the application systems to make the blockchains consistent, and re-execute step S201, and judge again whether the first client can be activated based on the updated blockchain, so that the activation control of the first client is more accurate.
[0121] This verification method ensures the legitimacy of the first block, specifically ensuring that the first block can be sequentially linked to form a blockchain based on the tail blocks of the blockchains stored by the control terminal and each client. This ensures that the respective stored blockchains have not been tampered with, guaranteeing the consistency of the respective stored blockchains. After confirming its legitimacy, it is stored on each client and at the tail of the blockchain locally stored by the control terminal, validating the activation operation for the first client. This ensures the consistency of the blockchains stored by each client and the control terminal, thereby ensuring the accuracy of the activation information stored by each client. Activation operations for each client are performed based on accurate activation information, improving the reliability of client activation control.
[0122] Through the approach of this embodiment, the control end can determine whether a client can be activated based on the block at the end of its stored blockchain. If activation is possible, the first block containing the activation information can be sent to each client. Each client can then verify the first block based on the identifier of the previous block before the first block. The verified first block is then stored at the end of the local blockchains of the control end and each client, thus achieving distributed storage of the activation information recorded in the first block across the control end and each client. Simultaneously, verification based on the identifier of the previous block before the first block ensures the consistency of the blockchains stored by the control end and each client, that is, ensures the accuracy of the activation information stored by each client. Therefore, activation operations for each client are performed based on accurate activation information, improving the reliability of client activation control.
[0123] The following describes how each client performs verification based on the identifier of the previous block recorded in the first block.
[0124] For any of the above clients, you can take the following approach:
[0125] In one possible implementation, the client first calculates the hash value of the tail block of the blockchain stored locally by the client to obtain the identifier of the tail block, and then determines whether the identifier of the previous block recorded in the first block is consistent with the identifier of the tail block of the blockchain stored locally by the client. If they are consistent, it means that the tail block of the blockchain stored by the client is consistent with the tail block of the blockchain stored by the control end, and the client succeeds the verification based on the identifier of the previous block recorded in the above-mentioned first block; if they are inconsistent, it means that the tail block of the blockchain stored by the client is inconsistent with the tail block of the blockchain stored by the control end, and the client fails the verification based on the identifier of the previous block recorded in the above-mentioned first block.
[0126] In another possible implementation, each of the aforementioned blocks also includes an identifier for the current block. For example, the contents of the previous block of the first block are schematically shown, and the contents of the first block are schematically shown in Tables 4 and 5, respectively. That is, the identifier of the current block is directly added to the block, without recalculating the hash value of the block. In this approach, the client can directly obtain the identifier of the current block of the tail block of the blockchain stored locally by the client and determine whether it is consistent with the identifier of the previous block in the first block. If they are consistent, it indicates that the tail block of the blockchain stored by the client is consistent with the tail block of the blockchain stored by the control terminal, and the client passes verification based on the identifier of the previous block recorded in the first block. If they are inconsistent, it indicates that the tail block of the blockchain stored by the client is inconsistent with the tail block of the blockchain stored by the control terminal, and the client fails verification based on the identifier of the previous block recorded in the first block.
[0127] Table 4: Contents of the previous block of the first block
[0128] property data The identifier of the previous block Logo 1 The identifier of this block Logo 2 Timestamp of this block Timestamp 1 Validity period of the license certificate for activating the client application system Time 1 - Time 2 The number of remaining active clients in the application system Quantity 5 Activated Client List Client ID B1
[0129] Table 5 Contents of the first block
[0130] property data The identifier of the previous block Logo 2 The identifier of this block Logo 3 Timestamp of this block Timestamp 2 Validity period of the license certificate for activating the client application system Time 1 - Time 2 The number of remaining active clients in the application system Quantity 4 Activated client list Client ID B1, Client ID B2
[0131] If the client verifies successfully based on the identifier of the previous block recorded in the first block, it sends a verification success message to the control terminal. If the client verifies successfully based on the identifier of the previous block recorded in the first block, it triggers a blockchain consensus application. Consensus refers to the method by which the control terminal and each client reach an agreement based on the diverging blockchains.
[0132] After the above-mentioned clients complete verification based on the identifier of the previous block recorded in the first block, the above-mentioned control end obtains the verification results of each client and the control end, which may be as follows:
[0133] (1) If the control end receives verification information returned by all clients, the control end confirms that the verification is successful, indicating that the blockchains stored in each application system are consistent and the first block is legal, then the control end activates the first client and stores the first block at the end of its blockchain. At the same time, the control end returns information indicating that storage is possible to each client, so that each client stores the first block at the end of its blockchain.
[0134] (2) If the control end receives a blockchain consensus application triggered by any client, and the control end confirms that the verification fails, it means that the first block is illegal (the tail block of the blockchain stored by the above-mentioned control end has been tampered with), and / or the tail block of the blockchain stored by the above-mentioned client has been tampered with, that is, the blockchains stored in the above-mentioned application systems are inconsistent, which further indicates that the activation information recorded in the blockchains stored in the application systems is inaccurate, and the blockchain consensus is triggered.
[0135] The consensus-building method can be: the control end obtains the tail block of the blockchain stored locally by each client, identifies a target block through a pre-set election strategy, and synchronizes it to each client, updating the tail block in each client's and the control end's blockchain. Alternatively, after identifying the target block, the control end synchronizes with the client corresponding to a tail block different from the target block, updating the tail block different from the target block. The update mentioned above refers to a replacement update, i.e., replacing the original tail block with the target block.
[0136] A possible implementation of the above-mentioned preset election strategy is that the above-mentioned control end obtains the identifier of the current block of each tail block, or obtains the hash value of each tail block, and compares the obtained identifier of the current block of each tail block, or the hash value, and the identifier of the current block of the tail block of the blockchain locally stored by the control end, or the hash value calculated by the tail block, and selects the identifier of the current block with the largest number of the same number, or the hash value, and uses the identifier of the current block or the block corresponding to the hash value as the target block.
[0137] In another possible implementation, the control end obtains the timestamp of the current block of each tail block, compares the obtained timestamp of the current block of each tail block, and the timestamp of the current block of the tail block of the blockchain stored locally by the control end, selects the timestamp of the current block with the latest time among the timestamps of the current blocks, and uses the block corresponding to the timestamp of the selected current block as the target block.
[0138] In the above manner, tampering with the data of a certain client or control terminal is invalid unless more than 51% of the clients in the above application system are tampered with, which is obviously very difficult.
[0139] Optionally, if the control end receives a blockchain consensus application triggered by a failure of the second client among the N clients to verify the identifier of the previous block recorded in the first block, the control end updates the tail block in the blockchain of the N clients and the control end in response to the consensus application by consensus; and determines whether to activate the first client based on the activation information currently recorded in the tail block in the blockchain of the control end, that is, re-executes the above-mentioned step S201.
[0140] After updating the tail block in the blockchains of the N clients and the control end, the consistency of the blockchains stored by each client can be ensured, that is, the accuracy of the activation information recorded in the blockchain can be ensured, and the activation judgment of the first client based on the updated blockchain can be more accurate.
[0141] In this embodiment, each client can perform verification based on the identifier of the previous block of the first block to ensure that it can be sequentially connected with the last block in its locally stored blockchain to generate a blockchain. That is, the legitimacy of the first block is ensured. If the first block is legal, it is stored to the end. If the verification fails, the blockchain stored in the application system is updated through blockchain consensus to ensure consistency, and activation confirmation is performed again based on the updated blockchain. This method can ensure the consistency of the blockchain, that is, the accuracy of the activation information, and thus make the activation confirmation based on the activation information recorded in the block of the blockchain more accurate.
[0142] The above is an example of how the control terminal activates the client. The following is another example of how the control terminal performs service communication with the activated client, still taking the first client as an example.
[0143] Figure 4 This is a flow chart of another client activation control method provided by this application. Figure 4 As shown, the method includes:
[0144] S301. Before conducting business communication with a first client, determine whether the first client is in an activated state based on activation information recorded in a block currently located at the end of a blockchain on a control end.
[0145] The control terminal may determine whether the first client is in an activated state by comparing the client identifier of the first client with a list of activated clients in a tail block of the blockchain stored locally on the control terminal, i.e., determining whether the client identifier of the first client is stored in the list. If so, the first client is in an activated state; if not, the first client is in an inactivated state.
[0146] If it is determined that the first client is in an activated state, it means that the first client has been activated, so step S302 is executed; if it is determined that the first client is in an unactivated state, it means that the activation state of the first client recorded by the control end is inconsistent with the activation state recorded by the first client, so step S303 is executed.
[0147] S302: Perform business communication with the first client.
[0148] Taking the application system as an information release system deployed in supermarkets, subway stations and other environments as an example, the business communication mentioned here can be, for example, sending multimedia data (such as advertisements, short videos, vehicle arrival time reminders, etc.) to the first client so that the first client can play the multimedia data.
[0149] S303: Send a self-check request to the first client.
[0150] The self-check request is used to request the first client to determine whether the first client is in an activated state based on the tail block in its blockchain.
[0151] The method for determining whether the first client is in an activated state may be to compare the client identifier of the first client with a list of activated clients in a tail block of the blockchain stored locally by the first client to determine whether the client identifier of the first client is stored in the list. If so, the first client is in an activated state; if not, the first client is in an inactivated state.
[0152] If the first client determines through self-check that the first client is in an inactive state, the self-check request is discarded and a communication request rejection is returned; if the first client determines through self-check that the first client is in an active state, it indicates that the blockchains saved by the control end and the first client are inconsistent, thus triggering a blockchain consensus application.
[0153] The control end receives a blockchain consensus request triggered by the first client after determining that the first client is in an activated state. In response to the consensus request, the control end updates the tail block in the blockchains of the N clients and the control end through consensus. The control end then determines whether the first client is in an activated state based on the activation information recorded in the tail block in the blockchain of the control end, and then returns to step S301.
[0154] After updating the tail block in the blockchains of the N clients and the control end, the consistency of the blockchains stored by each client can be ensured, that is, the accuracy of the activation information recorded in the blockchain can be ensured, and the activation judgment of the first client based on the updated blockchain can be more accurate.
[0155] If the control end receives a communication rejection request returned by the first client after determining that the first client is in an inactivated state, it means that the blockchains stored by the control end and the first client respectively record that the first client is in an inactivated state, indicating that the activation information of the blockchain locally stored by the control end is true and valid. In response to the request, the control end abandons business communication with the first client.
[0156] In this embodiment, whether business communication is conducted with the first client is determined by the activation information recorded in the block at the end of each blockchain, thereby ensuring the accuracy of business communication between the control end and the first client. If the control end believes that the first client is not activated, the first client will be notified to perform a self-check to ensure the accuracy of the activation information in the blocks in the respective stored blockchains. At the same time, if there is an inconsistency in the blockchain, the consistency of each blockchain can be guaranteed by blockchain consensus, and the activation confirmation can be performed again using the updated blockchains to improve the reliability of client activation control.
[0157] Still taking the first client as an example, the following describes how to deactivate an activated client.
[0158] Figure 5 This is a flow chart of another client activation control method provided by this application. Figure 5 As shown, the method includes:
[0159] S401: In response to the deactivation request of the first client, or in response to an instruction triggered when the deactivation operation is performed on the first client, determine whether to deactivate the first client based on the activation information recorded in the tail block in the blockchain of the control end.
[0160] The deactivation request of the first client is sent by the first client to the control end. The deactivation request of the first client is used to apply for deactivation of the first client and includes an identifier of the first client.
[0161] The time at which the deactivation operation is performed on the first client is the time at which the first client is deactivated, as determined by the first client deactivation policy preset on the control terminal. It should be noted that different clients may have different deactivation policies, or the same deactivation policy.
[0162] The determination of whether to deactivate the first client based on the activation information recorded in the tail block of the control terminal's blockchain may be based on a list of activated clients in the activation information. For example, if the list of activated clients in the tail block includes the client identifier of the first client, then the first client is determined to be deactivated; if the list of activated clients in the tail block does not include the client identifier of the first client, then the first client is determined to be in an inactivated state.
[0163] If it is determined that the first client is deactivated, it means that the activation information recorded in the blockchain stored by the control terminal is consistent with the activation information recorded in the blockchain stored by the first client, then step S402 is executed;
[0164] If it is determined that the first client is in an unactivated state, it means that the activation information recorded in the blockchain stored by the control end is inconsistent with the activation information recorded in the blockchain stored by the first client, and step S403 is executed.
[0165] S402. Broadcast a second block indicating deactivation of the first client to the N clients, so that the control end and the N clients store the second block at the end of their blockchains after the N clients pass verification based on the identifier of the previous block recorded in the second block.
[0166] If it is determined to deactivate the above-mentioned first client, the control end uses an encryption algorithm to generate a second block including the activation information based on the tail block of the blockchain locally stored by the control end and the client identifier of the above-mentioned first client, which is used to indicate the deactivation of the first client. The second block records the activation information of deactivating the above-mentioned first client.
[0167] It should be noted that the content attributes included in the second block are consistent with those in the previous block. The number of remaining activatable clients in the second block must be calculated by adding 1 to the number in the previous block. For example, referring to Table 3, if the number of remaining activatable clients in the previous block was 4, then the number of remaining activatable clients in the second block is 5.
[0168] The client identifier of the first client needs to be deleted from the activated client list of the second block. For example, the client identifier of the first client is client identifier B2. For example, if the previous block of the second block is the first block shown in Table 3, the contents of the second block are shown in Table 6.
[0169] Table 6 Contents of the second block
[0170]
[0171]
[0172] Optionally, the block of the blockchain of the present application may also include a list of deactivated clients, which is used to store the client identifiers of the clients that were deactivated after the above activation.
[0173] It should be noted that regarding how the N clients perform verification based on the identifier of the previous block recorded in the second block, reference may be made to the description of the aforementioned embodiment.
[0174] After each client completes verification based on the identifier of the previous block recorded in the second block, the control terminal obtains the verification results of each client and the control terminal, which may be as follows:
[0175] (1) If the control end receives verification information returned by all clients, the control end confirms that the verification is successful, indicating that the blockchains stored in each application system are consistent and the second block is legal, then the control end deactivates the first client and stores the second block at the end of its blockchain. At the same time, the control end returns information indicating that storage is possible to each client, so that each client stores the second block at the end of its blockchain.
[0176] (2) If the control end receives a blockchain consensus application triggered by any client, and the control end confirms that the verification fails, it means that the second block is illegal (the tail block of the blockchain stored by the above-mentioned control end has been tampered with), and / or the tail block of the blockchain stored by the above-mentioned client has been tampered with, that is, the blockchains stored in the above-mentioned application systems are inconsistent, which further indicates that the activation information recorded in the blockchains stored in the application systems is inaccurate, and the blockchain consensus is triggered.
[0177] If the control end receives a blockchain consensus application triggered by a third client among the N clients failing to verify the identifier of the previous block recorded in the second block, the control end updates the tail block in the blockchains of the N clients and the control end in response to the consensus application by consensus; and determines whether to deactivate the first client based on the activation information currently recorded in the tail block in the blockchain of the control end, and then returns to step S401.
[0178] After updating the tail block in the blockchains of the N clients and the control end, the consistency of the blockchains stored by each client can be ensured, that is, the accuracy of the activation information recorded in the blockchain can be ensured, and then the re-determination of whether to cancel the activation of the first client based on the updated blockchain can be more accurate.
[0179] S403: Send a self-check request to the first client.
[0180] The self-check request is used to request the first client to determine whether the first client is in an active state based on the last block in its blockchain. For details on how to determine whether the first client is in an active state, please refer to the description of the previous embodiment and will not be repeated here.
[0181] If the first client determines through self-checking that the first client is in an inactive state, an inactive response is returned to the control end; if the first client determines through self-checking that the first client is in an active state, it indicates that the blockchains saved by the control end and the first client are inconsistent, thus triggering a blockchain consensus application.
[0182] If the control end receives a blockchain consensus request triggered by the first client after determining that it is in an activated state, in response to the consensus request, the control end updates the tail block in the blockchain of the N clients and the control end through consensus; and re-determines whether to deactivate the first client based on the activation information recorded in the currently tail block in the blockchain of the control end.
[0183] After updating the tail block in the blockchains of the N clients and the control end, the consistency of the blockchains stored by each client can be ensured, that is, the accuracy of the activation information recorded in the blockchain can be ensured, and then the re-determination of whether to cancel the activation of the first client based on the updated blockchain can be more accurate.
[0184] If it is determined that the first client is to be deactivated, it indicates that the activation information recorded in the blockchain stored by the control terminal and the first client is consistent, and the process returns to step S402;
[0185] If it is determined that the first client is in an unactivated state, it means that the activation information recorded in the blockchain stored by the control end and the first client is inconsistent, and then step S403 is continued.
[0186] In this embodiment, the activation information recorded in the tail block of the blockchain stored by the control end and each client is used to confirm whether the above-mentioned first client is deactivated. If the control end believes that the first client is not activated, it will notify the first client to perform a self-check to ensure the accuracy of the activation information in the blocks in the respective stored blockchains; at the same time, if there is an inconsistency in the blockchain, the consistency of each blockchain can be guaranteed by blockchain consensus, and the deactivation confirmation can be performed again using the updated blockchains to improve the reliability of client activation control.
[0187] Figure 6This is a schematic diagram of the structure of a client activation control device provided by this application. Figure 6 As shown, the device includes: a processing module 11 and a transceiver module 12.
[0188] a processing module 11 configured to respond to an activation request from a first client among the N clients, or to respond to an instruction triggered when a time has come for performing an activation operation on the first client, and determine whether to activate the first client based on activation information recorded in a block currently located at the end of the blockchain on the control end;
[0189] The transceiver module 12 is configured to broadcast a first block indicating activation of the first client to the N clients if it is determined that the first client is to be activated, so that the control end and the N clients store the first block at the end of their blockchain after passing the identification verification based on the previous block recorded in the first block.
[0190] Optionally, after the transceiver module 12 broadcasts the first block indicating the activation of the first client to the N clients, the processing module 11 is used to respond to a blockchain consensus application triggered by a second client among the N clients failing to verify the identifier of the previous block recorded in the first block, and to update the tail block in the blockchain of the N clients and the control end by consensus; and re-determine whether to activate the first client based on the activation information recorded in the tail block currently in the blockchain of the control end.
[0191] Optionally, the processing module 11 is used to obtain a license certificate authorizing the application system to activate the client; based on the license certificate, generate a genesis block of its blockchain; the transceiver module 12 is used to broadcast the genesis block to the N clients, so that the control end and the N clients construct their blockchains and store the genesis block as the first block of their blockchains.
[0192] Optionally, the processing module 11 is configured to determine whether to deactivate the first client based on the activation information recorded in the block currently located at the tail of the blockchain of the control end, in response to a deactivation request of the first client, or in response to an instruction triggered when the deactivation operation is performed on the first client; the transceiver module 12 is configured to broadcast a second block indicating the deactivation of the first client to the N clients if it is determined that the first client is to be deactivated, so that the control end and the N clients store the second block at the tail of their blockchain after the identification verification based on the previous block recorded in the second block is passed.
[0193] Optionally, after the transceiver module 12 is used to broadcast the second block indicating the activation of the first client to the N clients, the processing module 11 is specifically used to respond to a blockchain consensus application triggered by a third client among the N clients after the identification verification of the previous block recorded in the second block fails, and to update the tail block in the blockchain of the N clients and the control end by consensus; and re-determine whether to deactivate the first client based on the activation information recorded in the tail block currently in the blockchain of the control end.
[0194] Optionally, after the above-mentioned processing module 11 is used to determine whether to deactivate the first client, it is specifically used to send a self-check request to the first client if it is determined that the first client is in an inactivated state; the self-check request is used to request the first client to determine whether the first client is in an activated state based on the block at the end of its blockchain; in response to the blockchain consensus application triggered after the first client determines that it is in an activated state, the block at the end of the blockchain of the N clients and the control end is updated by consensus; and it is determined whether to deactivate the first client again based on the activation information recorded in the block currently at the end of the blockchain of the control end.
[0195] Optionally, the above-mentioned processing module 11 is used to determine whether the first client is in an activated state based on the activation information recorded in the block currently located at the tail in the blockchain of the control end before conducting business communication with the first client; if it is determined that the first client is in an activated state, business communication is conducted with the first client; if it is determined that the first client is in an inactivated state, a self-check request is sent to the first client; the self-check request is used to request the first client to determine whether the first client is in an activated state based on the block located at the tail in its blockchain; in response to the blockchain consensus application triggered after the first client determines that it is in an activated state, the block located at the tail in the blockchain of the N clients and the control end is updated by consensus; and whether the first client is in an activated state is determined again based on the activation information recorded in the block currently located at the tail in the blockchain of the control end.
[0196] Optionally, after the processing module 11 is configured to send a self-check request to the first client, the processing module 11 is configured to respond to a communication rejection request returned by the first client upon determining that the first client is in an inactive state, and abandon service communication with the first client.
[0197] The client activation control device provided in this application is used to execute the aforementioned client activation control method embodiment. Its implementation principle and technical effects are similar and will not be described in detail.
[0198] This application also provides a Figure 1 The application system shown includes a control terminal and N clients, where N is an integer greater than 1. The control terminal and the clients both store a blockchain, and the blocks in the blockchain are used to record activation information. The activation information includes the validity period of the license authorizing the application system to activate the client, the number of remaining activatable clients in the application system, a list of activated clients, and an identifier of the previous block; the application system is used to implement the client activation control method in the above embodiment.
[0199] The present application also provides a computer-readable storage medium, which may include: a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a disk or an optical disk, and other media that can store computer-executable instructions. Specifically, the computer-readable storage medium stores computer-executable instructions, and the computer-executable instructions are used to execute the client activation control method in the above embodiment.
[0200] The present application also provides a program product, the program product including execution instructions stored in a readable storage medium. At least one processor of a control terminal can read the execution instructions from the readable storage medium, and the at least one processor executes the execution instructions so that the control terminal implements the client activation control method provided in the various embodiments described above.
[0201] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present application, rather than to limit them. Although the present application has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some or all of the technical features therein. These modifications or replacements do not deviate the essence of the corresponding technical solutions from the scope of the technical solutions of the embodiments of the present application.
[0202] For ease of explanation, the above description has been presented in conjunction with specific embodiments. However, the above exemplary discussion is not intended to be exhaustive or to limit the embodiments to the specific forms disclosed above. Based on the above teachings, various modifications and variations are possible. The above embodiments have been selected and described to better explain the principles and practical applications, thereby enabling those skilled in the art to better utilize the embodiments and various variations of the embodiments suitable for specific use considerations.
Claims
1. A client activation control method, characterized in that: The application system includes N clients; wherein N is an integer greater than 1; The application system further includes a control terminal; the control terminal and the client both store a blockchain, wherein blocks in the blockchain are used to record activation information, wherein the activation information includes the validity period of the license authorizing the application system to activate the client, the number of remaining activatable clients in the application system, a list of activated clients, and an identifier of the previous block; the control terminal is configured to: In response to an activation request from a first client among the N clients, or in response to an instruction triggered when a time for performing an activation operation on the first client has arrived, determining whether to activate the first client based on activation information recorded in a block currently located at the end of the blockchain on the control end; If it is determined to activate the first client, a first block indicating the activation of the first client is broadcast to the N clients, so that the control end and the N clients store the first block at the end of their blockchain after the N clients pass the identification verification based on the previous block recorded in the first block.
2. The method according to claim 1, characterized in that After broadcasting the first block for instructing activation of the first client to the N clients, the control end is configured to: In response to a blockchain consensus request triggered by a second client among the N clients failing to verify the identifier of the previous block recorded in the first block, updating the tail block in the blockchains of the N clients and the control end through consensus; Determine whether to activate the first client again based on the activation information recorded in the block currently located at the end of the blockchain of the control end.
3. The method according to claim 1 or 2, characterized in that The control terminal is configured as follows: Obtaining a license certificate authorizing the application system to activate the client; Generate the genesis block of its blockchain based on the license certificate; Broadcast the genesis block to the N clients, so that the control end and the N clients construct their blockchains and store the genesis block as the first block of their blockchains.
4. The method according to claim 1 or 2, characterized in that The control terminal is configured as follows: In response to a deactivation request from the first client, or in response to an instruction triggered when a deactivation operation is performed on the first client, determining whether to deactivate the first client based on activation information recorded in a block currently located at the end of the blockchain on the control end; If it is determined to deactivate the first client, a second block indicating the deactivation of the first client is broadcast to the N clients, so that the control end and the N clients store the second block at the end of their blockchain after the N clients pass the identification verification based on the previous block recorded in the second block.
5. The method according to claim 4, characterized in that After broadcasting the second block for instructing to deactivate the first client to the N clients, the control end is configured to: In response to a blockchain consensus request triggered by a third client among the N clients failing to verify the identifier of the previous block recorded in the second block, updating the tail block in the blockchains of the N clients and the control end through consensus; Determine whether to deactivate the first client again based on the activation information recorded in the block currently located at the end of the blockchain of the control end.
6. The method according to claim 4, characterized in that After determining whether to deactivate the first client, the control end is configured to: If it is determined that the first client is in an inactive state, sending a self-check request to the first client; the self-check request is used to request the first client to determine whether the first client is in an active state based on the last block in its blockchain; In response to a blockchain consensus request triggered by the first client after determining that it is in an activated state, updating the tail block in the blockchains of the N clients and the control end through consensus; Determine whether to deactivate the first client again based on the activation information recorded in the block currently located at the end of the blockchain of the control end.
7. The method according to claim 1 or 2, characterized in that The control terminal is configured as follows: Before performing business communication with the first client, determining whether the first client is in an activated state based on activation information recorded in a block currently located at the end of the blockchain of the control end; If it is determined that the first client is in an activated state, performing service communication with the first client; If it is determined that the first client is in an inactive state, sending a self-check request to the first client; the self-check request is used to request the first client to determine whether the first client is in an active state based on the last block in its blockchain; In response to a blockchain consensus request triggered by the first client after determining that it is in an activated state, updating the tail block in the blockchains of the N clients and the control end through consensus; Re-determine whether the first client is in an activated state based on the activation information recorded in the block currently located at the end of the blockchain of the control end.
8. The method according to claim 7, characterized in that After sending the self-check request to the first client, the control end is configured to: In response to the rejection of the communication request returned by the first client when the first client determines that the first client is in an inactive state, service communication with the first client is abandoned.
9. An application system, characterized in that: The application system includes a control terminal and N clients, where N is an integer greater than 1. The control terminal and the clients both store a blockchain, and blocks in the blockchain are used to record activation information. The activation information includes the validity period of a license authorizing the application system to activate the client, the number of remaining activatable clients in the application system, a list of activated clients, and an identifier of a previous block. The application system is used to implement the client activation control method according to any one of claims 1 to 8.
10. A computer-readable storage medium, characterized in that The computer-readable storage medium stores computer-executable instructions, which, when executed by a processor, are used to implement the client activation control method according to any one of claims 1 to 8.
Citation Information
Patent Citations
Activation code management method and device and activation code generation method and device
CN109995523A
Block data marking method and device based on block chain
CN113282672A