CN110602222B - Blockchain-based joint monitoring method, device and computer storage medium - Google Patents

Blockchain-based joint monitoring method, device and computer storage medium Download PDF

Info

Publication number
CN110602222B
CN110602222B CN201910880697.9A CN201910880697A CN110602222B CN 110602222 B CN110602222 B CN 110602222B CN 201910880697 A CN201910880697 A CN 201910880697A CN 110602222 B CN110602222 B CN 110602222B
Authority
CN
China
Prior art keywords
monitoring system
monitoring
block
group
data
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Expired - Fee Related
Application number
CN201910880697.9A
Other languages
Chinese (zh)
Other versions
CN110602222A (en
Inventor
王强
申子熹
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Tencent Technology Shenzhen Co Ltd
Original Assignee
Tencent Technology Shenzhen Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Tencent Technology Shenzhen Co Ltd filed Critical Tencent Technology Shenzhen Co Ltd
Priority to CN201910880697.9A priority Critical patent/CN110602222B/en
Publication of CN110602222A publication Critical patent/CN110602222A/en
Application granted granted Critical
Publication of CN110602222B publication Critical patent/CN110602222B/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/10Protocols in which an application is distributed across nodes in the network
    • H04L67/104Peer-to-peer [P2P] networks
    • H04L67/1044Group management mechanisms 
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/10Protocols in which an application is distributed across nodes in the network
    • H04L67/1095Replication or mirroring of data, e.g. scheduling or transport for data synchronisation between network nodes
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/10Protocols in which an application is distributed across nodes in the network
    • H04L67/1097Protocols in which an application is distributed across nodes in the network for distributed storage of data in networks, e.g. transport arrangements for network file system [NFS], storage area networks [SAN] or network attached storage [NAS]
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L9/00Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
    • H04L9/06Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols the encryption apparatus using shift registers or memories for block-wise or stream coding, e.g. DES systems or RC4; Hash functions; Pseudorandom sequence generators
    • H04L9/0643Hash functions, e.g. MD5, SHA, HMAC or f9 MAC
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L9/00Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
    • H04L9/08Key distribution or management, e.g. generation, sharing or updating, of cryptographic keys or passwords
    • H04L9/0861Generation of secret information including derivation or calculation of cryptographic keys or passwords
    • H04L9/0869Generation of secret information including derivation or calculation of cryptographic keys or passwords involving random numbers or seeds
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L9/00Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
    • H04L9/32Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols including means for verifying the identity or authority of a user of the system or for message authentication, e.g. authorization, entity authentication, data integrity or data verification, non-repudiation, key authentication or verification of credentials
    • H04L9/3247Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols including means for verifying the identity or authority of a user of the system or for message authentication, e.g. authorization, entity authentication, data integrity or data verification, non-repudiation, key authentication or verification of credentials involving digital signatures
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L9/00Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
    • H04L9/32Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols including means for verifying the identity or authority of a user of the system or for message authentication, e.g. authorization, entity authentication, data integrity or data verification, non-repudiation, key authentication or verification of credentials
    • H04L9/3263Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols including means for verifying the identity or authority of a user of the system or for message authentication, e.g. authorization, entity authentication, data integrity or data verification, non-repudiation, key authentication or verification of credentials involving certificates, e.g. public key certificate [PKC] or attribute certificate [AC]; Public key infrastructure [PKI] arrangements
    • H04L9/3268Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols including means for verifying the identity or authority of a user of the system or for message authentication, e.g. authorization, entity authentication, data integrity or data verification, non-repudiation, key authentication or verification of credentials involving certificates, e.g. public key certificate [PKC] or attribute certificate [AC]; Public key infrastructure [PKI] arrangements using certificate validation, registration, distribution or revocation, e.g. certificate revocation list [CRL]
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L9/00Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
    • H04L9/32Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols including means for verifying the identity or authority of a user of the system or for message authentication, e.g. authorization, entity authentication, data integrity or data verification, non-repudiation, key authentication or verification of credentials
    • H04L9/3297Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols including means for verifying the identity or authority of a user of the system or for message authentication, e.g. authorization, entity authentication, data integrity or data verification, non-repudiation, key authentication or verification of credentials involving time stamps, e.g. generation of time stamps
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/02Protocols based on web technology, e.g. hypertext transfer protocol [HTTP]
    • H04L67/025Protocols based on web technology, e.g. hypertext transfer protocol [HTTP] for remote control or remote monitoring of applications

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Computer Security & Cryptography (AREA)
  • Power Engineering (AREA)
  • Physics & Mathematics (AREA)
  • Computing Systems (AREA)
  • Mathematical Physics (AREA)
  • Theoretical Computer Science (AREA)
  • Alarm Systems (AREA)

Abstract

The application discloses a block chain-based joint monitoring method and device and a computer storage medium, and belongs to the technical field of data processing. The method comprises the following steps: when the first monitoring system monitors an abnormal object, a first block may be generated according to monitoring data indicating a behavior of the abnormal object, the first block is added to a block chain deployed in the first monitoring system, and the first block is synchronized to the second monitoring system, so as to instruct the second monitoring system to track the abnormal object based on the first block. Therefore, the second monitoring system can acquire the monitoring data, which is detected by the first monitoring system and is aimed at the abnormal object, in real time, and the problem that the timeliness of the monitoring data acquired by the second monitoring system is too poor is avoided, so that the effectiveness of the second monitoring system in tracking and monitoring the abnormal object is improved.

Description

基于区块链的联合监控方法、装置及计算机存储介质Blockchain-based joint monitoring method, device and computer storage medium

技术领域technical field

本申请涉及数据处理技术领域,特别涉及一种基于区块链的联合监控方法、装置及计算机存储介质。The present application relates to the technical field of data processing, and in particular, to a blockchain-based joint monitoring method, device and computer storage medium.

背景技术Background technique

目前,为了保证各个区域中的人员的人身安全或财产安全,对于任一区域,通常在该区域中部署一个监控系统,用于采集该区域的监控数据。不同的监控系统之间可以基于各自采集的监控数据实现联合监控。At present, in order to ensure the personal safety or property safety of persons in each area, for any area, a monitoring system is usually deployed in the area to collect monitoring data of the area. Joint monitoring can be achieved between different monitoring systems based on the monitoring data collected by them.

相关技术中,假设第一区域中部署有第一监控系统,第二区域中部署有第二监控系统。第一监控系统可以将采集的监控数据上报给数据中心,数据中心将第一监控系统采集的监控数据下发给第二监控系统。如此,第二监控系统便可根据第一监控系统采集的监控数据对第二区域进行监控,以实现第一监控系统和第二监控系统之间的联合监控。In the related art, it is assumed that the first monitoring system is deployed in the first area, and the second monitoring system is deployed in the second area. The first monitoring system can report the collected monitoring data to the data center, and the data center sends the monitoring data collected by the first monitoring system to the second monitoring system. In this way, the second monitoring system can monitor the second area according to the monitoring data collected by the first monitoring system, so as to realize joint monitoring between the first monitoring system and the second monitoring system.

上述第一监控系统和第二监控系统的联合监控中,第一监控系统需要将采集的监控数据上报给数据中心之后,数据中心后续才将该监控数据下发给第二监控系统,导致第二监控系统获取的监控数据的时效性太低,从而影响第二监控系统的监控有效性。In the above-mentioned joint monitoring of the first monitoring system and the second monitoring system, after the first monitoring system needs to report the collected monitoring data to the data center, the data center will subsequently issue the monitoring data to the second monitoring system, resulting in the second monitoring data. The timeliness of the monitoring data acquired by the monitoring system is too low, thereby affecting the monitoring effectiveness of the second monitoring system.

发明内容SUMMARY OF THE INVENTION

本申请实施例提供了一种基于区块链的联合监控方法、装置及计算机存储介质,可以提高监控系统的监控有效性。所述技术方案如下:The embodiments of the present application provide a blockchain-based joint monitoring method, device, and computer storage medium, which can improve the monitoring effectiveness of the monitoring system. The technical solution is as follows:

一方面,提供了一种基于区块链的联合监控方法,所述方法包括:In one aspect, a blockchain-based joint monitoring method is provided, the method comprising:

当第一监控系统监控到异常对象时,根据监控数据生成第一区块,所述监控数据包括用于指示所述异常对象的行为的数据;When an abnormal object is monitored by the first monitoring system, a first block is generated according to monitoring data, and the monitoring data includes data for indicating the behavior of the abnormal object;

所述第一监控系统将所述第一区块添加至所述第一监控系统中部署的区块链;the first monitoring system adds the first block to a blockchain deployed in the first monitoring system;

所述第一监控系统将所述第一区块同步至第二监控系统,用于指示所述第二监控系统基于所述第一区块对所述异常对象进行追踪,所述第二监控系统是所述第一监控系统之外的监控系统。The first monitoring system synchronizes the first block to the second monitoring system to instruct the second monitoring system to track the abnormal object based on the first block, and the second monitoring system It is a monitoring system other than the first monitoring system.

另一方面,提供了一种基于区块链的联合监控方法,所述方法包括:In another aspect, a blockchain-based joint monitoring method is provided, the method comprising:

第二监控系统接收第一监控系统同步的第一区块,所述第一区块是所述第一监控系统在监控到异常对象时根据监控数据生成的,所述监控数据包括用于指示所述异常对象的行为的数据,所述第二监控系统是所述第一监控系统之外的监控系统;The second monitoring system receives the first block synchronized by the first monitoring system, the first block is generated by the first monitoring system according to monitoring data when an abnormal object is monitored, and the monitoring data the behavior data of the abnormal object, the second monitoring system is a monitoring system other than the first monitoring system;

所述第二监控系统基于所述第一区块对所述异常对象进行追踪。The second monitoring system tracks the abnormal object based on the first block.

另一方面,提供了一种基于区块链的联合监控装置,所述装置包括:In another aspect, a blockchain-based joint monitoring device is provided, the device comprising:

生成模块,用于当第一监控系统监控到异常对象时,根据监控数据生成第一区块,所述监控数据包括用于指示所述异常对象的行为的数据;a generating module, configured to generate a first block according to monitoring data when an abnormal object is monitored by the first monitoring system, and the monitoring data includes data for indicating the behavior of the abnormal object;

添加模块,用于所述第一监控系统将所述第一区块添加至所述第一监控系统中部署的区块链;An adding module is used for the first monitoring system to add the first block to the blockchain deployed in the first monitoring system;

第一同步模块,用于所述第一监控系统将所述第一区块同步至第二监控系统,用于指示所述第二监控系统基于所述第一区块对所述异常对象进行追踪,所述第二监控系统是所述第一监控系统之外的监控系统。A first synchronization module for the first monitoring system to synchronize the first block to the second monitoring system, for instructing the second monitoring system to track the abnormal object based on the first block , the second monitoring system is a monitoring system other than the first monitoring system.

另一方面,一种基于区块链的联合监控装置,所述装置包括:In another aspect, a blockchain-based joint monitoring device, the device includes:

接收模块,用于第二监控系统接收第一监控系统同步的第一区块,所述第一区块是所述第一监控系统在监控到异常对象时根据监控数据生成的,所述监控数据包括用于指示所述异常对象的行为的数据,所述第二监控系统是所述第一监控系统之外的监控系统;The receiving module is used for the second monitoring system to receive the first block synchronized by the first monitoring system, the first block is generated by the first monitoring system according to monitoring data when an abnormal object is monitored, and the monitoring data including data indicative of the behavior of the abnormal object, the second monitoring system being a monitoring system other than the first monitoring system;

追踪模块,用于所述第二监控系统基于所述第一区块对所述异常对象进行追踪。A tracking module, used for the second monitoring system to track the abnormal object based on the first block.

另一方面、提供了一种基于区块链的联合监控装置,所述装置包括处理器和存储器,所述存储器中存储有至少一条指令、至少一段程序、代码集或指令集,所述至少一条指令、所述至少一段程序、所述代码集或所述指令集由所述处理器加载并执行以实现上述任一一方面所述的基于区块链的联合监控方法。In another aspect, a blockchain-based joint monitoring device is provided, the device includes a processor and a memory, wherein the memory stores at least one instruction, at least a piece of program, code set or instruction set, the at least one The instructions, the at least one piece of program, the code set or the instruction set are loaded and executed by the processor to implement the blockchain-based joint monitoring method according to any one of the above aspects.

另一方面、提供了一种计算机存储介质,所述存储介质中存储有至少一条指令、至少一段程序、代码集或指令集,所述至少一条指令、所述至少一段程序、所述代码集或所述指令集由处理器加载并执行以实现上述任一一方面所述的基于区块链的联合监控方法。In another aspect, a computer storage medium is provided, wherein the storage medium stores at least one instruction, at least one piece of program, code set or instruction set, the at least one instruction, the at least one piece of program, the code set or the The instruction set is loaded and executed by the processor to implement the blockchain-based joint monitoring method described in any one of the above aspects.

本申请实施例提供的技术方案带来的有益效果至少包括:The beneficial effects brought by the technical solutions provided in the embodiments of the present application include at least:

在本申请实施例中,当第一监控系统监控到异常对象时,可以根据用于指示该异常对象的行为的监控数据生成第一区块,将第一区块添加至第一监控系统中部署的区块链,并将第一区块同步至第二监控系统,用于指示第二监控系统基于第一区块对该异常对象进行追踪。如此,第二监控系统可以实时获取第一监控系统检测到的针对异常对象的监控数据,避免了第二监控系统获取的监控数据的时效性太差,从而也就提高了第二监控系统对异常对象进行追踪监控的有效性。In this embodiment of the present application, when an abnormal object is monitored by the first monitoring system, a first block may be generated according to monitoring data used to indicate the behavior of the abnormal object, and the first block may be added to the first monitoring system for deployment and synchronize the first block to the second monitoring system to instruct the second monitoring system to track the abnormal object based on the first block. In this way, the second monitoring system can acquire the monitoring data for abnormal objects detected by the first monitoring system in real time, which avoids the poor timeliness of the monitoring data acquired by the second monitoring system, thereby improving the second monitoring system's ability to detect abnormal objects. The effectiveness of tracking and monitoring of objects.

附图说明Description of drawings

为了更清楚地说明本申请实施例中的技术方案,下面将对实施例描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本申请的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。In order to illustrate the technical solutions in the embodiments of the present application more clearly, the following briefly introduces the drawings that are used in the description of 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 also be obtained from these drawings without creative effort.

图1是根据本申请实施例提供的一种数据共享系统示意图;1 is a schematic diagram of a data sharing system provided according to an embodiment of the present application;

图2是根据本申请实施例提供的一种区块链的示意图;FIG. 2 is a schematic diagram of a blockchain provided according to an embodiment of the present application;

图3是根据本申请实施例提供的一种生成区块的过程示意图;3 is a schematic diagram of a process for generating a block according to an embodiment of the present application;

图4是根据本申请实施例提供的一种区块链节点的注册方法流程图;4 is a flowchart of a method for registering a blockchain node according to an embodiment of the present application;

图5是本申请实施例提供的一种群组示意图;5 is a schematic diagram of a group provided by an embodiment of the present application;

图6是本申请实施例提供的一种多个监控系统进行注册的流程示意图;FIG. 6 is a schematic flowchart of a plurality of monitoring systems for registration provided by an embodiment of the present application;

图7是本申请实施例提供的一种基于区块链的联合监控方法流程图;7 is a flowchart of a blockchain-based joint monitoring method provided by an embodiment of the present application;

图8是本申请实施例提供的一种多个监控系统进行数据共享的流程示意图;8 is a schematic flowchart of data sharing by a plurality of monitoring systems provided by an embodiment of the present application;

图9是本申请实施例提供的另一种基于区块链的联合监控方法流程图;9 is a flowchart of another blockchain-based joint monitoring method provided by an embodiment of the present application;

图10是本申请实施例提供的一种基于区块链的联合监控装置的结构示意图;10 is a schematic structural diagram of a blockchain-based joint monitoring device provided by an embodiment of the present application;

图11是本申请实施例提供的另一种基于区块链的联合监控装置的结构示意图;11 is a schematic structural diagram of another blockchain-based joint monitoring device provided by an embodiment of the present application;

图12是本申请实施例提供的另一种基于区块链的联合监控装置的结构示意图。FIG. 12 is a schematic structural diagram of another blockchain-based joint monitoring device provided by an embodiment of the present application.

具体实施方式Detailed ways

为使本申请的目的、技术方案和优点更加清楚,下面将结合附图对本申请实施方式作进一步地详细描述。In order to make the objectives, technical solutions and advantages of the present application clearer, the embodiments of the present application will be further described in detail below with reference to the accompanying drawings.

应当理解的是,本文提及的“多个”是指两个或两个以上。在本申请的描述中,除非另有说明,“/”表示或的意思,例如,A/B可以表示A或B;本文中的“和/或”仅仅是一种描述关联对象的关联关系,表示可以存在三种关系,例如,A和/或B,可以表示:单独存在A,同时存在A和B,单独存在B这三种情况。另外,为了便于清楚描述本申请实施例的技术方案,在本申请的实施例中,采用了“第一”、“第二”等字样对功能和作用基本相同的相同项或相似项进行区分。本领域技术人员可以理解“第一”、“第二”等字样并不对数量和执行次序进行限定,并且“第一”、“第二”等字样也并不限定一定不同。It should be understood that references herein to "a plurality" means two or more. In the description of this application, unless otherwise specified, "/" means or means, for example, A/B can mean A or B; "and/or" in this text is only a relationship to describe the related objects, Indicates that three relationships can exist, for example, A and/or B, can represent: A alone exists, A and B exist at the same time, and B exists alone. In addition, in order to clearly describe the technical solutions of the embodiments of the present application, in the embodiments of the present application, words such as "first" and "second" are used to distinguish the same or similar items with basically the same function and effect. Those skilled in the art can understand that the words "first", "second" and the like do not limit the quantity and execution order, and the words "first", "second" and the like are not necessarily different.

在对本申请实施例提供的基于区块链的联合监控方法进行解释说明之前,先对区块链的相关内容进行解释说明。Before explaining the blockchain-based joint monitoring method provided by the embodiments of this application, the relevant content of the blockchain is explained first.

图1是本申请实施例提供的一种数据共享系统。数据共享系统100是指用于进行节点与节点之间数据共享的系统,该数据共享系统100中可以包括多个节点101,多个节点101可以是指数据共享系统中各个客户端。每个节点101在进行正常工作可以接收到输入信息,并基于接收到的输入信息维护该数据共享系统100内的共享数据。为了保证数据共享系统100内的信息互通,数据共享系统100中的每个节点101之间可以存在信息连接,节点101之间可以通过上述信息连接进行信息传输。例如,当数据共享系统100中的任意节点101接收到输入信息时,数据共享系统100中的其他节点101便根据共识算法获取该输入信息,将该输入信息作为共享数据中的数据进行存储,使得数据共享系统100中全部节点101上存储的数据均一致。FIG. 1 is a data sharing system provided by an embodiment of the present application. The data sharing system 100 refers to a system for sharing data between nodes. The data sharing system 100 may include multiple nodes 101, and the multiple nodes 101 may refer to each client in the data sharing system. Each node 101 can receive input information during normal operation, and maintain the shared data in the data sharing system 100 based on the received input information. In order to ensure the information exchange in the data sharing system 100, an information connection may exist between each node 101 in the data sharing system 100, and information transmission may be performed between the nodes 101 through the above-mentioned information connection. For example, when any node 101 in the data sharing system 100 receives input information, other nodes 101 in the data sharing system 100 obtain the input information according to the consensus algorithm, and store the input information as data in the shared data, so that The data stored on all nodes 101 in the data sharing system 100 are consistent.

对于数据共享系统100中的每个节点101,均具有与其对应的节点标识,而且数据共享系统100中的每个节点101均可以存储有数据共享系统100中其他节点101的节点标识,以便后续根据其他节点101的节点标识,将生成的区块广播至数据共享系统100中的其他节点101。每个节点101中可维护一个如下表所示的节点标识列表,将节点名称和节点标识对应存储至该节点标识列表中。其中,节点标识可为IP(Internet Protocol,网络之间互联的协议)地址以及其他任一种能够用于标识该节点的信息,表1中仅以IP地址为例进行说明。Each node 101 in the data sharing system 100 has a corresponding node identifier, and each node 101 in the data sharing system 100 can store the node identifiers of other nodes 101 in the data sharing system 100 for subsequent Node identifiers of other nodes 101 , and broadcast the generated block to other nodes 101 in the data sharing system 100 . Each node 101 may maintain a node identification list as shown in the following table, and store the node name and the node identification in the node identification list correspondingly. The node identifier may be an IP (Internet Protocol, protocol for interconnection between networks) address and any other information that can be used to identify the node. Table 1 only takes the IP address as an example for description.

表1Table 1

节点名称node name 节点标识Node ID 节点1Node 1 117.114.151.174117.114.151.174 节点2Node 2 117.116.189.145117.116.189.145 节点NNode N 119.123.789.258119.123.789.258

数据共享系统100中的每个节点均101存储一条相同的区块链。区块链由多个区块组成,参见图2,区块链由多个区块组成,创始块中包括区块头和区块主体,区块头中存储有输入信息特征值、版本号、时间戳和难度值,区块主体中存储有输入信息;创始块的下一区块以创始块为父区块,下一区块中同样包括区块头和区块主体,区块头中存储有当前区块的输入信息特征值、父区块的区块头特征值、版本号、时间戳和难度值,并以此类推,使得区块链中每个区块中存储的区块数据均与父区块中存储的区块数据存在关联,保证了区块中输入信息的安全性。Each node 101 in the data sharing system 100 stores an identical blockchain. The blockchain consists of multiple blocks, see Figure 2, the blockchain consists of multiple blocks, the founding block includes the block header and the block body, and the block header stores the input information feature value, version number, timestamp and difficulty value, the input information is stored in the block body; the next block of the genesis block takes the genesis block as the parent block, the next block also includes the block header and the block body, and the block header stores the current block The characteristic value of input information, the characteristic value of the block header of the parent block, the version number, the timestamp and the difficulty value, and so on, so that the block data stored in each block in the blockchain is the same as that in the parent block. The stored block data is associated, which ensures the security of the input information in the block.

在生成区块链中的各个区块时,参见图3,区块链所在的节点101在接收到输入信息时,对输入信息进行校验,完成校验后,将输入信息存储至内存池中,并更新其用于记录输入信息的哈希树;之后,将更新时间戳更新为接收到输入信息的时间,并尝试不同的随机数,多次进行特征值计算,使得计算得到的特征值可以满足下述公式:When generating each block in the blockchain, referring to FIG. 3 , when the node 101 where the blockchain is located receives the input information, it verifies the input information, and after the verification is completed, the input information is stored in the memory pool , and update the hash tree used to record the input information; after that, update the update timestamp to the time when the input information was received, and try different random numbers, and perform the eigenvalue calculation multiple times, so that the calculated eigenvalues can be Satisfy the following formula:

SHA256(SHA256(version+prev_hash+merkle_root+ntime+nbits+x))<TARGETSHA256(SHA256(version+prev_hash+merkle_root+ntime+nbits+x))<TARGET

其中,SHA256为计算特征值所用的特征值算法;version(版本号)为区块链中相关区块协议的版本信息;prev_hash为当前区块的父区块的区块头特征值;merkle_root为输入信息的特征值;ntime为更新时间戳的更新时间;nbits为当前难度,在一段时间内为定值,并在超出固定时间段后再次进行确定;x为随机数;TARGET为特征值阈值,该特征值阈值可以根据nbits确定得到。Among them, SHA256 is the eigenvalue algorithm used to calculate the eigenvalue; version (version number) is the version information of the relevant block protocol in the blockchain; prev_hash is the block header eigenvalue of the parent block of the current block; merkle_root is the input information The characteristic value of ; ntime is the update time of the update timestamp; nbits is the current difficulty, which is a fixed value within a period of time, and is determined again after a fixed period of time; x is a random number; TARGET is the characteristic value threshold, the characteristic value of The value threshold can be determined according to nbits.

这样,当计算得到满足上述公式的随机数时,便可将信息对应存储,生成区块头和区块主体,得到当前区块。随后,区块链所在节点根据数据共享系统中其他节点的节点标识,将新生成的区块分别发送给其所在的数据共享系统中的其他节点,由其他节点对新生成的区块进行校验,并在完成校验后将新生成的区块添加至其存储的区块链中。In this way, when the random number satisfying the above formula is obtained by calculation, the information can be stored correspondingly, the block header and the block body can be generated, and the current block can be obtained. Subsequently, the node where the blockchain is located sends the newly generated block to other nodes in the data sharing system where it is located according to the node identifiers of other nodes in the data sharing system, and the newly generated block is verified by other nodes. , and add the newly generated block to its stored blockchain after verification is complete.

本申请实施例提供的基于区块链的联合监控方法就应用于上述数据共享系统,图1中的每个节点可以为本申请实施例提供的监控系统,也即是,本申请实施例通过图1所示的数据共享系统来实现监控数据在各个监控系统上的实时共享。The blockchain-based joint monitoring method provided by the embodiment of the present application is applied to the above-mentioned data sharing system, and each node in FIG. 1 can be the monitoring system provided by the embodiment of the present application. The data sharing system shown in 1 is used to realize the real-time sharing of monitoring data on each monitoring system.

为了使得各个监控系统能够通过图1所示的数据共享系统来实现监控数据的实时共享,各个监控系统预先需要注册为图1所示的数据共享系统中的各个节点,也即是区块链节点。下面对监控系统注册区块链节点的过程进行解释说明。In order to enable each monitoring system to realize real-time sharing of monitoring data through the data sharing system shown in Figure 1, each monitoring system needs to be registered in advance as each node in the data sharing system shown in Figure 1, that is, a blockchain node . The following explains the process of registering blockchain nodes in the monitoring system.

图4是本申请实施例提供的一种区块链节点的注册方法流程图。如图4所示,该方法包括如下步骤:FIG. 4 is a flowchart of a method for registering a blockchain node provided by an embodiment of the present application. As shown in Figure 4, the method includes the following steps:

步骤401:第一监控系统向数据中心发送区块链注册请求。Step 401: The first monitoring system sends a blockchain registration request to the data center.

第一监控系统为任一需要为注册区块链节点的监控系统。在本申请实施例中,监控系统可以为在任意区域对应的监控机构中的部署的监控服务器。该监控系统用于监控相应区域内的异常对象,并在监控出异常对象时将异常对象的相关监控数据实时共享至数据共享系统中的其他监控系统,以使其他监控监控系统能够快速根据该监控数据实现联合监控。The first monitoring system is any monitoring system that needs to be a registered blockchain node. In this embodiment of the present application, the monitoring system may be a monitoring server deployed in a monitoring organization corresponding to any area. The monitoring system is used to monitor the abnormal objects in the corresponding area, and when monitoring the abnormal objects, the related monitoring data of the abnormal objects are shared to other monitoring systems in the data sharing system in real time, so that other monitoring and monitoring systems can quickly follow the monitoring Data realizes joint monitoring.

数据中心是指统一对各个区块链节点进行管理的服务器,各个监控系统可以通过数据中心注册为一个区块链节点。因此,当第一监控系统需要通过图1所示的数据共享系统进行监控数据的实时共享时,第一监控系统需先向数据中心发送区块链注册请求。The data center refers to the server that uniformly manages each blockchain node, and each monitoring system can be registered as a blockchain node through the data center. Therefore, when the first monitoring system needs to share the monitoring data in real time through the data sharing system shown in FIG. 1 , the first monitoring system needs to send a blockchain registration request to the data center first.

该区块链注册请求可以携带第一监控系统的机构编码、机构级别以及时间等信息。其中,机构编码用于唯一标识第一监控系统所对应的机构,机构级别用于指示第一监控系统所对应的机构的重要等级,时间用于指示当前注册区块链的时间。The blockchain registration request may carry information such as the institution code, institution level, and time of the first monitoring system. Wherein, the institution code is used to uniquely identify the institution corresponding to the first monitoring system, the institution level is used to indicate the importance level of the institution corresponding to the first monitoring system, and the time is used to indicate the time when the blockchain is currently registered.

步骤402:数据中心根据该区块链注册请求确定注册响应消息,并向第一监控系统发送该注册响应消息,注册响应消息携带证书、第一证书公钥和第一证书私钥,证书用于指示第一监控系统已注册为一个区块链节点。Step 402: The data center determines a registration response message according to the blockchain registration request, and sends the registration response message to the first monitoring system. The registration response message carries the certificate, the first certificate public key and the first certificate private key, and the certificate is used for Indicates that the first monitoring system has registered as a blockchain node.

当数据中心根据该区块链注册请求确定第一监控系统符合区块链节点的各项要求之后,便可为第一监控系统分配一个证书、第一证书公钥和第一证书私钥,并基于分配的证书、第一证书公钥和第一证书私钥生成注册响应消息,以便于向第一监控系统返回该注册响应消息。After the data center determines that the first monitoring system meets the requirements of the blockchain node according to the blockchain registration request, it can assign a certificate, the first certificate public key and the first certificate private key to the first monitoring system, and A registration response message is generated based on the assigned certificate, the first certificate public key and the first certificate private key, so as to return the registration response message to the first monitoring system.

其中,分配的证书用于指示第一监控系统已注册为一个区块链节点。并且,该证书还用于标识第一监控系统,以便于后续其他监控监控通过该证书识别第一监控系统。The assigned certificate is used to indicate that the first monitoring system has been registered as a blockchain node. In addition, the certificate is also used to identify the first monitoring system, so that subsequent monitoring and monitoring can identify the first monitoring system through the certificate.

第一证书私钥和第一证书公钥是数据中心为第一监控系统配置的一对密钥。第一证书公钥和第一证书私钥是为了便于保护第一监控系统共享的数据的私密性,关于第一证书公钥和第一证书私钥的功能将在下述共享数据的过程进行详细解释说明,在此先不展开说明。The first certificate private key and the first certificate public key are a pair of keys configured by the data center for the first monitoring system. The first certificate public key and the first certificate private key are used to protect the privacy of the data shared by the first monitoring system. The functions of the first certificate public key and the first certificate private key will be explained in detail in the process of sharing data below. Description, will not expand the description here.

此外,由于不同的监控系统所对应的机构的重要级别不同,这样某个监控系统的监控数据可能只局限于少量的其他监控系统之间进行共享,而不能在全局范围内进行共享。因此,在本申请实施例中,数据中心还可以根据区块链注册请求中携带的第一监控系统的机构级别,为第一监控系统设置群组,这样第一监控系统可以将监控数据共享在指定群组内,避免了某些敏感监控数据在全局内共享。In addition, due to the different importance levels of organizations corresponding to different monitoring systems, the monitoring data of a certain monitoring system may be limited to be shared among a small number of other monitoring systems, but cannot be shared globally. Therefore, in this embodiment of the present application, the data center can also set up groups for the first monitoring system according to the institutional level of the first monitoring system carried in the blockchain registration request, so that the first monitoring system can share the monitoring data in Within a designated group, some sensitive monitoring data is avoided from being shared globally.

在一种可能的实现方式中,数据中心可以根据第一监控系统的机构级别,确定第一监控系统所处的一个或多个群组,以及每个群组允许共享的监控数据对应的异常对象的行为类型。此时,数据中心生成的注册响应消息相应地携带第一监控系统所处的一个或多个群组中每个群组的标识、以及每个群组中允许共享的监控数据对应的异常对象的行为类型。In a possible implementation manner, the data center may, according to the institutional level of the first monitoring system, determine one or more groups where the first monitoring system is located, and the abnormal objects corresponding to the monitoring data allowed to be shared by each group type of behavior. At this time, the registration response message generated by the data center correspondingly carries the identity of each group in the one or more groups where the first monitoring system is located, and the identity of the abnormal object corresponding to the monitoring data allowed to be shared in each group. type of behavior.

此外,数据中心可以预先根据各个监控系统的机构级别,将所有的监控系统进行分组,如此,当数据中心接收到区块链注册请求时,便可直接根据第一监控系统的机构级别,获取第一监控系统所处的一个或多个群组。In addition, the data center can group all monitoring systems in advance according to the institutional level of each monitoring system. In this way, when the data center receives a blockchain registration request, it can directly obtain the first monitoring system based on the institutional level of the first monitoring system. One or more groups in which a monitoring system resides.

比如,图5是本申请实施例提供的一种群组示意图。如图5所示,数据中心可以预先将监控系统A、监控系统B、监控系统C以及监控系统D划分为群组1,将监控系统B、监控系统C以及监控系统D划分为群组2。群组1用于共享一种行为类型的监控数据,群组2用于共享另一种行为类型的监控数据。For example, FIG. 5 is a schematic diagram of a group provided by an embodiment of the present application. As shown in FIG. 5 , the data center may divide monitoring system A, monitoring system B, monitoring system C and monitoring system D into group 1 in advance, and divide monitoring system B, monitoring system C and monitoring system D into group 2 in advance. Group 1 is used to share monitoring data of one behavior type, and group 2 is used to share monitoring data of another behavior type.

基于图5所示的群组示意图,当数据中心接收到监控系统B发送的区块链注册请求时,此时数据中心向监控系统B反馈的注册响应消息中携带群组1的标识和群组2的标识,以及群组1中允许共享的监控数据对应的异常对象的行为类型,和群组2中允许共享的监控数据对应的异常对象的行为类型。Based on the schematic diagram of the group shown in Figure 5, when the data center receives the blockchain registration request sent by the monitoring system B, the registration response message fed back by the data center to the monitoring system B carries the identity of the group 1 and the group 2, and the behavior type of the abnormal object corresponding to the monitoring data allowed to be shared in group 1, and the behavior type of the abnormal object corresponding to the monitoring data allowed to be shared in group 2.

当数据中心接收到监控系统A发送的区块链注册请求时,此时数据中心向监控系统A反馈的注册响应消息中仅携带群组1的标识,以及群组1中允许共享的监控数据对应的异常对象的行为类型。When the data center receives the blockchain registration request sent by monitoring system A, the registration response message fed back by the data center to monitoring system A only carries the identifier of group 1, and the corresponding monitoring data allowed to be shared in group 1 The behavior type of the exception object.

在应用本申请实施例提供的基于区块链的联合监控方法时,由于某些异常对象的行为类型指示的监控数据的敏感程度较高,某些异常对象的行为类型指示的监控数据的敏感程度较较低,而不同敏感程度的监控数据也需要在不同的群组内共享,以进一步提高监控数据的私密性。因此,在本申请实施例中,可以针对第一监控系统配置多个群组,然后针对每个群组设置该群组中允许共享的监控数据对应的异常对象的行为类型,如此,第一监控系统便可将不同的监控数据共享在不同的群组,提高了联合监控的灵活性。When applying the blockchain-based joint monitoring method provided by the embodiments of the present application, since the monitoring data indicated by the behavior types of some abnormal objects are highly sensitive, the monitoring data indicated by the behavior types of some abnormal objects are more sensitive. It is relatively low, and monitoring data with different degrees of sensitivity also needs to be shared in different groups to further improve the privacy of monitoring data. Therefore, in this embodiment of the present application, multiple groups may be configured for the first monitoring system, and then the behavior types of the abnormal objects corresponding to the monitoring data allowed to be shared in the group are set for each group. In this way, the first monitoring system The system can share different monitoring data in different groups, improving the flexibility of joint monitoring.

也即是,在本申请实施例中,通过群组的配置可以将区块链的实时共享特性应用在全局监控系统中,在保证了监控数据的实时共享的效果下,还可以通过不同的群组,使得监控数据在较小范围内使用,保障了某些监控数据的私密性。That is, in the embodiment of the present application, the real-time sharing feature of the blockchain can be applied to the global monitoring system through the configuration of groups, and under the effect of ensuring the real-time sharing of monitoring data, different groups group, so that the monitoring data can be used in a small range, and the privacy of some monitoring data is guaranteed.

步骤403:第一监控系统接收该注册响应消息。Step 403: The first monitoring system receives the registration response message.

当数据中心通过步骤402生成注册响应消息之后,数据中心便可将生成的注册相应消息反馈给第一监控系统。通过该注册响应消息,第一监控系统确定自身已经注册为一个区块链节点,如此,第一监控系统便可通过图1所示的数据共享系统来进行监控数据的共享。After the data center generates the registration response message in step 402, the data center may feed back the generated registration response message to the first monitoring system. Through the registration response message, the first monitoring system determines that it has been registered as a blockchain node. In this way, the first monitoring system can share the monitoring data through the data sharing system shown in FIG. 1 .

步骤404:第一监控系统将第一证书公钥同步至第二监控系统。Step 404: The first monitoring system synchronizes the public key of the first certificate to the second monitoring system.

在区块链技术中,任一区块链节点发布的区块,其他区块链节点需要通过证书公钥对该区块进行校验之后才能将其加入自身的区块链。因此,当第一监控系统接收到注册响应消息后,需要将第一证书公钥同步至第二监控系统,也即是,将第一证书公钥发布在图1所示的数据共享系统中,以便于数据共享系统中的第二监控系统根据第一证书公钥对第一监控系统发布的区块进行校验。In the blockchain technology, the block published by any blockchain node, other blockchain nodes need to verify the block with the public key of the certificate before adding it to their own blockchain. Therefore, after the first monitoring system receives the registration response message, it needs to synchronize the public key of the first certificate to the second monitoring system, that is, publish the public key of the first certificate in the data sharing system shown in FIG. 1 , In order to facilitate the second monitoring system in the data sharing system to verify the block issued by the first monitoring system according to the public key of the first certificate.

另外,如果其他监控系统中预先没有存储第一监控系统的标识,第一监控系统还可以将注册响应消息中的证书也同步至第二监控系统,以便于第二监控系统基于该证书对第一监控系统进行识别。In addition, if the identification of the first monitoring system is not pre-stored in other monitoring systems, the first monitoring system may also synchronize the certificate in the registration response message to the second monitoring system, so that the second monitoring system can identify the first monitoring system based on the certificate. monitoring system for identification.

上述步骤401至步骤404是以第一监控系统为例来说明监控系统的区块链注册过程,其他的监控系统的区块链注册流程均可以参考上述步骤401至步骤404,在此不再详细说明。The above steps 401 to 404 take the first monitoring system as an example to illustrate the blockchain registration process of the monitoring system. For the blockchain registration processes of other monitoring systems, reference can be made to the above steps 401 to 404, which will not be detailed here. illustrate.

图6是本申请实施例提供的一种多个监控系统进行注册的流程示意图。假设当前存在三个监控系统,分别标记为监控系统A、监控系统B以及监控系统C,监控系统A和监控系统B位于一个群组,监控系统B和监控系统C位于一个群组。如图6所示,监控系统A、监控系统B以及监控系统C可以分别向数据中心发起注册流程,该注册流程可以通过上述步骤401来实现。数据中心分别向监控系统A、监控系统B以及监控系统C下发证书以及一对密钥。然后监控系统A将自身的证书及证书公钥同步至所处的一个群组内,监控系统B将证书自身的证书及证书公钥同步至所处的两个群组内,监控系统C将证书自身的证书及证书公钥同步至所处的两个群组内。FIG. 6 is a schematic flowchart of registration with multiple monitoring systems provided by an embodiment of the present application. Assuming that there are currently three monitoring systems, labeled as monitoring system A, monitoring system B, and monitoring system C, monitoring system A and monitoring system B are in a group, and monitoring system B and monitoring system C are in a group. As shown in FIG. 6 , the monitoring system A, the monitoring system B, and the monitoring system C can respectively initiate a registration process to the data center, and the registration process can be implemented by the above step 401 . The data center issues certificates and a pair of keys to monitoring system A, monitoring system B, and monitoring system C respectively. Then monitoring system A synchronizes its own certificate and certificate public key to one group, monitoring system B synchronizes the certificate's own certificate and certificate public key to the two groups it is located in, and monitoring system C synchronizes the certificate Its own certificate and certificate public key are synchronized to the two groups where it is located.

在基于图6所示的注册流程完成区块链节点的注册之后,监控系统A、监控系统B以及监控系统C便可通过下述基于区块链的联合监控方法进行联合监控。After completing the registration of blockchain nodes based on the registration process shown in Figure 6, monitoring system A, monitoring system B, and monitoring system C can perform joint monitoring through the following blockchain-based joint monitoring method.

在本申请实施例中,监控系统可以通过数据中心注册为一个区块链节点,以便于后续与其他区块链节点实现本申请实施例提供的基于区块链的联合监控方法,从而提高联合监控的有效性。In the embodiment of the present application, the monitoring system can be registered as a blockchain node through the data center, so that the joint monitoring method based on the blockchain provided by the embodiment of the present application can be implemented with other blockchain nodes in the future, thereby improving joint monitoring. effectiveness.

图7是本申请实施例提供的一种基于区块链的联合监控方法流程图。如图7所示,该方法包括如下步骤:FIG. 7 is a flowchart of a blockchain-based joint monitoring method provided by an embodiment of the present application. As shown in Figure 7, the method includes the following steps:

步骤701:当第一监控系统监控到异常对象时,根据监控数据生成第一区块,监控数据包括用于指示异常对象的行为的数据。Step 701: When an abnormal object is monitored by the first monitoring system, a first block is generated according to the monitoring data, and the monitoring data includes data used to indicate the behavior of the abnormal object.

在一种可能的实现方式中,第一监控系统可以通过WIFI(Wireless Fidelity,无线保真)探针的方式来检测异常对象。第一监控系统对所监控区域内的数据流量进行监控,当检测到某个流量对应的终端的MAC(Media Access Control Address,媒体访问控制地址)为预先设置的MAC黑名单中的MAC时,确定监控到异常对象,然后通过基站定位等技术手段来定位该异常对象的位置信息。在定位出该异常对象的位置信息之后,控制部署在该位置信息处的摄像头采集该异常对象的视频数据。第一监控系统对该视频数据进行识别,分析中视频数据中用于指示异常对象的行为的数据,比如,标记视频数据中该异常对象的人脸信息以及异常行为信息等,将分析之后的视频数据作为针对该异常对象的监控数据。In a possible implementation manner, the first monitoring system may detect abnormal objects by means of a WIFI (Wireless Fidelity, wireless fidelity) probe. The first monitoring system monitors the data traffic in the monitored area, and when detecting that the MAC (Media Access Control Address, media access control address) of the terminal corresponding to a certain traffic is the MAC in the preset MAC blacklist, determine The abnormal object is monitored, and then the location information of the abnormal object is located by technical means such as base station positioning. After the location information of the abnormal object is located, the camera deployed at the location information is controlled to collect video data of the abnormal object. The first monitoring system identifies the video data, analyzes the data used to indicate the behavior of the abnormal object in the video data, for example, marks the face information and abnormal behavior information of the abnormal object in the video data, and analyzes the video data after the analysis. The data is used as monitoring data for the abnormal object.

可选地,第一监控系统还可以通过其他方式来检测异常对象,比如,可以通过语音监听或人脸识别等技术来检测异常对象,本申请实施例对此不做具体限定。Optionally, the first monitoring system can also detect abnormal objects in other ways, for example, can detect abnormal objects through technologies such as voice monitoring or face recognition, which is not specifically limited in this embodiment of the present application.

当第一监控系统监控到异常对象时,为了能够实现监控数据的实时共享,从而提高联合监控的有效性,第一监控系统将根据监控数据生成第一区块,以便于通过下述步骤702通过第一区块将监控数据实时共享给其他监控系统。When the first monitoring system monitors an abnormal object, in order to realize real-time sharing of monitoring data, thereby improving the effectiveness of joint monitoring, the first monitoring system will generate a first block according to the monitoring data, so as to pass the following step 702. The first block shares monitoring data with other monitoring systems in real time.

步骤702:第一监控系统将第一区块添加至第一监控系统中部署的区块链。Step 702: The first monitoring system adds the first block to the blockchain deployed in the first monitoring system.

在一种可能的实现方式中,若各个监控系统之间是在全局范围内共享数据,那么所有监控系统中部署的是同一条区块链,此时,第一监控系统可将第一区块直接添加至第一监控系统中部署的区块链即可。In a possible implementation, if the monitoring systems share data on a global scale, then the same blockchain is deployed in all monitoring systems. At this time, the first monitoring system can transfer the first block It can be directly added to the blockchain deployed in the first monitoring system.

在另一种可能的实现方式中,由图4所示的实施例可知,为了避免部分敏感监控数据的全局共享而导致重要信息泄露,第一监控系统可以处于一个或多个群组,第一监控系统中部署有一个或多个区块链,一个或多个区块链与一个或多个群组一一对应。此时步骤702的实现方式可以为:第一监控系统根据异常对象的行为类型,从一个或多个群组中,确定允许共享监控数据的群组,得到第一群组,第一群组中包括多个监控系统,第二监控系统是多个监控系统中除第一监控系统之外的监控系统;第一监控系统将第一区块添加至与第一群组对应的区块链。如此,第一监控系统获取的监控数据便可只共享在第一群组这个范围,而不是在全局范围内进行共享。In another possible implementation, it can be known from the embodiment shown in FIG. 4 that, in order to avoid the leakage of important information caused by the global sharing of some sensitive monitoring data, the first monitoring system may be in one or more groups, and the first monitoring system may be in one or more groups. One or more blockchains are deployed in the monitoring system, and one or more blockchains are in one-to-one correspondence with one or more groups. At this time, the implementation of step 702 may be as follows: the first monitoring system determines a group that is allowed to share monitoring data from one or more groups according to the behavior type of the abnormal object, and obtains the first group, which is in the first group. A plurality of monitoring systems are included, and the second monitoring system is a monitoring system other than the first monitoring system among the plurality of monitoring systems; the first monitoring system adds the first block to the blockchain corresponding to the first group. In this way, the monitoring data acquired by the first monitoring system can be shared only in the scope of the first group, rather than in the global scope.

由于第一监控系统在注册区块链过程中获取的注册响应消息携带第一监控系统所处的一个或多个群组中每个群组的标识、以及每个群组中允许共享的监控数据对应的异常对象的行为类型。因此,第一监控系统在获取到监控数据后,便可根据监控数据中用于指示异常对象的行为的类型从一个或多个群组中,确定允许共享监控数据的群组,得到第一群组。在此不再详细说明。Because the registration response message obtained by the first monitoring system in the process of registering the blockchain carries the identification of each group in one or more groups where the first monitoring system is located, and the monitoring data allowed to be shared in each group The behavior type of the corresponding exception object. Therefore, after acquiring the monitoring data, the first monitoring system can determine the groups that are allowed to share the monitoring data from one or more groups according to the type of behavior in the monitoring data used to indicate the abnormal object, and obtain the first group Group. It will not be described in detail here.

比如,第一监控系统处于三个群组中,分别标记为群组1、群组2和群组3。第一监控系统中部署于有与群组1对应的第一区块链,与群组2对应的第二区块链,与群组3对应的第三区块链。群组1用于共享指示的异常对象的行为类型为第一类行为的监控数据,群组2用于共享指示的异常对象的行为类型为第二类行为的监控数据,群组3用于共享指示的异常对象的行为类型为第三类行为的监控数据。其中,第一类行为、第二类行为、第三类行为可以预先设置,本申请并不限定行为类型的分类方式。For example, the first monitoring system is in three groups, which are marked as group 1, group 2, and group 3, respectively. The first monitoring system is deployed with a first blockchain corresponding to group 1, a second blockchain corresponding to group 2, and a third blockchain corresponding to group 3. Group 1 is used to share the monitoring data whose behavior type of the indicated abnormal object is the first type of behavior, group 2 is used to share the monitoring data that the indicated behavior type of the abnormal object is the second type of behavior, and group 3 is used to share the monitoring data of the second type of behavior. The behavior type of the indicated abnormal object is the monitoring data of the third type of behavior. Among them, the first type of behavior, the second type of behavior, and the third type of behavior can be preset, and the present application does not limit the classification method of the behavior types.

当第一监控系统当前获取的监控数据中指示的异常对象的行为类型为第二类行为时,此时,第一监控系统便可将生成的第一区块添加至第二区块链即可。When the behavior type of the abnormal object indicated in the monitoring data currently obtained by the first monitoring system is the second type of behavior, at this time, the first monitoring system can add the generated first block to the second blockchain. .

第一监控系统通过步骤702可以实现将监控数据实时上链,以便于后续对该监控数据进行查询。此外,第一监控系统在获取到监控数据时,除了通过区块链进行监控数据共享之外,第一监控系统还可以根据该监控数据对该异常对象采取一系列措施,比如,根据该监控数据进行报警,以便于相关人员对该异常对象进行后续处理。The first monitoring system can realize real-time uploading of monitoring data to the chain through step 702, so as to facilitate subsequent query of the monitoring data. In addition, when the first monitoring system acquires the monitoring data, in addition to sharing the monitoring data through the blockchain, the first monitoring system can also take a series of measures for the abnormal object according to the monitoring data, for example, according to the monitoring data Make an alarm to facilitate the follow-up processing of the abnormal object by the relevant personnel.

步骤703:第一监控系统将第一区块同步至第二监控系统,第二监控系统是第一监控系统之外的监控系统。Step 703: The first monitoring system synchronizes the first block to the second monitoring system, and the second monitoring system is a monitoring system other than the first monitoring system.

基于步骤702的一种可能的实现方式中,若各个监控系统之间是在全局范围内共享数据,此时,第二监控系统就是图1所示的数据共享系统中的所有其他监控系统。In a possible implementation manner based on step 702, if the monitoring systems share data globally, at this time, the second monitoring system is all other monitoring systems in the data sharing system shown in FIG. 1 .

基于步骤702的另一种可能的实现方式,若第一监控系统可以处于一个或多个群组。此时步骤703的实现方式可以为:第一监控系统在第一群组内发布第一区块,用于将第一区块同步至第二监控系统。也即是,第二监控系统是第一群组内除第一监控系统之外的其他监控系统。Based on another possible implementation manner of step 702, if the first monitoring system may be in one or more groups. At this time, the implementation of step 703 may be as follows: the first monitoring system publishes the first block in the first group for synchronizing the first block to the second monitoring system. That is, the second monitoring system is another monitoring system in the first group except the first monitoring system.

另外,上述第一监控系统在第一群组内发布第一区块的实现方式可以为:发布的第一区块携带第一群组的标识,数据共享系统中的所有节点在接收到该第一区块时,先确定自身是否处于第一群组内,若是,则将第一区块添加在自身部署的与第一群组对应的区块链上。若不是,则丢弃第一区块。In addition, the implementation manner of the above-mentioned first monitoring system publishing the first block in the first group may be: the published first block carries the identifier of the first group, and all nodes in the data sharing system receive the first block. When creating a block, first determine whether it is in the first group, and if so, add the first block to the blockchain corresponding to the first group deployed by itself. If not, discard the first block.

可选地,上述第一监控系统在第一群组内发布第一区块的实现方式还可以为:发布的第一区块携带第一群组中各个监控系统的MAC,数据共享系统中的所有节点在接收到该第一区块时,先确定自身的MAC是否是第一区块中携带的各个监控系统的MAC中的一个,若是,则将第一区块添加在自身部署的与第一群组对应的区块链上。若不是,则丢弃第一区块。Optionally, the implementation manner of the above-mentioned first monitoring system publishing the first block in the first group may also be: the published first block carries the MAC of each monitoring system in the first group, and the first block in the data sharing system carries the MAC. When all nodes receive the first block, first determine whether their own MAC is one of the MACs of the monitoring systems carried in the first block, and if so, add the first block to the A group of corresponding blockchains. If not, discard the first block.

此外,为了保证共享的数据的安全性,在上述任一种实现方式中,第一监控系统将第一区块同步至第二监控系统的实现过程可以为:第一监控系统根据第一证书私钥对第一区块进行数字签名,得到签名后的第一区块;第一监控系统发布签名后的第一区块,用于指示第二监控系统在根据第一证书公钥对签名后的第一区块验证成功后,将第一区块添加至第二监控系统中部署的区块链。In addition, in order to ensure the security of the shared data, in any of the above implementation manners, the implementation process of the first monitoring system synchronizing the first block to the second monitoring system may be: The first block is digitally signed with the key to obtain the signed first block; the first monitoring system publishes the signed first block, which is used to instruct the second monitoring system to sign the first block according to the public key of the first certificate. After the first block is successfully verified, the first block is added to the blockchain deployed in the second monitoring system.

其中,第一证书私钥和第一证书公钥是上述图4所示的实施例中数据中心为第一监控系统配置的一对密钥。The first certificate private key and the first certificate public key are a pair of keys configured by the data center for the first monitoring system in the embodiment shown in FIG. 4 .

当第一监控系统通过上述步骤703将第一区块同步至第二监控系统之后,第二监控系统便可根据下述步骤704和步骤705实现对异常对象的追踪。After the first monitoring system synchronizes the first block to the second monitoring system through the above step 703, the second monitoring system can track the abnormal object according to the following steps 704 and 705.

步骤704:第二监控系统接收第一监控系统同步的第一区块。Step 704: The second monitoring system receives the first block synchronized by the first monitoring system.

基于步骤701至步骤703可知,步骤704中的第一区块是第一监控系统在监控到异常对象时根据监控数据生成的。Based on steps 701 to 703, it can be known that the first block in step 704 is generated by the first monitoring system according to monitoring data when an abnormal object is monitored.

步骤705:第二监控系统基于第一区块对异常对象进行追踪。Step 705: The second monitoring system tracks the abnormal object based on the first block.

当第二监控系统通过上述方式获取到第一区块之后,便可通过第一区块中携带的监控数据锁定异常对象,以实现对第一异常对象的实时追踪,从而提高对异常对象的处理速度,显然也可以避免异常对象的逃逸。After the second monitoring system obtains the first block in the above manner, it can lock the abnormal object through the monitoring data carried in the first block, so as to realize real-time tracking of the first abnormal object, thereby improving the processing of the abnormal object The speed, obviously, also avoids the escape of the exception object.

另外,第二监控系统在接收到第一区块之后,便可通过图1所示的的方式将第一区块添加至第二监控系统中部署的区块链,在此不再详细解释说明。In addition, after receiving the first block, the second monitoring system can add the first block to the blockchain deployed in the second monitoring system in the manner shown in FIG. 1 , which will not be explained in detail here. .

需要说明的是,对于第一监控系统,第一监控系统可以处于一个或多个群组,相应地,第二监控系统也可以处于一个或多个群组。因此,对于第二监控系统,第二监控中也部署有一个或多个区块链,这一个或多个区块链与第二监控系统所处的一个或多个群组一一对应。此时,第一监控系统发布的第一区块还携带第一群组的标识,如此,第二监控系统在检测到第一区块之后,便可基于第一群组的标识将第一区块添加在第二监控系统中与第一群组对应的区块链上。It should be noted that, for the first monitoring system, the first monitoring system may be in one or more groups, and correspondingly, the second monitoring system may also be in one or more groups. Therefore, for the second monitoring system, one or more blockchains are also deployed in the second monitoring, and the one or more blockchains are in one-to-one correspondence with one or more groups where the second monitoring system is located. At this time, the first block released by the first monitoring system also carries the identifier of the first group. In this way, after the second monitoring system detects the first block, the first block can be identified based on the identifier of the first group. The block is added to the blockchain corresponding to the first group in the second monitoring system.

也即是,第一区块中携带允许共享步骤701中的监控数据的群组的标识。如此,第二监控系统接收第一监控系统同步的第一区块之后,第二监控系统根据第一区块中携带的允许共享上述监控数据的群组,从所述一个或多个群组中,确定允许共享上述监控数据的群组,得到第一群组;第二监控系统将第一区块添加至与第一群组对应的区块链。That is, the first block carries the identifier of the group that is allowed to share the monitoring data in step 701 . In this way, after the second monitoring system receives the first block synchronized by the first monitoring system, the second monitoring system selects a group from the one or more groups according to the groups carried in the first block that are allowed to share the monitoring data. , determine the group that is allowed to share the monitoring data, and obtain the first group; the second monitoring system adds the first block to the blockchain corresponding to the first group.

上述步骤701至步骤705是以第一监控系统和第二监控系统为例来解释说明本申请实施例通过的基于区块链的联合监控方法。在应用本申请实施例提供的基于区块链的联合监控方法时,均可以通过上述步骤701至步骤703来实现不同监控系统之间的联合监控。The above steps 701 to 705 take the first monitoring system and the second monitoring system as examples to explain the blockchain-based joint monitoring method adopted in the embodiment of the present application. When applying the blockchain-based joint monitoring method provided by the embodiments of the present application, joint monitoring between different monitoring systems can be implemented through the above steps 701 to 703 .

对于图6所示的多个监控系统。如图8所示,当监控系统A监控到异常对象,便可根据监控数据生成区块,并将区块上链。同时监控系统A还将区块同步至监控系统B,监控系统B接收到区块之后,验证区块有效之后上链。如此,便可实现监控数据的实时共享。For the multiple monitoring systems shown in Figure 6. As shown in Figure 8, when the monitoring system A monitors an abnormal object, it can generate a block according to the monitoring data and upload the block to the chain. At the same time, monitoring system A also synchronizes the block to monitoring system B. After monitoring system B receives the block, it will upload the block after verifying that the block is valid. In this way, real-time sharing of monitoring data can be achieved.

此外,监控系统B在将区块成功上链之后,还可以将上链成功消息通过区块的方式分别同步至监控系统A和数据中心,以便于后续查询联合监控的具体流程。其中,同步上链成功消息的方式和上述步骤701至步骤703同步监控数据的方式基本相同,在此不再详细阐述。In addition, after the monitoring system B successfully uploads the block to the chain, it can also synchronize the success message of the chain to the monitoring system A and the data center by means of blocks, so as to facilitate the subsequent query of the specific process of joint monitoring. The method of synchronizing the successful message on the chain is basically the same as the method of synchronizing the monitoring data in the above steps 701 to 703, and will not be described in detail here.

在本申请实施例中,当第一监控系统监控到异常对象时,可以根据用于指示该异常对象的行为的监控数据生成第一区块,将第一区块添加至第一监控系统中部署的区块链,并将第一区块同步至第二监控系统,用于指示第二监控系统基于第一区块对该异常对象进行追踪。如此,第二监控系统可以实时获取第一监控系统检测到的针对异常对象的监控数据,避免了第二监控系统获取的监控数据的时效性太差,从而也就提高了第二监控系统对异常对象进行追踪监控的有效性。In this embodiment of the present application, when an abnormal object is monitored by the first monitoring system, a first block may be generated according to monitoring data used to indicate the behavior of the abnormal object, and the first block may be added to the first monitoring system for deployment and synchronize the first block to the second monitoring system to instruct the second monitoring system to track the abnormal object based on the first block. In this way, the second monitoring system can acquire the monitoring data for abnormal objects detected by the first monitoring system in real time, which avoids the poor timeliness of the monitoring data acquired by the second monitoring system, thereby improving the second monitoring system's ability to detect abnormal objects. The effectiveness of tracking and monitoring of objects.

上述所有可选技术方案,均可按照任意结合形成本申请的可选实施例,本申请实施例对此不再一一赘述。All the above-mentioned optional technical solutions can be combined to form optional embodiments of the present application, which are not repeated in this embodiment of the present application.

下面结合图6所示的多个监控系统,对本申请实施例提供的基于区块链的联合监控方法进一步进行解释说明。The block chain-based joint monitoring method provided by the embodiment of the present application is further explained below with reference to the multiple monitoring systems shown in FIG. 6 .

图9是本申请实施例提供的另一种基于区块链的联合监控方法流程图。如图9所示,监控系统A、监控系统B以及监控系统C分别基于自身的机构级别通过图4所示的实施例中的步骤401向数据中心发起注册流程。数据中心可以基于各个监控系统上报的机构级别将监控系统A和监控系统B划分在群组1,将监控系统B和监控系统C划分在群组2,并向每个监控系统返回各自的证书、密钥以及所在的群组。这个过程同样可以参考图4所示的实施例中的步骤403,在此不再详细阐述。FIG. 9 is a flowchart of another blockchain-based joint monitoring method provided by an embodiment of the present application. As shown in FIG. 9 , monitoring system A, monitoring system B, and monitoring system C respectively initiate a registration process to the data center through step 401 in the embodiment shown in FIG. 4 based on their own institutional levels. The data center can divide monitoring system A and monitoring system B into group 1, and divide monitoring system B and monitoring system C into group 2 based on the organization level reported by each monitoring system, and return their own certificates, key and the group it is in. For this process, reference may also be made to step 403 in the embodiment shown in FIG. 4 , which will not be described in detail here.

各个监控系统在接收到数据中心返回的证书、密钥以及所在的群组后,根据自身当前所处的群组,将自身的证书及证书公钥同步至所在群组内的其他监控系统。各个监控系统还在自身部署与所在群组对应的区块链,以便后续通过自身部署的区块链实现监控数据的共享。After each monitoring system receives the certificate, key and group returned by the data center, it synchronizes its own certificate and certificate public key to other monitoring systems in the group according to the group it is currently in. Each monitoring system also deploys its own blockchain corresponding to the group it is in, so that monitoring data can be shared through the blockchain deployed by itself.

上述各个监控系统的注册过程可以在监控系统初始化时进行,各个监控系统在初始化之后,就可以通过图7所示的实施例实现基于区块链的联合监控。图9中以监控系统A为例进行说明,其他监控系统可以参考监控系统A进行联合监控。The registration process of each of the above monitoring systems can be performed when the monitoring system is initialized. After each monitoring system is initialized, the blockchain-based joint monitoring can be implemented through the embodiment shown in FIG. 7 . In FIG. 9 , the monitoring system A is used as an example for description, and other monitoring systems may refer to the monitoring system A for joint monitoring.

如图9所示,监控系统A实时监控异常对象是否侵入监控系统A所对应的区域。当监控系统A监控到异常对象时,根据监控数据生成区块,然后在群组1内将区块同步至其他节点监控系统B。监控系统B在获取到该区块之后,从区块中获取监控数据,然后根据该监控数据便可实现对异常对象的追踪。由于监控系统A是在监控到异常对象之后即刻将区块进行同步的,因此,监控系统B获取到监控数据的时刻距离监控系统A监控到异常对象的时刻非常短,如此,监控系统B获取的监控数据的时效性就非常高,从而也提高了监控系统B的监控有效性。As shown in FIG. 9 , the monitoring system A monitors in real time whether the abnormal object invades the area corresponding to the monitoring system A. When monitoring system A monitors an abnormal object, it generates a block according to the monitoring data, and then synchronizes the block to monitoring system B of other nodes in group 1. After obtaining the block, the monitoring system B obtains monitoring data from the block, and then can track the abnormal object according to the monitoring data. Since the monitoring system A synchronizes the blocks immediately after monitoring the abnormal object, the time when the monitoring system B obtains the monitoring data is very short from the time when the monitoring system A monitors the abnormal object. The timeliness of the monitoring data is very high, thereby improving the monitoring effectiveness of the monitoring system B.

另外,如图9所示,监控系统B在获取到区块之后,需将该区块存储在与群组1对应的区块链上,以实现该监控数据在群组1内的共享。In addition, as shown in FIG. 9 , after the monitoring system B acquires the block, it needs to store the block on the blockchain corresponding to the group 1, so as to realize the sharing of the monitoring data in the group 1.

图10是本申请实施例提供的一种基于区块链的联合监控装置,该装置1000包括:FIG. 10 is a block chain-based joint monitoring device provided by an embodiment of the present application, and the device 1000 includes:

生成模块1001,用于当第一监控系统监控到异常对象时,根据监控数据生成第一区块,监控数据包括用于指示异常对象的行为的数据;The generating module 1001 is used to generate a first block according to the monitoring data when the abnormal object is monitored by the first monitoring system, and the monitoring data includes data for indicating the behavior of the abnormal object;

添加模块1002,用于第一监控系统将第一区块添加至第一监控系统中部署的区块链;The adding module 1002 is used for the first monitoring system to add the first block to the blockchain deployed in the first monitoring system;

第一同步模块1003,用于第一监控系统将第一区块同步至第二监控系统,用于指示第二监控系统基于第一区块对异常对象进行追踪,第二监控系统是第一监控系统之外的监控系统。The first synchronization module 1003 is used for the first monitoring system to synchronize the first block to the second monitoring system, for instructing the second monitoring system to track the abnormal object based on the first block, and the second monitoring system is the first monitoring system monitoring system outside the system.

可选地,第一监控系统处于一个或多个群组内,第一监控系统中部署有一个或多个区块链,一个或多个区块链与一个或多个群组一一对应;Optionally, the first monitoring system is in one or more groups, one or more blockchains are deployed in the first monitoring system, and the one or more blockchains are in one-to-one correspondence with one or more groups;

添加模块1002用于:Add module 1002 for:

第一监控系统根据异常对象的行为类型,从一个或多个群组中,确定允许共享监控数据的群组,得到第一群组,第一群组中包括多个监控系统,第二监控系统是多个监控系统中除第一监控系统之外的监控系统;The first monitoring system determines a group that is allowed to share monitoring data from one or more groups according to the behavior type of the abnormal object, and obtains the first group. The first group includes multiple monitoring systems and the second monitoring system. It is a monitoring system other than the first monitoring system among the multiple monitoring systems;

第一监控系统将第一区块添加至与第一群组对应的区块链;The first monitoring system adds the first block to the blockchain corresponding to the first group;

相应地,第一监控系统将第一区块同步至第二监控系统,包括:Accordingly, the first monitoring system synchronizes the first block to the second monitoring system, including:

第一监控系统在第一群组内发布第一区块,用于将第一区块同步至第二监控系统。The first monitoring system publishes the first block in the first group for synchronizing the first block to the second monitoring system.

可选地,第一同步模块1003用于:Optionally, the first synchronization module 1003 is used for:

第一监控系统根据第一证书私钥对第一区块进行数字签名,得到签名后的第一区块;The first monitoring system digitally signs the first block according to the first certificate private key to obtain the signed first block;

第一监控系统发布签名后的第一区块,用于指示第二监控系统在根据第一证书公钥对签名后的第一区块验证成功后,将第一区块添加至第二监控系统中部署的区块链;The first monitoring system issues the signed first block to instruct the second monitoring system to add the first block to the second monitoring system after successfully verifying the signed first block according to the public key of the first certificate Blockchain deployed in;

其中,第一证书私钥和第一证书公钥是数据中心为第一监控系统配置的一对密钥。The first certificate private key and the first certificate public key are a pair of keys configured by the data center for the first monitoring system.

可选地,如图11所示,该装置1000还包括:Optionally, as shown in FIG. 11 , the apparatus 1000 further includes:

发送模块1004,用于第一监控系统向数据中心发送区块链注册请求;The sending module 1004 is used for the first monitoring system to send a blockchain registration request to the data center;

接收模块1005,用于第一监控系统接收数据中心发送的注册响应消息,注册响应消息携带证书、第一证书公钥和第一证书私钥,证书用于指示第一监控系统已注册为一个区块链节点;The receiving module 1005 is used for the first monitoring system to receive the registration response message sent by the data center. The registration response message carries the certificate, the first certificate public key and the first certificate private key, and the certificate is used to indicate that the first monitoring system has been registered as a zone. blockchain node;

第二同步模块1006,用于第一监控系统将第一证书公钥同步至第二监控系统。The second synchronization module 1006 is used for the first monitoring system to synchronize the public key of the first certificate to the second monitoring system.

可选地,区块链注册请求还携带第一监控系统的机构级别;Optionally, the blockchain registration request also carries the institutional level of the first monitoring system;

注册响应消息还携带第一监控系统所处的一个或多个群组中每个群组的标识、以及每个群组中允许共享的监控数据对应的异常对象的行为类型,一个或多个群组中每个群组的标识、以及每个群组中允许共享的监控数据对应的异常对象的行为类型是根据第一监控系统的机构级别确定的。The registration response message also carries the identification of each group in the one or more groups where the first monitoring system is located, and the behavior type of the abnormal object corresponding to the monitoring data allowed to be shared in each group, one or more groups. The identifier of each group in the group and the behavior type of the abnormal object corresponding to the monitoring data allowed to be shared in each group are determined according to the institutional level of the first monitoring system.

在本申请实施例中,当第一监控系统监控到异常对象时,可以根据用于指示该异常对象的行为的监控数据生成第一区块,将第一区块添加至第一监控系统中部署的区块链,并将第一区块同步至第二监控系统,用于指示第二监控系统基于第一区块对该异常对象进行追踪。如此,第二监控系统可以实时获取第一监控系统检测到的针对异常对象的监控数据,避免了第二监控系统获取的监控数据的时效性太差,从而也就提高了第二监控系统对异常对象进行追踪监控的有效性。In this embodiment of the present application, when an abnormal object is monitored by the first monitoring system, a first block may be generated according to monitoring data used to indicate the behavior of the abnormal object, and the first block may be added to the first monitoring system for deployment and synchronize the first block to the second monitoring system to instruct the second monitoring system to track the abnormal object based on the first block. In this way, the second monitoring system can acquire the monitoring data for abnormal objects detected by the first monitoring system in real time, which avoids the poor timeliness of the monitoring data acquired by the second monitoring system, thereby improving the second monitoring system's ability to detect abnormal objects. The effectiveness of tracking and monitoring of objects.

需要说明的是:上述实施例提供的基于区块链的联合监控装置在基于区块链进行联合监控时,仅以上述各功能模块的划分进行举例说明,实际应用中,可以根据需要而将上述功能分配由不同的功能模块完成,即将设备的内部结构划分成不同的功能模块,以完成以上描述的全部或者部分功能。另外,上述实施例提供的基于区块链的联合监控装置与基于区块链的联合监控方法实施例属于同一构思,其具体实现过程详见方法实施例,这里不再赘述。It should be noted that: when the joint monitoring device based on blockchain provided by the above embodiment performs joint monitoring based on blockchain, only the division of the above-mentioned functional modules is used as an example. The function distribution is completed by different function modules, that is, the internal structure of the device is divided into different function modules to complete all or part of the functions described above. In addition, the blockchain-based joint monitoring device and the blockchain-based joint monitoring method embodiments provided by the above embodiments belong to the same concept, and the specific implementation process is detailed in the method embodiments, which will not be repeated here.

图12是本申请实施例提供的一种基于区块链的联合监控装置的结构示意图。图1所示的数据共享系统中的任一节点可以通过该装置来实现,该装置可以为服务器,该服务器可以是后台服务器集群中的服务器。具体来讲:FIG. 12 is a schematic structural diagram of a blockchain-based joint monitoring device provided by an embodiment of the present application. Any node in the data sharing system shown in FIG. 1 can be implemented by the device, the device can be a server, and the server can be a server in a background server cluster. Specifically:

服务器1200包括CPU(Central Processing Unit,中央处理单元)1201、包括RAM(Random Access Memory,随机存取存储器)1202和ROM(Read-Only Memory,只读存储器)1203的系统存储器1204,以及连接系统存储器1204和中央处理单元1201的系统总线1205。服务器1200还包括帮助计算机内的各个器件之间传输信息的基本I/O系统(Input/Output,输入/输出)1206,和用于存储操作系统1213、应用程序1214和其他程序模块1215的大容量存储设备1207。The server 1200 includes a CPU (Central Processing Unit, central processing unit) 1201, a system memory 1204 including a RAM (Random Access Memory, random access memory) 1202 and a ROM (Read-Only Memory, read only memory) 1203, and is connected to the system memory 1204 1204 and the system bus 1205 of the central processing unit 1201. The server 1200 also includes a basic I/O system (Input/Output) 1206 that facilitates the transfer of information between various devices within the computer, and a large capacity for storing the operating system 1213, application programs 1214, and other program modules 1215 Storage device 1207.

基本输入/输出系统1206包括有用于显示信息的显示器1208和用于用户输入信息的诸如鼠标、键盘之类的输入设备1209。其中显示器1208和输入设备1209都通过连接到系统总线1205的输入输出控制器1120连接到中央处理单元1201。基本输入/输出系统1206还可以包括输入输出控制器1120以用于接收和处理来自键盘、鼠标、或电子触控笔等多个其他设备的输入。类似地,输入输出控制器1120还提供输出到显示屏、打印机或其他类型的输出设备。The basic input/output system 1206 includes a display 1208 for displaying information and input devices 1209 such as a mouse, keyboard, etc., for user input of information. Both the display 1208 and the input device 1209 are connected to the central processing unit 1201 through the input and output controller 1120 connected to the system bus 1205. The basic input/output system 1206 may also include an input output controller 1120 for receiving and processing input from a number of other devices such as a keyboard, mouse, or electronic stylus. Similarly, input output controller 1120 also provides output to a display screen, printer, or other type of output device.

大容量存储设备1207通过连接到系统总线1205的大容量存储控制器(未示出)连接到中央处理单元1201。大容量存储设备1207及其相关联的计算机可读介质为服务器1200提供非易失性存储。也就是说,大容量存储设备1207可以包括诸如硬盘之类的计算机可读介质(未示出)。Mass storage device 1207 is connected to central processing unit 1201 through a mass storage controller (not shown) connected to system bus 1205 . Mass storage device 1207 and its associated computer-readable media provide non-volatile storage for server 1200. That is, the mass storage device 1207 may include a computer-readable medium (not shown) such as a hard disk.

不失一般性,计算机可读介质可以包括计算机存储介质和通信介质。计算机存储介质包括以用于存储诸如计算机可读指令、数据结构、程序模块或其他数据等信息的任何方法或技术实现的易失性和非易失性、可移动和不可移动介质。计算机存储介质包括RAM、ROM、闪存或其他固态存储其技术,或其他光学存储、磁带盒、磁带、磁盘存储或其他磁性存储设备。当然,本领域技术人员可知计算机存储介质不局限于上述几种。上述的系统存储器1204和大容量存储设备1207可以统称为存储器。Without loss of generality, computer-readable media can include computer storage media and communication media. Computer storage media includes volatile and nonvolatile, removable and non-removable media implemented in any method or technology for storage of information such as computer readable instructions, data structures, program modules or other data. Computer storage media include RAM, ROM, flash memory, or other solid-state storage technologies, or other optical storage, magnetic tape cartridges, magnetic tape, magnetic disk storage, or other magnetic storage devices. Of course, those skilled in the art know that the computer storage medium is not limited to the above-mentioned types. The system memory 1204 and the mass storage device 1207 described above may be collectively referred to as memory.

根据本申请的各种实施例,服务器1200还可以通过诸如因特网等网络连接到网络上的远程计算机运行。也即服务器1200可以通过连接在系统总线1205上的网络接口单元1211连接到网络1212,或者说,也可以使用网络接口单元1211来连接到其他类型的网络或远程计算机系统(未示出)。According to various embodiments of the present application, the server 1200 may also run on a remote computer connected to a network through a network such as the Internet. That is, the server 1200 can be connected to the network 1212 through the network interface unit 1211 connected to the system bus 1205, or can also use the network interface unit 1211 to connect to other types of networks or remote computer systems (not shown).

上述存储器还包括一个或者一个以上的程序,一个或者一个以上程序存储于存储器中,被配置由CPU执行。所述一个或者一个以上程序包含用于进行本申请实施例提供的的基于区块链的联合监控的方法的指令The above-mentioned memory also includes one or more programs, and the one or more programs are stored in the memory and configured to be executed by the CPU. The one or more programs include instructions for performing the method for joint blockchain-based monitoring provided by the embodiments of the present application

本申请实施例还提供了一种非临时性计算机可读存储介质,当所述存储介质中的指令由服务器的处理器执行时,使得服务器能够执行上述实施例提供的基于区块链的联合监控的方法。The embodiments of the present application also provide a non-transitory computer-readable storage medium, when the instructions in the storage medium are executed by the processor of the server, the server can perform the blockchain-based joint monitoring provided by the above embodiments Methods.

本申请实施例还提供了一种包含指令的计算机程序产品,当其在服务器上运行时,使得服务器执行上述实施例提供的基于区块链的联合监控的方法。Embodiments of the present application also provide a computer program product containing instructions, which, when running on a server, cause the server to execute the method for joint monitoring based on blockchain provided by the above embodiments.

本领域普通技术人员可以理解实现上述实施例的全部或部分步骤可以通过硬件来完成,也可以通过程序来指令相关的硬件完成,所述的程序可以存储于一种计算机可读存储介质中,上述提到的存储介质可以是只读存储器,磁盘或光盘等。Those of ordinary skill in the art can understand that all or part of the steps of implementing the above embodiments can be completed by hardware, or can be completed by instructing relevant hardware through a program, and the program can be stored in a computer-readable storage medium. The storage medium mentioned may be a read-only memory, a magnetic disk or an optical disk, etc.

以上所述仅为本申请的较佳实施例,并不用以限制本申请,凡在本申请的精神和原则之内,所作的任何修改、等同替换、改进等,均应包含在本申请的保护范围之内。The above descriptions are only preferred embodiments of the present application and are not intended to limit the present application. Any modifications, equivalent replacements, improvements, etc. made within the spirit and principles of the present application shall be included in the protection of the present application. within the range.

Claims (5)

1.一种基于区块链的联合监控方法,其特征在于,所述方法包括:1. A blockchain-based joint monitoring method, wherein the method comprises: 第一监控系统向数据中心发送区块链注册请求,所述区块链注册请求携带所述第一监控系统的机构级别;The first monitoring system sends a blockchain registration request to the data center, and the blockchain registration request carries the institution level of the first monitoring system; 所述数据中心根据所述第一监控系统的机构级别,确定所述第一监控系统所处的一个或多个群组,以及所述第一监控系统所处的每个群组允许共享的监控数据对应的异常对象的行为类型,并向所述第一监控系统发送注册响应消息,所述注册响应消息携带证书、第一证书公钥、第一证书私钥,所述第一监控系统所处的一个或多个群组中每个群组的标识、以及每个群组中允许共享的监控数据对应的异常对象的行为类型;According to the organization level of the first monitoring system, the data center determines one or more groups in which the first monitoring system is located, and each group in which the first monitoring system is located allows shared monitoring The behavior type of the abnormal object corresponding to the data, and send a registration response message to the first monitoring system. The registration response message carries the certificate, the first certificate public key, and the first certificate private key, where the first monitoring system is located. The identity of each group in one or more of the groups, and the behavior type of the abnormal object corresponding to the monitoring data allowed to be shared in each group; 所述第一监控系统接收所述注册响应消息,并将所述第一证书公钥同步至所述一个或多个群组中;The first monitoring system receives the registration response message, and synchronizes the first certificate public key to the one or more groups; 当所述第一监控系统监控到异常对象时,根据监控数据生成第一区块,所述监控数据包括用于指示所述异常对象的行为的数据;When an abnormal object is monitored by the first monitoring system, a first block is generated according to monitoring data, and the monitoring data includes data for indicating the behavior of the abnormal object; 所述第一监控系统根据所述异常对象的行为类型,从所述一个或多个群组中,确定允许共享所述监控数据的群组,得到第一群组,所述第一群组中包括多个监控系统,第二监控系统是所述多个监控系统中除所述第一监控系统之外的监控系统,并将所述第一区块添加至与所述第一群组对应的区块链;The first monitoring system determines a group that is allowed to share the monitoring data from the one or more groups according to the behavior type of the abnormal object, and obtains a first group, which is in the first group. Including a plurality of monitoring systems, the second monitoring system is a monitoring system other than the first monitoring system among the plurality of monitoring systems, and the first block is added to the first group corresponding to the blockchain; 所述第一监控系统基于所述第一证书私钥在所述第一群组内发布所述第一区块,用于将所述第一区块同步至第二监控系统;The first monitoring system publishes the first block in the first group based on the first certificate private key, for synchronizing the first block to the second monitoring system; 所述第二监控系统接收第一监控系统同步的第一区块,所述第二监控系统在确定自身为所述第一群组中的监控系统的情况下,在基于所述第一证书公钥对所述第一区块校验之后将所述第一区块添加在自身部署的与第一群组对应的区块链上;The second monitoring system receives the first block synchronized by the first monitoring system, and when the second monitoring system determines that it is the monitoring system in the first group, based on the first certificate public After the key pair is verified for the first block, the first block is added to the self-deployed blockchain corresponding to the first group; 所述第二监控系统基于所述第一区块对所述异常对象进行追踪。The second monitoring system tracks the abnormal object based on the first block. 2.如权利要求1所述的方法,其特征在于,所述第一监控系统将所述第一区块同步至第二监控系统,包括:2. The method of claim 1, wherein the first monitoring system synchronizes the first block to the second monitoring system, comprising: 所述第一监控系统根据所述第一证书私钥对所述第一区块进行数字签名,得到签名后的所述第一区块;The first monitoring system digitally signs the first block according to the first certificate private key to obtain the signed first block; 所述第一监控系统发布签名后的所述第一区块,用于指示所述第二监控系统在根据第一证书公钥对签名后的所述第一区块验证成功后,将所述第一区块添加至所述第二监控系统中部署的区块链;The first monitoring system issues the signed first block, which is used to instruct the second monitoring system to verify the signed first block according to the public key of the first certificate. The first block is added to the blockchain deployed in the second monitoring system; 其中,所述第一证书私钥和所述第一证书公钥是数据中心为所述第一监控系统配置的一对密钥。The first certificate private key and the first certificate public key are a pair of keys configured by the data center for the first monitoring system. 3.如权利要求1所述的方法,其特征在于,所述第二监控系统处于一个或多个群组内,所述第二监控系统中部署有一个或多个区块链,所述一个或多个区块链与所述一个或多个群组一一对应,所述第一区块中携带允许共享所述监控数据的群组的标识;3. The method of claim 1, wherein the second monitoring system is in one or more groups, wherein the second monitoring system has one or more blockchains deployed, the one One or more blockchains are in one-to-one correspondence with the one or more groups, and the first block carries an identifier of a group that is allowed to share the monitoring data; 所述第二监控系统在确定自身为所述第一群组中的监控系统的情况下,在基于所述第一证书公钥对所述第一区块校验之后将所述第一区块添加在自身部署的与第一群组对应的区块链上,包括:In the case that the second monitoring system determines that it is the monitoring system in the first group, after verifying the first block based on the public key of the first certificate, the first block is checked. Added to the blockchain corresponding to the first group deployed by itself, including: 所述第二监控系统根据所述第一区块中携带的允许共享所述监控数据的群组,从所述一个或多个群组中,确定允许共享所述监控数据的群组,得到第一群组;The second monitoring system determines the group that is allowed to share the monitoring data from the one or more groups according to the group that is carried in the first block and is allowed to share the monitoring data, and obtains the first a group; 在基于所述第一证书公钥对所述第一区块校验之后所述第二监控系统将所述第一区块添加至与所述第一群组对应的区块链。The second monitoring system adds the first block to the blockchain corresponding to the first group after verifying the first block based on the first certificate public key. 4.一种数据共享系统,其特征在于,所述数据共享系统包括:4. A data sharing system, wherein the data sharing system comprises: 第一监控系统,用于向数据中心发送区块链注册请求,所述区块链注册请求携带所述第一监控系统的机构级别;a first monitoring system, configured to send a blockchain registration request to the data center, where the blockchain registration request carries the institutional level of the first monitoring system; 所述数据中心,用于根据所述第一监控系统的机构级别,确定所述第一监控系统所处的一个或多个群组,以及所述第一监控系统所处的每个群组允许共享的监控数据对应的异常对象的行为类型,并向所述第一监控系统发送注册响应消息,所述注册响应消息携带证书、第一证书公钥、第一证书私钥,所述第一监控系统所处的一个或多个群组中每个群组的标识、以及每个群组中允许共享的监控数据对应的异常对象的行为类型;The data center is configured to determine, according to the institutional level of the first monitoring system, one or more groups in which the first monitoring system is located, and each group in which the first monitoring system is located allows the The behavior type of the abnormal object corresponding to the shared monitoring data, and send a registration response message to the first monitoring system. The registration response message carries the certificate, the first certificate public key, and the first certificate private key. The first monitoring system The identity of each group in one or more groups where the system is located, and the behavior type of the abnormal object corresponding to the monitoring data allowed to be shared in each group; 所述第一监控系统,还用于接收所述注册响应消息,并将所述第一证书公钥同步至所述一个或多个群组中;The first monitoring system is further configured to receive the registration response message, and synchronize the first certificate public key to the one or more groups; 所述第一监控系统,还用于当所述第一监控系统监控到异常对象时,根据监控数据生成第一区块,所述监控数据包括用于指示所述异常对象的行为的数据;The first monitoring system is further configured to generate a first block according to monitoring data when the first monitoring system monitors an abnormal object, and the monitoring data includes data for indicating the behavior of the abnormal object; 所述第一监控系统,还用于根据所述异常对象的行为类型,从所述一个或多个群组中,确定允许共享所述监控数据的群组,得到第一群组,所述第一群组中包括多个监控系统,第二监控系统是所述多个监控系统中除所述第一监控系统之外的监控系统,并将所述第一区块添加至与所述第一群组对应的区块链;The first monitoring system is further configured to, according to the behavior type of the abnormal object, determine a group that is allowed to share the monitoring data from the one or more groups, and obtain a first group, the first group. A group includes a plurality of monitoring systems, the second monitoring system is a monitoring system other than the first monitoring system among the plurality of monitoring systems, and the first block is added to the first block The blockchain corresponding to the group; 所述第一监控系统,还用于基于所述第一证书私钥在所述第一群组内发布所述第一区块,用于将所述第一区块同步至第二监控系统;The first monitoring system is further configured to publish the first block in the first group based on the first certificate private key, for synchronizing the first block to the second monitoring system; 所述第二监控系统,还用于接收第一监控系统同步的第一区块,所述第二监控系统在确定自身为所述第一群组中的监控系统的情况下,在基于所述第一证书公钥对所述第一区块校验之后将所述第一区块添加在自身部署的与第一群组对应的区块链上;The second monitoring system is further configured to receive the first block synchronized by the first monitoring system, when the second monitoring system determines that it is the monitoring system in the first group, based on the After the first certificate public key verifies the first block, the first block is added to the self-deployed blockchain corresponding to the first group; 所述第二监控系统,还用于基于所述第一区块对所述异常对象进行追踪。The second monitoring system is further configured to track the abnormal object based on the first block. 5.一种计算机存储介质,其特征在于,所述存储介质中存储有至少一条指令、至少一段程序、代码集或指令集,所述至少一条指令、所述至少一段程序、所述代码集或所述指令集由处理器加载并执行以实现如权利要求1至3任一所述的基于区块链的联合监控方法。5. A computer storage medium, characterized in that the storage medium stores at least one instruction, at least one segment of program, code set or instruction set, the at least one instruction, the at least one segment of program, the code set or The instruction set is loaded and executed by the processor to implement the blockchain-based joint monitoring method as claimed in any one of claims 1 to 3.
CN201910880697.9A 2019-09-18 2019-09-18 Blockchain-based joint monitoring method, device and computer storage medium Expired - Fee Related CN110602222B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910880697.9A CN110602222B (en) 2019-09-18 2019-09-18 Blockchain-based joint monitoring method, device and computer storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910880697.9A CN110602222B (en) 2019-09-18 2019-09-18 Blockchain-based joint monitoring method, device and computer storage medium

Publications (2)

Publication Number Publication Date
CN110602222A CN110602222A (en) 2019-12-20
CN110602222B true CN110602222B (en) 2022-06-28

Family

ID=68860626

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910880697.9A Expired - Fee Related CN110602222B (en) 2019-09-18 2019-09-18 Blockchain-based joint monitoring method, device and computer storage medium

Country Status (1)

Country Link
CN (1) CN110602222B (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111953671B (en) * 2020-07-31 2022-08-26 中国工商银行股份有限公司 Dynamic honey net data processing method and system based on block chain
CN114449227B (en) * 2022-03-09 2025-12-19 中国农业银行股份有限公司 Distributed monitoring system and method

Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108055309A (en) * 2017-12-07 2018-05-18 厦门集微科技有限公司 A kind of data transmission system and method

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106506203B (en) * 2016-10-25 2019-12-10 杭州云象网络技术有限公司 Node monitoring system applied to block chain
GB2573426A (en) * 2016-12-22 2019-11-06 Walmart Apollo Llc Systems and methods for monitoring item distribution
CN110245144B (en) * 2018-04-27 2022-02-22 腾讯科技(深圳)有限公司 Protocol data management method, device, storage medium and system
CN109034809B (en) * 2018-08-16 2021-08-17 北京京东尚科信息技术有限公司 Block chain generation method, device, block chain node and storage medium
CN109861992B (en) * 2019-01-10 2021-09-07 深圳英飞拓智能技术有限公司 Information interaction method and cross-scene tracking method of monitoring terminal

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108055309A (en) * 2017-12-07 2018-05-18 厦门集微科技有限公司 A kind of data transmission system and method

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
面向未来城市的智慧交通整体构思;张晓春等;《城市交通》;20180925(第05期);全文 *

Also Published As

Publication number Publication date
CN110602222A (en) 2019-12-20

Similar Documents

Publication Publication Date Title
US20230006846A1 (en) Data processing method and apparatus based on blockchain network
CN110569251B (en) Data processing method, related equipment and computer readable storage medium
US10085149B2 (en) Authentication of a gateway device in a sensor network
CN111628886B (en) Method, device and computer equipment for building blockchain network in private cloud environment
CN110188563A (en) A kind of trust data update method and device
CN112714192A (en) Data synchronization method and device, computer readable medium and electronic equipment
TW201631510A (en) Methods, apparatus, and systems for identity authentication
CN110602222B (en) Blockchain-based joint monitoring method, device and computer storage medium
CN110599321B (en) Tax data processing method and device, server and storage medium
CN110442349B (en) Method and device for service expansion
WO2019054372A1 (en) Data transfer system and data transfer method
CN112910995B (en) Resource allocation method and device based on multi-cloud environment, electronic equipment and medium
WO2017020748A1 (en) Method and device for processing signalling tracking task
CN102761940A (en) 802.1X authentication method and equipment
CN110868466B (en) A storage method, system and device for distributed storage network
CN110572857B (en) Network connection processing method and device, electronic equipment and storage medium
CN111611574B (en) Information acquisition methods, devices, equipment and systems
CN115114630A (en) Data sharing method and device and electronic equipment
CN114722429A (en) Identity sharing method and device, electronic equipment and readable storage medium
CN114400101B (en) User tracking method, device, medium and electronic device based on zero-knowledge proof
CN111327666B (en) Service management method, device and system, computer equipment and storage medium
CN111432407B (en) Identity verification method, device, equipment and system
Hong et al. A synergy of the wireless sensor network and the data center system
CN112954789B (en) Method and system for transmitting maintenance information of blockchain system based on Internet of Things
WO2016078458A1 (en) Method, device, and system for device operation and maintenance

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant
CF01 Termination of patent right due to non-payment of annual fee

Granted publication date: 20220628

CF01 Termination of patent right due to non-payment of annual fee