CN109560893B - Data verification method and device and server - Google Patents

Data verification method and device and server Download PDF

Info

Publication number
CN109560893B
CN109560893B CN201811322299.7A CN201811322299A CN109560893B CN 109560893 B CN109560893 B CN 109560893B CN 201811322299 A CN201811322299 A CN 201811322299A CN 109560893 B CN109560893 B CN 109560893B
Authority
CN
China
Prior art keywords
server
data verification
data
verification
iot devices
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.)
Active
Application number
CN201811322299.7A
Other languages
Chinese (zh)
Other versions
CN109560893A (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 United Network Communications Group Co Ltd
Original Assignee
China United Network Communications Group 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 United Network Communications Group Co Ltd filed Critical China United Network Communications Group Co Ltd
Priority to CN201811322299.7A priority Critical patent/CN109560893B/en
Publication of CN109560893A publication Critical patent/CN109560893A/en
Application granted granted Critical
Publication of CN109560893B publication Critical patent/CN109560893B/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
    • H04L1/00Arrangements for detecting or preventing errors in the information received
    • H04L1/004Arrangements for detecting or preventing errors in the information received by using forward error control
    • H04L1/0045Arrangements at the receiver end

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Telephonic Communication Services (AREA)

Abstract

本发明实施例提供一种数据校验方法、装置及服务器。该方法包括:统计接入服务器的物联网设备的数量;根据所统计的接入服务器的物联网设备的数量,调整数据校验容器的数量,数据校验容器用于对至少一个物联网设备采集的数据进行校验。本发明实施例的方法,实现了数据校验容器的数量可以根据接入的物联网设备的数量自适应调整,满足了海量物联网设备同时接入网络时的海量数据校验需求。

Figure 201811322299

Embodiments of the present invention provide a data verification method, device, and server. The method includes: counting the number of IoT devices accessing the server; adjusting the number of data verification containers according to the counted number of IoT devices accessing the server, where the data verification container is used to collect data from at least one IoT device data for verification. The method of the embodiment of the present invention realizes that the number of data verification containers can be adaptively adjusted according to the number of connected IoT devices, and meets the massive data verification requirement when massive IoT devices simultaneously access the network.

Figure 201811322299

Description

数据校验方法、装置及服务器Data verification method, device and server

技术领域technical field

本发明实施例涉及物联网应用技术领域,尤其涉及一种数据校验方法、装置及服务器。Embodiments of the present invention relate to the technical field of Internet of Things applications, and in particular, to a data verification method, device, and server.

背景技术Background technique

为了保证数据的完整性以及合法性,在各种应用场景下,接收方需要对接收到的数据进行数据校验,以确保数据的完整,避免非法数据攻击。In order to ensure the integrity and legality of the data, in various application scenarios, the receiver needs to perform data verification on the received data to ensure the integrity of the data and avoid illegal data attacks.

随着互联网行业的快速发展以及物联网产业的兴起,物联网设备已经被广泛用于数据采集。数据采集是基于数据传输协议,通过主机端口进行数据传输采集,服务器在接收到物联网设备采集的数据后,首先需要对接收到的数据进行数据校验。只有通过数据校验的完整、合法的数据才会传递至下游系统进行进一步的分析处理。数据校验会占用服务器的主机资源,尤其是在各种大数据应用场景下,物联网设备的接入量骤增,导致数据校验速度缓慢,以至于无法及时有效的对物联网设备采集的数据进行分析处理。With the rapid development of the Internet industry and the rise of the Internet of Things industry, IoT devices have been widely used for data collection. Data collection is based on the data transmission protocol, and data transmission and collection is carried out through the host port. After the server receives the data collected by the IoT device, it first needs to perform data verification on the received data. Only complete and legal data that has passed the data verification will be transmitted to the downstream system for further analysis and processing. Data verification will occupy the host resources of the server, especially in various big data application scenarios, the access volume of IoT devices increases sharply, resulting in slow data verification, so that it is impossible to collect data from IoT devices in a timely and effective manner. Data is analyzed.

综上所述,现有数据校验方法无法支持海量物联网设备同时接入网络,无法满足海量数据校验需求。To sum up, the existing data verification methods cannot support massive IoT devices accessing the network at the same time, and cannot meet the demand for massive data verification.

发明内容SUMMARY OF THE INVENTION

本发明实施例提供一种数据校验方法、装置及服务器,用以解决现有技术无法满足海量数据校验需求的问题。Embodiments of the present invention provide a data verification method, an apparatus, and a server, which are used to solve the problem that the prior art cannot meet the requirement of massive data verification.

第一方面,本发明实施例提供一种数据校验方法,包括:In a first aspect, an embodiment of the present invention provides a data verification method, including:

统计接入服务器的物联网设备的数量;Count the number of IoT devices connected to the server;

根据所统计的接入服务器的物联网设备的数量,调整数据校验容器的数量,数据校验容器用于对至少一个物联网设备采集的数据进行校验。The number of data verification containers is adjusted according to the counted number of IoT devices connected to the server, and the data verification container is used to verify the data collected by at least one IoT device.

在一种可能的实现方式中,根据所统计的接入服务器的物联网设备的数量,调整数据校验容器的数量包括:In a possible implementation manner, according to the counted number of IoT devices accessing the server, adjusting the number of data verification containers includes:

若所统计的接入服务器的物联网设备的数量大于第一阈值,则根据所统计的接入服务器的物联网设备的数量,增加数据校验容器的数量,第一阈值根据当前服务器中数据校验容器的数量确定。If the counted number of IoT devices connected to the server is greater than the first threshold, the number of data verification containers is increased according to the counted number of IoT devices connected to the server, and the first threshold is based on the data verification in the current server. The number of inspection containers is determined.

在一种可能的实现方式中,根据所统计的接入服务器的物联网设备的数量,调整数据校验容器的数量包括:In a possible implementation manner, according to the counted number of IoT devices accessing the server, adjusting the number of data verification containers includes:

若所统计的接入服务器的物联网设备的数量小于第二阈值,则根据所统计的接入服务器的物联网设备的数量,减少数据校验容器的数量,第二阈值根据当前服务器中数据校验容器的数量确定。If the counted number of IoT devices connected to the server is less than the second threshold, the number of data verification containers is reduced according to the counted number of IoT devices connected to the server, and the second threshold is based on the data verification in the current server. The number of inspection containers is determined.

在一种可能的实现方式中,所述方法还包括:In a possible implementation, the method further includes:

若与数据校验容器连接的物联网设备的数量降为预设数量时,则销毁该数据校验容器。If the number of IoT devices connected to the data verification container is reduced to a preset number, the data verification container is destroyed.

在一种可能的实现方式中,数据校验容器用于对至少一个物联网设备采集的数据进行校验包括:In a possible implementation manner, the data verification container used to verify the data collected by at least one IoT device includes:

数据校验容器用于对至少一个物联网设备采集的数据依次进行常规校验、数字签名校验和循环冗余校验,常规校验用于对数据的记录数、大小、行数和编码信息进行校验。The data verification container is used to sequentially perform routine verification, digital signature verification and cyclic redundancy check on the data collected by at least one IoT device, and the routine verification is used to verify the number of records, size, number of rows and coding information of the data Check it out.

在一种可能的实现方式中,所述方法还包括:In a possible implementation, the method further includes:

若物联网设备采集的数据未通过数据校验,则向物联网设备发送失败通知消息,失败通知消息包括重传策略指示信息,用于指示物联网设备根据失败通知消息所指示的重传策略进行数据重新传输。If the data collected by the IoT device fails the data verification, a failure notification message is sent to the IoT device. The failure notification message includes retransmission policy indication information, which is used to instruct the IoT device to perform a retransmission policy according to the retransmission policy indicated by the failure notification message. Data retransmission.

在一种可能的实现方式中,在统计接入服务器的物联网设备的数量之前,所述方法还包括:In a possible implementation manner, before counting the number of IoT devices accessing the server, the method further includes:

接收物联网设备发送的接入请求消息,接入请求消息包括物联网设备的设备编码信息;Receive an access request message sent by an IoT device, where the access request message includes device code information of the IoT device;

根据设备编码信息确定是否允许物联网设备接入服务器。Determine whether to allow the IoT device to access the server according to the device encoding information.

第二方面,本发明实施例提供一种数据校验装置,包括:In a second aspect, an embodiment of the present invention provides a data verification device, including:

统计模块,用于统计接入服务器的物联网设备的数量;Statistics module, used to count the number of IoT devices connected to the server;

调整模块,用于根据所统计的接入服务器的物联网设备的数量,调整数据校验容器的数量,数据校验容器用于对至少一个物联网设备采集的数据进行校验。The adjustment module is configured to adjust the number of data verification containers according to the counted number of IoT devices accessing the server, and the data verification containers are used to verify the data collected by at least one IoT device.

第三方面,本发明实施例提供一种服务器,包括:In a third aspect, an embodiment of the present invention provides a server, including:

至少一个处理器和存储器;at least one processor and memory;

存储器存储计算机执行指令;memory stores instructions for execution by the computer;

至少一个处理器执行存储器存储的计算机执行指令,使得至少一个处理器执行如第一方面任一项所述的数据校验方法。The at least one processor executes the computer-executable instructions stored in the memory, so that the at least one processor executes the data verification method according to any one of the first aspects.

第四方面,本发明实施例提供一种计算机可读存储介质,所述计算机可读存储介质中存储有计算机执行指令,计算机执行指令被处理器执行时用于实现如第一方面任一项所述的数据校验方法。In a fourth aspect, an embodiment of the present invention provides a computer-readable storage medium, where computer-executable instructions are stored in the computer-readable storage medium, and when the computer-executable instructions are executed by a processor, are used to implement any one of the first aspect. The data verification method described above.

本发明实施例提供的数据校验方法、装置及服务器,通过统计接入服务器的物联网设备的数量,并根据所统计的接入服务器的物联网设备的数量,调整数据校验容器的数量。如此,实现了数据校验容器的数量可以根据接入的物联网设备的数量按需自适应调整,可以满足海量物联网设备同时接入网络时的数据校验需求,响应速度快,提高了数据校验的速度。The data verification method, device and server provided by the embodiments of the present invention adjust the number of data verification containers by counting the number of IoT devices connected to the server and according to the counted number of IoT devices accessing the server. In this way, it is realized that the number of data verification containers can be adaptively adjusted according to the number of connected IoT devices, which can meet the data verification requirements when a large number of IoT devices are simultaneously connected to the network. The response speed is fast, and the data is improved. Check speed.

附图说明Description of drawings

此处的附图被并入说明书中并构成本说明书的一部分,示出了符合本发明的实施例,并与说明书一起用于解释本发明的原理。The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the invention and together with the description serve to explain the principles of the invention.

图1为本发明提供的数据校验方法一实施例的流程图;1 is a flowchart of an embodiment of a data verification method provided by the present invention;

图2为本发明提供的数据校验方法一实施例的应用示意图;2 is an application schematic diagram of an embodiment of a data verification method provided by the present invention;

图3为本发明提供的数据校验装置一实施例的结构示意图;3 is a schematic structural diagram of an embodiment of a data verification device provided by the present invention;

图4为本发明提供的服务器一实施例的结构示意图。FIG. 4 is a schematic structural diagram of an embodiment of a server provided by the present invention.

通过上述附图,已示出本发明明确的实施例,后文中将有更详细的描述。这些附图和文字描述并不是为了通过任何方式限制本发明构思的范围,而是通过参考特定实施例为本领域技术人员说明本发明的概念。By the above-mentioned drawings, there have been shown specific embodiments of the invention, which will be described in more detail hereinafter. These drawings and written descriptions are not intended to limit the scope of the inventive concept in any way, but to illustrate the inventive concept to those skilled in the art by referring to specific embodiments.

具体实施方式Detailed ways

这里将详细地对示例性实施例进行说明,其示例表示在附图中。下面的描述涉及附图时,除非另有表示,不同附图中的相同数字表示相同或相似的要素。以下示例性实施例中所描述的实施方式并不代表与本发明相一致的所有实施方式。相反,它们仅是与如所附权利要求书中所详述的、本发明的一些方面相一致的装置和方法的例子。Exemplary embodiments will be described in detail herein, examples of which are illustrated in the accompanying drawings. Where the following description refers to the drawings, the same numerals in different drawings refer to the same or similar elements unless otherwise indicated. The implementations described in the illustrative examples below are not intended to represent all implementations consistent with the present invention. Rather, they are merely examples of apparatus and methods consistent with some aspects of the invention as recited in the appended claims.

本发明的说明书和权利要求书中的术语“包括”和“具有”以及它们任何变形,意图在于覆盖不排他的包含。例如包含了一系列步骤或单元的过程、方法、系统、产品或设备没有限定于已列出的步骤或单元,而是可选地还包括没有列出的步骤或单元,或可选地还包括对于这些过程、方法、产品或设备固有的其它步骤或单元。The terms "comprising" and "having" and any variations thereof in the description and claims of the present invention are intended to cover non-exclusive inclusions. For example, a process, method, system, product or device comprising a series of steps or units is not limited to the listed steps or units, but optionally also includes unlisted steps or units, or optionally also includes For other steps or units inherent to these processes, methods, products or devices.

本发明中的“第一”和“第二”只起标识作用,而不能理解为指示或暗示顺序关系、相对重要性或者隐含指明所指示的技术特征的数量。“多个”是指两个或两个以上。“和/或”,描述关联对象的关联关系,表示可以存在三种关系,例如,A和/或B,可以表示:单独存在A,同时存在A和B,单独存在B这三种情况。字符“/”一般表示前后关联对象是一种“或”的关系。In the present invention, "first" and "second" only play a role of identification, and cannot be understood as indicating or implying a sequence relationship, relative importance, or implicitly indicating the quantity of the indicated technical features. "Plural" means two or more. "And/or", which describes the association relationship of the associated objects, means that there can be three kinds of relationships, for example, A and/or B, which can mean that A exists alone, A and B exist at the same time, and B exists alone. The character "/" generally indicates that the associated objects are an "or" relationship.

本发明的说明书中通篇提到的“一个实施例”或“一实施例”意味着与实施例有关的特定特征、结构或特性包括在本申请的至少一个实施例中。因此,在整个说明书各处出现的“在一个实施例中”或“在一实施例中”未必一定指相同的实施例。需要说明的是,在不冲突的情况下,本发明中的实施例及实施例中的特征可以相互组合。Reference throughout this specification to "one embodiment" or "an embodiment" means that a particular feature, structure, or characteristic associated with the embodiment is included in at least one embodiment of the present application. Thus, appearances of "in one embodiment" or "in an embodiment" in various places throughout this specification are not necessarily necessarily referring to the same embodiment. It should be noted that the embodiments of the present invention and the features of the embodiments may be combined with each other under the condition of no conflict.

图1为本发明提供的数据校验方法一实施例的流程图。本实施例提供的方法可以由网络侧设备,如服务器执行。如图1所示,本实施例提供的数据校验方法可以包括:FIG. 1 is a flowchart of an embodiment of a data verification method provided by the present invention. The method provided in this embodiment may be executed by a network-side device, such as a server. As shown in FIG. 1 , the data verification method provided in this embodiment may include:

S101、统计接入服务器的物联网设备的数量。S101. Count the number of IoT devices connected to the server.

本实施例中物联网设备可以通过蓝牙、红外、无线局域网、移动通信网络等无线通信方式接入服务器中,还可以通过有线通信方式接入服务器中,本实施例对于物联网设备接入服务器的方式不做特殊限制,各种接入方式均适用于本实施例。In this embodiment, the IoT device can be connected to the server through wireless communication methods such as Bluetooth, infrared, wireless local area network, and mobile communication network, and can also be connected to the server through wired communication. The mode is not particularly limited, and various access modes are applicable to this embodiment.

本实施例中的物联网设备可以是各种传感器,例如温度传感器、水位传感器、风速传感器、压力传感器等。本实施例中接入服务器的物联网设备可以是相同种类的物联网设备,也可以是不同种类的物联网设备。The IoT device in this embodiment may be various sensors, such as a temperature sensor, a water level sensor, a wind speed sensor, a pressure sensor, and the like. In this embodiment, the IoT devices accessing the server may be the same type of IoT devices, or may be different types of IoT devices.

本实施例中服务器对于接入服务器的物联网设备的数量的统计可以是实时的,也可以是以预设时间间隔作为统计周期进行的,例如,可以每隔30秒对接入服务器的物联网设备的数量进行一次统计。In this embodiment, the server may perform statistics on the number of IoT devices accessing the server in real time, or it may be performed at a preset time interval as a statistical period. For example, the statistics on the IoT devices accessing the server may be performed every 30 seconds The number of devices is counted once.

S102、根据所统计的接入服务器的物联网设备的数量,调整数据校验容器的数量,数据校验容器用于对至少一个物联网设备采集的数据进行校验。S102. Adjust the number of data verification containers according to the counted number of IoT devices accessing the server, where the data verification containers are used to verify data collected by at least one IoT device.

本实施例中的数据校验容器可以用于对至少一个物联网设备采集的数据进行校验,对数据进行的校验可以包括对数据的完整性和/或合法性进行校验。本实施例对于数据校验的具体实现方式不作限制。The data verification container in this embodiment may be used to verify the data collected by at least one IoT device, and the verification of the data may include verification of the integrity and/or validity of the data. This embodiment does not limit the specific implementation manner of data verification.

本实施例中数据校验容器的数量与接入服务器的物联网设备的数量正相关。也就是说,当接入服务器的物联网设备的数量增加时,数据校验容器的数量也增加;当接入服务器的物联网设备的数量减少时,数据校验容器的数量也减少。In this embodiment, the number of data verification containers is positively related to the number of IoT devices accessing the server. That is to say, when the number of IoT devices accessing the server increases, the number of data verification containers also increases; when the number of IoT devices accessing the server decreases, the number of data verification containers also decreases.

本实施例中的数据校验容器可以采用虚拟化容器技术实现,例如可以采用Docker实现,占用资源少,部署快,启动快。The data verification container in this embodiment can be implemented by using a virtualized container technology, for example, can be implemented by using Docker, which occupies less resources, is quick to deploy, and quick to start.

本实施例提供的数据校验方法,通过统计接入服务器的物联网设备的数量,并根据所统计的接入服务器的物联网设备的数量,调整数据校验容器的数量。如此,实现了数据校验容器的数量可以根据接入的物联网设备的数量按需自适应调整,可以满足海量物联网设备同时接入网络时的数据校验需求,响应速度快,提高了数据校验的速度。The data verification method provided in this embodiment adjusts the number of data verification containers by counting the number of IoT devices connected to the server, and according to the counted number of IoT devices accessing the server. In this way, it is realized that the number of data verification containers can be adaptively adjusted according to the number of connected IoT devices, which can meet the data verification requirements when a large number of IoT devices are simultaneously connected to the network. The response speed is fast, and the data is improved. Check speed.

在一些实施例中,根据所统计的接入服务器的物联网设备的数量,调整数据校验容器的数量的一种实现方式可以是:In some embodiments, according to the counted number of IoT devices accessing the server, an implementation manner of adjusting the number of data verification containers may be:

若所统计的接入服务器的物联网设备的数量大于第一阈值,则根据所统计的接入服务器的物联网设备的数量,增加数据校验容器的数量,第一阈值根据当前服务器中数据校验容器的数量确定。If the counted number of IoT devices connected to the server is greater than the first threshold, the number of data verification containers is increased according to the counted number of IoT devices connected to the server, and the first threshold is based on the data verification in the current server. The number of inspection containers is determined.

本实施例中的第一阈值可以根据当前服务器中数据校验容器的数量来确定。举例来说,若当前服务器中启动的数据校验容器为10个,每个数据校验容器可以用于对3个物联网设备所采集的数据进行校验,则本实施例中的第一阈值可以设置为30(10*3)。即当统计的接入服务器的物联网设备的数量大于30时,需要增加数据校验容器的数量。若统计的当前同时接入服务器的物联网设备的数量为40,则需要增加的数据校验容器的数量可以为

Figure BDA0001857820440000051
即需要增加4个数据校验容器。上述数值仅做示例,并不对本发明形成任何限制。The first threshold in this embodiment may be determined according to the number of data verification containers in the current server. For example, if there are 10 data verification containers started in the current server, and each data verification container can be used to verify the data collected by 3 IoT devices, the first threshold in this embodiment is Can be set to 30 (10*3). That is, when the counted number of IoT devices connected to the server is greater than 30, the number of data verification containers needs to be increased. If the counted number of IoT devices currently connected to the server at the same time is 40, the number of data verification containers that need to be increased can be
Figure BDA0001857820440000051
That is, 4 data verification containers need to be added. The above numerical values are only examples and do not form any limitation to the present invention.

需要说明的是,本实施例中接入数据校验容器的物联网设备的数量,还可以根据数据校验容器的数据校验容量以及单个物联网设备的数据采集速率确定。例如,若数据校验容器的数据校验容量为10MB/s,单个物联网设备的数据采集速率为1MB/s,则数据校验容器可以用于对10个物联网设备采集的数据进行校验。各个物联网设备的数据采集速率可以不同,例如用于航拍的物联网设备采集照片、视频数据的采集速率大于用于温度监测的物联网设备采集温度数据的采集速率。It should be noted that, in this embodiment, the number of IoT devices connected to the data verification container may also be determined according to the data verification capacity of the data verification container and the data collection rate of a single IoT device. For example, if the data verification capacity of the data verification container is 10MB/s and the data collection rate of a single IoT device is 1MB/s, the data verification container can be used to verify the data collected by 10 IoT devices. . The data collection rate of each IoT device may be different. For example, the IoT device used for aerial photography collects photos and video data at a higher rate than the temperature data collected by the IoT device used for temperature monitoring.

可选的,可以根据接入服务器的物联网设备的待校验数据量,调整数据校验容器的数量。当接入服务器的物联网设备的待校验数据量大于预设阈值时,增加数据校验容器的数量。Optionally, the number of data verification containers may be adjusted according to the amount of data to be verified of the IoT devices connected to the server. When the amount of data to be verified of the IoT device connected to the server is greater than the preset threshold, the number of data verification containers is increased.

本实施例提供的数据校验方法,通过在接入服务器的物联网设备的数量大于第一阈值,则根据所统计的接入服务器的物联网设备的数量,增加数据校验容器的数量。如此,通过在接入服务器的物联网设备的数量增加时,及时增加数据校验容器的数量,使得物联网设备所采集的数据能够快速进行校验,提高了数据校验速度。The data verification method provided by this embodiment increases the number of data verification containers according to the counted number of IoT devices accessing the server when the number of IoT devices accessing the server is greater than the first threshold. In this way, when the number of IoT devices connected to the server increases, the number of data verification containers is increased in time, so that the data collected by the IoT devices can be quickly verified, and the data verification speed is improved.

在一些实施例中,根据所统计的接入服务器的物联网设备的数量,调整数据校验容器的数量的一种实现方式可以是:In some embodiments, according to the counted number of IoT devices accessing the server, an implementation manner of adjusting the number of data verification containers may be:

若所统计的接入服务器的物联网设备的数量小于第二阈值,则根据所统计的接入服务器的物联网设备的数量,减少数据校验容器的数量,第二阈值根据当前服务器中数据校验容器的数量确定。If the counted number of IoT devices connected to the server is less than the second threshold, the number of data verification containers is reduced according to the counted number of IoT devices connected to the server, and the second threshold is based on the data verification in the current server. The number of inspection containers is determined.

举例来说,若当前服务器中数据校验容器的数量足以用于对100个物联网设备所采集的数据进行校验,而此时接入服务器的物联网设备的数量仅仅只有50个,则会导致大量的数据校验容器的处于闲置状态,导致系统资源的浪费。因此,为了避免系统资源的浪费,提高资源利用率,本实施例在接入服务器的物联网设备的数量小于第二阈值,则根据所统计的接入服务器的物联网设备的数量,减少数据校验容器的数量。第二阈值的具体数值可以根据实际需要进行设置,本实施例对此不作限制。如此,通过及时减少数据校验容器的数量,避免了使数据校验容器处于空闲状态,造成资源浪费,提高了资源利用率,同时还可以释放更多的资源供有数据校验需求的物联网设备使用,进而提高了数据校验的速度。For example, if the number of data verification containers in the current server is sufficient to verify the data collected by 100 IoT devices, and the number of IoT devices connected to the server is only 50, the As a result, a large number of data verification containers are in an idle state, resulting in a waste of system resources. Therefore, in order to avoid waste of system resources and improve resource utilization rate, in this embodiment, when the number of IoT devices accessing the server is less than the second threshold, the number of IoT devices accessing the server is counted to reduce data calibration. Check the number of containers. The specific value of the second threshold may be set according to actual needs, which is not limited in this embodiment. In this way, by reducing the number of data verification containers in a timely manner, the data verification containers are avoided to be in an idle state, resulting in waste of resources, improving resource utilization, and at the same time, more resources can be released for the Internet of Things with data verification requirements. device usage, thereby improving the speed of data verification.

在一些实施例中,在上述任一实施例的基础上,本实施例提供的方法还可以包括:In some embodiments, on the basis of any of the foregoing embodiments, the method provided in this embodiment may further include:

若与数据校验容器连接的物联网设备的数量降为预设数量时,则销毁该数据校验容器。If the number of IoT devices connected to the data verification container is reduced to a preset number, the data verification container is destroyed.

本实施例中,当物联网设备将所采集的数据传输完毕后,则会断开与服务器的连接,释放相应的资源以便其他设备可以使用,同时也能够降低物联网设备的功耗。In this embodiment, after the IoT device has finished transmitting the collected data, it will disconnect from the server, release corresponding resources so that other devices can use it, and also reduce the power consumption of the IoT device.

本实施例中的数据校验容器可以同时与多个物联网设备连接,用于对多个物联网设备所采集的数据进行校验。若与其连接的多个物联网设备均完成数据传输,处于离线状态时,则可以销毁该数据校验容器,释放相应的资源。The data verification container in this embodiment can be connected to multiple IoT devices at the same time, and is used to verify the data collected by the multiple IoT devices. If multiple IoT devices connected to it have completed data transmission and are in an offline state, the data verification container can be destroyed to release corresponding resources.

本实施例中的预设数量可以设为0,即当与数据校验容器连接的物联网设备的数量降为0时,可以销毁该数据校验容器。The preset number in this embodiment can be set to 0, that is, when the number of IoT devices connected to the data verification container is reduced to 0, the data verification container can be destroyed.

本实施例提供的数据校验方法,通过在与数据校验容器连接的物联网设备的数量降为预设数量时,销毁该数据校验容器。如此,通过及时销毁多余的数据校验容器,释放了更多的资源,提高了资源利用率,进而可以提高服务器的响应速度,提高数据校验速度。In the data verification method provided by this embodiment, when the number of IoT devices connected to the data verification container is reduced to a preset number, the data verification container is destroyed. In this way, by destroying the redundant data verification container in time, more resources are released, and the resource utilization rate is improved, thereby improving the response speed of the server and the data verification speed.

在一些实施例中,数据校验容器用于对至少一个物联网设备采集的数据进行校验的一种实现方式可以是:数据校验容器用于对至少一个物联网设备采集的数据依次进行常规校验、数字签名校验和循环冗余校验,常规校验用于对数据的记录数、大小、行数和编码信息进行校验。In some embodiments, an implementation manner in which the data verification container is used to verify the data collected by the at least one Internet of Things device may be: the data verification container is used to sequentially perform normal operation on the data collected by the at least one Internet of Things device. Check, digital signature check and cyclic redundancy check, conventional check is used to check the number of records, size, number of lines and encoding information of the data.

本实施例中的常规校验用于对数据的记录数、大小、行数和编码信息进行校验。具体来说,就是将接收到的数据文件中所记录的记录数、大小、行数和编码信息与接收到的数据文件的实际记录数、大小、行数和编码信息进行比较,若相同,则校验通过,若不同,则校验失败。对于校验失败的数据,可以丢弃;只有通过常规校验的数据,才会进行数字签名校验。The normal check in this embodiment is used to check the number of records, size, number of lines and encoding information of the data. Specifically, it is to compare the number of records, size, number of lines and coding information recorded in the received data file with the actual number of records, size, number of lines and coding information of the received data file, if they are the same, then The verification is passed, if not, the verification fails. Data that fails to be verified can be discarded; only data that passes regular verification will be verified for digital signatures.

本实施例中的数字签名校验例如可以采用消息摘要算法(Message Digest,MD)、安全散列算法(Secure Hash Algorithm,SHA)和消息认证码算法(MessageAuthentication Code,MAC)中的至少一种进行数字签名校验。例如可以选用MD5算法计算接收数据的消息摘要,与接收数据中记录的消息摘要进行比较,若相同,则数字签名校验通过;若不同,则校验失败。对于校验失败的数据,可以丢弃;只有通过数字签名校验的数据,才会进行循环冗余校验。The digital signature verification in this embodiment may be performed by, for example, at least one of a message digest algorithm (Message Digest, MD), a secure hash algorithm (Secure Hash Algorithm, SHA), and a message authentication code algorithm (Message Authentication Code, MAC). Digital signature verification. For example, the MD5 algorithm can be used to calculate the message digest of the received data and compare it with the message digest recorded in the received data. If they are the same, the digital signature verification passes; if they are different, the verification fails. The data that fails to be verified can be discarded; only the data that passes the digital signature verification will be checked for cyclic redundancy.

本实施例中的循环冗余校验(Cyclical Redundancy Check,CRC)根据预设算法计算接收收据的校验码,与接收数据中记录的校验码进行比较。若相同,则CRC校验通过;若不同,则校验失败。The cyclic redundancy check (Cyclical Redundancy Check, CRC) in this embodiment calculates the check code of the received receipt according to a preset algorithm, and compares it with the check code recorded in the received data. If they are the same, the CRC check passes; if they are different, the check fails.

本实施例中对物联网设备所采集的数据依次进行常规校验、数字签名校验和循环冗余校验,通过层层筛选,确保了进入后续数据分析处理流程的数据的完整性和合法性。In this embodiment, routine verification, digital signature verification and cyclic redundancy verification are sequentially performed on the data collected by the IoT device, and the integrity and legality of the data entering the subsequent data analysis and processing process are ensured through layer-by-layer screening. .

本实施例提供的数据校验方法,通过统计接入服务器的物联网设备的数量,并根据所统计的接入服务器的物联网设备的数量,调整数据校验容器的数量,以确保有充足的资源用于进行数据校验。通过对物联网设备所采集的数据依次进行常规校验、数字签名校验和循环冗余校验,进一步提高了安全性。In the data verification method provided in this embodiment, the number of IoT devices connected to the server is counted, and the number of data verification containers is adjusted according to the counted number of IoT devices connected to the server, so as to ensure that there are sufficient Resources are used for data validation. The security is further improved by sequentially performing routine verification, digital signature verification and cyclic redundancy verification on the data collected by the IoT devices.

在一些实施例中,在上一实施例的基础上,本实施例提供的方法还可以包括:若物联网设备采集的数据未通过数据校验,则向物联网设备发送失败通知消息,失败通知消息包括重传策略指示信息,用于指示物联网设备根据失败通知消息所指示的重传策略进行数据重新传输。In some embodiments, on the basis of the previous embodiment, the method provided in this embodiment may further include: if the data collected by the IoT device fails the data verification, sending a failure notification message to the IoT device, and the failure notification The message includes retransmission policy indication information, which is used to instruct the IoT device to retransmit data according to the retransmission policy indicated by the failure notification message.

本实施例中的物联网设备采集的数据未通过数据校验可以是未通过常规校验、数字签名校验和循环冗余校验中的任一项。The data collected by the Internet of Things device in this embodiment fails the data verification and may fail any one of conventional verification, digital signature verification, and cyclic redundancy verification.

可选的,当有数据未通过数据校验时,服务器还可以生成日志记录,用于记录未通过数据校验的详细信息,具体例如可以包括采集数据的物联网设备标识信息、数据校验的时间信息、数据校验失败的原因、数据类型信息等。Optionally, when some data fails the data verification, the server may also generate a log record to record the detailed information of the failed data verification. Time information, reason for data verification failure, data type information, etc.

本实施例中当物联网设备采集的数据未通过数据校验时,则服务器向该物联网设备发送失败通知消息,失败通知消息包括重传策略指示信息,用于指示物联网设备根据失败通知消息所指示的重传策略进行数据重新传输。可选的,重传策略指示信息例如可以根据校验失败的原因、数据的类型、数据的优先级中的至少一项确定。举例来说,若数据校验失败的原因是网络拥塞,且数据的优先级指示该数据对时效性要求较低,则重传策略可以设置为错峰传输,以减小网络压力,例如还可以将根据历史记录统计出的网络空闲时间段信息与错峰传输重传策略指示信息一同发送至物联网设备。In this embodiment, when the data collected by the IoT device fails the data verification, the server sends a failure notification message to the IoT device, and the failure notification message includes retransmission policy indication information, which is used to instruct the IoT device to follow the failure notification message The indicated retransmission policy retransmits the data. Optionally, the retransmission policy indication information may be determined, for example, according to at least one of the cause of the verification failure, the type of data, and the priority of the data. For example, if the reason for data verification failure is network congestion, and the priority of the data indicates that the data requires less timeliness, the retransmission policy can be set to staggered transmission to reduce network pressure, for example, it can also be Send the network idle time period information calculated according to the historical records together with the indication information of the staggered transmission and retransmission strategy to the IoT device.

图2为本发明提供的数据校验方法一实施例的应用示意图。如图2所示,本实施例中每个数据校验容器用于对三个物联网设备所采集的数据进行数据校验。数据校验容器对物联网设备所采集的数据依次进行常规校验、数字签名校验和循环冗余校验,只有通过全部校验的数据才会进入后续的数据分析处理流程,也就是说,当常规校验、数字签名校验和循环冗余校验中有任一项校验未通过时,服务器将丢弃该数据,而不会进入后续的数据分析处理流程。当有新的物联网设备接入时,现有数据校验容器无法满足数据校验需求时,则增加数据校验容器来对物联网设备所采集的数据进行校验;当与数据校验容器连接的多个物联网设备均已将所采集的数据传输完毕,处于离线状态时,则可以销毁该数据校验容器,释放相应的资源。需要说明的是,图2仅是本发明实施例的一种可能的实现方式,数值仅做示例,并不对本申请形成限制。FIG. 2 is an application schematic diagram of an embodiment of the data verification method provided by the present invention. As shown in FIG. 2 , in this embodiment, each data verification container is used to perform data verification on data collected by three IoT devices. The data verification container sequentially performs routine verification, digital signature verification and cyclic redundancy verification on the data collected by the IoT device. Only the data that passes all verifications will enter the subsequent data analysis and processing process, that is to say, When any one of the regular check, digital signature check and cyclic redundancy check fails, the server will discard the data and will not enter the subsequent data analysis and processing flow. When a new IoT device is connected and the existing data verification container cannot meet the data verification requirements, a data verification container is added to verify the data collected by the IoT device; Multiple connected IoT devices have completed the transmission of the collected data, and when they are offline, the data verification container can be destroyed to release the corresponding resources. It should be noted that FIG. 2 is only a possible implementation manner of the embodiment of the present invention, and the numerical values are only examples and do not limit the present application.

在一些实施例中,在上述任一实施例的基础上,在统计接入服务器的物联网设备的数量之前,本实施例提供的方法还可以包括:In some embodiments, on the basis of any of the foregoing embodiments, before counting the number of IoT devices accessing the server, the method provided in this embodiment may further include:

接收物联网设备发送的接入请求消息,接入请求消息包括物联网设备的设备编码信息。An access request message sent by an IoT device is received, where the access request message includes device code information of the IoT device.

根据设备编码信息确定是否允许物联网设备接入服务器。Determine whether to allow the IoT device to access the server according to the device encoding information.

本实施例中服务器中可以预先存储有合法的物联网设备的相关信息。其中,合法的物联网设备可以包括已经合法注册的物联网设备,服务器已经授权的物联网设备等。相关信息可以包括物联网设备的设备编码信息、访问权限信息等。In this embodiment, relevant information of legal IoT devices may be pre-stored in the server. The legal IoT devices may include IoT devices that have been legally registered, IoT devices that have been authorized by the server, and the like. The relevant information may include device coding information, access permission information, etc. of the IoT device.

本实施例的服务器在接收到物联网设备的接入请求消息时,获取其中所包含的设备编码信息,将其与预先存储的合法物联网设备的设备编码信息相比较,若匹配成功,则可以确定该物联网设备合法,可以接入服务器;若匹配失败,则可以确定该物联网设备非法,拒绝该物联网设备接入服务器。When receiving the access request message of the IoT device, the server in this embodiment obtains the device code information contained therein, and compares it with the pre-stored device code information of the legitimate IoT device. It is determined that the Internet of Things device is legal and the server can be accessed; if the matching fails, it can be determined that the Internet of Things device is illegal, and the Internet of Things device is refused to access the server.

本实施例提供的数据校验方法,通过在物联网设备接入服务器时,接收物联网设备发送的包括物联网设备的设备编码信息的接入请求消息,并根据接入请求消息中的设备编码信息确定是否允许物联网设备接入服务器。如此可以有效避免非法物联网设备的接入,进而可以有效避免非法数据攻击,同时通过对非法物联网设备进行过滤,减少了数据校验服务器需要校验的数据量,提高了数据校验的效率和速度。In the data verification method provided by this embodiment, when the IoT device accesses the server, an access request message including the device code information of the IoT device sent by the IoT device is received, and the device code in the access request message is received according to the data verification method. information to determine whether to allow IoT devices to access the server. In this way, the access of illegal IoT devices can be effectively avoided, thereby effectively avoiding illegal data attacks. At the same time, by filtering illegal IoT devices, the amount of data that needs to be verified by the data verification server is reduced, and the efficiency of data verification is improved. and speed.

本发明实施例还提供一种数据校验装置,请参见图3所示,本发明实施例仅以图3为例进行说明,并不表示本发明仅限于此。图3为本发明提供的数据校验装置一实施例的结构示意图。本实施例提供的数据校验装置可以是网络侧设备,例如服务器等,也可以是用于网络侧设备的部件,例如芯片、集成电路等。如图3所示,本实施例提供的数据校验装置30可以包括统计模块301和调整模块302。An embodiment of the present invention further provides a data verification apparatus. Please refer to FIG. 3 . The embodiment of the present invention only uses FIG. 3 as an example for description, which does not mean that the present invention is limited to this. FIG. 3 is a schematic structural diagram of an embodiment of a data verification apparatus provided by the present invention. The data verification apparatus provided in this embodiment may be a network-side device, such as a server, or a component used for the network-side device, such as a chip, an integrated circuit, and the like. As shown in FIG. 3 , the data verification apparatus 30 provided in this embodiment may include a statistics module 301 and an adjustment module 302 .

统计模块301,用于统计接入服务器的物联网设备的数量。The statistics module 301 is configured to count the number of IoT devices accessing the server.

调整模块302,用于根据所统计的接入服务器的物联网设备的数量,调整数据校验容器的数量,数据校验容器用于对至少一个物联网设备采集的数据进行校验。The adjustment module 302 is configured to adjust the number of data verification containers according to the counted number of IoT devices accessing the server, and the data verification containers are used to verify data collected by at least one IoT device.

本实施例的装置,可以用于执行图1所示方法实施例的技术方案,其实现原理和技术效果类似,此处不再赘述。The apparatus of this embodiment can be used to execute the technical solution of the method embodiment shown in FIG. 1 , and the implementation principle and technical effect thereof are similar, and are not repeated here.

可选的,调整模块302具体可以用于:Optionally, the adjustment module 302 can be specifically used for:

若所统计的接入服务器的物联网设备的数量大于第一阈值,则根据所统计的接入服务器的物联网设备的数量,增加数据校验容器的数量,第一阈值根据当前服务器中数据校验容器的数量确定。If the counted number of IoT devices connected to the server is greater than the first threshold, the number of data verification containers is increased according to the counted number of IoT devices connected to the server, and the first threshold is based on the data verification in the current server. The number of inspection containers is determined.

可选的,调整模块302具体可以用于:Optionally, the adjustment module 302 can be specifically used for:

若所统计的接入服务器的物联网设备的数量小于第二阈值,则根据所统计的接入服务器的物联网设备的数量,减少数据校验容器的数量,第二阈值根据当前服务器中数据校验容器的数量确定。If the counted number of IoT devices connected to the server is less than the second threshold, the number of data verification containers is reduced according to the counted number of IoT devices connected to the server, and the second threshold is based on the data verification in the current server. The number of inspection containers is determined.

可选的,调整模块302还可以具体用于:Optionally, the adjustment module 302 can also be specifically used for:

若与数据校验容器连接的物联网设备的数量降为预设数量时,则销毁该数据校验容器。If the number of IoT devices connected to the data verification container is reduced to a preset number, the data verification container is destroyed.

可选的,数据校验容器可以用于对至少一个物联网设备采集的数据依次进行常规校验、数字签名校验和循环冗余校验,常规校验用于对数据的记录数、大小、行数和编码信息进行校验。Optionally, the data verification container can be used to sequentially perform routine verification, digital signature verification and cyclic redundancy verification on the data collected by at least one IoT device. The number of lines and encoding information are checked.

可选的,数据校验装置30还可以包括发送模块,用于在物联网设备采集的数据未通过数据校验时,向物联网设备发送失败通知消息,失败通知消息包括重传策略指示信息,用于指示物联网设备根据失败通知消息所指示的重传策略进行数据重新传输。Optionally, the data verification apparatus 30 may further include a sending module for sending a failure notification message to the IoT device when the data collected by the IoT device fails the data verification, where the failure notification message includes retransmission policy indication information, It is used to instruct the IoT device to retransmit data according to the retransmission policy indicated by the failure notification message.

可选的,数据校验装置30还可以包括接收模块和验证模块,其中接收模块用于在统计接入服务器的物联网设备的数量之前,接收物联网设备发送的接入请求消息,接入请求消息包括物联网设备的设备编码信息;验证模块,用于根据设备编码信息确定是否允许物联网设备接入服务器。Optionally, the data verification apparatus 30 may further include a receiving module and a verification module, wherein the receiving module is used to receive the access request message sent by the IoT device before counting the number of IoT devices accessing the server, and the access request The message includes the device code information of the Internet of Things device; the verification module is used to determine whether to allow the Internet of Things device to access the server according to the device code information.

本发明实施例还提供一种服务器,请参见图4所示,本发明实施例仅以图4为例进行说明,并不表示本发明仅限于此。图4为本发明提供的服务器一实施例的结构示意图。如图4所示,本实施例提供的服务器40可以包括:存储器401、处理器402和总线403。其中,总线403用于实现各元件之间的连接。An embodiment of the present invention further provides a server. Referring to FIG. 4 , the embodiment of the present invention is only described by taking FIG. 4 as an example, which does not mean that the present invention is limited to this. FIG. 4 is a schematic structural diagram of an embodiment of a server provided by the present invention. As shown in FIG. 4 , the server 40 provided in this embodiment may include: a memory 401 , a processor 402 and a bus 403 . Among them, the bus 403 is used to realize the connection between various elements.

存储器401中存储有计算机程序,计算机程序被处理器402执行时可以实现上述任一方法实施例提供的数据校验方法的技术方案。A computer program is stored in the memory 401, and when the computer program is executed by the processor 402, the technical solution of the data verification method provided by any of the above method embodiments can be implemented.

其中,存储器401和处理器402之间直接或间接地电性连接,以实现数据的传输或交互。例如,这些元件相互之间可以通过一条或者多条通信总线或信号线实现电性连接,如可以通过总线403连接。存储器401中存储有实现数据校验方法的计算机程序,包括至少一个可以软件或固件的形式存储于存储器401中的软件功能模块,处理器402通过运行存储在存储器401内的软件程序以及模块,从而执行各种功能应用以及数据处理。The memory 401 and the processor 402 are electrically connected directly or indirectly to realize data transmission or interaction. For example, these elements can be electrically connected to each other through one or more communication buses or signal lines, such as the bus 403 . A computer program for implementing the data verification method is stored in the memory 401, including at least one software function module that can be stored in the memory 401 in the form of software or firmware, and the processor 402 runs the software programs and modules stored in the memory 401. Execute various functional applications and data processing.

存储器401可以是,但不限于,随机存取存储器(Random Access Memory,简称:RAM),只读存储器(Read Only Memory,简称:ROM),可编程只读存储器(ProgrammableRead-Only Memory,简称:PROM),可擦除只读存储器(Erasable Programmable Read-OnlyMemory,简称:EPROM),电可擦除只读存储器(Electric Erasable Programmable Read-Only Memory,简称:EEPROM)等。其中,存储器401用于存储程序,处理器402在接收到执行指令后,执行程序。进一步地,上述存储器401内的软件程序以及模块还可包括操作系统,其可包括各种用于管理系统任务(例如内存管理、存储设备控制、电源管理等)的软件组件和/或驱动,并可与各种硬件或软件组件相互通信,从而提供其他软件组件的运行环境。The memory 401 can be, but is not limited to, a random access memory (Random Access Memory, referred to as: RAM), a read-only memory (Read Only Memory, referred to as: ROM), a programmable read-only memory (Programmable Read-Only Memory, referred to as: PROM) ), Erasable Programmable Read-Only Memory (EPROM for short), Electrical Erasable Programmable Read-Only Memory (EEPROM for short), etc. The memory 401 is used for storing the program, and the processor 402 executes the program after receiving the execution instruction. Further, the software programs and modules in the above-mentioned memory 401 may also include an operating system, which may include various software components and/or drivers for managing system tasks (such as memory management, storage device control, power management, etc.), and Can communicate with various hardware or software components to provide an operating environment for other software components.

处理器402可以是一种集成电路芯片,具有信号的处理能力。上述的处理器402可以是通用处理器,包括中央处理器(Central Processing Unit,简称:CPU)、网络处理器(Network Processor,简称:NP)等。可以实现或者执行本发明实施例中的公开的各方法、步骤及逻辑框图。通用处理器可以是微处理器或者该处理器也可以是任何常规的处理器等。可以理解,图4的结构仅为示意,还可以包括比图4中所示更多或者更少的组件,或者具有与图4所示不同的配置。图4中所示的各组件可以采用硬件和/或软件实现。The processor 402 may be an integrated circuit chip with signal processing capability. The aforementioned processor 402 may be a general-purpose processor, including a central processing unit (Central Processing Unit, CPU for short), a network processor (Network Processor, NP for short). Various methods, steps, and logical block diagrams disclosed in the embodiments of the present invention can be implemented or executed. A general purpose processor may be a microprocessor or the processor may be any conventional processor or the like. It can be understood that the structure of FIG. 4 is only for illustration, and may also include more or less components than those shown in FIG. 4 , or have different configurations from those shown in FIG. 4 . The components shown in FIG. 4 may be implemented in hardware and/or software.

本发明实施例还提供一种计算机可读存储介质,其上存储有计算机程序,计算机程序被处理器执行时可以实现上述任一方法实施例提供的数据校验方法。本实施例中的计算机可读存储介质可以是计算机能够存取的任何可用介质,或者是包含一个或多个可用介质集成的服务器、数据中心等数据存储设备,可用介质可以是磁性介质,(例如,软盘、硬盘、磁带)、光介质(例如,DVD)、或者半导体介质(例如SSD)等。An embodiment of the present invention further provides a computer-readable storage medium, on which a computer program is stored, and when the computer program is executed by a processor, the data verification method provided by any of the foregoing method embodiments can be implemented. The computer-readable storage medium in this embodiment may be any available medium that can be accessed by a computer, or a data storage device such as a server or data center that includes one or more available media integrated, and the available medium may be a magnetic medium, (for example, , floppy disk, hard disk, magnetic tape), optical media (eg, DVD), or semiconductor media (eg, SSD), etc.

在上述的实施例中,应该理解到,所揭露的设备和方法,可以通过其它的方式实现。例如,以上所描述的设备实施例仅仅是示意性的,例如,所述模块的划分,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式,例如多个模块可以结合或者可以集成到另一个系统,或一些特征可以忽略,或不执行。另一点,所显示或讨论的相互之间的耦合或直接耦合或通信连接可以是通过一些接口,装置或模块的间接耦合或通信连接,可以是电性,机械或其它的形式。In the above-mentioned embodiments, it should be understood that the disclosed apparatus and method may be implemented in other manners. For example, the device embodiments described above are only illustrative. For example, the division of the modules is only a logical function division. In actual implementation, there may be other division methods. For example, multiple modules may be combined or integrated. to another system, or some features can be ignored, or not implemented. On the other hand, the shown or discussed mutual coupling or direct coupling or communication connection may be through some interfaces, indirect coupling or communication connection of devices or modules, and may be in electrical, mechanical or other forms.

所述作为分离部件说明的模块可以是或者也可以不是物理上分开的,作为模块显示的部件可以是或者也可以不是物理单元,即可以位于一个地方,或者也可以分布到多个网络单元上。可以根据实际的需要选择其中的部分或者全部模块来实现本实施例方案的目的。The modules described as separate components may or may not be physically separated, and components shown as modules may or may not be physical units, that is, may be located in one place, or may be distributed to multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution in this embodiment.

另外,在本发明各个实施例中的各功能模块可以集成在一个处理单元中,也可以是各个模块单独物理存在,也可以两个或两个以上模块集成在一个单元中。上述模块成的单元既可以采用硬件的形式实现,也可以采用硬件加软件功能单元的形式实现。In addition, each functional module in each embodiment of the present invention may be integrated into one processing unit, or each module may exist physically alone, or two or more modules may be integrated into one unit. The units formed by the above modules can be implemented in the form of hardware, or can be implemented in the form of hardware plus software functional units.

上述以软件功能模块的形式实现的集成的模块,可以存储在一个计算机可读取存储介质中。上述软件功能模块存储在一个存储介质中,包括若干指令用以使得一台计算机设备(可以是个人计算机,服务器,或者网络设备等)或处理器(英文:processor)执行本申请各个实施例所述方法的部分步骤。The above-mentioned integrated modules implemented in the form of software functional modules may be stored in a computer-readable storage medium. The above-mentioned software function modules are stored in a storage medium, and include several instructions to enable a computer device (which may be a personal computer, a server, or a network device, etc.) or a processor (English: processor) to execute the various embodiments of the present application. part of the method.

上述存储介质可以是由任何类型的易失性或非易失性存储设备或者它们的组合实现,如静态随机存取存储器(SRAM),电可擦除可编程只读存储器(EEPROM),可擦除可编程只读存储器(EPROM),可编程只读存储器(PROM),只读存储器(ROM),磁存储器,快闪存储器,磁盘或光盘。存储介质可以是通用或专用计算机能够存取的任何可用介质。The above-mentioned storage medium may be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read only memory (EEPROM), erasable Except programmable read only memory (EPROM), programmable read only memory (PROM), read only memory (ROM), magnetic memory, flash memory, magnetic disk or optical disk. A storage medium can be any available medium that can be accessed by a general purpose or special purpose computer.

一种示例性的存储介质耦合至处理器,从而使处理器能够从该存储介质读取信息,且可向该存储介质写入信息。当然,存储介质也可以是处理器的组成部分。处理器和存储介质可以位于专用集成电路(Application Specific Integrated Circuits,简称:ASIC)中。当然,处理器和存储介质也可以作为分立组件存在于终端或服务器中。An exemplary storage medium is coupled to the processor, such that the processor can read information from, and write information to, the storage medium. Of course, the storage medium can also be an integral part of the processor. The processor and the storage medium may be located in application specific integrated circuits (Application Specific Integrated Circuits, ASIC for short). Of course, the processor and the storage medium may also exist in the terminal or server as discrete components.

本领域普通技术人员可以理解:实现上述各方法实施例的全部或部分步骤可以通过程序指令相关的硬件来完成。前述的程序可以存储于一计算机可读取存储介质中。该程序在执行时,执行包括上述各方法实施例的步骤;而前述的存储介质包括:ROM、RAM、磁碟或者光盘等各种可以存储程序代码的介质。Those of ordinary skill in the art can understand that all or part of the steps of implementing the above method embodiments may be completed by program instructions related to hardware. The aforementioned program can be stored in a computer-readable storage medium. When the program is executed, the steps including the above method embodiments are executed; and the foregoing storage medium includes: ROM, RAM, magnetic disk or optical disk and other media that can store program codes.

最后应说明的是:以上各实施例仅用以说明本发明的技术方案,而非对其限制;尽管参照前述各实施例对本发明进行了详细的说明,本领域的普通技术人员应当理解:其依然可以对前述各实施例所记载的技术方案进行修改,或者对其中部分或者全部技术特征进行等同替换;而这些修改或者替换,并不使相应技术方案的本质脱离本发明各实施例技术方案的范围。Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, but not to limit them; although the present invention has been described in detail with reference to the foregoing embodiments, those of ordinary skill in the art should understand that: The technical solutions described in the foregoing embodiments can still be modified, or some or all of the technical features thereof can be equivalently replaced; and these modifications or replacements do not make the essence of the corresponding technical solutions deviate from the technical solutions of the embodiments of the present invention. scope.

Claims (9)

1.一种数据校验方法,其特征在于,包括:1. a data verification method, is characterized in that, comprises: 统计接入服务器的物联网设备的数量;所述统计是实时进行的;或者是以预设时间间隔作为统计周期进行的;Count the number of IoT devices connected to the server; the statistics are carried out in real time; or are carried out with a preset time interval as the statistical period; 根据所统计的接入服务器的物联网设备的数量,调整数据校验容器的数量,所述数据校验容器用于对至少一个物联网设备采集的数据进行校验;Adjust the number of data verification containers according to the counted number of IoT devices connected to the server, where the data verification containers are used to verify data collected by at least one IoT device; 若与所述数据校验容器连接的物联网设备的数量降为预设数量时,则销毁该数据校验容器。If the number of IoT devices connected to the data verification container is reduced to a preset number, the data verification container is destroyed. 2.根据权利要求1所述的方法,其特征在于,所述根据所统计的接入服务器的物联网设备的数量,调整数据校验容器的数量包括:2. The method according to claim 1, wherein, according to the counted number of IoT devices accessing the server, adjusting the number of data verification containers comprises: 若所统计的接入服务器的物联网设备的数量大于第一阈值,则根据所统计的接入服务器的物联网设备的数量,增加数据校验容器的数量,所述第一阈值根据当前所述服务器中数据校验容器的数量确定。If the counted number of IoT devices accessing the server is greater than the first threshold, the number of data verification containers is increased according to the counted number of IoT devices accessing the server, and the first threshold is based on the current The number of data verification containers in the server is determined. 3.根据权利要求1所述的方法,其特征在于,所述根据所统计的接入服务器的物联网设备的数量,调整数据校验容器的数量包括:3. The method according to claim 1, wherein, according to the counted number of Internet of Things devices accessing the server, adjusting the number of data verification containers comprises: 若所统计的接入服务器的物联网设备的数量小于第二阈值,则根据所统计的接入服务器的物联网设备的数量,减少数据校验容器的数量,所述第二阈值根据当前所述服务器中数据校验容器的数量确定。If the counted number of IoT devices accessing the server is less than the second threshold, the number of data verification containers is reduced according to the counted number of IoT devices accessing the server, and the second threshold is based on the current The number of data verification containers in the server is determined. 4.根据权利要求1所述的方法,其特征在于,所述数据校验容器用于对至少一个物联网设备采集的数据进行校验包括:4. The method according to claim 1, wherein the data verification container used for verifying the data collected by at least one Internet of Things device comprises: 所述数据校验容器用于对至少一个物联网设备采集的数据依次进行常规校验、数字签名校验和循环冗余校验,所述常规校验用于对所述数据的记录数、大小、行数和编码信息进行校验。The data verification container is used to sequentially perform routine verification, digital signature verification and cyclic redundancy verification on the data collected by at least one IoT device, and the routine verification is used to verify the number and size of records of the data. , line number and encoding information for verification. 5.根据权利要求1-4任一项所述的方法,其特征在于,所述方法还包括:5. The method according to any one of claims 1-4, wherein the method further comprises: 若物联网设备采集的数据未通过数据校验,则向所述物联网设备发送失败通知消息,所述失败通知消息包括重传策略指示信息,用于指示所述物联网设备根据所述失败通知消息所指示的重传策略进行数据重新传输。If the data collected by the IoT device fails the data verification, a failure notification message is sent to the IoT device, and the failure notification message includes retransmission policy indication information, which is used to instruct the IoT device according to the failure notification The retransmission policy indicated by the message retransmits the data. 6.根据权利要求1-4任一项所述的方法,其特征在于,在所述统计接入服务器的物联网设备的数量之前,所述方法还包括:6. The method according to any one of claims 1-4, wherein before the counting the number of IoT devices accessing the server, the method further comprises: 接收物联网设备发送的接入请求消息,所述接入请求消息包括所述物联网设备的设备编码信息;receiving an access request message sent by an IoT device, where the access request message includes device coding information of the IoT device; 根据所述设备编码信息确定是否允许所述物联网设备接入服务器。Determine whether to allow the Internet of Things device to access the server according to the device encoding information. 7.一种数据校验装置,其特征在于,包括:7. A data verification device, characterized in that, comprising: 统计模块,用于统计接入服务器的物联网设备的数量;所述统计是实时进行的;或者是以预设时间间隔作为统计周期进行的;A statistics module, used to count the number of IoT devices connected to the server; the statistics are performed in real time; or a preset time interval is used as a statistical period; 调整模块,用于根据所统计的接入服务器的物联网设备的数量,调整数据校验容器的数量,所述数据校验容器用于对至少一个物联网设备采集的数据进行校验;an adjustment module, configured to adjust the number of data verification containers according to the counted number of IoT devices accessing the server, where the data verification containers are used to verify the data collected by at least one IoT device; 所述调整模块还用于:若与数据校验容器连接的物联网设备的数量降为预设数量时,则销毁该数据校验容器。The adjustment module is further configured to destroy the data verification container if the number of IoT devices connected to the data verification container is reduced to a preset number. 8.一种服务器,其特征在于,包括:至少一个处理器和存储器;8. A server, comprising: at least one processor and a memory; 所述存储器存储计算机执行指令;the memory stores computer-executable instructions; 所述至少一个处理器执行所述存储器存储的计算机执行指令,使得所述至少一个处理器执行如权利要求1-6任一项所述的数据校验方法。The at least one processor executes the computer-executable instructions stored in the memory, so that the at least one processor executes the data verification method of any one of claims 1-6. 9.一种计算机可读存储介质,其特征在于,所述计算机可读存储介质中存储有计算机执行指令,所述计算机执行指令被处理器执行时用于实现如权利要求1-6任一项所述的数据校验方法。9. A computer-readable storage medium, wherein computer-executable instructions are stored in the computer-readable storage medium, and when executed by a processor, the computer-executable instructions are used to implement any one of claims 1-6 The described data verification method.
CN201811322299.7A 2018-11-08 2018-11-08 Data verification method and device and server Active CN109560893B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201811322299.7A CN109560893B (en) 2018-11-08 2018-11-08 Data verification method and device and server

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201811322299.7A CN109560893B (en) 2018-11-08 2018-11-08 Data verification method and device and server

Publications (2)

Publication Number Publication Date
CN109560893A CN109560893A (en) 2019-04-02
CN109560893B true CN109560893B (en) 2022-04-15

Family

ID=65865805

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201811322299.7A Active CN109560893B (en) 2018-11-08 2018-11-08 Data verification method and device and server

Country Status (1)

Country Link
CN (1) CN109560893B (en)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110310512B (en) * 2019-07-10 2021-02-19 中国联合网络通信集团有限公司 Parking lot positioning management method and system based on 5g Internet of things container technology
CN110718052B (en) * 2019-10-21 2020-12-29 上海米尺网络技术有限公司 Wireless acquisition device and data acquisition method
CN112566126B (en) * 2020-12-02 2022-04-26 支付宝(杭州)信息技术有限公司 Method, device and equipment for connecting equipment

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101764671A (en) * 2008-12-23 2010-06-30 北大方正集团有限公司 File transmission method and business processing method, equipment and system in server
CN103237045A (en) * 2013-02-22 2013-08-07 北方工业大学 Parallel processing system and parallel processing method for large-scale real-time traffic data
CN103068052B (en) * 2013-01-17 2016-03-02 中国联合网络通信集团有限公司 Dynamic resource allocation method, system and Portal server
KR20170042946A (en) * 2015-10-12 2017-04-20 에스케이텔레콤 주식회사 Method for managing of buffer memory size and apparatus thereof
CN107590632A (en) * 2017-09-19 2018-01-16 北京瑞格瑞特生物科技有限公司 A kind of management system and method, server for the transport of cell production inventory
CN108345512A (en) * 2018-03-19 2018-07-31 重庆金融资产交易所有限责任公司 Data verification method, server and storage medium

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106453564B (en) * 2016-10-18 2019-11-05 北京京东尚科信息技术有限公司 The method, apparatus and system of elastic cloud distribution magnanimity request processing
CN107666525B (en) * 2017-09-08 2020-11-24 北京京东尚科信息技术有限公司 Method and device for IP allocation of cluster container
CN108427992B (en) * 2018-03-16 2020-09-01 济南飞象信息科技有限公司 Machine learning training system and method based on edge cloud computing

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101764671A (en) * 2008-12-23 2010-06-30 北大方正集团有限公司 File transmission method and business processing method, equipment and system in server
CN103068052B (en) * 2013-01-17 2016-03-02 中国联合网络通信集团有限公司 Dynamic resource allocation method, system and Portal server
CN103237045A (en) * 2013-02-22 2013-08-07 北方工业大学 Parallel processing system and parallel processing method for large-scale real-time traffic data
KR20170042946A (en) * 2015-10-12 2017-04-20 에스케이텔레콤 주식회사 Method for managing of buffer memory size and apparatus thereof
CN107590632A (en) * 2017-09-19 2018-01-16 北京瑞格瑞特生物科技有限公司 A kind of management system and method, server for the transport of cell production inventory
CN108345512A (en) * 2018-03-19 2018-07-31 重庆金融资产交易所有限责任公司 Data verification method, server and storage medium

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
"一种基于容器编排技术的资源运维系统的设计与实现";张勋等;《电信科学》;20180620(第6期);162-170 *

Also Published As

Publication number Publication date
CN109560893A (en) 2019-04-02

Similar Documents

Publication Publication Date Title
CN108701039B (en) Method and device for wirelessly updating software of vehicle
TWI453624B (en) Information security protection host
US20200287920A1 (en) Endpoint network traffic analysis
CN109560893B (en) Data verification method and device and server
CN109617824B (en) Data collection method, device and server
CN111434090A (en) System and method for providing security to an in-vehicle network
CN110300040A (en) A kind of communication means and relevant device
CN104580133A (en) Malicious program protection method and system and filtering table updating method thereof
CN108667828A (en) Risk control method and device and storage medium
WO2015032221A1 (en) Antivirus file detection method and apparatus, and network device
CN114389882B (en) Gateway flow control method, device, computer equipment and storage medium
WO2019075662A1 (en) Gateway multi-connection method and device
CN104809046B (en) Application program networking control method and application program networking control device
CN111159195A (en) Data storage control method and equipment in block chain system
CN115988038A (en) Data management method and system based on Internet of things platform
WO2025140740A1 (en) Method and system for processing fault information of internet-of-things terminal, and electronic device and medium
CN103167016B (en) The method and apparatus that a kind of browser crash data is uploaded and processed
CN108429727A (en) Method for secure exchange of discovery link information
CN106709333B (en) A security testing method and device for application programming
CN116321162B (en) Block chain authentication method, system, terminal and medium based on WIFI6
WO2013182053A1 (en) Sensor access detection method, device and system
CN110839038A (en) Security device-based intelligent monitoring method, platform server and security device
CN106487858B (en) Information uploading method and device
CN113992715A (en) Online state cloud monitoring and edge computing device and method
CN106101059A (en) A kind of web-page requests processing method and processing device

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