CN114666081A - Early warning message output method, early warning message distribution device and related equipment - Google Patents

Early warning message output method, early warning message distribution device and related equipment Download PDF

Info

Publication number
CN114666081A
CN114666081A CN202011536910.3A CN202011536910A CN114666081A CN 114666081 A CN114666081 A CN 114666081A CN 202011536910 A CN202011536910 A CN 202011536910A CN 114666081 A CN114666081 A CN 114666081A
Authority
CN
China
Prior art keywords
warning message
early warning
issuing device
public key
message issuing
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.)
Granted
Application number
CN202011536910.3A
Other languages
Chinese (zh)
Other versions
CN114666081B (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.)
China Mobile Communications Group Co Ltd
Research Institute of China Mobile Communication Co Ltd
Original Assignee
China Mobile Communications Group Co Ltd
Research Institute of China Mobile Communication 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 China Mobile Communications Group Co Ltd, Research Institute of China Mobile Communication Co Ltd filed Critical China Mobile Communications Group Co Ltd
Priority to CN202011536910.3A priority Critical patent/CN114666081B/en
Publication of CN114666081A publication Critical patent/CN114666081A/en
Application granted granted Critical
Publication of CN114666081B publication Critical patent/CN114666081B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L63/00Network architectures or network communication protocols for network security
    • H04L63/08Network architectures or network communication protocols for network security for authentication of entities
    • H04L63/0823Network architectures or network communication protocols for network security for authentication of entities using certificates
    • 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

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Computer Hardware Design (AREA)
  • Computer Security & Cryptography (AREA)
  • Computing Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • Telephonic Communication Services (AREA)

Abstract

The application provides an early warning message output method, an early warning message distribution device and related equipment, wherein the early warning message output method comprises the following steps: receiving an early warning message sent by network equipment, wherein the early warning message is an early warning message signed by early warning message issuing equipment by using a private key; acquiring a block chain certificate of the early warning message issuing equipment from a alliance chain, and acquiring a public key of the early warning message issuing equipment based on the block chain certificate; using the public key to carry out signature verification on the early warning message; and outputting the early warning message when the signature verification is passed. The method and the device can improve the safety of issuing the early warning message.

Description

预警消息输出方法、预警消息分发方法、装置及相关设备Early warning message output method, early warning message distribution method, device and related equipment

技术领域technical field

本申请涉及区块链技术领域,并且更具体地,涉及一种预警消息输出方法、预警消息分发方法、装置及相关设备。The present application relates to the field of blockchain technology, and more particularly, to a method for outputting an early warning message, a method for distributing an early warning message, an apparatus and related equipment.

背景技术Background technique

在突发公共事件发生前,突发公共事件预警消息发布部门通过手机短消息方式向公众发布预警消息,通知突发公共事件即将来临并告知公众预防措施,以减少事件带给的生命、财产损失。预警消息一般通过小区广播短信的方式发送,其特点包括:可以在接近实时的时间按照指定区域所需的语言,发送消息给数以百万计的用户,所有的预警消息都要由预警消息管理中心进行签名处理,但如果预警消息在传送给预警信息管理中心时被篡改,会难以确定责任归属,从而导致预警消息下发的安全性较差。Before the occurrence of public emergencies, the public emergency warning message issuing department will issue early warning messages to the public through mobile phone short messages to inform the public of the imminent public emergency and inform the public of preventive measures to reduce the loss of life and property caused by the incident. . Early warning messages are generally sent through cell broadcast short messages. Its features include: it can send messages to millions of users in near real-time in the language required by the designated area, and all early warning messages must be managed by the early warning message The center performs signature processing, but if the early warning message is tampered with when it is transmitted to the early warning information management center, it will be difficult to determine the attribution of responsibility, resulting in poor security in issuing the early warning message.

发明内容SUMMARY OF THE INVENTION

本申请实施例提供一种预警消息输出方法、预警消息分发方法、装置及相关设备,以解决预警消息下发的安全性较差的问题。Embodiments of the present application provide a method for outputting an early warning message, a method for distributing an early warning message, an apparatus, and related equipment, so as to solve the problem of poor security in issuing early warning messages.

为解决上述问题,本申请是这样实现的:In order to solve the above problems, this application is implemented as follows:

第一方面,本申请实施例提供了一种预警消息输出方法,由终端执行,所述方法包括:In a first aspect, an embodiment of the present application provides a method for outputting an early warning message, which is executed by a terminal, and the method includes:

接收网络设备发送的预警消息,所述预警消息为预警消息发布设备使用私钥进行签名的预警消息;Receive an early warning message sent by a network device, where the early warning message is an early warning message signed by an early warning message issuing device using a private key;

从联盟链中获取所述预警消息发布设备的区块链证书,基于所述区块链证书获取所述预警消息发布设备的公钥;Obtain the blockchain certificate of the early warning message issuing device from the alliance chain, and obtain the public key of the early warning message issuing device based on the blockchain certificate;

使用所述公钥对所述预警消息进行签名验证;Using the public key to perform signature verification on the warning message;

在签名验证通过的情况下,输出所述预警消息。If the signature verification is passed, the warning message is output.

第二方面,本申请实施例提供了一种预警消息分发方法,由预警消息发布设备执行,所述方法包括:In a second aspect, an embodiment of the present application provides a method for distributing an early warning message, which is executed by a device for distributing an early warning message, and the method includes:

使用私钥对预警消息进行签名;Sign the alert message with the private key;

分发所述签名的所述预警消息;distributing said warning message of said signature;

其中,所述私钥对应的公钥包含在区块链证书中,所述区块链证书通过所述预警消息发布设备和监管部门对应的监管设备组成的联盟链管理。Wherein, the public key corresponding to the private key is included in the blockchain certificate, and the blockchain certificate is managed by a consortium chain composed of the warning message issuing device and the supervision device corresponding to the supervision department.

第三方面,本申请实施例还提供一种预警消息输出装置,包括:In a third aspect, an embodiment of the present application further provides a device for outputting an early warning message, including:

接收模块,用于接收网络设备发送的预警消息,所述预警消息为预警消息发布设备使用私钥进行签名的预警消息;a receiving module, configured to receive an early warning message sent by a network device, where the early warning message is an early warning message signed by an early warning message issuing device using a private key;

第一获取模块,用于从联盟链中获取所述预警消息发布设备的区块链证书,基于所述区块链证书获取所述预警消息发布设备的公钥;a first obtaining module, configured to obtain the blockchain certificate of the early warning message issuing device from the alliance chain, and obtain the public key of the early warning message issuing device based on the blockchain certificate;

验证模块,用于使用所述公钥对所述预警消息进行签名验证;a verification module, configured to perform signature verification on the warning message using the public key;

输出模块,用于在签名验证通过的情况下,输出所述预警消息。The output module is configured to output the warning message when the signature verification is passed.

第四方面,本申请实施例还提供一种预警消息分发装置,包括:In a fourth aspect, an embodiment of the present application further provides an apparatus for distributing an early warning message, including:

签名模块,用于使用私钥对预警消息进行签名;The signature module is used to sign the warning message with the private key;

分发模块,用于分发所述签名的所述预警消息;a distribution module for distributing the signed warning message;

其中,所述私钥对应的公钥包含在区块链证书中,所述区块链证书通过所述预警消息发布设备和监管部门对应的监管设备组成的联盟链管理。Wherein, the public key corresponding to the private key is included in the blockchain certificate, and the blockchain certificate is managed by a consortium chain composed of the warning message issuing device and the supervision device corresponding to the supervision department.

第五方面,本申请实施例还提供一种通信设备,包括:收发机、存储器、处理器及存储在所述存储器上并可在所述处理器上运行的程序;其特征在于,所述处理器,用于读取存储器中的程序实现如前述第一方面所述方法中的步骤;或,如前述第二方面所述方法中的步骤。In a fifth aspect, an embodiment of the present application further provides a communication device, including: a transceiver, a memory, a processor, and a program stored in the memory and running on the processor; characterized in that, the processing A device for reading the program in the memory to implement the steps in the method according to the first aspect; or, the steps in the method according to the second aspect.

第六方面,本申请实施例还提供一种可读存储介质,用于存储程序,所述程序被处理器执行时实现如前述第一方面所述方法中的步骤,或,实现如前述第二方面所述方法中的步骤。In a sixth aspect, an embodiment of the present application further provides a readable storage medium for storing a program, and when the program is executed by a processor, the steps in the method described in the first aspect above are implemented, or the second method described above is implemented. A step in the method of an aspect.

在本申请实施例中,通过从联盟链中获取所述预警消息发布设备的区块链证书,基于所述区块链证书获取所述预警消息发布设备的公钥,使用所述公钥对所述预警消息进行签名验证,在签名验证通过的情况下,输出所述预警消息,可以验证所述预警消息发布设备的身份和所述预警消息的完整性,避免在传送过程中若所述预警消息被篡改而导致责任归属不明确,从而提高所述预警消息下发的安全性。In the embodiment of this application, the blockchain certificate of the early warning message issuing device is obtained from the consortium chain, the public key of the early warning message issuing device is obtained based on the blockchain certificate, and the public key is used to The pre-warning message carries out signature verification, and in the case of passing the signature verification, the pre-warning message is output, which can verify the identity of the pre-warning message issuing device and the integrity of the pre-warning message. The attribution of responsibility is unclear due to tampering, thereby improving the security of the warning message.

附图说明Description of drawings

为了更清楚地说明本申请实施例的技术方案,下面将对实施例或现有技术描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本申请的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动性的前提下,还可以根据这些附图获得其他的附图。In order to illustrate the technical solutions of the embodiments of the present application more clearly, the following briefly introduces the drawings that need to be used in the description of the embodiments or the prior art. Obviously, the drawings in the following description are only some of the drawings in the present application. In the embodiments, for those of ordinary skill in the art, other drawings can also be obtained according to these drawings without creative labor.

图1是本申请实施例提供的预警消息输出方法的流程示意图;1 is a schematic flowchart of a method for outputting an early warning message provided by an embodiment of the present application;

图2是本申请实施例提供的预警消息分发方法的流程示意图;2 is a schematic flowchart of a method for distributing an early warning message provided by an embodiment of the present application;

图3是本申请实施例可应用的预警消息输出系统的结构示意图;3 is a schematic structural diagram of an early warning message output system applicable to an embodiment of the present application;

图4是本申请实施例提供的预警消息输出装置的结构示意图之一;4 is one of the schematic structural diagrams of the early warning message output device provided by the embodiment of the present application;

图5是本申请实施例提供的预警消息输出装置的结构示意图之二;5 is a second schematic structural diagram of an early warning message output device provided by an embodiment of the present application;

图6是本申请实施例提供的预警消息分发装置的结构示意图之一;6 is one of the schematic structural diagrams of the early warning message distribution device provided by the embodiment of the present application;

图7是本申请实施例提供的预警消息分发装置的结构示意图之二;FIG. 7 is a second schematic structural diagram of an early warning message distribution device provided by an embodiment of the present application;

图8是本申请实施提供的通信设备的结构示意图。FIG. 8 is a schematic structural diagram of a communication device provided by the implementation of this application.

具体实施方式Detailed ways

下面将结合本申请实施例中的附图,对本申请实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例是本申请一部分实施例,而不是全部的实施例。基于本申请中的实施例,本领域普通技术人员在没有作出创造性劳动前提下所获得的所有其他实施例,都属于本申请保护的范围。The technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those of ordinary skill in the art without creative work fall within the protection scope of the present application.

本申请实施例中的术语“第一”、“第二”等是用于区别类似的对象,而不必用于描述特定的顺序或先后次序。此外,术语“包括”和“具有”以及他们的任何变形,意图在于覆盖不排他的包含,例如,包含了一系列步骤或单元的过程、方法、系统、产品或设备不必限于清楚地列出的那些步骤或单元,而是可包括没有清楚地列出的或对于这些过程、方法、产品或设备固有的其它步骤或单元。此外,本申请中使用“和/或”表示所连接对象的至少其中之一,例如A和/或B和/或C,表示包含单独A,单独B,单独C,以及A和B都存在,B和C都存在,A和C都存在,以及A、B和C都存在的7种情况。The terms "first", "second", etc. in the embodiments of the present application are used to distinguish similar objects, and are not necessarily used to describe a specific sequence or sequence. Furthermore, the terms "comprising" and "having" and any variations thereof, are intended to cover non-exclusive inclusion, for example, a process, method, system, product or device comprising a series of steps or units is not necessarily limited to those expressly listed Rather, those steps or units may include other steps or units not expressly listed or inherent to these processes, methods, products or devices. In addition, the use of "and/or" in this application means at least one of the connected objects, such as A and/or B and/or C, means A alone, B alone, C alone, and both A and B are present, Both B and C exist, both A and C exist, and 7 cases where A, B, and C all exist.

参见图1,图1是本申请实施例提供的预警消息输出方法的流程示意图。图1所示的预警消息输出方法可以由终端执行。Referring to FIG. 1 , FIG. 1 is a schematic flowchart of a method for outputting an early warning message provided by an embodiment of the present application. The early warning message output method shown in FIG. 1 can be executed by a terminal.

如图1所示,预警消息输出方法可以包括以下步骤:As shown in Figure 1, the method for outputting an early warning message may include the following steps:

步骤101、接收网络设备发送的预警消息,所述预警消息为预警消息发布设备使用私钥进行签名的预警消息。Step 101: Receive an early warning message sent by a network device, where the early warning message is an early warning message signed by the early warning message issuing device using a private key.

终端(也可以称作用户设备(User Equipment,UE))可以是手机、平板电脑(TabletPersonal Computer)、膝上型电脑(Laptop Computer)、个人数字助理(Personal DigitalAssistant,PDA)、移动上网装置(Mobile Internet Device,MID)、可穿戴式设备(WearableDevice)或车载设备等。网络设备可以是基站、接入和移动管理功能(Access and MobilityManagement Function,AMF)、中继、接入点或其他网元等。The terminal (also referred to as User Equipment (UE)) may be a mobile phone, a tablet computer (TabletPersonal Computer), a laptop computer (Laptop Computer), a personal digital assistant (Personal DigitalAssistant, PDA), a mobile Internet device (Mobile Internet access device) Internet Device, MID), wearable device (WearableDevice) or vehicle-mounted device, etc. The network device may be a base station, an access and mobility management function (Access and Mobility Management Function, AMF), a relay, an access point, or other network elements.

其中,上述预警消息发布设备可以是预警消息发布部门(Cell BroadcastEntity,CBE)用于发布预警消息的设备,预警消息发布部门(例如:气象局、地震局等)可以负责发起小区广播业务,输入小区广播消息,对广播消息进行发送、查询、删除、设定广播短消息优先级和控制广播区域等。上述网络设备可以作为CBC(Cell Broadcast Center,小区广播中心)部署在运营商网络中,CBC作为移动网络的一个组成部分,由基础电信运营商管理,它负责所有基站布局的相关信息,并负责管理基站负荷和将地理信息映射到有效的无线小区,通过无线接入网,向UE发送CBE产生的短消息。The above-mentioned early warning message issuing device may be a device used by a warning message issuing department (Cell BroadcastEntity, CBE) to issue early warning messages, and the early warning message issuing department (for example, the Meteorological Bureau, the Earthquake Bureau, etc.) Broadcast message, send, query, delete, set broadcast short message priority and control broadcast area, etc. The above network equipment can be deployed in the operator's network as a CBC (Cell Broadcast Center, cell broadcast center). CBC, as an integral part of the mobile network, is managed by the basic telecom operator. The base station loads and maps geographic information to valid wireless cells, and sends short messages generated by CBE to the UE through the wireless access network.

其中,上述预警消息的签名可以是所述预警消息发布设备使用哈希算法对所述预警消息的内容进行哈希后,对哈希值进行签名得到的结果。The signature of the warning message may be a result obtained by signing the hash value after the warning message issuing device uses a hash algorithm to hash the content of the warning message.

步骤102、从联盟链中获取所述预警消息发布设备的区块链证书,基于所述区块链证书获取所述预警消息发布设备的公钥。Step 102: Obtain the blockchain certificate of the early warning message issuing device from the alliance chain, and obtain the public key of the early warning message issuing device based on the blockchain certificate.

其中,上述联盟链可以是由若干个机构共同参与管理的区块链,例如:上述联盟链中可以指定预警消息发布设备作为记账节点,每个块的生成由所有的预选节点使用共识机制共同决定,其他接入节点可以读取链上信息,但不参与记账过程。联盟链使用分布式账本和分布式共识技术从而构成数据不可篡改的分布式数据库,这样也解决了多方信任问题。上述预警消息发布设备作为记账节点可以在联盟链上发布自己的公钥,终端可以访问联盟链获取上述预警消息发布设备的公钥。Among them, the above-mentioned alliance chain can be a blockchain jointly managed by several institutions. For example, in the above-mentioned alliance chain, an early warning message publishing device can be designated as an accounting node, and the generation of each block is jointly performed by all pre-selected nodes using a consensus mechanism. It is decided that other access nodes can read the information on the chain, but do not participate in the accounting process. The alliance chain uses distributed ledgers and distributed consensus technology to form a distributed database where data cannot be tampered with, which also solves the problem of multi-party trust. The above-mentioned warning message issuing device, as an accounting node, can publish its own public key on the alliance chain, and the terminal can access the alliance chain to obtain the public key of the above-mentioned warning message issuing device.

另外,步骤101与步骤102没有执行的先后顺序要求,例如:可以先执行步骤101,通过接收的预警消息获取对应的预警消息发布设备,从而在联盟链中查找所述预警消息发布设备的区块链证书,获取所述预警消息发布设备的公钥,或者,也可以先执行步骤102,所述终端可以预先缓存所述联盟链,得到所有预警消息发布设备的公钥,也可以在通过接收到所述预警消息后从网上联盟链获取对应的预警消息发布设备的公钥,本申请对此不作限制。In addition, step 101 and step 102 are not required in order of execution. For example, step 101 can be executed first to obtain the corresponding early warning message issuing device through the received early warning message, so as to search for the block of the early warning message issuing device in the alliance chain Chain certificate to obtain the public key of the early warning message issuing device, or, step 102 can also be performed first, the terminal can cache the alliance chain in advance, and obtain the public key of all early warning message issuing devices, or it can be received by receiving After the early warning message, the public key of the corresponding early warning message issuing device is obtained from the online alliance chain, which is not limited in this application.

步骤103、使用所述公钥对所述预警消息进行签名验证。Step 103: Use the public key to perform signature verification on the warning message.

步骤104、在签名验证通过的情况下,输出所述预警消息。Step 104: In the case that the signature verification is passed, output the warning message.

其中,上述输出预警消息的方式可以是终端上对所述预警消息进行提醒,例如:语音播报、震动、响铃、消息弹窗、短信提示等方式。在签名验证通过的情况下,可以保证所述预警消息的完整性及所述预警消息发布设备的身份。Wherein, the above-mentioned manner of outputting the early warning message may be a method of reminding the early warning message on the terminal, such as voice broadcast, vibration, ringing, message pop-up window, short message prompt and the like. If the signature verification is passed, the integrity of the warning message and the identity of the warning message issuing device can be guaranteed.

本申请实施例中,通过从联盟链中获取所述预警消息发布设备的区块链证书,基于所述区块链证书获取所述预警消息发布设备的公钥,使用所述公钥对所述预警消息进行签名验证,在签名验证通过的情况下,输出所述预警消息,可以验证所述预警消息发布设备的身份和所述预警消息的完整性,避免在传送过程中若所述预警消息被篡改而导致责任归属不明确,从而提高所述预警消息下发的安全性。In the embodiment of this application, the blockchain certificate of the early warning message issuing device is obtained from the consortium chain, the public key of the early warning message issuing device is obtained based on the blockchain certificate, and the public key is used for the The pre-warning message performs signature verification, and in the case of passing the signature verification, the pre-warning message is output, which can verify the identity of the pre-warning message issuing device and the integrity of the pre-warning message. The attribution of responsibility is unclear due to tampering, thereby improving the security of issuing the warning message.

另外,使用所述公钥对接收的预警消息发布设备使用私钥进行签名的所述预警消息进行签名验证,在签名验证通过的情况下,输出所述预警消息,可以使所述预警消息直接从所述预警消息发布设备进行签名并下发,避免通过预警消息管理中心进行签名下发而预警消息管理中心出现问题不能及时下发预警消息的情况,从而可以提高所述预警消息的时效性。In addition, the public key is used to perform signature verification on the received early warning message signed by the early warning message issuing device using the private key, and when the signature verification is passed, the early warning message is output, so that the early warning message can be directly sent from the The pre-warning message issuing device signs and issues it, so as to avoid the situation that the pre-warning message management center cannot issue the pre-warning message in time due to the issue of the pre-warning message management center, thereby improving the timeliness of the pre-warning message.

可选的,所述预警消息可以包括所述预警消息发布设备对应的预警消息发布部门的名称;Optionally, the warning message may include the name of the warning message issuing department corresponding to the warning message issuing device;

步骤102中所述从联盟链中获取所述预警消息发布设备的区块链证书,基于所述区块链证书获取所述预警消息发布设备的公钥,可以包括:In step 102, obtaining the blockchain certificate of the early warning message issuing device from the alliance chain, and obtaining the public key of the early warning message issuing device based on the blockchain certificate, may include:

根据所述名称在联盟链中获取所述预警消息发布设备的区块链证书,基于所述区块链证书获取所述预警消息发布设备的公钥。Obtain the blockchain certificate of the early warning message issuing device in the alliance chain according to the name, and obtain the public key of the early warning message issuing device based on the blockchain certificate.

其中,上述预警消息发布设备的名称与公钥可以是对应关系,所述预警消息发布设备可以作为联盟链中的记账节点通过共识机制将所述预警消息发布设备的公钥写入到联盟链上,终端可以通过访问联盟链,根据所述预警消息发布设备的名称找到对应的公钥,从而实现对所述预警消息的签名验证。上述联盟链的访问用户可以是预设区域内的所有终端,例如:即使离开自己注册登记的服务区域,移动到另一服务区的用户终端也可以访问所述联盟链,获取所述预警消息发布设备的公钥,并使用所述公钥对接收的所述预警消息进行签名验证。The name and public key of the above-mentioned early warning message issuing device may be in a corresponding relationship, and the early warning message issuing device may be used as an accounting node in the consortium chain to write the public key of the early warning message issuing device to the consortium chain through a consensus mechanism On the above, the terminal can access the alliance chain and find the corresponding public key according to the name of the warning message issuing device, so as to realize the signature verification of the warning message. The access users of the above-mentioned alliance chain can be all terminals in the preset area, for example: even if they leave their own registered service area, the user terminal that moves to another service area can access the alliance chain and obtain the warning message issued. the public key of the device, and use the public key to perform signature verification on the received early warning message.

该实施方式中,通过所述预警消息发布设备对应的预警消息发布部门的名称在联盟链中获取所述预警消息发布设备的公钥,可以通过访问联盟链获取所述预警消息发布设备的公钥,可以避免只有预装所述公钥的终端才能对所述预警消息进行签名验证后输出的情况,从而增加了所述预警消息下发成功的终端数量。In this embodiment, the public key of the early warning message issuing device is obtained in the alliance chain through the name of the warning message issuing department corresponding to the warning message issuing device, and the public key of the early warning message issuing device can be obtained by accessing the alliance chain , it can avoid the situation that only the terminal preinstalled with the public key can perform signature verification on the warning message and then output it, thereby increasing the number of terminals to which the warning message is successfully delivered.

可选的,所述根据所述名称在联盟链中获取所述预警消息发布设备的区块链证书,基于所述区块链证书获取所述预警消息发布设备的公钥,包括:Optionally, obtaining the blockchain certificate of the early warning message issuing device in the alliance chain according to the name, and obtaining the public key of the early warning message issuing device based on the blockchain certificate, including:

在联盟链中包括的多个区块链证书中,查找所述预警消息发布设备的区块链证书,所述区块链证书包括预警消息发布部门的名称和公钥。From the multiple blockchain certificates included in the alliance chain, look up the blockchain certificate of the warning message issuing device, where the blockchain certificate includes the name and public key of the warning message issuing department.

其中,上述区块链证书可以预警消息发布部门的名称查找,例如:可以预先缓存上述联盟链,获取所有预警消息发布部门的区块链证书,从而得到所有预警消息发布部门的公钥,再根据上述预警消息中的上述名称获取上述预警消息发布设备对应的预警消息发布部门的公钥;或者,也可以收到上述预警消息后,根据上述预警消息中的上述名称在联盟链上获取对应的预警消息发布部门的区块链证书,从而得到上述预警消息发布设备对应的预警消息发布部门的公钥,本实施例对此不作限制。Among them, the above blockchain certificate can be searched by the name of the warning message issuing department. For example, the above alliance chain can be cached in advance, and the blockchain certificates of all warning message issuing departments can be obtained, so as to obtain the public keys of all warning message issuing departments. The above name in the above warning message obtains the public key of the warning message issuing department corresponding to the above warning message issuing device; or, after receiving the above warning message, the corresponding warning can be obtained on the alliance chain according to the above name in the above warning message The blockchain certificate of the message issuing department, so as to obtain the public key of the early warning message issuing department corresponding to the above-mentioned early warning message issuing device, which is not limited in this embodiment.

其中,上述区块链证书可以是基于自签名的X.509证书,也可以是基于自定义格式的证书。无论哪种证书格式,区块链证书都应包含预警消息发布设备的公钥,预警消息发布设备对应的预警消息发布部门名称,证书的有效期,证书的状态等内容。所述预警消息发布设备生成所述区块链证书,并将所述区块链证书标为有效后,作为一个记账节点,发起交易,联盟链上有记账权的节点使用共识机制,把区块链证书写入联盟链。The above blockchain certificate may be a self-signed X.509 certificate or a certificate based on a custom format. Regardless of the certificate format, the blockchain certificate should contain the public key of the warning message issuing device, the name of the warning message issuing department corresponding to the warning message issuing device, the validity period of the certificate, the status of the certificate, etc. The early warning message issuing device generates the blockchain certificate and marks the blockchain certificate as valid, and acts as a billing node to initiate transactions. The nodes with billing rights on the alliance chain use the consensus mechanism to The blockchain certificate is written into the consortium chain.

该实施方式中,通过所述预警消息发布设备对应的预警消息发布部门的名称,在联盟链中获取所述预警消息发布设备的公钥,从而终端可以通过访问联盟链获得所述预警消息发布设备对应的预警消息发布部门的公钥,实现对所述预警消息的签名验证,可以使所述预警消息发布区域的终端都能完成对所述预警消息的签名验证,避免漫游用户在另一服务区无法对所述预警消息进行验证的情况,可以提高所述预警消息下发到终端的成功率。In this embodiment, the public key of the early warning message issuing device is obtained in the consortium chain through the name of the early warning message issuing department corresponding to the early warning message issuing device, so that the terminal can obtain the early warning message issuing device by accessing the consortium chain The public key of the corresponding early warning message issuing department realizes the signature verification of the early warning message, so that the terminals in the early warning message issuing area can complete the signature verification of the early warning message, preventing roaming users from being in another service area. If the warning message cannot be verified, the success rate of delivering the warning message to the terminal can be improved.

可选的,所述预警消息还包括消息发送的计数和消息发送的时间戳;Optionally, the early warning message also includes a message sending count and a message sending time stamp;

步骤103中所述使用所述公钥对所述预警消息进行签名验证之前,所述预警消息输出方法还可以包括以下步骤:Before using the public key to perform signature verification on the early warning message in step 103, the early warning message output method may further include the following steps:

在所述时间戳符合预设范围,且所述计数大于所述终端上一次输出的预警消息计数的情况下,获取所述预警消息发布设备对应的预警消息发布部门的名称。In the case that the time stamp conforms to the preset range and the count is greater than the count of the warning message last output by the terminal, the name of the warning message issuing department corresponding to the warning message issuing device is acquired.

其中,通过上述消息发送的时间戳与用户终端现在的时间进行对比,若时间相隔太远,则确定所述预警消息为重放攻击,通过上述消息发送的计数与终端上一次输出的预警消息的计数对比,若本次预警消息的计数小于或等于上次预警消息的计数,也可以确定所述预警消息为重放攻击,对于重放攻击的预警消息不进行输出。The time stamp sent by the above message is compared with the current time of the user terminal. If the time interval is too far, it is determined that the early warning message is a replay attack, and the count sent by the above message is compared with the previous warning message output by the terminal. Comparing the counts, if the count of the current warning message is less than or equal to the count of the previous warning message, it can also be determined that the warning message is a replay attack, and the warning message of the replay attack is not output.

该实施方式中,通过在使用所述公钥对所述预警消息进行签名验证之前,对所述预警消息的时间戳和计数进行验证,在所述时间戳符合预设范围,且所述计数大于所述终端上一次输出的预警消息计数的情况下,获取所述预警消息发布设备对应的预警消息发布部门的名称,再根据所述名称获取所述预警消息发布设备的公钥,通过消息发送的时间戳和计数对预警消息进行验证,可以阻止攻击者的重放攻击。In this embodiment, by verifying the timestamp and count of the early warning message before using the public key to perform signature verification on the early warning message, when the timestamp conforms to a preset range and the count is greater than In the case of the count of early warning messages output by the terminal last time, obtain the name of the early warning message issuing department corresponding to the early warning message issuing device, and then obtain the public key of the early warning message issuing device according to the name, and send the message through the message. Timestamps and counts validate alert messages, preventing attackers from replaying attacks.

参见图2,图2是本申请实施例提供的预警消息分发方法的流程示意图。图2所示的预警消息分发方法可以由预警消息发布设备执行。Referring to FIG. 2 , FIG. 2 is a schematic flowchart of a method for distributing an early warning message provided by an embodiment of the present application. The early warning message distribution method shown in FIG. 2 may be executed by an early warning message issuing device.

如图2所示,预警消息分发方法可以包括以下步骤:As shown in FIG. 2 , the method for distributing an early warning message may include the following steps:

步骤201、使用私钥对预警消息进行签名。Step 201: Sign the warning message with the private key.

步骤202、分发所述签名的所述预警消息;Step 202, distributing the signed warning message;

其中,所述私钥对应的公钥包含在区块链证书中,所述区块链证书通过所述预警消息发布设备和监管部门对应的监管设备组成的联盟链管理。Wherein, the public key corresponding to the private key is included in the blockchain certificate, and the blockchain certificate is managed by a consortium chain composed of the warning message issuing device and the supervision device corresponding to the supervision department.

可选的,所述预警消息可以包括所述预警消息发布设备对应的预警消息发布部门的名称。Optionally, the early warning message may include the name of the early warning message issuing department corresponding to the early warning message issuing device.

可选的,所述预警消息分发方法还可以包括以下步骤:Optionally, the early warning message distribution method may further include the following steps:

生成区块链证书,将所述区块链证书发布到联盟链,其中,所述区块链证书包括所述预警消息发布设备对应的预警消息发布部门的名称和公钥。A blockchain certificate is generated, and the blockchain certificate is published to the alliance chain, wherein the blockchain certificate includes the name and public key of the warning message issuing department corresponding to the warning message issuing device.

可选的,所述预警消息还可以包括消息发送的计数和消息发送的时间戳。Optionally, the early warning message may further include a message sending count and a message sending time stamp.

需要说明的是,本实施例作为与上述方法实施例对应的预警消息发布设备的实施方式,因此,可以参见上述方法实施例中的相关说明,且可以达到相同的有益效果。为了避免重复说明,在此不再赘述。It should be noted that this embodiment is an implementation of an early warning message issuing device corresponding to the above method embodiment, therefore, reference may be made to the relevant description in the above method embodiment, and the same beneficial effects can be achieved. In order to avoid repeated descriptions, detailed descriptions are omitted here.

本申请实施例中介绍的多种可选的实施方式,在彼此不冲突的情况下可以相互结合实现,也可以单独实现,对此本申请实施例不作限定。The various optional implementation manners introduced in the embodiments of the present application may be implemented in combination with each other under the condition that they do not conflict with each other, or may be implemented independently, which are not limited in the embodiments of the present application.

为方便理解,示例说明如下:For ease of understanding, an example is described below:

参见图3,图3是本申请实施例可应用的预警消息输出系统的结构图,如图3所示,包括预警消息发布设备31、运营商网络32和用户终端33。Referring to FIG. 3 , FIG. 3 is a structural diagram of an early warning message output system applicable to the embodiment of the present application. As shown in FIG.

其中,多个预警消息发布设备31有各自对应的预警消息发布部门。Among them, a plurality of early warning message issuing devices 31 have respective corresponding early warning message issuing departments.

预警消息输出方法可以包括以下过程:The warning message output method can include the following processes:

各个预警消息发布设备31直接使用自己的私钥对预警消息进行签名,并将带签名的所述预警消息发送给运营商网络32,运营商网络32根据收到所述预警消息中的发送要求选择相应区域的基站进行小区广播,用户终端33根据预警消息发布设备的公钥对所述签名的所述预警消息进行签名验证。Each early warning message issuing device 31 directly signs the early warning message with its own private key, and sends the signed early warning message to the operator network 32, and the operator network 32 selects according to the sending requirements in the received early warning message. The base station in the corresponding area performs cell broadcast, and the user terminal 33 performs signature verification on the signed early warning message according to the public key of the early warning message issuing device.

其中,所述发送要求可以通过接收的所述签名的预警消息的内容得到。例如:预警消息发布设备使用自己的私钥对所述预警消息内容进行签名,其格式如下:Wherein, the sending request can be obtained through the content of the received signed early warning message. For example, the warning message issuing device uses its own private key to sign the content of the warning message, and its format is as follows:

MESSAGE|COUNT|TIMESTAMP|NAME|AREA|HASH ALG ID|SIGN ALG ID;MESSAGE|COUNT|TIMESTAMP|NAME|AREA|HASH ALG ID|SIGN ALG ID;

这里|表示信息的级联,MESSAGE表示预警消息,COUNT表示消息发送的计数,TIMESTAMP表示发送消息时的时间戳,NAME表示预警消息发布部门的名称,AREA表示预警消息的广播区域,HASH ALG ID用于指示所用哈希算法,SIGN ALG ID用于指示所用签名算法,所述签名的所述预警消息如下:Here | represents the concatenation of information, MESSAGE represents the warning message, COUNT represents the count of the message sent, TIMESTAMP represents the timestamp when the message was sent, NAME represents the name of the warning message issuing department, AREA represents the broadcast area of the warning message, HASH ALG ID uses To indicate the used hash algorithm, SIGN ALG ID is used to indicate the used signature algorithm, and the warning message of the signature is as follows:

MESSAGE|COUNT|TIMESTAMP|NAME|AREA|HASH ALG ID|SIGN ALG ID|SIGNATURE;MESSAGE|COUNT|TIMESTAMP|NAME|AREA|HASH ALG ID|SIGN ALG ID|SIGNATURE;

其中,SIGNATURE表示使用哈希算法对要签名的内容进行哈希后,对哈希值进行签名后得到的结果。Among them, SIGNATURE represents the result obtained after the hash value is signed after hashing the content to be signed by using the hash algorithm.

其中,AREA表示的所述预警消息的广播区域可以理解为所述运营商网络32选择相应区域的基站进行小区广播所遵循的发送要求。Wherein, the broadcast area of the early warning message represented by AREA can be understood as the sending requirement followed by the operator network 32 selecting base stations in the corresponding area to perform cell broadcast.

其中,用户终端33根据预警消息发布设备31的公钥对所述签名的所述预警消息进行签名验证具体可以包括以下过程:用户终端33收到所述签名的所述预警消息后,首先验证时间戳是否在一个可接受的范围内,如果是,再确定计数器是否比上次收到的预警消息的计数器高,如果也是,从而确定预警消息不是重放消息;用户终端33接着搜寻本地存储的联盟链,确定是否能找到预警消息发布部门名称,如果找不到,从网上更新联盟链,如果在更新后的联盟链里找到预警消息发布部门名称,则可以找到相应的公钥,使用此公钥对预警消息进行验签,如果成功,则显示预警消息,否则就不显示预警消息;如果在更新后的联盟链里找不到预警消息发布部门名称,不显示预警消息。这样,可以通过所述时间戳和所述计数器的配合验证所述预警消息,对于确定为重放消息的预警消息不进行显示,阻止攻击者重放上一轮预警消息的重放攻击。The signature verification of the signed early warning message by the user terminal 33 according to the public key of the early warning message issuing device 31 may specifically include the following process: after the user terminal 33 receives the signed early warning message, it first verifies the time Whether the stamp is within an acceptable range, and if so, determines whether the counter is higher than the counter of the last received alert message, and if so, determines that the alert message is not a replay message; the user terminal 33 then searches for locally stored alliances If you can't find the name of the warning message issuing department, update the alliance chain from the Internet. If you find the warning message issuing department name in the updated alliance chain, you can find the corresponding public key and use this public key Check the warning message. If it is successful, the warning message will be displayed. Otherwise, the warning message will not be displayed. If the name of the warning message issuing department cannot be found in the updated alliance chain, the warning message will not be displayed. In this way, the early warning message can be verified through the cooperation of the timestamp and the counter, and the early warning message determined to be a replayed message is not displayed, thereby preventing an attacker from replaying the previous round of early warning message replay attacks.

其中,联盟链可以由预警消息发布部门的预警消息发布设备31和监管部门的监管设备组成。预警消息发布设备31的公钥基于区块链证书的方式通过联盟链的共识机制写入联盟链,用户终端33通过访问联盟链可以获得预警消息发布部门的公钥,从而实现对预警消息的验证。预警消息发布设备31需要生成区块链证书,并把区块链证书标为有效,预警消息发布设备31作为一个记账节点,发起交易,联盟链上有记账权的节点使用共识机制,把区块链证书写入联盟链。另外,所述用户终端33还可以包括其他服务区域注册登记的用户终端,对位于所述预警消息的广播区域内的漫游用户终端,也可以通过访问联盟链获取所述预警消息发布设备的公钥,从而实现对所述预警消息的签名验证。Among them, the alliance chain can be composed of the warning message issuing device 31 of the warning message issuing department and the supervision device of the regulatory department. The public key of the warning message issuing device 31 is written into the alliance chain through the consensus mechanism of the alliance chain based on the blockchain certificate, and the user terminal 33 can obtain the public key of the warning message issuing department by accessing the alliance chain, thereby realizing the verification of the warning message . The early warning message issuing device 31 needs to generate a blockchain certificate and mark the blockchain certificate as valid. The early warning message issuing device 31 acts as a billing node to initiate transactions. The nodes with billing rights on the alliance chain use the consensus mechanism. The blockchain certificate is written into the consortium chain. In addition, the user terminal 33 may also include user terminals registered in other service areas. For roaming user terminals located in the broadcast area of the warning message, the public key of the warning message issuing device may also be obtained by accessing the alliance chain. , so as to realize the signature verification of the warning message.

本实施例中,预警消息发布设备31直接使用自己的私钥对预警消息进行签名,并将所述签名的所述预警消息发送给运营商网络32,运营商网络32根据收到的所述预警消息的广播区域选择相应区域的基站进行小区广播,用户终端33根据预警消息发布设备31的公钥对预警消息进行验签;预警消息发布设备31的公钥基于区块链证书的方式通过联盟链的共识机制写入联盟链,用户终端33通过访问联盟链可以获得预警消息发布设备31的公钥,从而实现对所述预警消息的签名验证,确定所述预先消息发布设备的身份以及所述预警消息的完整性,不需要设置专门预警消息管理中心,可以克服现有技术中单点失败和责任不清的问题。In this embodiment, the early warning message issuing device 31 directly signs the early warning message with its own private key, and sends the signed early warning message to the operator network 32, and the operator network 32 receives the early warning according to the The broadcast area of the message selects the base station in the corresponding area for cell broadcast, and the user terminal 33 verifies the early warning message according to the public key of the early warning message issuing device 31; the public key of the early warning message issuing device 31 is based on the blockchain certificate. The consensus mechanism is written into the alliance chain, and the user terminal 33 can obtain the public key of the warning message issuing device 31 by accessing the alliance chain, so as to realize the signature verification of the warning message, determine the identity of the advance message issuing device and the warning The integrity of the message does not need to set up a special warning message management center, which can overcome the problems of single point failure and unclear responsibility in the existing technology.

参见图4,图4是本申请实施例提供的预警消息输出装置的结构图之一。如图4所示,预警消息输出装置400包括:Referring to FIG. 4 , FIG. 4 is one of the structural diagrams of an early warning message output device provided by an embodiment of the present application. As shown in FIG. 4 , the warning message output device 400 includes:

接收模块401,用于接收网络设备发送的预警消息,所述预警消息为预警消息发布设备使用私钥进行签名的预警消息;A receiving module 401, configured to receive an early warning message sent by a network device, where the early warning message is an early warning message signed by the early warning message issuing device using a private key;

第一获取模块402,用于从联盟链中获取所述预警消息发布设备的公钥;The first obtaining module 402 is configured to obtain the public key of the early warning message issuing device from the alliance chain;

验证模块403,用于使用所述公钥对所述预警消息进行签名验证;A verification module 403, configured to perform signature verification on the warning message using the public key;

输出模块404,用于在签名验证通过的情况下,输出所述预警消息。The output module 404 is configured to output the warning message when the signature verification is passed.

可选的,所述预警消息包括所述预警消息发布设备对应的预警消息发布部门的名称;Optionally, the warning message includes the name of the warning message issuing department corresponding to the warning message issuing device;

第一获取模块402可以具体用于:The first obtaining module 402 may be specifically used for:

根据所述名称在联盟链中获取所述预警消息发布设备的公钥。Obtain the public key of the warning message issuing device in the alliance chain according to the name.

可选的,所述根据所述名称在联盟链中获取所述预警消息发布设备的公钥,可以包括:Optionally, the obtaining the public key of the early warning message issuing device in the alliance chain according to the name may include:

在联盟链中包括的多个区块链证书中,查找所述预警消息发布设备的区块链证书,所述区块链证书包括预警消息发布部门的名称和公钥。From the multiple blockchain certificates included in the alliance chain, look up the blockchain certificate of the warning message issuing device, where the blockchain certificate includes the name and public key of the warning message issuing department.

可选的,所述预警消息还包括消息发送的计数和消息发送的时间戳;Optionally, the early warning message also includes a message sending count and a message sending time stamp;

如图5所示,预警消息输出装置400还可以包括:As shown in FIG. 5 , the warning message output device 400 may further include:

第二获取模块405,用于在所述时间戳符合预设范围,且所述计数大于所述终端上一次输出的预警消息计数的情况下,获取所述目标预警消息发布部门的名称。The second obtaining module 405 is configured to obtain the name of the target warning message issuing department when the time stamp conforms to a preset range and the count is greater than the count of the warning message last output by the terminal.

预警消息输出装置400能够实现本申请实施例中图1方法实施例的各个过程,以及达到相同的有益效果,为避免重复,这里不再赘述。The early warning message output device 400 can implement each process of the method embodiment of FIG. 1 in the embodiment of the present application, and achieve the same beneficial effect, and to avoid repetition, details are not repeated here.

预警消息输出装置500能够实现本申请实施例中图1方法实施例的各个过程,以及达到相同的有益效果,为避免重复,这里不再赘述。The early warning message output device 500 can implement each process of the method embodiment of FIG. 1 in the embodiment of the present application, and achieve the same beneficial effect, and to avoid repetition, details are not repeated here.

参见图6,图6是本申请实施例提供的预警消息分发装置的结构图之一。如图6所示,预警消息分发装置600包括:Referring to FIG. 6, FIG. 6 is one of the structural diagrams of an early warning message distribution apparatus provided by an embodiment of the present application. As shown in FIG. 6 , the warning message distribution apparatus 600 includes:

签名模块601,用于使用私钥对预警消息进行签名;A signature module 601, used to sign the warning message with a private key;

分发模块602,用于分发所述签名的所述预警消息;a distribution module 602, configured to distribute the signed warning message;

其中,所述私钥对应的公钥包含在联盟链中。Wherein, the public key corresponding to the private key is included in the alliance chain.

可选的,所述预警消息包括所述预警消息发布设备对应的预警消息发布部门的名称。Optionally, the early warning message includes the name of the early warning message issuing department corresponding to the early warning message issuing device.

可选的,如图7所示,预警消息分发装置600还可以包括:Optionally, as shown in FIG. 7 , the early warning message distribution apparatus 600 may further include:

生成模块603,用于生成区块链证书,将所述区块链证书发布到联盟链,其中,所述区块链证书包括所述预警消息发布设备对应的预警消息发布部门的名称和公钥。The generating module 603 is configured to generate a blockchain certificate and publish the blockchain certificate to the alliance chain, wherein the blockchain certificate includes the name and public key of the warning message issuing department corresponding to the warning message issuing device .

可选的,所述预警消息还可以包括消息发送的计数和消息发送的时间戳。Optionally, the early warning message may further include a message sending count and a message sending time stamp.

预警消息分发装置600能够实现本申请实施例中图2方法实施例的各个过程,以及达到相同的有益效果,为避免重复,这里不再赘述。The early warning message distribution apparatus 600 can implement each process of the method embodiment of FIG. 2 in the embodiment of the present application, and achieve the same beneficial effect. To avoid repetition, details are not described here.

本申请实施例还提供一种通信设备。请参见图8,通信设备可以包括处理器801、存储器802及存储在存储器802上并可在处理器801上运行的程序8021。The embodiments of the present application also provide a communication device. Referring to FIG. 8 , the communication device may include a processor 801 , a memory 802 , and a program 8021 stored on the memory 802 and executable on the processor 801 .

在通信设备为终端的情况下,程序8021被处理器801执行时可实现图1对应的方法实施例中的任意步骤及达到相同的有益效果,此处不再赘述。In the case where the communication device is a terminal, when the program 8021 is executed by the processor 801, any steps in the method embodiment corresponding to FIG. 1 can be implemented and the same beneficial effects can be achieved, which will not be repeated here.

在通信设备为预警消息发布设备的情况下,程序8021被处理器801执行时可实现图2对应的方法实施例中的任意步骤及达到相同的有益效果,此处不再赘述。When the communication device is an early warning message issuing device, when the program 8021 is executed by the processor 801, any steps in the method embodiment corresponding to FIG. 2 can be implemented and the same beneficial effects can be achieved, which will not be repeated here.

本领域普通技术人员可以理解实现上述实施例方法的全部或者部分步骤是可以通过程序指令相关的硬件来完成,所述的程序可以存储于一可读取介质中。本申请实施例还提供一种可读存储介质,所述可读存储介质上存储有计算机程序,所述计算机程序被处理器执行时可实现上述图1或图2对应的方法实施例中的任意步骤,且能达到相同的技术效果,为避免重复,这里不再赘述。Those of ordinary skill in the art can understand that all or part of the steps of implementing the methods of the above embodiments can be completed by program instructions related to hardware, and the program can be stored in a readable medium. Embodiments of the present application further provide a readable storage medium, where a computer program is stored on the readable storage medium, and when the computer program is executed by a processor, any one of the method embodiments corresponding to FIG. 1 or FIG. 2 can be implemented. steps, and can achieve the same technical effect, in order to avoid repetition, it is not repeated here.

所述的存储介质,如只读存储器(Read-Only Memory,ROM)、随机存取存储器(Random Access Memory,RAM)、磁碟或者光盘等。The storage medium is, for example, a read-only memory (Read-Only Memory, ROM), a random access memory (Random Access Memory, RAM), a magnetic disk or an optical disk, and the like.

以上所述是本申请实施例的优选实施方式,应当指出,对于本技术领域的普通技术人员来说,在不脱离本申请所述原理的前提下,还可以作出若干改进和润饰,这些改进和润饰也应视为本申请的保护范围。The above are the preferred implementations of the embodiments of the present application. It should be pointed out that for those skilled in the art, without departing from the principles described in the present application, several improvements and modifications can also be made. These improvements and Retouching should also be considered within the scope of protection of this application.

Claims (12)

1.一种预警消息输出方法,由终端执行,其特征在于,包括:1. A method for outputting an early warning message, executed by a terminal, is characterized in that, comprising: 接收网络设备发送的预警消息,所述预警消息为预警消息发布设备使用私钥进行签名的预警消息;Receive an early warning message sent by a network device, where the early warning message is an early warning message signed by an early warning message issuing device using a private key; 从联盟链中获取所述预警消息发布设备的区块链证书,基于所述区块链证书获取所述预警消息发布设备的公钥;Obtain the blockchain certificate of the early warning message issuing device from the alliance chain, and obtain the public key of the early warning message issuing device based on the blockchain certificate; 使用所述公钥对所述预警消息进行签名验证;Using the public key to perform signature verification on the warning message; 在签名验证通过的情况下,输出所述预警消息。If the signature verification is passed, the warning message is output. 2.如权利要求1所述的方法,其特征在于,所述预警消息包括所述预警消息发布设备对应的预警消息发布部门的名称;2. The method according to claim 1, wherein the warning message comprises the name of the warning message issuing department corresponding to the warning message issuing device; 所述从联盟链中获取所述预警消息发布设备的区块链证书,基于所述区块链证书获取所述预警消息发布设备的公钥,包括:The obtaining the blockchain certificate of the early warning message issuing device from the alliance chain, and obtaining the public key of the early warning message issuing device based on the blockchain certificate, includes: 根据所述名称在联盟链中获取所述预警消息发布设备的区块链证书,基于所述区块链证书获取所述预警消息发布设备的公钥。Obtain the blockchain certificate of the early warning message issuing device in the alliance chain according to the name, and obtain the public key of the early warning message issuing device based on the blockchain certificate. 3.如权利要求2所述的方法,其特征在于,所述根据所述名称在联盟链中获取所述预警消息发布设备的区块链证书,基于所述区块链证书获取所述预警消息发布设备的公钥,包括:3. The method according to claim 2, wherein the block chain certificate of the early warning message issuing device is obtained in a consortium chain according to the name, and the early warning message is obtained based on the block chain certificate Publish the device's public key, including: 在联盟链中包括的多个区块链证书中,查找所述预警消息发布设备的区块链证书,所述区块链证书包括预警消息发布部门的名称和公钥。From the multiple blockchain certificates included in the alliance chain, look up the blockchain certificate of the warning message issuing device, where the blockchain certificate includes the name and public key of the warning message issuing department. 4.如权利要求2所述的方法,其特征在于,所述预警消息还包括消息发送的计数和消息发送的时间戳;4. The method of claim 2, wherein the early warning message further comprises a count of message sending and a time stamp of message sending; 所述使用所述公钥对所述预警消息进行签名验证之前,所述方法还包括:Before performing signature verification on the warning message using the public key, the method further includes: 在所述时间戳符合预设范围,且所述计数大于所述终端上一次输出的预警消息计数的情况下,获取所述预警消息发布设备对应的预警消息发布部门的名称。In the case that the time stamp conforms to the preset range and the count is greater than the count of the warning message last output by the terminal, the name of the warning message issuing department corresponding to the warning message issuing device is acquired. 5.一种预警消息分发方法,由预警消息发布设备执行,其特征在于,包括:5. A method for distributing an early warning message, executed by an early warning message issuing device, comprising: 使用私钥对预警消息进行签名;Sign the alert message with the private key; 分发所述签名的所述预警消息;distributing said warning message of said signature; 其中,所述私钥对应的公钥包含在区块链证书中,所述区块链证书通过所述预警消息发布设备和监管部门对应的监管设备组成的联盟链管理。Wherein, the public key corresponding to the private key is included in the blockchain certificate, and the blockchain certificate is managed by a consortium chain composed of the warning message issuing device and the supervision device corresponding to the supervision department. 6.如权利要求5所述的方法,其特征在于,所述预警消息包括所述预警消息发布设备对应的预警消息发布部门的名称。6 . The method of claim 5 , wherein the early warning message includes the name of an early warning message issuing department corresponding to the early warning message issuing device. 7 . 7.如权利要求6所述的方法,其特征在于,所述方法还包括:7. The method of claim 6, wherein the method further comprises: 生成区块链证书,将所述区块链证书发布到联盟链,其中,所述区块链证书包括所述预警消息发布设备对应的预警消息发布部门的名称和公钥。A blockchain certificate is generated, and the blockchain certificate is published to the alliance chain, wherein the blockchain certificate includes the name and public key of the warning message issuing department corresponding to the warning message issuing device. 8.如权利要求6所述的方法,其特征在于,所述预警消息还包括消息发送的计数和消息发送的时间戳。8. The method of claim 6, wherein the early warning message further comprises a count of message sending and a time stamp of message sending. 9.一种预警消息输出装置,其特征在于,包括:9. An early warning message output device, characterized in that, comprising: 接收模块,用于接收网络设备发送的预警消息,所述预警消息为预警消息发布设备使用私钥进行签名的预警消息;a receiving module, configured to receive an early warning message sent by a network device, where the early warning message is an early warning message signed by an early warning message issuing device using a private key; 第一获取模块,用于从联盟链中获取所述预警消息发布设备的区块链证书,基于所述区块链证书获取所述预警消息发布设备的公钥;a first obtaining module, configured to obtain the blockchain certificate of the early warning message issuing device from the alliance chain, and obtain the public key of the early warning message issuing device based on the blockchain certificate; 验证模块,用于使用所述公钥对所述预警消息进行签名验证;a verification module, configured to perform signature verification on the warning message using the public key; 输出模块,用于在签名验证通过的情况下,输出所述预警消息。The output module is configured to output the warning message when the signature verification is passed. 10.一种预警消息分发装置,其特征在于,包括:10. An early warning message distribution device, characterized in that, comprising: 签名模块,用于使用私钥对预警消息进行签名;The signature module is used to sign the warning message with the private key; 分发模块,用于分发所述签名的所述预警消息;a distribution module for distributing the signed warning message; 其中,所述私钥对应的公钥包含在联盟链中。Wherein, the public key corresponding to the private key is included in the alliance chain. 11.一种通信设备,包括:收发机、存储器、处理器及存储在所述存储器上并可在所述处理器上运行的程序;其特征在于,所述处理器,用于读取存储器中的程序实现如权利要求1至4中任一项所述的预警消息输出方法中的步骤,或,如权利要求5至8中任一项所述的预警消息分发方法中的步骤。11. A communication device, comprising: a transceiver, a memory, a processor, and a program stored on the memory and executable on the processor; characterized in that, the processor is configured to read data stored in the memory The program implements the steps in the early warning message output method according to any one of claims 1 to 4, or the steps in the early warning message distribution method according to any one of claims 5 to 8. 12.一种可读存储介质,用于存储程序,其特征在于,所述程序被处理器执行时实现如权利要求1至4中任一项所述的预警消息输出方法中的步骤,或,实现如权利要求5至8中任一项所述的预警消息分发方法中的步骤。12. A readable storage medium for storing a program, wherein, when the program is executed by a processor, the steps in the method for outputting an early warning message as claimed in any one of claims 1 to 4 are realized, or, Steps in the early warning message distribution method as claimed in any one of claims 5 to 8 are implemented.
CN202011536910.3A 2020-12-23 2020-12-23 Warning message output method, warning message distribution method, device and related equipment Active CN114666081B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011536910.3A CN114666081B (en) 2020-12-23 2020-12-23 Warning message output method, warning message distribution method, device and related equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011536910.3A CN114666081B (en) 2020-12-23 2020-12-23 Warning message output method, warning message distribution method, device and related equipment

Publications (2)

Publication Number Publication Date
CN114666081A true CN114666081A (en) 2022-06-24
CN114666081B CN114666081B (en) 2024-11-08

Family

ID=82024313

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011536910.3A Active CN114666081B (en) 2020-12-23 2020-12-23 Warning message output method, warning message distribution method, device and related equipment

Country Status (1)

Country Link
CN (1) CN114666081B (en)

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20180181739A1 (en) * 2015-08-27 2018-06-28 Alibaba Group Holding Limited Identity authentication using biometrics
CN110601853A (en) * 2019-09-17 2019-12-20 腾讯科技(深圳)有限公司 Block chain private key generation method and equipment
CN110677376A (en) * 2018-07-03 2020-01-10 中国电信股份有限公司 Authentication method, related device and system and computer readable storage medium

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20180181739A1 (en) * 2015-08-27 2018-06-28 Alibaba Group Holding Limited Identity authentication using biometrics
CN110677376A (en) * 2018-07-03 2020-01-10 中国电信股份有限公司 Authentication method, related device and system and computer readable storage medium
CN110601853A (en) * 2019-09-17 2019-12-20 腾讯科技(深圳)有限公司 Block chain private key generation method and equipment

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
王乃洲;金连文;高兵;金晓峰;: "基于区块链技术的身份认证与存储方法研究", 现代信息科技, no. 08, 25 April 2020 (2020-04-25) *

Also Published As

Publication number Publication date
CN114666081B (en) 2024-11-08

Similar Documents

Publication Publication Date Title
Zhou et al. Efficient certificateless conditional privacy-preserving authentication for VANETs
Li et al. BDRA: Blockchain and decentralized identifiers assisted secure registration and authentication for VANETs
Zhang et al. PA-CRT: Chinese remainder theorem based conditional privacy-preserving authentication scheme in vehicular ad-hoc networks
US20230316273A1 (en) Data processing method and apparatus, computer device, and storage medium
CN106789090B (en) Blockchain-based public key infrastructure system and semi-random joint certificate signature method
US10972284B2 (en) Method of providing a hash value for a piece of data, electronic device and computer program
US12184726B2 (en) Blockchain-based data processing method and apparatus, device, and readable storage medium
CN108537046A (en) A kind of online contract signature system and method based on block chain technology
Yao et al. PBCert: Privacy-preserving blockchain-based certificate status validation toward mass storage management
CN111556120A (en) Data processing method and device based on block chain, storage medium and equipment
Yao et al. An Improved and Privacy‐Preserving Mutual Authentication Scheme with Forward Secrecy in VANETs
Moussaoui et al. A Distributed Blockchain Based PKI (BCPKI) architecture to enhance privacy in VANET
Yang et al. An efficient blockchain‐based batch verification scheme for vehicular ad hoc networks
US11943210B2 (en) System and method for distributed, keyless electronic transactions with authentication
WO2020088074A1 (en) Privacy transaction method and apparatus based on blockchain, and application method and apparatus therefor
CN104579662B (en) Mobile terminal authentication method and system based on WPKI and timestamp
CN111182497A (en) V2X anonymous authentication method, device and storage medium
CN113254972A (en) Information security management method based on block chain
US20090025062A1 (en) Verifying authenticity of conference call invitees
Zeng et al. Mix‐Context‐Based Pseudonym Changing Privacy Preserving Authentication in VANETs
WO2024146179A9 (en) Cross-blockchain transaction processing method, related device, storage medium and product
Yang et al. Blockchain-based conditional privacy-preserving authentication protocol with implicit certificates for vehicular edge computing
Yu et al. Efficient anonymous data authentication for vehicular ad hoc networks
Sun et al. Anonymous authentication and key agreement scheme combining the group key for vehicular ad hoc networks
CN114239072B (en) Block chain node management method and block chain network

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