区块链数据清理方法、装置、计算机设备和存储介质Block chain data cleaning method, device, computer equipment and storage medium
相关申请的交叉引用Cross references to related applications
本申请要求于2019年7月25日提交中国专利局,申请号为2019106753464,申请名称为“区块链数据清理方法、装置、计算机设备和存储介质”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。This application claims the priority of a Chinese patent application filed with the Chinese Patent Office on July 25, 2019, with the application number 2019106753464 and the application titled "Blockchain data cleaning method, device, computer equipment and storage medium", and its entire content Incorporated in this application by reference.
技术领域Technical field
本申请涉及一种区块链数据清理方法、装置、计算机设备和存储介质。This application relates to a blockchain data cleaning method, device, computer equipment and storage medium.
背景技术Background technique
近年来,随着区块链技术的发展,区块链技术的应用也逐渐的深入到生活中的各个领域。在区块链的技术中,通过在由所有参与者组成的网络内形成共识的过程来保证参与者间信息流通的可靠性,并且在整个系统中,也能通过防止篡改或重复消费等不正当行为,来保证区块链的完好性。In recent years, with the development of blockchain technology, the application of blockchain technology has gradually penetrated into all areas of life. In the blockchain technology, the reliability of information circulation among participants is ensured by the process of forming a consensus in a network composed of all participants, and in the entire system, it can also prevent unauthorized tampering or repeated consumption. Behavior to ensure the integrity of the blockchain.
然而,发明人意识到,但当前在区块链的运行过程中,可以应该数据测试或其他原因留下大量没用的测试数据,想要清理区块链中随着时间发展遗留下的测试数据十分困难,但如果不做清理,随着数据越来越大,区块链的运行效率也会逐步下降。However, the inventor realized that in the current operation of the blockchain, a large amount of useless test data can be left for data testing or other reasons, and wants to clean up the test data left over from the blockchain over time. It's very difficult, but if you don't clean up, as the data becomes larger and larger, the operating efficiency of the blockchain will gradually decrease.
发明内容Summary of the invention
根据本申请公开的各种实施例,提供一种区块链数据清理方法、装置、计算机设备和存储介质。According to various embodiments disclosed in the present application, a blockchain data cleaning method, device, computer equipment, and storage medium are provided.
一种区块链数据清理方法,包括:A blockchain data cleaning method, including:
停止区块链中的各节点及各节点对应的关联服务;Stop each node in the blockchain and the associated services corresponding to each node;
获取排序标识,根据所述排序标识从所述关联服务中获取排序服务,并删除所述排序服务中的数据队列,当所述数据队列删除时,生成数据清理指令;Acquiring a sorting identifier, acquiring a sorting service from the associated service according to the sorting identifier, deleting a data queue in the sorting service, and generating a data cleaning instruction when the data queue is deleted;
根据所述数据清理指令登录待清理节点,删除所述待清理节点中的待清理数据,并重启所述待清理节点对应的关联服务,当所述关联服务重启时,生成通道替换指令;Log in to the node to be cleaned according to the data cleansing instruction, delete the data to be cleaned in the node to be cleaned, and restart the associated service corresponding to the node to be cleaned, and when the associated service restarts, generate a channel replacement instruction;
根据所述通道替换指令,新建替换通道,将所述替换通道添加到所述待清理节点;及According to the channel replacement instruction, create a new replacement channel, and add the replacement channel to the node to be cleaned; and
获取所述替换通道的第一配置信息并查询资源交换服务器,根据所述第一配置信息修改所述待清理节点的通道配置并启动资源交换服务器。Obtain the first configuration information of the replacement channel and query the resource exchange server, modify the channel configuration of the node to be cleaned up according to the first configuration information, and start the resource exchange server.
一种区块链数据清理装置,包括:A block chain data cleaning device, including:
停止模块,用于停止区块链中的各节点及各节点对应的关联服务;The stop module is used to stop each node in the blockchain and the associated service corresponding to each node;
第一获取模块,用于获取排序标识,根据所述排序标识从所述关联服务中获取排序服务,并删除所述排序服务中的数据队列,当所述数据队列删除时,生成数据清理指令;The first obtaining module is configured to obtain a sorting identifier, obtain a sorting service from the associated service according to the sorting identifier, and delete a data queue in the sorting service, and generate a data cleaning instruction when the data queue is deleted;
登录模块,用于根据所述数据清理指令登录待清理节点,删除所述待清理节点中的待清理数据,并重启所述待清理节点对应的关联服务,当所述关联服务重启时,生成通道替换指令;The login module is configured to log in to the node to be cleaned according to the data cleansing instruction, delete the data to be cleaned in the node to be cleaned, and restart the associated service corresponding to the node to be cleaned, and when the associated service restarts, generate a channel Replacement instruction
新建通道模块,用于根据所述通道替换指令,新建替换通道,将所述替换通道添加到所述待清理节点;及The new channel module is used to create a new replacement channel according to the channel replacement instruction, and add the replacement channel to the node to be cleaned; and
第二获取模块,用于获取所述替换通道的第一配置信息并查询资源交换服务器,根据所述第一配置信息修改所述待清理节点的通道配置并启动资源交换服务器。The second acquisition module is configured to acquire the first configuration information of the replacement channel and query the resource exchange server, modify the channel configuration of the node to be cleaned up according to the first configuration information, and start the resource exchange server.
一种计算机设备,包括存储器和一个或多个处理器,所述存储器中储存有计算机可读指令,所述计算机可读指令被所述处理器执行时,使得所述一个或多个处理器执行以下步骤:A computer device, including a memory and one or more processors, the memory stores computer readable instructions, when the computer readable instructions are executed by the processor, the one or more processors execute The following steps:
停止区块链中的各节点及各节点对应的关联服务;Stop each node in the blockchain and the associated services corresponding to each node;
获取排序标识,根据所述排序标识从所述关联服务中获取排序服务,并删除所述排序服务中的数据队列,当所述数据队列删除时,生成数据清理指令;Acquiring a sorting identifier, acquiring a sorting service from the associated service according to the sorting identifier, deleting a data queue in the sorting service, and generating a data cleaning instruction when the data queue is deleted;
根据所述数据清理指令登录待清理节点,删除所述待清理节点中的待清理数据,并重启所述待清理节点对应的关联服务,当所述关联服务重启时,生成通道替换指令;Log in to the node to be cleaned according to the data cleanup instruction, delete the data to be cleaned in the node to be cleaned, and restart the associated service corresponding to the node to be cleaned, and when the associated service restarts, generate a channel replacement instruction;
根据所述通道替换指令,新建替换通道,将所述替换通道添加到所述待清理节点;及According to the channel replacement instruction, create a new replacement channel, and add the replacement channel to the node to be cleaned; and
获取所述替换通道的第一配置信息并查询资源交换服务器,根据所述第一配置信息修改所述待清理节点的通道配置并启动资源交换服务器。Obtain the first configuration information of the replacement channel and query the resource exchange server, modify the channel configuration of the node to be cleaned up according to the first configuration information, and start the resource exchange server.
一个或多个存储有计算机可读指令的非易失性计算机可读存储介质,计算机可读指令被一个或多个处理器执行时,使得一个或多个处理器执行以下步骤:One or more non-volatile computer-readable storage media storing computer-readable instructions. When the computer-readable instructions are executed by one or more processors, the one or more processors execute the following steps:
停止区块链中的各节点及各节点对应的关联服务;Stop each node in the blockchain and the associated services corresponding to each node;
获取排序标识,根据所述排序标识从所述关联服务中获取排序服务,并删除所述排序服务中的数据队列,当所述数据队列删除时,生成数据清理指令;Acquiring a sorting identifier, acquiring a sorting service from the associated service according to the sorting identifier, deleting a data queue in the sorting service, and generating a data cleaning instruction when the data queue is deleted;
根据所述数据清理指令登录待清理节点,删除所述待清理节点中的待清理数据,并重启所述待清理节点对应的关联服务,当所述关联服务重启时,生成通道替换指令;Log in to the node to be cleaned according to the data cleanup instruction, delete the data to be cleaned in the node to be cleaned, and restart the associated service corresponding to the node to be cleaned, and when the associated service restarts, generate a channel replacement instruction;
根据所述通道替换指令,新建替换通道,将所述替换通道添加到所述待清理节点;及According to the channel replacement instruction, create a new replacement channel, and add the replacement channel to the node to be cleaned; and
获取所述替换通道的第一配置信息并查询资源交换服务器,根据所述第一配置信息修改所述待清理节点的通道配置并启动资源交换服务器。Obtain the first configuration information of the replacement channel and query the resource exchange server, modify the channel configuration of the node to be cleaned up according to the first configuration information, and start the resource exchange server.
本申请的一个或多个实施例的细节在下面的附图和描述中提出。本申请的其它特征和优点将从说明书、附图以及权利要求书变得明显。The details of one or more embodiments of the application are set forth in the following drawings and description. Other features and advantages of this application will become apparent from the description, drawings and claims.
附图说明Description of the drawings
为了更清楚地说明本申请实施例中的技术方案,下面将对实施例中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本申请的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其它的附图。In order to more clearly describe the technical solutions in the embodiments of the present application, the following will briefly introduce the drawings needed in the embodiments. Obviously, the drawings in the following description are only some embodiments of the present application. For those of ordinary skill in the art, other drawings can be obtained based on these drawings without creative work.
图1为根据一个或多个实施例中区块链数据清理方法的应用场景图。Fig. 1 is an application scenario diagram of a blockchain data cleaning method according to one or more embodiments.
图2为根据一个或多个实施例中区块链数据清理方法的流程示意图。Fig. 2 is a schematic flow chart of a method for clearing blockchain data according to one or more embodiments.
图3为根据一个或多个实施例中检测待清理数据中的校准数据的流程示意图。FIG. 3 is a schematic diagram of a process of detecting calibration data in data to be cleaned according to one or more embodiments.
图4为根据一个或多个实施例中区块链数据清理装置的框图。Fig. 4 is a block diagram of a block chain data cleaning device according to one or more embodiments.
图5为根据一个或多个实施例中计算机设备的框图。Figure 5 is a block diagram of a computer device according to one or more embodiments.
具体实施方式Detailed ways
为了使本申请的技术方案及优点更加清楚明白,以下结合附图及实施例,对本申请进行进一步详细说明。应当理解,此处描述的具体实施例仅仅用以解释本申请,并不用于限定本申请。In order to make the technical solutions and advantages of the present application clearer, the following further describes the present application in detail with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described here are only used to explain the application, and not used to limit the application.
本申请提供的区块链数据清理方法,可以应用于如图1所示的应用环境中。服务器102通过网络与区块链系统104中包含的待清理节点106进行通信。服务器102停止区块链系统104中的各节点及各节点对应的关联服务;当区块链中各节点及服务停止后,获取排序标识,并根据排序标识从关联服务中获取排序服务,并删除排序服务中的数据队列,当数据队列删除时,生成数据清理指令;然后根据数据清理指令登录待清理节点106,删除待清理节点106中的待清理数据,并重启待清理节点106对应的关联服务,当关联服务重启时,生成通道替换指令;根据通道替换指令,新建替换通道,将替换通道添加到待清理节点106;最后获取替换通道的第一配置信息并查询资源交换服务器,根据第一配置信息修改待清理节点的通道配置并启动资源交换服务器。服务器102、待清理节点106可以用独立的服务器或者是多个服 务器组成的服务器集群来实现,区块链系统104可以是包含有不同的节点的分布式存储系统,可以连接不同节点生成的区块,形成区块链,并将形成的区块链存储至不同的节点中。The blockchain data cleaning method provided in this application can be applied to the application environment shown in FIG. 1. The server 102 communicates with the to-be-cleaned node 106 included in the blockchain system 104 through the network. The server 102 stops each node in the blockchain system 104 and the associated service corresponding to each node; when each node and service in the blockchain stops, it obtains the ordering identifier, and obtains the ordering service from the associated service according to the ordering identifier, and deletes it The data queue in the sorting service generates a data cleaning instruction when the data queue is deleted; then logs in to the node 106 to be cleaned according to the data cleaning instruction, deletes the data to be cleaned in the node 106 to be cleaned, and restarts the associated service corresponding to the node to be cleaned 106 When the associated service restarts, a channel replacement instruction is generated; according to the channel replacement instruction, a new replacement channel is created, and the replacement channel is added to the node to be cleaned 106; finally, the first configuration information of the replacement channel is obtained and the resource exchange server is inquired, according to the first configuration Information modify the channel configuration of the node to be cleaned up and start the resource exchange server. The server 102 and the node to be cleaned 106 can be implemented by an independent server or a server cluster composed of multiple servers. The blockchain system 104 can be a distributed storage system containing different nodes, which can connect blocks generated by different nodes. , To form a blockchain, and store the formed blockchain in different nodes.
在其中一个实施例中,如图2所示,提供了一种区块链数据清理方法,以该方法应用于图1中的服务器102为例进行说明,包括以下步骤:In one of the embodiments, as shown in FIG. 2, a method for clearing blockchain data is provided. Taking the method applied to the server 102 in FIG. 1 as an example, the method includes the following steps:
步骤202,停止区块链中的各节点及各节点对应的关联服务。Step 202: Stop each node in the blockchain and the associated service corresponding to each node.
具体地,区块链中的各个节点及关联服务可以包括:用于对数据进行排序的共识节点及与共识节点关联的排序服务、用于验证数据是否合法的背书节点及与背书节点关联的背书服务、用于数据存储的数据节点及与数据节点关联的数据存储服务、用于发起及停止交易的交易节点及与交易节点关联的交易发起服务等等,服务器停止区块链中的上述节点及其关联服务,为后续的区块链中的数据清理做准备。Specifically, each node and associated service in the blockchain may include: a consensus node for sorting data and a sorting service associated with the consensus node, an endorsing node for verifying whether the data is legal, and an endorsement associated with the endorsing node Services, data nodes for data storage and data storage services associated with data nodes, transaction nodes for initiating and stopping transactions, transaction initiation services associated with transaction nodes, etc. The server stops the above nodes in the blockchain and Its associated service prepares for the subsequent data cleaning in the blockchain.
步骤204,获取排序标识,根据排序标识从关联服务中获取排序服务,并删除排序服务中的数据队列,当数据队列删除时,生成数据清理指令。Step 204: Obtain the sorting identifier, obtain the sorting service from the associated service according to the sorting identifier, and delete the data queue in the sorting service. When the data queue is deleted, a data cleaning instruction is generated.
具体地,排序标识用于标识共识节点中的排序服务,比如共识节点连接的kafka服务等。数据队列可以为待清理的测试数据的数据队列,比如kafka服务中的topic(标签),数据清理指令可以用于在数据队列删除后,指示待清理节点中待清理数据的删除。服务器获取到用于指示排序服务排序标识,根据排序标识获取到共识节点连接的排序服务,并删除排序服务中的数据队列,生成数据清理指令。Specifically, the ordering identifier is used to identify the ordering service in the consensus node, such as the kafka service connected to the consensus node. The data queue may be a data queue of test data to be cleaned, such as a topic (tag) in the kafka service. The data cleansing instruction may be used to instruct the deletion of the data to be cleaned in the node to be cleaned after the data queue is deleted. The server obtains the sorting identifier used to indicate the sorting service, obtains the sorting service connected to the consensus node according to the sorting identifier, and deletes the data queue in the sorting service, and generates a data cleaning instruction.
步骤206,根据数据清理指令登录待清理节点,删除待清理节点中的待清理数据,并重启待清理节点对应的关联服务,当关联服务重启时,生成通道替换指令。Step 206: Log in to the node to be cleaned according to the data cleansing instruction, delete the data to be cleaned in the node to be cleaned, and restart the associated service corresponding to the node to be cleaned, and when the associated service restarts, generate a channel replacement instruction.
具体地,待清理节点可以包括区块链中的共识节点、背书节点以及数据节点,待清理数据可以是测试用的残留数据,比如共识节点中的通道数据、背书节点及数据节点中的账本数据、瞬态数据等等。服务器获取到数据清理指令后,根据数据清理指令登录待清理节点,并删除待清理节点中需要进行 清理的待清理数据,待清理节点中的待清理数据删除后,重启待清理节点中的关联服务:可以包括共识节点及关联的排序服务、背书节点及关联的背书服务、数据节点及关联的数据存储服务,并生成的通道替换指令,通道替换指令用于指示替换通道生成以及替换通道的替换。Specifically, the nodes to be cleaned can include consensus nodes, endorsement nodes, and data nodes in the blockchain. The data to be cleaned can be residual data for testing, such as channel data in consensus nodes, endorsement nodes, and ledger data in data nodes. , Transient data, etc. After the server obtains the data cleaning instruction, it logs in to the node to be cleaned according to the data cleaning instruction, and deletes the data to be cleaned in the node to be cleaned. After the data to be cleaned in the node to be cleaned is deleted, restart the associated service in the node to be cleaned : It can include consensus nodes and associated ranking services, endorsement nodes and associated endorsement services, data nodes and associated data storage services, and generated channel replacement instructions. The channel replacement instructions are used to instruct replacement channel generation and replacement channel replacement.
步骤208,根据通道替换指令,新建替换通道,将替换通道添加到待清理节点。Step 208: Create a new replacement channel according to the channel replacement instruction, and add the replacement channel to the node to be cleaned.
具体地,替换通道用于替换待清理数据原数据通道的区块链通道,待清理数据被删除后,待清理数据所在的原数据通道也相应被删除,区块链通道具体的建立方法包括进入Docker cli容器(区块链中用于代码处理,数据运行,系统设置的软件包),然后设置通道的环境变量,并将通道相关配置数据加入通道等步骤,在新建用于替换的区块链通道后,将替换用的通道添加到共识节点、背书节点以及数据节点等已经进行过数据清理的待清理节点中。Specifically, the replacement channel is used to replace the blockchain channel of the original data channel of the data to be cleaned. After the data to be cleaned is deleted, the original data channel where the data to be cleaned is located is also deleted. The specific method for establishing the blockchain channel includes entering Docker cli container (a software package used for code processing, data operation, and system settings in the blockchain), and then set the environment variables of the channel, and add the channel-related configuration data to the channel and other steps, in the new blockchain for replacement After the channel is completed, the replacement channel is added to the consensus node, endorsement node, and data node to be cleaned up.
步骤210,获取替换通道的第一配置信息并查询资源交换服务器,根据第一配置信息修改待清理节点的通道配置并启动资源交换服务器。Step 210: Obtain the first configuration information of the replacement channel and query the resource exchange server, modify the channel configuration of the node to be cleaned up according to the first configuration information, and start the resource exchange server.
具体地,第一配置信息可以为替换通道的标准信息,比如最大交易数量、最大字节数等信息,服务器获取到新建替换通道的第一配置信息后,根据第一配置信息修改待清理节点的原通道配置,并查询资源交换服务器的状态,若资源交换服务器未开启,则启动资源交换服务器,若资源交换服务器处于开启状态,则重启资源交换服务器。Specifically, the first configuration information may be standard information of the replacement channel, such as information such as the maximum number of transactions and the maximum number of bytes. After obtaining the first configuration information of the new replacement channel, the server modifies the node to be cleaned according to the first configuration information. The original channel configuration, and query the status of the resource exchange server, if the resource exchange server is not turned on, start the resource exchange server, if the resource exchange server is in the on state, restart the resource exchange server.
上述区块链数据清理方法中,服务器停止区块链中的各节点及各节点对应的关联服务;当区块链中各节点及服务停止后,获取排序标识,并根据排序标识从关联服务中获取排序服务,并删除排序服务中的数据队列,当数据队列删除时,生成数据清理指令;然后根据数据清理指令登录待清理节点,删除待清理节点中的待清理数据,并重启待清理节点对应的关联服务,当关联服务重启时,生成通道替换指令;根据通道替换指令,新建替换通道,将替换通道添加到待清理节点;最后获取替换通道的第一配置信息并查询资源交换服务器,根据第一配置信息修改待清理节点的通道配置并启动资源交换 服务器。通过删除排序服务中的数据队列,然后删除清理节点中的待清理数据,最后替换通道的方法对通道数据进行清理,与现有技术相比,提供了一种能够清理区块链中数据,从而提高区块链运行效率的区块链数据清理方法。In the above block chain data cleaning method, the server stops each node in the block chain and the associated service corresponding to each node; when each node and service in the block chain stops, it obtains the sorting identifier, and according to the sorting identifier from the associated service Obtain the sorting service and delete the data queue in the sorting service. When the data queue is deleted, generate a data cleaning instruction; then log in to the node to be cleaned according to the data cleansing instruction, delete the data to be cleaned in the node to be cleaned, and restart the corresponding node to be cleaned When the associated service restarts, a channel replacement instruction is generated; according to the channel replacement instruction, a new replacement channel is created, and the replacement channel is added to the node to be cleaned; finally, the first configuration information of the replacement channel is obtained and the resource exchange server is queried. One configuration information modifies the channel configuration of the node to be cleaned up and starts the resource exchange server. By deleting the data queue in the sorting service, then deleting the data to be cleaned in the cleaning node, and finally replacing the channel, the channel data is cleaned. Compared with the prior art, it provides a method that can clean the data in the blockchain. Blockchain data cleaning method to improve the efficiency of blockchain operation.
在其中一个实施例中,如图3所示,区块链数据清理方法中,删除所述待清理节点中的待清理数据之前,还可以包括:In one of the embodiments, as shown in FIG. 3, in the blockchain data cleaning method, before deleting the data to be cleaned in the node to be cleaned, it may further include:
步骤302,当待清理节点中的待清理数据中存在校准数据时,对待清理节点中的校准数据进行备份。Step 302: When there is calibration data in the data to be cleaned in the node to be cleaned, the calibration data in the node to be cleaned is backed up.
具体地,校准数据为待清理数据中的还原数据,还原数据可以还原待清理数据,能够在后续需要纠错或者检验时,重新还原待清理数据,对待清理数据进行检测纠错,服务器在删除待清理节点中的待清理数据前,检测待清理数据中是否包含校准数据,当服务器检测到待清理节点中的待清理数据中存在校准数据时,保存检测到的校准数据留做备份数据,用于后续数据检验。Specifically, the calibration data is the restored data in the data to be cleaned. The restored data can restore the data to be cleaned, and can restore the data to be cleaned when the subsequent error correction or verification is required. The data to be cleaned is detected and corrected, and the server is deleting the data to be cleaned. Before cleaning the data to be cleaned in the node, check whether the data to be cleaned contains calibration data. When the server detects that there is calibration data in the data to be cleaned in the node to be cleaned, it saves the detected calibration data as backup data. Follow-up data verification.
步骤304,在接收到数据检验请求时,根据备份的校准数据对待清理节点中的待清理数据进行还原。Step 304: When the data verification request is received, restore the data to be cleaned in the node to be cleaned according to the backup calibration data.
具体地,当服务器接收到数据检验请求时,根据备份的待清理数据中的校准数据对待清理节点中的待清理数据进行还原,方便用户对删除前的待清理数据进行检查,查看待清理数据是否存在异常。Specifically, when the server receives the data verification request, it restores the data to be cleaned in the node to be cleaned according to the calibration data in the backed up data to be cleaned, so that the user can check the data to be cleaned before deletion and check whether the data to be cleaned is There is an exception.
上述区块链数据清理方法中,区块链数据清理方法在清理数据之前会检测待清理数据中是否包含校准数据,当待清理数据中包含校准数据时,保存校准数据,并在后续接收到数据检验请求时进行还原,方便用户查找区块链数据中的错误。In the above blockchain data cleaning method, the blockchain data cleaning method detects whether the data to be cleaned contains calibration data before cleaning the data. When the data to be cleaned contains calibration data, the calibration data is saved, and the data is subsequently received Restore when verifying the request to facilitate users to find errors in blockchain data.
在其中一个实施例中,区块链数据清理方法获取替换通道的第一配置信息并查询资源交换服务器之后,还可以包括:获取历史记录中历史通道的第二配置信息,将第二配置信息与第一配置信息进行匹配;当匹配成功时,启动资源交换服务器。In one of the embodiments, after the blockchain data cleaning method obtains the first configuration information of the replacement channel and queries the resource exchange server, it may also include: obtaining the second configuration information of the historical channel in the history record, and combining the second configuration information with The first configuration information is matched; when the matching is successful, the resource exchange server is started.
具体地,第二配置信息是指历史记录中历史数据通道的配置信息,在服务器获取替换通道的第一配置信息并查询资源交换服务器的当前状态之后, 查询区块链中的历史记录中历史数据通道的第二配置信息,并将替换通道的第一配置信息与历史记录中的第二配置信息进行匹配,当历史记录中存在第二配置信息与替换通道的第一配置信息匹配时,说明两者的配置相同,历史记录的第二配置信息符合替换通道的配置要求,则跳过根据第一配置信息修改待清理节点的通道配置的步骤,直接启动服务器。Specifically, the second configuration information refers to the configuration information of the historical data channel in the historical record. After the server obtains the first configuration information of the replacement channel and queries the current state of the resource exchange server, query the historical data in the historical record in the blockchain The second configuration information of the channel, and the first configuration information of the replacement channel is matched with the second configuration information in the history record. When the second configuration information in the history record matches the first configuration information of the replacement channel, the two If the second configuration information of the historical record meets the configuration requirements of the replacement channel, the step of modifying the channel configuration of the node to be cleaned according to the first configuration information is skipped, and the server is directly started.
本实施例中,服务器通过获取历史记录中历史通道的第二配置信息查看是否存在与替换通道的第一配置信息匹配的配置信息,当存在时,可以直接跳过通道配置修改步骤,节约了服务器资源。In this embodiment, the server checks whether there is configuration information matching the first configuration information of the replacement channel by acquiring the second configuration information of the historical channel in the history record. When it exists, it can skip the channel configuration modification step directly, saving the server Resources.
在其中一个实施例中,区块链数据清理方法停止区块链中的各个节点及各个节点对应的关联服务,可以包括:接收终端发送的数据清理指令,数据清理指令中包含有终端标识;获取清理权限终端集合,检测终端标识与清理权限终端集合中终端标识是否匹配;当终端标识与清理权限终端集合中终端标识匹配时,停止区块链中的各个节点及各个节点对应的关联服务。。In one of the embodiments, the blockchain data cleaning method stopping each node in the blockchain and the associated service corresponding to each node may include: receiving a data cleaning instruction sent by a terminal, and the data cleaning instruction includes a terminal identifier; obtaining The set of clearing authority terminals is to detect whether the terminal identifier matches the terminal identifier in the clearing authority terminal set; when the terminal identifier matches the terminal identifier in the clearing authority terminal set, stop each node in the blockchain and the associated service corresponding to each node. .
具体地,清理权限终端集合为固定的终端、IP频段等权限名单集合,终端标识为数据清理发送方终端的标识信息,包含在数据清理指令中,用于指向数据清理发送方的终端。服务器在接收到终端发送的数据清理指令时,获取数据清理指令中包含的终端标识,通过终端标识检测发出数据清理指令的终端是否在清理权限终端集合内,如果发出数据清理指令的终端在清理权限终端集合内,开始后续的区块链数据清理工作,即停止区块链中的各个节点及各个节点对应的关联服务。另外,如果发出数据清理指令的终端不在清理权限终端集合内,可以对发出清理指令的终端的身份进行验证。Specifically, the set of clearing authority terminals is a set of fixed terminals, IP frequency bands and other authority lists, and the terminal identifier is the identification information of the data clearing sender terminal, which is included in the data clearing instruction and is used to point to the data clearing sender's terminal. When the server receives the data cleaning instruction sent by the terminal, it obtains the terminal identification contained in the data cleaning instruction, and uses the terminal identification to detect whether the terminal issuing the data cleaning instruction is in the set of cleaning authority terminals, and if the terminal issuing the data cleaning instruction is in the cleaning authority In the terminal set, the subsequent block chain data cleaning work is started, that is, each node in the block chain and the associated service corresponding to each node are stopped. In addition, if the terminal that issued the data cleaning instruction is not in the set of clearing authority terminals, the identity of the terminal that issued the cleaning instruction can be verified.
本实施例中,服务器通过检测发送数据清理指令的终端与清理权限终端集合是否匹配,当匹配时,开始区块链的数据清理工作,这样防止了其他没有权限的用户清理区块链数据,保障了区块链数据的安全。In this embodiment, the server detects whether the terminal sending the data cleaning instruction matches the set of cleaning authority terminals, and when it matches, it starts the data cleaning of the blockchain, which prevents other users without the authority from cleaning the blockchain data and guarantees The security of blockchain data.
在其中一个实施例中,区块链数据清理方法停止区块链中的各个节点及各个节点对应的关联服务,可以包括:获取待清理数据的数据量,并判断待清理数据的数据量是否大于预设值;当待清理数据的数据量大于预设值时, 停止区块链中的各个节点及各个节点对应的关联服务。In one of the embodiments, the block chain data cleaning method stops each node in the block chain and the associated service corresponding to each node, which may include: obtaining the data volume of the data to be cleaned, and determining whether the data volume of the data to be cleaned is greater than Preset value; when the amount of data to be cleaned is greater than the preset value, stop each node in the blockchain and the associated service corresponding to each node.
具体地,预设值可以是临界值,当待清理的数据量大于临界值时,区块链的运行效率会明显减低,服务器检测待清理数据的数据量,并判断检测到的数据量是否大于预设值,当待清理数据的数据量大于预设值时,开始后续的区块链数据清理工作,即停止区块链中的各个节点及各个节点对应的关联服务。另外,可以设置预设周期,服务器会按照预设周期定期检测待清理数据的数据量,定期保证区块链的运行效率。Specifically, the preset value may be a critical value. When the amount of data to be cleaned is greater than the critical value, the operating efficiency of the blockchain will be significantly reduced. The server detects the amount of data to be cleaned and determines whether the detected data amount is greater than The preset value. When the data volume of the data to be cleaned is greater than the preset value, the subsequent blockchain data cleanup work is started, that is, each node in the blockchain and the associated service corresponding to each node are stopped. In addition, a preset period can be set, and the server will periodically detect the amount of data to be cleaned according to the preset period, so as to regularly ensure the operating efficiency of the blockchain.
本实施例中,服务器通过检测待清理数据的数据量是否大于预设值,当数据量大于预设值时,开始区块链的数据清理工作,这样能够在待清理数据会影响到运行效率时进行数据清理,保证了区块链的运行效率。In this embodiment, the server detects whether the data volume of the data to be cleaned is greater than a preset value, and when the data volume is greater than the preset value, it starts the data cleansing work of the blockchain, which can affect the operation efficiency when the data to be cleaned Data cleaning ensures the operational efficiency of the blockchain.
在其中一个实施例中,上述区块链数据清理方法,服务器通过停止区块链中各节点及关联服务,删除排序服务中的数据队列,删除待清理节点中的待清理数据、新建替换通道重启资源交换服务器等步骤对区块链中的待清理数据进行清理。举例说明,区块链在运行过程中因为数据测试等方面原因遗留了许多测试数据,测试数据在测试过后失去作用,并且测试数据还会影响到区块链处理其他数据时的运行效率,服务器停止区块链中各个节点及各节点对应的关联服务,然后获取共识节点中的kafka服务,删除kafka服务中的数据队列(topic),其次,删除共识节点上的测试数据,背书节点上以及数据节点上的测试数据(账本数据以及瞬态数据),然后新建替换通道,将替换通道添加到被删除数据的节点上,启动资源交换服务器。这样清理了区块链中数据,从而提高区块链运行效率的区块链数据清理方法。In one of the embodiments, in the above blockchain data cleaning method, the server deletes the data queue in the sorting service by stopping each node and associated service in the blockchain, deletes the data to be cleaned in the node to be cleaned, and restarts the new replacement channel Steps such as the resource exchange server clean up the data to be cleaned in the blockchain. For example, during the operation of the blockchain, a lot of test data is left due to data testing and other reasons. The test data loses its effect after the test, and the test data will also affect the efficiency of the blockchain when processing other data, and the server stops. Each node in the blockchain and the associated service corresponding to each node, then obtain the kafka service in the consensus node, delete the data queue (topic) in the kafka service, and secondly, delete the test data on the consensus node, endorse the node and the data node Test data (ledger data and transient data) on the computer, then create a replacement channel, add the replacement channel to the node where the data is deleted, and start the resource exchange server. This cleans up the data in the blockchain, thereby improving the efficiency of the blockchain data cleaning method.
应该理解的是,虽然图2、图3的流程图中的各个步骤按照箭头的指示依次显示,但是这些步骤并不是必然按照箭头指示的顺序依次执行。除非本文中有明确的说明,这些步骤的执行并没有严格的顺序限制,这些步骤可以以其它的顺序执行。而且,图2、图3中的至少一部分步骤可以包括多个子步骤或者多个阶段,这些子步骤或者阶段并不必然是在同一时刻执行完成,而是可以在不同的时刻执行,这些子步骤或者阶段的执行顺序也不必然是依 次进行,而是可以与其它步骤或者其它步骤的子步骤或者阶段的至少一部分轮流或者交替地执行。It should be understood that although the various steps in the flowcharts of FIG. 2 and FIG. 3 are sequentially displayed as indicated by the arrows, these steps are not necessarily executed in the order indicated by the arrows. Unless specifically stated in this article, the execution of these steps is not strictly limited in order, and these steps can be executed in other orders. Moreover, at least part of the steps in Figure 2 and Figure 3 may include multiple sub-steps or multiple stages. These sub-steps or stages are not necessarily executed at the same time, but can be executed at different times. These sub-steps or The execution order of the stages is not necessarily carried out sequentially, but may be executed alternately or alternately with at least a part of other steps or sub-steps or stages of other steps.
在其中一个实施例中,如图4所示,提供了一种区块链数据清理装置,包括:停止模块402、第一获取模块404、登录模块406、新建通道模块408和第二获取模块410,其中:In one of the embodiments, as shown in FIG. 4, a block chain data cleaning device is provided, including: a stop module 402, a first acquisition module 404, a login module 406, a new channel module 408, and a second acquisition module 410 ,among them:
停止模块402,用于停止区块链中的各节点及各节点对应的关联服务。The stop module 402 is used to stop each node in the blockchain and the associated service corresponding to each node.
第一获取模块404,用于获取排序标识,根据排序标识从关联服务中获取排序服务,并删除排序服务中的数据队列,当数据队列删除时,生成数据清理指令。The first obtaining module 404 is configured to obtain the sorting identifier, obtain the sorting service from the associated service according to the sorting identifier, and delete the data queue in the sorting service, and generate a data cleaning instruction when the data queue is deleted.
登录模块406,用于根据数据清理指令登录待清理节点,删除待清理节点中的待清理数据,并重启待清理节点对应的关联服务,当关联服务重启时,生成通道替换指令。The login module 406 is configured to log in to the node to be cleaned according to the data cleansing instruction, delete the data to be cleaned in the node to be cleaned, and restart the associated service corresponding to the node to be cleaned, and when the associated service restarts, generate a channel replacement instruction.
新建通道模块408,用于根据通道替换指令,新建替换通道,将替换通道添加到待清理节点。及The new channel module 408 is used to create a new replacement channel according to the channel replacement instruction, and add the replacement channel to the node to be cleaned. and
第二获取模块410,用于获取替换通道的第一配置信息并查询资源交换服务器,根据第一配置信息修改待清理节点的通道配置并启动资源交换服务器。The second obtaining module 410 is configured to obtain the first configuration information of the replacement channel and query the resource exchange server, modify the channel configuration of the node to be cleaned up according to the first configuration information, and start the resource exchange server.
在其中一个实施例中,装置还可以包括:In one of the embodiments, the device may further include:
备份模块,用于当待清理节点中的待清理数据中存在校准数据时,对待清理节点中的校准数据进行备份,并在接收到数据检验请求时,根据备份的校准数据对待清理节点中的待清理数据进行还原。The backup module is used to back up the calibration data in the node to be cleaned when there is calibration data in the data to be cleaned in the node to be cleaned, and when a data verification request is received, according to the backup calibration data, the calibration data in the node to be cleaned is Clean up the data for restoration.
在其中一个实施例中,装置还可以包括:In one of the embodiments, the device may further include:
第三获取模块,用于获取历史记录中历史通道的第二配置信息,将第二配置信息与第一配置信息进行匹配。及The third acquisition module is configured to acquire the second configuration information of the historical channel in the historical record, and match the second configuration information with the first configuration information. and
启动模块,用于当匹配成功时,启动资源交换服务器。The start module is used to start the resource exchange server when the match is successful.
在其中一个实施例中,停止模块402还可以包括:In one of the embodiments, the stop module 402 may further include:
接收模块,用于接收终端发送的数据清理指令,数据清理指令中包含有 终端标识。The receiving module is used to receive the data cleaning instruction sent by the terminal, and the data cleaning instruction contains the terminal identification.
第四获取模块,用于获取清理权限终端集合,检测终端标识与清理权限终端集合中终端标识是否匹配。The fourth acquiring module is used to acquire the set of clearing authority terminals, and detecting whether the terminal identifier matches the terminal identifier in the clearing authority terminal set.
第二停止模块,用于当终端标识与清理权限终端集合中终端标识匹配时,停止区块链中的各个节点及各个节点对应的关联服务。The second stop module is used to stop each node in the blockchain and the associated service corresponding to each node when the terminal identifier matches the terminal identifier in the clearing authority terminal set.
在其中一个实施例中,停止模块402还可以包括:In one of the embodiments, the stop module 402 may further include:
第五获取模块,用于获取待清理数据的数据量,并判断待清理数据的数据量是否大于预设值。及The fifth acquisition module is used to acquire the data volume of the data to be cleaned and determine whether the data volume of the data to be cleaned is greater than a preset value. and
第三停止模块,用于当待清理数据的数据量大于预设值时,停止区块链中的各个节点及各个节点对应的关联服务。The third stop module is used to stop each node in the blockchain and the associated service corresponding to each node when the amount of data to be cleaned is greater than the preset value.
关于区块链数据清理装置的具体限定可以参见上文中对于区块链数据清理方法的限定,在此不再赘述。上述区块链数据清理装置中的各个模块可全部或部分通过软件、硬件及其组合来实现。上述各模块可以硬件形式内嵌于或独立于计算机设备中的处理器中,也可以以软件形式存储于计算机设备中的存储器中,以便于处理器调用执行以上各个模块对应的操作。Regarding the specific limitation of the blockchain data cleaning device, please refer to the above limitation on the blockchain data cleaning method, which will not be repeated here. Each module in the above-mentioned block chain data cleaning device can be implemented in whole or in part by software, hardware, and a combination thereof. The foregoing modules may be embedded in the form of hardware or independent of the processor in the computer device, or may be stored in the memory of the computer device in the form of software, so that the processor can call and execute the operations corresponding to the foregoing modules.
在其中一个实施例中,提供了一种计算机设备,该计算机设备可以是服务器,其框图可以如图5所示。该计算机设备包括通过系统总线连接的处理器、存储器、网络接口和数据库。该计算机设备的处理器用于提供计算和控制能力。该计算机设备的存储器包括非易失性存储介质、内存储器。该非易失性存储介质存储有操作系统、计算机可读指令和数据库。该内存储器为非易失性存储介质中的操作系统和计算机可读指令的运行提供环境。该计算机设备的数据库用于存储区块链数据。该计算机设备的网络接口用于与外部的终端通过网络连接通信。该计算机可读指令被处理器执行时以实现一种区块链数据清理方法。In one of the embodiments, a computer device is provided. The computer device may be a server, and its block diagram may be as shown in FIG. 5. The computer equipment includes a processor, a memory, a network interface and a database connected through a system bus. The processor of the computer device is used to provide calculation and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, computer readable instructions, and a database. The internal memory provides an environment for the operation of the operating system and computer-readable instructions in the non-volatile storage medium. The database of the computer equipment is used to store blockchain data. The network interface of the computer device is used to communicate with an external terminal through a network connection. The computer readable instruction is executed by the processor to realize a blockchain data cleaning method.
本领域技术人员可以理解,图5中示出的结构,仅仅是与本申请方案相关的部分结构的框图,并不构成对本申请方案所应用于其上的计算机设备的限定,具体的计算机设备可以包括比图中所示更多或更少的部件,或者组合 某些部件,或者具有不同的部件布置。Those skilled in the art can understand that the structure shown in FIG. 5 is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may Including more or fewer parts than shown in the figure, or combining some parts, or having a different arrangement of parts.
一种计算机设备,包括存储器和一个或多个处理器,存储器中储存有计算机可读指令,计算机可读指令被处理器执行时,使得一个或多个处理器执行以下步骤:停止区块链中的各节点及各节点对应的关联服务;获取排序标识,根据排序标识从关联服务中获取排序服务,并删除排序服务中的数据队列,当数据队列删除时,生成数据清理指令;根据数据清理指令登录待清理节点,删除待清理节点中的待清理数据,并重启待清理节点对应的关联服务,当关联服务重启时,生成通道替换指令;根据通道替换指令,新建替换通道,将替换通道添加到待清理节点;及获取替换通道的第一配置信息并查询资源交换服务器,根据第一配置信息修改待清理节点的通道配置并启动资源交换服务器。A computer device, including a memory and one or more processors. The memory stores computer readable instructions. When the computer readable instructions are executed by the processor, the one or more processors perform the following steps: stop in the blockchain Each node and the associated service corresponding to each node; obtain the sorting identifier, obtain the sorting service from the associated service according to the sorting identifier, and delete the data queue in the sorting service, when the data queue is deleted, generate a data cleaning instruction; according to the data cleaning instruction Log in to the node to be cleaned, delete the data to be cleaned in the node to be cleaned, and restart the associated service corresponding to the node to be cleaned. When the associated service restarts, a channel replacement instruction is generated; according to the channel replacement instruction, a new replacement channel is created and the replacement channel is added to The node to be cleaned up; and obtain the first configuration information of the replacement channel and query the resource exchange server, modify the channel configuration of the node to be cleaned up according to the first configuration information, and start the resource exchange server.
在其中一个实施例中,处理器执行计算机可读指令时所实现的删除待清理节点中的待清理数据之前,还可以包括:当待清理节点中的待清理数据中存在校准数据时,对待清理节点中的校准数据进行备份,并在接收到数据检验请求时,根据备份的校准数据对待清理节点中的待清理数据进行还原。In one of the embodiments, before deleting the data to be cleaned in the node to be cleaned when the processor executes the computer-readable instruction, it may further include: when calibration data exists in the data to be cleaned in the node to be cleaned, The calibration data in the node is backed up, and when a data verification request is received, the data to be cleaned in the node to be cleaned is restored according to the backup calibration data.
在其中一个实施例中,处理器执行计算机可读指令时所实现的获取替换通道的第一配置信息并查询资源交换服务器之后,还可以包括:获取历史记录中历史通道的第二配置信息,将第二配置信息与第一配置信息进行匹配;当匹配成功时,启动资源交换服务器。In one of the embodiments, after the processor executes the computer-readable instruction to obtain the first configuration information of the replacement channel and query the resource exchange server, it may further include: obtaining the second configuration information of the historical channel in the history record, and The second configuration information is matched with the first configuration information; when the matching is successful, the resource exchange server is started.
在其中一个实施例中,处理器执行计算机可读指令时所涉及的停止区块链中的各个节点及各个节点对应的关联服务,可以包括:接收终端发送的数据清理指令,数据清理指令中包含有终端标识;获取清理权限终端集合,检测终端标识与清理权限终端集合中终端标识是否匹配;及当终端标识与清理权限终端集合中终端标识匹配时,停止区块链中的各个节点及各个节点对应的关联服务。In one of the embodiments, stopping each node in the blockchain and the associated service corresponding to each node involved when the processor executes the computer-readable instruction may include: receiving a data cleaning instruction sent by the terminal, and the data cleaning instruction includes There is a terminal identification; obtain the set of cleaning authority terminals, check whether the terminal identification matches the terminal identification in the set of cleaning authority terminals; and when the terminal identification matches the terminal identification in the set of cleaning authority terminals, stop each node and each node in the blockchain The corresponding associated service.
在其中一个实施例中,处理器执行计算机可读指令时所涉及的停止区块链中的各个节点及各个节点对应的关联服务,可以包括:获取待清理数据的 数据量,并判断待清理数据的数据量是否大于预设值;及当待清理数据的数据量大于预设值时,停止区块链中的各个节点及各个节点对应的关联服务。In one of the embodiments, stopping each node in the blockchain and the associated service corresponding to each node involved when the processor executes the computer-readable instruction may include: obtaining the amount of data to be cleaned, and determining the data to be cleaned Whether the amount of data is greater than the preset value; and when the amount of data to be cleaned is greater than the preset value, stop each node in the blockchain and the associated service corresponding to each node.
一个或多个存储有计算机可读指令的非易失性计算机可读存储介质,计算机可读指令被一个或多个处理器执行时,使得一个或多个处理器执行以下步骤:停止区块链中的各节点及各节点对应的关联服务;获取排序标识,根据排序标识从关联服务中获取排序服务,并删除排序服务中的数据队列,当数据队列删除时,生成数据清理指令;根据数据清理指令登录待清理节点,删除待清理节点中的待清理数据,并重启待清理节点对应的关联服务,当关联服务重启时,生成通道替换指令;根据通道替换指令,新建替换通道,将替换通道添加到待清理节点;及获取替换通道的第一配置信息并查询资源交换服务器,根据第一配置信息修改待清理节点的通道配置并启动资源交换服务器。One or more non-volatile computer-readable storage media storing computer-readable instructions. When the computer-readable instructions are executed by one or more processors, the one or more processors perform the following steps: stop the blockchain Each node in the node and the associated service corresponding to each node; obtain the sorting identifier, obtain the sorting service from the associated service according to the sorting identifier, and delete the data queue in the sorting service, when the data queue is deleted, generate a data cleaning instruction; clean up according to the data Log in to the node to be cleaned in instructions, delete the data to be cleaned in the node to be cleaned, and restart the associated service corresponding to the node to be cleaned. When the associated service restarts, a channel replacement instruction is generated; according to the channel replacement instruction, a new replacement channel is created, and the replacement channel is added Go to the node to be cleaned up; and obtain the first configuration information of the replacement channel and query the resource exchange server, modify the channel configuration of the node to be cleaned up according to the first configuration information, and start the resource exchange server.
在其中一个实施例中,计算机可读指令被处理器执行时所实现的删除待清理节点中的待清理数据之前,还可以包括:当待清理节点中的待清理数据中存在校准数据时,对待清理节点中的校准数据进行备份,并在接收到数据检验请求时,根据备份的校准数据对待清理节点中的待清理数据进行还原。In one of the embodiments, before deleting the data to be cleaned in the node to be cleaned when the computer readable instruction is executed by the processor, it may further include: when there is calibration data in the data to be cleaned in the node to be cleaned, treating The calibration data in the cleaning node is backed up, and when a data verification request is received, the data to be cleaned in the cleaning node is restored according to the backup calibration data.
在其中一个实施例中,计算机可读指令被处理器执行时所实现的获取替换通道的第一配置信息并查询资源交换服务器之后,还可以包括:获取历史记录中历史通道的第二配置信息,将第二配置信息与第一配置信息进行匹配;当匹配成功时,启动资源交换服务器。In one of the embodiments, after the computer-readable instruction is executed by the processor to obtain the first configuration information of the replacement channel and query the resource exchange server, it may further include: obtaining the second configuration information of the historical channel in the history record, The second configuration information is matched with the first configuration information; when the matching is successful, the resource exchange server is started.
在其中一个实施例中,计算机可读指令被处理器执行时所涉及的停止区块链中的各个节点及各个节点对应的关联服务,可以包括:接收终端发送的数据清理指令,数据清理指令中包含有终端标识;获取清理权限终端集合,检测终端标识与清理权限终端集合中终端标识是否匹配;及当终端标识与清理权限终端集合中终端标识匹配时,停止区块链中的各个节点及各个节点对应的关联服务。In one of the embodiments, the stopping of each node in the blockchain and the associated service corresponding to each node when the computer-readable instruction is executed by the processor may include: receiving a data cleaning instruction sent by the terminal, and the data cleaning instruction Contains terminal identification; obtain the set of cleaning authority terminals, check whether the terminal identification matches the terminal identification in the set of clear authority terminals; and when the terminal identification matches the terminal identification in the set of clear authority terminals, stop each node and each in the blockchain The associated service corresponding to the node.
在其中一个实施例中,计算机可读指令被处理器执行时所涉及的停止区 块链中的各个节点及各个节点对应的关联服务,可以包括:获取待清理数据的数据量,并判断待清理数据的数据量是否大于预设值;及当待清理数据的数据量大于预设值时,停止区块链中的各个节点及各个节点对应的关联服务。In one of the embodiments, stopping each node in the blockchain and the associated service corresponding to each node when the computer-readable instruction is executed by the processor may include: obtaining the amount of data to be cleaned, and determining the amount of data to be cleaned Whether the amount of data is greater than the preset value; and when the amount of data to be cleaned is greater than the preset value, stop each node in the blockchain and the associated service corresponding to each node.
本领域普通技术人员可以理解实现上述实施例方法中的全部或部分流程,是可以通过计算机可读指令来指令相关的硬件来完成,所述的计算机可读指令可存储于一非易失性计算机可读取存储介质中,该计算机可读指令在执行时,可包括如上述各方法的实施例的流程。本申请所提供的各实施例中所使用的对存储器、存储、数据库或其它介质的任何引用,均可包括非易失性和/或易失性存储器。非易失性存储器可包括只读存储器(ROM)、可编程ROM(PROM)、电可编程ROM(EPROM)、电可擦除可编程ROM(EEPROM)或闪存。易失性存储器可包括随机存取存储器(RAM)或者外部高速缓冲存储器。作为说明而非局限,RAM以多种形式可得,诸如静态RAM(SRAM)、动态RAM(DRAM)、同步DRAM(SDRAM)、双数据率SDRAM(DDRSDRAM)、增强型SDRAM(ESDRAM)、同步链路(Synchlink)DRAM(SLDRAM)、存储器总线(Rambus)直接RAM(RDRAM)、直接存储器总线动态RAM(DRDRAM)、以及存储器总线动态RAM(RDRAM)等。A person of ordinary skill in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be implemented by instructing relevant hardware through computer-readable instructions, which can be stored in a non-volatile computer. In a readable storage medium, when the computer-readable instructions are executed, they may include the processes of the above-mentioned method embodiments. Any reference to memory, storage, database or other media used in the embodiments provided in this application may include non-volatile and/or volatile memory. Non-volatile memory may include read only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM), or flash memory. Volatile memory may include random access memory (RAM) or external cache memory. As an illustration and not a limitation, RAM is available in many forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous chain Channel (Synchlink) DRAM (SLDRAM), memory bus (Rambus) direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM), etc.
以上实施例的各技术特征可以进行任意的组合,为使描述简洁,未对上述实施例中的各个技术特征所有可能的组合都进行描述,然而,只要这些技术特征的组合不存在矛盾,都应当认为是本说明书记载的范围。The technical features of the above embodiments can be combined arbitrarily. In order to make the description concise, all possible combinations of the technical features in the above embodiments are not described. However, as long as there is no contradiction between the combinations of these technical features, they should It is considered as the range described in this specification.
以上所述实施例仅表达了本申请的几种实施方式,其描述较为具体和详细,但并不能因此而理解为对发明专利范围的限制。应当指出的是,对于本领域的普通技术人员来说,在不脱离本申请构思的前提下,还可以做出若干变形和改进,这些都属于本申请的保护范围。因此,本申请专利的保护范围应以所附权利要求为准。The above-mentioned embodiments only express several implementation manners of the present application, and the description is relatively specific and detailed, but it should not be understood as a limitation on the scope of the invention patent. It should be pointed out that for those of ordinary skill in the art, without departing from the concept of this application, several modifications and improvements can be made, and these all fall within the protection scope of this application. Therefore, the scope of protection of the patent of this application shall be subject to the appended claims.