[go: up one dir, main page]

CN111988348B - Data acquisition method and car networking control system - Google Patents

Data acquisition method and car networking control system Download PDF

Info

Publication number
CN111988348B
CN111988348B CN201910430166.XA CN201910430166A CN111988348B CN 111988348 B CN111988348 B CN 111988348B CN 201910430166 A CN201910430166 A CN 201910430166A CN 111988348 B CN111988348 B CN 111988348B
Authority
CN
China
Prior art keywords
data
data collection
internet
vehicles
control system
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
CN201910430166.XA
Other languages
Chinese (zh)
Other versions
CN111988348A (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.)
SF Technology Co Ltd
Shenzhen SF Taisen Holding Group Co Ltd
Original Assignee
SF Technology Co Ltd
Shenzhen SF Taisen Holding 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 SF Technology Co Ltd, Shenzhen SF Taisen Holding Group Co Ltd filed Critical SF Technology Co Ltd
Priority to CN201910430166.XA priority Critical patent/CN111988348B/en
Publication of CN111988348A publication Critical patent/CN111988348A/en
Application granted granted Critical
Publication of CN111988348B publication Critical patent/CN111988348B/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
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/02Protocols based on web technology, e.g. hypertext transfer protocol [HTTP]
    • H04L67/025Protocols based on web technology, e.g. hypertext transfer protocol [HTTP] for remote control or remote monitoring of applications
    • 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/12Protocols specially adapted for proprietary or special-purpose networking environments, e.g. medical networks, sensor networks, networks in vehicles or remote metering networks
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/50Network services
    • H04L67/60Scheduling or organising the servicing of application requests, e.g. requests for application data transmissions using the analysis and optimisation of the required network resources
    • H04L67/63Routing a service request depending on the request content or context
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W4/00Services specially adapted for wireless communication networks; Facilities therefor
    • H04W4/30Services specially adapted for particular environments, situations or purposes
    • H04W4/40Services specially adapted for particular environments, situations or purposes for vehicles, e.g. vehicle-to-pedestrians [V2P]
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W88/00Devices specially adapted for wireless communication networks, e.g. terminals, base stations or access point devices
    • H04W88/16Gateway arrangements
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02PCLIMATE CHANGE MITIGATION TECHNOLOGIES IN THE PRODUCTION OR PROCESSING OF GOODS
    • Y02P90/00Enabling technologies with a potential contribution to greenhouse gas [GHG] emissions mitigation
    • Y02P90/02Total factory control, e.g. smart factories, flexible manufacturing systems [FMS] or integrated manufacturing systems [IMS]

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Health & Medical Sciences (AREA)
  • Computing Systems (AREA)
  • General Health & Medical Sciences (AREA)
  • Medical Informatics (AREA)
  • Traffic Control Systems (AREA)

Abstract

本发明实施例公开了一种数据采集方法及车联网控制系统,该车联网控制系统包括路由装置以及与路由装置连接的多个计算节点,每个计算节点分别对应多个数据采集网关,路由装置用于接收车联网设备的上报数据,并转发给多个计算节点;数据采集网关用于从对应的计算节点采集数据,并上报给车联网控制系统,车联网控制系统还包括:第一判断模块,用于判断第一计算节点对应的多个数据采集网关中,是否存在数据采集速度大于数据上报速度的第一数据采集网关;采集模块,用于在存在第一数据采集网关时,利用空闲的目标数据采集网关采集第一数据采集网关的待采集数据。本发明实施例可以解除数据采集网关处的数据积压,提高车联网控制系统处理数据的效率。

Figure 201910430166

The embodiment of the present invention discloses a data collection method and a control system for the Internet of Vehicles. The control system for the Internet of Vehicles includes a routing device and a plurality of computing nodes connected to the routing device. Each computing node corresponds to a plurality of data collection gateways, and the routing device It is used to receive the reported data from the Internet of Vehicles equipment and forward it to multiple computing nodes; the data acquisition gateway is used to collect data from the corresponding computing nodes and report it to the Internet of Vehicles control system. The Internet of Vehicles control system also includes: a first judgment module , used to judge whether there is a first data collection gateway whose data collection speed is greater than the data reporting speed among the multiple data collection gateways corresponding to the first computing node; the collection module is used to use the idle The target data collection gateway collects the data to be collected by the first data collection gateway. The embodiment of the present invention can relieve the backlog of data at the data collection gateway, and improve the efficiency of data processing by the Internet of Vehicles control system.

Figure 201910430166

Description

数据采集方法及车联网控制系统Data acquisition method and car networking control system

技术领域technical field

本发明涉及车联网控制领域,具体涉及一种数据采集方法及车联网控制系统。The invention relates to the field of vehicle networking control, in particular to a data collection method and a vehicle networking control system.

背景技术Background technique

随着通信技术的迅速发展,物联网设备在无人车、新能源车等领域有了大规模的运用。通过物联网设备的部署,技术人员可以实时采集车辆的运行信息。达到智能化运营,设备反控等目的。考虑到车联网设备的运营要求,当前设备与平台通常采用TCP(Transmission Control Protocol,传输控制协议)作为底层通信协议。TCP协议能够在一定程度上保障数据传递的可靠性。但是在针对重复数据去重、设备上线快速识别等方面还存在许多问题。车联网设备安装在全国各地的运营车辆当中,车辆运营地区的网络情况并不相同。例如大量的重货卡车,通常需要进行远距离的运输工作。当车辆进入山区、野外等地点时。由于网络情况较为糟糕,设备采集的数据很难及时的传输至云端。此时采集的设备数据,通常会先存储在本地。当车辆进入网络环境较好的地区时,会发生数据传输不均衡的情况,会出现数据积压,进而造成系统性的问题。With the rapid development of communication technology, IoT devices have been widely used in unmanned vehicles, new energy vehicles and other fields. Through the deployment of IoT devices, technicians can collect vehicle operating information in real time. Achieve intelligent operation, equipment anti-control and other purposes. Considering the operational requirements of IoV devices, current devices and platforms usually use TCP (Transmission Control Protocol, Transmission Control Protocol) as the underlying communication protocol. The TCP protocol can guarantee the reliability of data transmission to a certain extent. However, there are still many problems in terms of deduplication of duplicate data and rapid identification of equipment online. Vehicle networking equipment is installed in operating vehicles across the country, and the network conditions in the vehicle operating areas are not the same. For example, a large number of heavy trucks usually need to carry out long-distance transportation. When the vehicle enters places such as mountains and fields. Due to the poor network conditions, it is difficult to transmit the data collected by the equipment to the cloud in a timely manner. The device data collected at this time is usually stored locally first. When a vehicle enters an area with a better network environment, unbalanced data transmission will occur, and data backlogs will occur, which will cause systemic problems.

也即,现有技术中,车联网控制系统会出现数据积压的情况,降低了系统的效率。That is to say, in the prior art, there will be a backlog of data in the Internet of Vehicles control system, which reduces the efficiency of the system.

发明内容Contents of the invention

本发明实施例提供一种数据采集方法及车联网控制系统,能够调整系统中的计算资源配置,避免出现数据积压的情况,提高车联网控制系统处理数据的效率。Embodiments of the present invention provide a data collection method and an Internet of Vehicles control system, which can adjust the configuration of computing resources in the system, avoid data backlogs, and improve the efficiency of data processing by the Internet of Vehicles control system.

第一方面,本申请提供一种车联网控制系统,所述车联网控制系统包括路由装置以及与所述路由装置连接的多个计算节点,每个所述计算节点分别对应多个数据采集网关,所述路由装置用于接收车联网设备的上报数据,并转发给所述多个计算节点;所述数据采集网关用于从对应的计算节点采集数据,所述车联网控制系统还包括:In a first aspect, the present application provides a control system for the Internet of Vehicles, the control system for the Internet of Vehicles includes a routing device and a plurality of computing nodes connected to the routing device, each of the computing nodes corresponds to a plurality of data collection gateways, The routing device is used to receive the reported data of the Internet of Vehicles equipment and forward it to the plurality of computing nodes; the data collection gateway is used to collect data from corresponding computing nodes, and the Internet of Vehicles control system further includes:

第一判断模块,用于判断第一计算节点对应的所述多个数据采集网关中,是否存在数据采集速度大于数据上报速度的第一数据采集网关;A first judgment module, configured to judge whether there is a first data collection gateway whose data collection speed is greater than the data reporting speed among the plurality of data collection gateways corresponding to the first computing node;

采集模块,用于在存在所述第一数据采集网关时,利用空闲的目标数据采集网关采集所述第一数据采集网关的待采集数据。The collection module is configured to use an idle target data collection gateway to collect the data to be collected by the first data collection gateway when the first data collection gateway exists.

进一步的,所述采集模块具体包括:Further, the acquisition module specifically includes:

获取子模块,用于获取所述第一计算节点的请求指令;An acquisition submodule, configured to acquire the request instruction of the first computing node;

确定子模块,用于根据所述请求指令确定所述目标数据采集网关;A determining submodule, configured to determine the target data collection gateway according to the request instruction;

采集子模块,用于通知所述目标数据采集网关,以利用所述目标数据采集网关采集所述第一数据采集网关的待采集数据。The collection sub-module is configured to notify the target data collection gateway to use the target data collection gateway to collect the data to be collected by the first data collection gateway.

进一步的,所述确定子模块具体用于:Further, the determining submodule is specifically used for:

根据所述请求指令获取与所述路由装置连接的多个计算节点的数据流量;Obtaining the data flow of multiple computing nodes connected to the routing device according to the request instruction;

将所述多个计算节点中数据流量最小的计算节点确定为所述目标计算节点;determining a computing node with the smallest data flow among the plurality of computing nodes as the target computing node;

将所述目标计算节点中的空闲的第二数据采集网关,确定为所述目标数据采集网关。An idle second data collection gateway in the target computing node is determined as the target data collection gateway.

进一步的,所述确定子模块具体用于:Further, the determining submodule is specifically used for:

根据所述请求指令判断所述第一计算节点对应的所述多个数据采集网关中,是否存在空闲的第三数据采集网关;judging according to the request instruction whether there is an idle third data collection gateway among the plurality of data collection gateways corresponding to the first computing node;

若存在,则确定所述第三数据采集网关为所述目标数据采集网关。If it exists, determine that the third data collection gateway is the target data collection gateway.

进一步的,所述车联网控制系统还包括:Further, the vehicle networking control system also includes:

第二判断模块,用于判断在预设时间内是否获取到车联网设备的上报数据;The second judging module is used to judge whether the reported data of the Internet of Vehicles device is obtained within a preset time;

存储模块,用于若未获取到所述车联网设备的上报数据,则将第一预设信息存储在预设的第一数据结构中,以使所述车联网设备在上线时从所述第一数据结构中获取所述第一预设信息。A storage module, configured to store first preset information in a preset first data structure if the reported data of the Internet of Vehicles device is not obtained, so that the Internet of Vehicles device can be accessed from the first preset information when going online. Acquiring the first preset information in a data structure.

进一步的,所述第一预设信息包括升级包和/或控制指令;所述车联网控制系统还包括删除模块,所述删除模块具体用于:Further, the first preset information includes an upgrade package and/or a control instruction; the Internet of Vehicles control system further includes a deletion module, and the deletion module is specifically used for:

获取所述第一预设信息的被获取次数;Acquire the number of times the first preset information is acquired;

判断所述被获取次数是否达到预设次数;judging whether the number of acquisitions reaches a preset number of times;

若是,则删除所述第一预设信息。If yes, delete the first preset information.

进一步的,所述存储模块具体用于:Further, the storage module is specifically used for:

在所述车联网控制系统在与所述车联网设备断开连接时,获取所述车联网设备的遗言信息;When the Internet of Vehicles control system is disconnected from the Internet of Vehicles device, acquiring the will information of the Internet of Vehicles device;

根据所述遗言信息确定所述第一预设信息;determining the first preset information according to the will information;

将所述第一预设信息存储至所述第一数据结构,以使所述车联网设备在上线时,从所述第一数据结构中获取所述第一预设信息。The first preset information is stored in the first data structure, so that the IoV device acquires the first preset information from the first data structure when going online.

第二方面,本申请提供一种数据采集方法,所述数据采集方法应用于车联网控制系统,所述车联网控制系统包括路由装置以及与所述路由装置连接的多个计算节点,每个所述计算节点分别对应多个数据采集网关,所述数据采集方法包括:In a second aspect, the present application provides a data collection method, the data collection method is applied to a control system of the Internet of Vehicles, and the control system of the Internet of Vehicles includes a routing device and a plurality of computing nodes connected to the routing device, each of which The computing nodes correspond to a plurality of data collection gateways respectively, and the data collection method includes:

通过所述路由装置接收车联网设备的上报数据,并转发给所述多个计算节点;receiving the reported data of the IoV device through the routing device, and forwarding it to the plurality of computing nodes;

通过所述数据采集网关从对应的计算节点采集数据;collecting data from corresponding computing nodes through the data collection gateway;

判断第一计算节点对应的所述多个数据采集网关中,是否存在数据采集速度大于数据上报速度的第一数据采集网关;Judging whether there is a first data collection gateway whose data collection speed is greater than the data reporting speed among the plurality of data collection gateways corresponding to the first computing node;

若存在,利用空闲的目标数据采集网关采集所述第一数据采集网关的待采集数据。If it exists, use an idle target data collection gateway to collect the data to be collected by the first data collection gateway.

进一步的,所述利用空闲的目标数据采集网关采集所述第一数据采集网关的待采集数据,包括:Further, said using an idle target data collection gateway to collect the data to be collected by the first data collection gateway includes:

获取所述第一计算节点的请求指令;Obtain a request instruction of the first computing node;

根据所述请求指令确定所述目标数据采集网关;determining the target data collection gateway according to the request instruction;

通知所述目标数据采集网关,以利用所述目标数据采集网关采集所述第一数据采集网关的待采集数据。Notifying the target data collection gateway to use the target data collection gateway to collect the data to be collected by the first data collection gateway.

进一步的,所述根据所述请求指令确定所述目标数据采集网关,包括:Further, the determining the target data collection gateway according to the request instruction includes:

根据所述请求指令获取与所述路由装置连接的多个计算节点的数据流量;Obtaining the data flow of multiple computing nodes connected to the routing device according to the request instruction;

将所述多个计算节点中数据流量最小的计算节点确定为所述目标计算节点;determining a computing node with the smallest data flow among the plurality of computing nodes as the target computing node;

将所述目标计算节点中的空闲的第二数据采集网关,确定为所述目标数据采集网关。An idle second data collection gateway in the target computing node is determined as the target data collection gateway.

进一步的,所述根据所述请求指令确定所述目标数据采集网关,包括:Further, the determining the target data collection gateway according to the request instruction includes:

根据所述请求指令判断所述第一计算节点对应的所述多个数据采集网关中,是否存在空闲的第三数据采集网关;judging according to the request instruction whether there is an idle third data collection gateway among the plurality of data collection gateways corresponding to the first computing node;

若存在,则确定所述第三数据采集网关为所述目标数据采集网关。If it exists, determine that the third data collection gateway is the target data collection gateway.

进一步的,所述数据采集方法还包括:Further, the data collection method also includes:

判断在预设时间内是否获取到车联网设备的上报数据;Judging whether the reported data of the Internet of Vehicles device is obtained within the preset time;

若未获取到所述车联网设备的上报数据,则将第一预设信息存储在预设的第一数据结构中,以使所述车联网设备在上线时从所述第一数据结构中获取所述第一预设信息。If the reported data of the IoV device is not obtained, storing the first preset information in a preset first data structure, so that the IOV device obtains it from the first data structure when going online The first preset information.

进一步的,所述第一预设信息包括升级包和/或控制指令;所述方法还包括:Further, the first preset information includes an upgrade package and/or a control instruction; the method further includes:

获取所述第一预设信息的被获取次数;Acquire the number of times the first preset information is acquired;

判断所述被获取次数是否达到预设次数;judging whether the number of acquisitions reaches a preset number of times;

若是,则删除所述第一预设信息。If yes, delete the first preset information.

进一步的,所述将第一预设信息存储在预设的第一数据结构中,以使所述车联网设备在上线时从所述第一数据结构中获取所述第一预设信息,包括:Further, the storing the first preset information in a preset first data structure, so that the Internet of Vehicles device obtains the first preset information from the first data structure when going online, includes :

在所述车联网控制系统在与所述车联网设备断开连接时,获取所述车联网设备的遗言信息;When the Internet of Vehicles control system is disconnected from the Internet of Vehicles device, acquiring the will information of the Internet of Vehicles device;

根据所述遗言信息确定所述第一预设信息;determining the first preset information according to the will information;

将所述第一预设信息存储至所述第一数据结构,以使所述车联网设备在上线时,从所述第一数据结构中获取所述第一预设信息。The first preset information is stored in the first data structure, so that the IoV device acquires the first preset information from the first data structure when going online.

进一步的,所述数据采集方法还包括:Further, the data collection method also includes:

若获取到所述车联网设备的上报数据,则判断所述车联网设备的上报数据是否满足预设条件;If the reported data of the Internet of Vehicles device is obtained, it is judged whether the reported data of the Internet of Vehicles device satisfies a preset condition;

若是,则将所述第二预设信息发送至预设的第二数据结构中,以使所述车联网设备即时获取所述第二预设信息。If so, the second preset information is sent to the preset second data structure, so that the IoV device acquires the second preset information immediately.

第三方面,本发明还提供一种服务器,所述服务器包括:In a third aspect, the present invention also provides a server, and the server includes:

一个或多个处理器;one or more processors;

存储器;以及storage; and

一个或多个应用程序,其中所述一个或多个应用程序被存储于所述存储器中,并配置为由所述处理器执行以实现第二方面中任一项所述的数据采集方法。One or more application programs, wherein the one or more application programs are stored in the memory and configured to be executed by the processor to implement the data collection method according to any one of the second aspect.

第四方面,本发明还提供一种存储介质,所述存储介质中存储有多条指令,所述指令适于处理器进行加载,以执行第二方面中任一项所述的数据采集方法中的步骤。In the fourth aspect, the present invention also provides a storage medium, wherein a plurality of instructions are stored in the storage medium, and the instructions are suitable for being loaded by a processor to execute the data collection method described in any one of the second aspect. A step of.

本发明实施例中提供一种数据采集方法及车联网控制系统,车联网控制系统包括路由装置以及与路由装置连接的多个计算节点,每个计算节点分别对应多个数据采集网关,路由装置用于接收车联网设备的上报数据,并转发给多个计算节点;数据采集网关用于从对应的计算节点采集数据,并上报给车联网控制系统,车联网控制系统还包括:第一判断模块,用于判断第一计算节点对应的多个数据采集网关中,是否存在数据采集速度大于数据上报速度的第一数据采集网关;采集模块,用于在存在第一数据采集网关时,利用空闲的目标数据采集网关采集第一数据采集网关的待采集数据。本发明实施例中在发现第一计算节点对应的数据采集网关中,存在数据采集速度大于数据上报速度的第一数据采集网关,及时利用第一数据采集网关之外空闲的目标采集网关,采集第一数据采集网关的待采集数据,解除第一数据采集网关处的数据积压,提高车联网控制系统处理数据的效率。An embodiment of the present invention provides a data collection method and a control system for the Internet of Vehicles. The control system for the Internet of Vehicles includes a routing device and a plurality of computing nodes connected to the routing device. Each computing node corresponds to a plurality of data collection gateways. The routing device uses It is used to receive the reported data from the Internet of Vehicles equipment and forward it to multiple computing nodes; the data collection gateway is used to collect data from the corresponding computing nodes and report it to the Internet of Vehicles control system. The Internet of Vehicles control system also includes: a first judgment module, It is used to judge whether there is a first data collection gateway whose data collection speed is greater than the data reporting speed among the multiple data collection gateways corresponding to the first computing node; the collection module is used to use an idle target when there is a first data collection gateway The data collection gateway collects the data to be collected by the first data collection gateway. In the embodiment of the present invention, it is found that among the data collection gateways corresponding to the first computing node, there is a first data collection gateway whose data collection speed is greater than the data reporting speed, and the idle target collection gateway other than the first data collection gateway is used in time to collect the second data collection gateway. The data to be collected by a data collection gateway relieves the data backlog at the first data collection gateway and improves the data processing efficiency of the Internet of Vehicles control system.

附图说明Description of drawings

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

图1是本发明实施例提供的车联网控制系统与车联网设备交互的一个实施例结构示意图;FIG. 1 is a schematic structural diagram of an embodiment of the interaction between the Internet of Vehicles control system and the Internet of Vehicles device provided by the embodiment of the present invention;

图2是本发明实施例提供的数据采集方法的一个实施例流程示意图;Fig. 2 is a schematic flow chart of an embodiment of the data acquisition method provided by the embodiment of the present invention;

图3是图2所示实施例中步骤204的一个实施例流程示意图;Fig. 3 is a schematic flow chart of an embodiment of step 204 in the embodiment shown in Fig. 2;

图4是在图2所示实施例基础上,本发明实施例提供的数据采集方法的另一个实施例流程示意图;Fig. 4 is a schematic flowchart of another embodiment of the data collection method provided by the embodiment of the present invention based on the embodiment shown in Fig. 2;

图5是本发明实施例提供的车联网控制系统的一个实施例结构示意图;FIG. 5 is a schematic structural diagram of an embodiment of a vehicle networking control system provided by an embodiment of the present invention;

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

具体实施例specific embodiment

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

在本发明的描述中,需要理解的是,术语“中心”、“纵向”、“横向”、“长度”、“宽度”、“厚度”、“上”、“下”、“前”、“后”、“左”、“右”、“竖直”、“水平”、“顶”、“底”、“内”、“外”等指示的方位或位置关系为基于附图所示的方位或位置关系,仅是为了便于描述本发明和简化描述,而不是指示或暗示所指的装置或元件必须具有特定的方位、以特定的方位构造和操作,因此不能理解为对本发明的限制。此外,术语“第一”、“第二”仅用于描述目的,而不能理解为指示或暗示相对重要性或者隐含指明所指示的技术特征的数量。由此,限定有“第一”、“第二”的特征可以明示或者隐含地包括一个或者更多个特征。在本发明的描述中,“多个”的含义是两个或两个以上,除非另有明确具体的限定。In describing the present invention, it should be understood that the terms "center", "longitudinal", "transverse", "length", "width", "thickness", "upper", "lower", "front", " The orientation or positional relationship indicated by "rear", "left", "right", "vertical", "horizontal", "top", "bottom", "inner", "outer", etc. is based on the orientation shown in the drawings Or positional relationship is only for the convenience of describing the present invention and simplifying the description, but does not indicate or imply that the device or element referred to must have a specific orientation, be constructed and operated in a specific orientation, and therefore should not be construed as limiting the present invention. In addition, the terms "first" and "second" are used for descriptive purposes only, and cannot be interpreted as indicating or implying relative importance or implicitly specifying the quantity of indicated technical features. Thus, features defined as "first" and "second" may explicitly or implicitly include one or more features. In the description of the present invention, "plurality" means two or more, unless otherwise specifically defined.

在本发明中,“示例性”一词用来表示“用作例子、例证或说明”。本发明中被描述为“示例性”的任何实施例不一定被解释为比其它实施例更优选或更具优势。为了使本领域任何技术人员能够实现和使用本发明,给出了以下描述。在以下描述中,为了解释的目的而列出了细节。应当明白的是,本领域普通技术人员可以认识到,在不使用这些特定细节的情况下也可以实现本发明。在其它实例中,不会对公知的结构和过程进行详细阐述,以避免不必要的细节使本发明的描述变得晦涩。因此,本发明并非旨在限于所示的实施例,而是与符合本发明所公开的原理和特征的最广范围相一致。In the present invention, the word "exemplary" is used to mean "serving as an example, illustration or illustration". Any embodiment described herein as "exemplary" is not necessarily to be construed as preferred or advantageous over other embodiments. The following description is given to enable any person skilled in the art to make and use the invention. In the following description, details are set forth for purposes of explanation. It should be understood that one of ordinary skill in the art would recognize that the present invention may be practiced without the use of these specific details. In other instances, well-known structures and procedures are not described in detail to avoid obscuring the description of the present invention with unnecessary detail. Thus, the present invention is not intended to be limited to the embodiments shown but is to be accorded the widest scope consistent with the principles and features disclosed herein.

本发明实施例提供一种数据采集方法、装置、系统以及存储介质。以下分别进行详细说明。Embodiments of the present invention provide a data collection method, device, system, and storage medium. Each will be described in detail below.

请参阅图1,图1是本发明实施例提供的车联网控制系统与车联网设备的一个实施例结构示意图,车联网控制系统用于与车联网设备进行交互数据。车联网控制系统可以位于服务器中,该服务器可以单个的服务器或者服务器集群,例如消息队列遥测传输(Message Queuing Telemetry Transport,MQTT)服务器集群。Please refer to FIG. 1. FIG. 1 is a schematic structural diagram of an embodiment of an IoV control system and an IOV device provided by an embodiment of the present invention. The IOV control system is used to exchange data with the IOV device. The vehicle networking control system may be located in a server, and the server may be a single server or a server cluster, such as a message queue telemetry transport (Message Queuing Telemetry Transport, MQTT) server cluster.

车联网设备为设置在车辆上的车载终端,车联网设备主要是集成一些传感设备、雷达、GPS设备、视频录制、图像抓拍等构件的设备,不同的车联网设备主要是构件多少、种类不同而已。数据的采集主要通过所述车联网设备里的构件采集,各种构件都有自己的机制,里面会有相应的控制器、电子电路等,实现信号放大与模拟信号到数字信号的转换等,转换后的数字信号就是采集的数据;像GPS设备能采集当前位置的经度、纬度、海拔等信息;摄像设备的图像抓拍能拍照,照片就是它采集的数据,可以经过特定的格式与编码上报。一般所述车联网设备可连接GPS设备、烟雾报警器、智能防撞设备、疲劳检测设备、胎压监测设备、摄像设备中的至少一种,优选多种。The Internet of Vehicles device is a vehicle-mounted terminal installed on the vehicle. The Internet of Vehicles device is mainly a device that integrates some components such as sensing equipment, radar, GPS equipment, video recording, and image capture. Different Internet of Vehicles devices mainly have different components and types. That's all. The collection of data is mainly through the collection of components in the Internet of Vehicles equipment. Each component has its own mechanism, and there will be corresponding controllers, electronic circuits, etc. in it to realize signal amplification and conversion from analog signals to digital signals. The final digital signal is the collected data; GPS equipment can collect the longitude, latitude, altitude and other information of the current location; the image capture of the camera equipment can take pictures, and the photos are the data it collects, which can be reported in a specific format and code. Generally, the Internet of Vehicles device can be connected to at least one of GPS devices, smoke alarms, intelligent anti-collision devices, fatigue detection devices, tire pressure monitoring devices, and camera devices, preferably more than one.

其中,GPS设备配置用于采集车辆的位置数据;烟雾报警器配置用于采集车辆的烟雾警报数据;智能防撞设备配置用于采集车辆的智能防撞警报数据疲劳检测设备配置用于采集车辆的疲劳检测数据;胎压监测设备配置用于采集车辆的胎压监测数据;摄像设备配置用于采集车辆的车身及车身周边相关数据,实现对位置数据、烟雾警报数据、智能防撞警报数据、疲劳检测数据、胎压监测数据、车身及车身周边相关数据的至少一项的采集。通过给该数据分别创建不同的MQTT主题,比如:位置数据、交通违规数据、ADAS协议数据、图片抓拍与视频数据等,形成所述车载终端上报的不同主题的采集数据。所述车联网设备上报的所述采集数据是按约定的MQTT协议与格式上报的,比如:json格式、二进制格式等,车联网控制系统从主题中读到数据后,要根据协议与格式把真实的数据解析出来并存储供后面数据分析与使用。Among them, the GPS device is configured to collect the location data of the vehicle; the smoke alarm is configured to collect the smoke alarm data of the vehicle; the intelligent anti-collision device is configured to collect the intelligent anti-collision alarm data of the vehicle; Fatigue detection data; tire pressure monitoring equipment is configured to collect tire pressure monitoring data of vehicles; camera equipment is configured to collect relevant data on the vehicle body and its surroundings to realize location data, smoke alarm data, intelligent anti-collision alarm data, fatigue Collection of at least one item of detection data, tire pressure monitoring data, body and surrounding data. By creating different MQTT topics for the data, such as: location data, traffic violation data, ADAS protocol data, picture capture and video data, etc., the collected data of different topics reported by the vehicle terminal is formed. The collected data reported by the Internet of Vehicles device is reported according to the agreed MQTT protocol and format, such as: json format, binary format, etc. After the Internet of Vehicles control system reads the data from the subject, it must convert the real data according to the agreement and format. The data is parsed out and stored for subsequent data analysis and use.

车联网设备在网络情况好的时候将采集的数据实时上报到车联网控制系统(如MQTT服务器集群)相应的主题里,要断网或者网络情况不好的情况下将采集的数据缓存在车联网设备本地,车联网设备待上报的采集数据在车联网设备进行本地缓存,即可在本地先缓存,等联网或者网络情况转好时再批量推送到车联网控制系统相应的主题里,车联网控制系统接收并存储车联网设备上报的不同主题的采集数据。When the network condition is good, the Internet of Vehicles device will report the collected data to the corresponding topic of the Internet of Vehicles control system (such as MQTT server cluster) in real time, and cache the collected data in the Internet of Vehicles when the network is disconnected or the network condition is not good. Locally on the device, the collected data to be reported by the Internet of Vehicles device is cached locally on the Internet of Vehicles device, which can be cached locally, and then pushed to the corresponding topic of the Internet of Vehicles control system in batches when the Internet of Vehicles or the network situation improves. The system receives and stores collected data of different topics reported by the Internet of Vehicles devices.

本发明实施例中,如图1所示,车联网控制系统包括路由装置11,以及与路由装置11连接的多个计算节点12。路由装置11用于接收车联网设备14的上报数据,并转发给多个计算节点12。每个计算节点12分别对应多个数据采集网关13,每个数据采集网关13从对应的计算节点12采集数据。车联网设备14可以通过传感器采集车辆的温度数据、位置数据、湿度数据、发送机数据等并发送给路由装置11,或者接收路由装置11发送的数据。与路由装置11连接的计算节点12的数量、与计算节点12连接的数据采集网关13的数量根据具体情况设定,本发明对此不作限定。In the embodiment of the present invention, as shown in FIG. 1 , the Internet of Vehicles control system includes a routing device 11 and a plurality of computing nodes 12 connected to the routing device 11 . The routing device 11 is used to receive the data reported by the IoV device 14 and forward it to multiple computing nodes 12 . Each computing node 12 corresponds to a plurality of data collection gateways 13 , and each data collection gateway 13 collects data from the corresponding computing node 12 . The Internet of Vehicles device 14 can collect temperature data, location data, humidity data, transmitter data, etc. of the vehicle through sensors and send them to the routing device 11 , or receive data sent by the routing device 11 . The number of computing nodes 12 connected to the routing device 11 and the number of data collection gateways 13 connected to the computing nodes 12 are set according to specific conditions, which is not limited in the present invention.

在一个具体的实施例中,车联网设备14采集车辆的温度数据、位置数据、湿度数据等数据,并发送给路由装置11。路由装置11根据预设转发规则,将不同主题的数据发送至多个计算节点12,并对转发的数据进行统计计数。优选的,路由装置11对同一个数据仅转发一次。与计算节点12连接的多个数据采集网关13分别从对应的计算节点12采集数据。由于车联网设备的每条数据均是通过路由装置11进行转发,并对转发的数据进行统计计数,能够保证每条数据只被消费一次。本发明对此不作限定。路由装置11可以是路由器或者路由服务器等独立设备,可以理解的是,在本发明另一些实施例中,路由装置11、计算节点12和数据采集网关13也可以集成为一个采集设备,即路由装置11也可以是采集设备中的一个模块,例如路由层等,具体此处不作限定。In a specific embodiment, the Internet of Vehicles device 14 collects data such as temperature data, location data, and humidity data of the vehicle, and sends them to the routing device 11 . The routing device 11 sends data of different topics to multiple computing nodes 12 according to preset forwarding rules, and counts the forwarded data. Preferably, the routing device 11 forwards the same data only once. Multiple data collection gateways 13 connected to computing nodes 12 collect data from corresponding computing nodes 12 respectively. Since each piece of data of the Internet of Vehicles device is forwarded through the routing device 11, and the forwarded data is counted, it can be guaranteed that each piece of data is only consumed once. The present invention is not limited thereto. The routing device 11 can be an independent device such as a router or a routing server. It can be understood that, in other embodiments of the present invention, the routing device 11, the computing node 12 and the data collection gateway 13 can also be integrated into one collection device, that is, the routing device 11 may also be a module in the collection device, such as a routing layer, etc., which is not limited here.

参阅图2,图2是本发明实施例提供的数据采集方法的一个实施例流程示意图。需要说明的是,本发明实施例中,执行该数据采集方法的主体为车联网控制系统,该车联网控制系统位于服务器中,该数据采集方法的具体流程可以如下:Referring to FIG. 2 , FIG. 2 is a schematic flowchart of an embodiment of a data collection method provided by an embodiment of the present invention. It should be noted that, in the embodiment of the present invention, the main body that executes the data collection method is the Internet of Vehicles control system, and the Internet of Vehicles control system is located in the server. The specific process of the data collection method can be as follows:

201、通过所述路由装置接收车联网设备的上报数据,并转发给所述多个计算节点。201. Receive the data reported by the IoV device through the routing device, and forward the data to the multiple computing nodes.

202、通过所述数据采集网关从对应的计算节点采集数据。202. Collect data from corresponding computing nodes through the data collection gateway.

203、判断第一计算节点对应的所述多个数据采集网关中,是否存在数据采集速度大于数据上报速度的第一数据采集网关,若存在,执行步骤204,若不存在,可以不作处理。203. Determine whether there is a first data collection gateway whose data collection speed is greater than the data reporting speed among the plurality of data collection gateways corresponding to the first computing node. If yes, perform step 204. If not, do not process.

在一个具体的实施例中,车联网控制系统可以分别获取,每个计算节点对应的多个数据采集网关13的数据采集速度和数据上报速度。根据获取数据采集网关13的数据采集速度和数据上报速度,车联网控制系统即可以判断是否存在数据采集速度大于数据上报速度的第一数据采集网关。In a specific embodiment, the Internet of Vehicles control system can separately obtain the data collection speed and data reporting speed of multiple data collection gateways 13 corresponding to each computing node. According to the data collection speed and data reporting speed of the data collection gateway 13, the IoV control system can determine whether there is a first data collection gateway whose data collection speed is faster than the data reporting speed.

由于数据采集网关数据采集速度大于数据上报速度,采集的数据无法及时上报,容易出现数据积压。车联网控制系统可以同时执行判断多个计算节点对应的各数据采集网关的数据采集速度和数据上报速度的大小,也可以计算节点依次执行,或者按预设策略执行,本发明实施例中对此不作限定。Since the data collection speed of the data collection gateway is greater than the data reporting speed, the collected data cannot be reported in time, and data backlogs are prone to occur. The Internet of Vehicles control system can simultaneously judge the data collection speed and data reporting speed of each data collection gateway corresponding to multiple computing nodes, and can also execute computing nodes sequentially or according to a preset strategy. In this embodiment of the present invention, Not limited.

同样的,对于某个计算节点,车联网控制系统也可以同时执行判断对应的多个数据采集网关的数据采集速度和数据上报速度的大小,也可以按照数据采集网关依次执行,或者按预设策略执行,本发明实施例中对此不作限定。Similarly, for a certain computing node, the Internet of Vehicles control system can also simultaneously execute and judge the data collection speed and data reporting speed of the corresponding multiple data collection gateways, and can also execute sequentially according to the data collection gateway, or according to the preset strategy Execute, which is not limited in this embodiment of the present invention.

优选的,车联网控制系统可以按预设频率,依次判断各计算节点对应的多个数据采集网关中,是否存在数据采集速度大于数据上报速度的第一数据采集网关。预设频率根据具体情况设定即可。通过对各个数据采集网关进行实施监控,能够及时发现出现数据积压的第一数据采集网关,进而通过后续策略及时处理数据积压的情况。Preferably, the Internet of Vehicles control system can sequentially judge whether there is a first data collection gateway whose data collection speed is faster than the data reporting speed among the multiple data collection gateways corresponding to each computing node according to a preset frequency. The preset frequency can be set according to specific conditions. By monitoring each data collection gateway, the first data collection gateway with data backlog can be found in time, and then the data backlog can be dealt with in a timely manner through subsequent strategies.

204、利用空闲的目标数据采集网关采集所述第一数据采集网关的待采集数据。204. Use an idle target data collection gateway to collect the data to be collected by the first data collection gateway.

本发明实施例中在发现第一计算节点对应的数据采集网关中,存在数据采集速度大于数据上报速度的第一数据采集网关,及时利用第一数据采集网关之外空闲的目标采集网关,采集第一数据采集网关的待采集数据,解除第一数据采集网关处的数据积压,提高了车联网控制系统处理数据的效率。In the embodiment of the present invention, it is found that among the data collection gateways corresponding to the first computing node, there is a first data collection gateway whose data collection speed is greater than the data reporting speed, and the idle target collection gateway other than the first data collection gateway is used in time to collect the second data collection gateway. The data to be collected by a data collection gateway relieves the data backlog at the first data collection gateway and improves the data processing efficiency of the Internet of Vehicles control system.

本发明实施例中,若车联网控制系统判断第一计算节点对应的多个数据采集网关中,存在数据采集速度大于数据上报速度的第一数据采集网关。表明第一数据采集网关可能发生数据积压。此时,在本发明一个实施例中,如图3所示,所述利用空闲的目标数据采集网关采集所述第一数据采集网关的待采集数据,可以包括:In the embodiment of the present invention, if the IoV control system determines that among the multiple data collection gateways corresponding to the first computing node, there is a first data collection gateway whose data collection speed is greater than the data reporting speed. Indicates that a data backlog may occur at the first data collection gateway. At this point, in one embodiment of the present invention, as shown in FIG. 3 , the collection of the data to be collected by the first data collection gateway using an idle target data collection gateway may include:

301、获取所述第一计算节点的请求指令。301. Acquire a request instruction of the first computing node.

本发明实施例中,若第一计算节点对应的某个数据采集网关的数据采集速度大于数据上报速度,触发第一计算节点发送所述请求指令。即请求指令是计算节点在判断第一数据采集网关的数据采集速度大于数据上报速度时发送的,第一数据采集网关为计算节点对应的一个数据采集网关In the embodiment of the present invention, if the data collection speed of a certain data collection gateway corresponding to the first computing node is greater than the data reporting speed, the first computing node is triggered to send the request instruction. That is, the request command is sent by the computing node when it judges that the data collection speed of the first data collection gateway is greater than the data reporting speed, and the first data collection gateway is a data collection gateway corresponding to the computing node

302、根据所述请求指令确定所述目标数据采集网关。302. Determine the target data collection gateway according to the request instruction.

本发明实施例中,步骤302中根据所述请求指令确定所述目标数据采集网关可以有多种实现方式,具体如下:In the embodiment of the present invention, in step 302, the determination of the target data collection gateway according to the request instruction can be implemented in multiple ways, specifically as follows:

(1)调动当前第一计算节点中空闲的数据采集网关,采集第一数据采集网关的待采集数据。(1) Mobilize the currently idle data collection gateway in the first computing node to collect the data to be collected by the first data collection gateway.

在一种具体实施方式中,所述根据所述请求指令确定所述目标数据采集网关,可以包括:根据所述请求指令判断所述第一计算节点对应的所述多个数据采集网关中,是否存在空闲的第三数据采集网关;若存在,则确定所述第三数据采集网关为所述目标数据采集网关。In a specific implementation manner, the determining the target data collection gateway according to the request instruction may include: judging according to the request instruction whether among the plurality of data collection gateways corresponding to the first computing node There is an idle third data collection gateway; if there is, it is determined that the third data collection gateway is the target data collection gateway.

本发明实施例中,若车联网控制系统判断第一计算节点对应的多个数据采集网关中,存在空闲的目标数据采集网关。无需请求车联网控制系统调配其他计算节点的资源,可直接通知与第一计算节点对应的空闲的第三数据采集网关,采集第一数据采集网关的待采集数据。也即,计算节点利用与自身连接的目标数据采集网关,采集第一数据采集网关的待采集数据。由于第三数据采集网关与第一计算节点直连,因此,能够提高车联网控制系统的响应速度,更快的消除数据积压的情况。In the embodiment of the present invention, if the Internet of Vehicles control system determines that there is an idle target data collection gateway among the multiple data collection gateways corresponding to the first computing node. The idle third data collection gateway corresponding to the first computing node can be notified directly to collect the data to be collected by the first data collection gateway without requesting the IoV control system to allocate resources of other computing nodes. That is, the computing node uses the target data collection gateway connected to itself to collect the data to be collected by the first data collection gateway. Since the third data acquisition gateway is directly connected to the first computing node, the response speed of the control system of the Internet of Vehicles can be improved, and the data backlog can be eliminated more quickly.

(2)调动其他计算节点中空闲的数据采集网关,采集第一数据采集网关的待采集数据。(2) mobilize idle data collection gateways in other computing nodes to collect data to be collected by the first data collection gateway.

在一种具体实施方式中,所述根据所述请求指令确定所述目标数据采集网关,可以包括:根据所述请求指令获取与所述路由装置连接的多个计算节点的数据流量;将所述多个计算节点中数据流量最小的计算节点确定为所述目标计算节点;将所述目标计算节点中的空闲的第二数据采集网关,确定为所述目标数据采集网关。其中,目标计算节点可以是第一计算节点,也可以不是第一计算节点,一般情况下,由于方式(1),此处优选为其他非第一计算节点的计算节点,即优选的,目标计算节点与第一计算节点不同。In a specific implementation manner, the determining the target data collection gateway according to the request instruction may include: obtaining the data flow of multiple computing nodes connected to the routing device according to the request instruction; The computing node with the smallest data flow among the plurality of computing nodes is determined as the target computing node; and an idle second data collection gateway among the target computing nodes is determined as the target data collection gateway. Wherein, the target computing node may be the first computing node, or may not be the first computing node. In general, due to method (1), it is preferably other computing nodes other than the first computing node, that is, preferably, the target computing node The node is different from the first computing node.

另外,在本发明其他实施例中,获取与路由装置11连接的多个计算节点12的数据流量的方式也可以根据其他策略确定目标计算节点,本发明对此不作限定。In addition, in other embodiments of the present invention, the manner of acquiring the data traffic of multiple computing nodes 12 connected to the routing device 11 may also determine the target computing node according to other strategies, which is not limited in the present invention.

在本发明实施例中,当存在数据积压的第一数据采集网关时,调动其他空闲数据采集网关采集第一数据采集网关的待采集数据,从而避免出现数据积压的情况,提高系统的效率。In the embodiment of the present invention, when there is a first data collection gateway with a backlog of data, other idle data collection gateways are mobilized to collect the data to be collected by the first data collection gateway, thereby avoiding data backlog and improving system efficiency.

需要说明的是,本发明实施例中,所指的空闲的数据采集网关可以是待处理数据量低于预设值的数据采集网关,该预设值可以是1M、2M、5M等,本发明实施例中对此不作限定。在本发明其他实施例中,空闲的数据采集网关也可以是数据采集速度与数据上报速度之差高于预设速度的数据采集网关,根据具体情况设定,本发明对此不作限定。It should be noted that, in the embodiment of the present invention, the idle data collection gateway referred to may be a data collection gateway whose amount of data to be processed is lower than a preset value, and the preset value may be 1M, 2M, 5M, etc., the present invention This is not limited in the embodiments. In other embodiments of the present invention, the idle data collection gateway may also be a data collection gateway whose difference between the data collection speed and the data reporting speed is higher than the preset speed, which is set according to specific circumstances, and the present invention does not limit this.

303、通知所述目标数据采集网关,以利用所述目标数据采集网关采集所述第一数据采集网关的待采集数据。303. Notify the target data collection gateway to use the target data collection gateway to collect the data to be collected by the first data collection gateway.

本发明实施例中,若车联网控制系统判断第一计算节点对应的多个数据采集网关中,不存在空闲数据采集网关。需要车联网控制系统调配其他计算节点的资源。具体的,第一计算节点12通过路由装置11发送请求指令,车联网控制系统接收所述请求指令,以使车联网控制系统根据所述请求指令确定空闲的目标数据采集网关,并通知目标数据采集网关,采集第一数据采集网关的待采集数据。也即,利用目标计算节点的闲置资源,能够避免单一数据采集网关数据积压导致对应的计算节点发生数据积压,提高车联网控制系统的资源利用率。另外,通过路由装置向目标计算节点发送通知,能够保证数据仅被发送给一个节点,实现数据共享功能。In the embodiment of the present invention, if the IoV control system determines that there is no idle data collection gateway among the multiple data collection gateways corresponding to the first computing node. It is necessary for the Internet of Vehicles control system to allocate resources of other computing nodes. Specifically, the first computing node 12 sends a request instruction through the routing device 11, and the Internet of Vehicles control system receives the request instruction, so that the Internet of Vehicles control system determines an idle target data collection gateway according to the request instruction, and notifies the target data collection gateway The gateway is configured to collect the data to be collected by the first data collection gateway. That is, using the idle resources of the target computing node can avoid the data backlog of the corresponding computing node caused by the data backlog of a single data collection gateway, and improve the resource utilization rate of the IoV control system. In addition, sending a notification to the target computing node through the routing device can ensure that the data is only sent to one node, thereby realizing the data sharing function.

参阅图4,图4是本发明实施例提供的数据采集方法的另一个实施例流程示意图。本发明实施例中,执行该数据采集方法的主体为车联网控制系统。该数据采集方法的具体流程可以如下:Referring to FIG. 4, FIG. 4 is a schematic flowchart of another embodiment of the data collection method provided by the embodiment of the present invention. In the embodiment of the present invention, the main body that executes the data collection method is the Internet of Vehicles control system. The specific process of the data collection method can be as follows:

401、判断在预设时间内是否获取到车联网设备的上报数据。401. Determine whether the data reported by the IoV device is obtained within a preset time.

本实施例中,若在预设时间内未获取到车联网设备的上报数据,则可以确定车联网设备处于离线状态,若在预设时间内获取到车联网设备的上报数据,确定该车联网设备处于在线状态,该预设时间可以是预先设定的,例如1min或1h等,具体此处不作限定。In this embodiment, if the reported data of the IoV device is not obtained within the preset time, it can be determined that the IOV device is offline; if the reported data of the IOV device is obtained within the preset time, it can be determined that the IOV device The device is in the online state, and the preset time may be preset, such as 1 minute or 1 hour, etc., which is not limited here.

本发明实施例中,车联网控制系统可以通过监控数据采集网关,进而判断是否获取到车联网设备的上报数据。In the embodiment of the present invention, the IoV control system can monitor the data collection gateway to determine whether the data reported by the IoV device is obtained.

本发明实施例中,若车联网控制系统未获取到车联网设备的上报数据,则执行步骤402;若获取到车联网设备的上报数据,则可以步骤执行403。也即,根据车联网设备是否在线,对车联网设备进行不同的处理,通过分类管理对数据进行分流传输,能够避免出现数据积压。In the embodiment of the present invention, if the IoV control system does not obtain the reported data of the IoV device, then execute step 402; if the reported data of the IOV device is obtained, then execute step 403. That is, according to whether the Internet of Vehicles device is online, the Internet of Vehicles device is processed differently, and the data is distributed and transmitted through classified management, which can avoid data backlog.

402、若未获取到所述车联网设备的上报数据,则将第一预设信息存储在预设的第一数据结构中,以使所述车联网设备在上线时从所述第一数据结构中获取所述第一预设信息。402. If the reported data of the IoV device is not obtained, store the first preset information in a preset first data structure, so that the IoV device can read from the first data structure when going online to obtain the first preset information.

本发明实施例中,车联网控制系统如果没有获取到车联网设备的上报数据,则表明车联网设备离线,此时如果继续向车联网设备发送第一预设信息(第一预设信息为则针对离线状态的车联网设备的指令或升级包),则可能会造成数据丢失或者数据积压。车联网控制系统将第一预设信息存储在预设的第一数据结构中,以使车联网设备在上线时从第一数据结构中获取第一预设信息。也即,如果判断车联网设备离线,则将第一预设信息存储至第一数据结构,能够避免第一预设信息丢失或者数据积压,降低车联网控制系统的负荷。In the embodiment of the present invention, if the IoV control system does not obtain the reported data of the IOV device, it indicates that the IOV device is offline. If the first preset information is sent to the IOV device at this time (the first preset information is Instructions or upgrade packages for offline IoV devices) may cause data loss or data backlog. The IoV control system stores the first preset information in a preset first data structure, so that the IOV device obtains the first preset information from the first data structure when going online. That is, if it is determined that the IoV device is offline, the first preset information is stored in the first data structure, which can avoid loss of the first preset information or data backlog, and reduce the load of the IOV control system.

在一个具体的实施例中,车联网控制系统如果没有获取到车联网设备的上报数据,则表明车联网设备离线,车联网控制系统获取车联网设备的遗言信息。具体的,在所述车联网控制系统在与所述车联网设备断开连接时,获取所述车联网设备的遗言信息。In a specific embodiment, if the Internet of Vehicles control system does not obtain the reported data of the Internet of Vehicles device, it indicates that the Internet of Vehicles device is offline, and the Internet of Vehicles control system obtains the will information of the Internet of Vehicles device. Specifically, when the Internet of Vehicles control system is disconnected from the Internet of Vehicles device, it acquires the will information of the Internet of Vehicles device.

在车联网控制系统获取车联网设备的遗言信息后,车联网控制系统根据遗言信息确定第一预设信息;车联网控制系统将第一预设信息存储至第一数据结构,以使车联网控制系统在上线时获取第一预设信息。也即,通过遗言信息,既可以实现车联网控制系统对离线的车联网设备进行快速检测,也可以根据遗言信息中的设定规则,对离线的车联网设备进行相应的信息发布。After the Internet of Vehicles control system obtains the will information of the Internet of Vehicles equipment, the Internet of Vehicles control system determines the first preset information according to the last words information; the Internet of Vehicles control system stores the first preset information in the first data structure, so that the Internet of Vehicles control The system obtains the first preset information when going online. That is to say, through the will information, the IoV control system can not only quickly detect the offline IoV devices, but also release corresponding information on the offline IoV devices according to the setting rules in the will information.

在一个优选的实施例中,车联网控制系统如果没有获取到车联网设备的上报数据,则判断车联网控制系统中是否存在遗言信息,如果存在,则获取车联网设备的遗言信息;如果不存在,则发出提示信息,以提示用户发布第一预设信息。也即,如果存在遗言信息,则根据遗言信息获取第一预设信息,如果不存在遗言,则提示用户发布第一预设信息。In a preferred embodiment, if the Internet of Vehicles control system does not obtain the reported data of the Internet of Vehicles device, it judges whether there is will information in the Internet of Vehicles control system, and if it exists, then obtains the last word information of the Internet of Vehicles device; if not , then a prompt message is issued to prompt the user to publish the first preset message. That is, if there is last word information, the first preset information is obtained according to the last word information, and if there is no last word information, the user is prompted to publish the first preset information.

进一步的,第一预设信息包括升级包和/或控制指令,预设的第一数据结构为一在线队列。队列是一种特殊的线性表,特殊之处在于它只允许在表的前端进行删除操作,而在表的后端进行插入操作,和栈一样,队列是一种操作受限制的线性表。进行插入操作的端称为队尾,进行删除操作的端称为队头。队列中没有元素时,称为空队列。队列的数据元素又称为队列元素。在队列中插入一个队列元素称为入队,从队列中删除一个队列元素称为出队。因为队列只允许在一端插入,在另一端删除,所以只有最早进入队列的元素才能最先从队列中删除,故队列又称为先进先出线性表。在线队列中的元素在被获取预设次数后被删除。Further, the first preset information includes upgrade packages and/or control instructions, and the preset first data structure is an online queue. A queue is a special linear table, which is special in that it only allows deletion operations at the front end of the table, and insert operations at the back end of the table. Like a stack, a queue is a linear table with limited operations. The end of the insertion operation is called the tail of the queue, and the end of the deletion operation is called the head of the queue. When there are no elements in the queue, it is called an empty queue. The data elements of a queue are also called queue elements. Inserting a queue element into the queue is called enqueuing, and removing a queue element from the queue is called dequeuing. Because the queue only allows insertion at one end and deletion at the other end, only the elements that enter the queue first can be deleted from the queue first, so the queue is also called a first-in-first-out linear list. Elements in the online queue are removed after being fetched a preset number of times.

在车联网控制系统将第一预设信息发送至在线队列之后,车联网控制系统获取第一预设信息的被获取次数;车联网控制系统判断被获取次数是否达到预设次数;若是,则删除第一预设信息。其中,预设次数可以是1次,2次,3次或者更多次,根据具体情况设定。通过统计第一预设信息的被获取次数,在第一预设信息被获取预设次数之后,将其删除,一方面,能够使第一预设信息能够被多次下载,避免车联网设备离线再上线时无法获取第一预设信息的情况;另一方面,在多车联网设备完成下载升级包或者执行控制指令后,及时清理在线队列,关闭升级通道等,降低了系统的负荷。After the Internet of Vehicles control system sends the first preset information to the online queue, the Internet of Vehicles control system obtains the number of times the first preset information is acquired; the Internet of Vehicles control system judges whether the number of acquisitions reaches the preset number of times; if so, delete The first preset information. Wherein, the preset number of times can be 1 time, 2 times, 3 times or more times, which is set according to specific conditions. By counting the number of acquisitions of the first preset information and deleting it after the first preset information is acquired the preset number of times, on the one hand, the first preset information can be downloaded multiple times, preventing the Internet of Vehicles device from going offline When the first preset information cannot be obtained when going online again; on the other hand, after the multi-vehicle networking device finishes downloading the upgrade package or executes the control command, the online queue is cleaned up in time, the upgrade channel is closed, etc., reducing the load on the system.

403、判断车联网设备的上报数据是否满足预设条件。403. Determine whether the data reported by the IoV device meets a preset condition.

本发明实施例中,如果车联网控制系统获取到车联网设备的上报数据,则表明车联网设备在线,判断车联网设备的上报数据是否满足预设条件。如果车联网设备的上报数据满足预设条件,则执行404;如果车联网设备的上报数据不满足预设条件,则结束或者返回。预设条件根据具体情况设置,例如,预设条件为上报数据中的温度低于预设温度、上报数据中的湿度低于高于预设湿度等,本发明对此不作限定。也即,车联网控制系统针对车联网设备的上报数据实时监控。In the embodiment of the present invention, if the IOV control system obtains the reported data of the IOV device, it indicates that the IOV device is online, and determines whether the reported data of the IOV device satisfies a preset condition. If the data reported by the Internet of Vehicles device meets the preset condition, execute 404; if the data reported by the Internet of Vehicles device does not meet the preset condition, end or return. The preset conditions are set according to specific situations. For example, the preset conditions are that the temperature in the reported data is lower than the preset temperature, the humidity in the reported data is lower than or higher than the preset humidity, etc., which are not limited in the present invention. That is, the IoV control system monitors in real time the data reported by IOV devices.

404、将第二预设信息存储至预设的第二数据结构中,以使车联网设备即时获取第二预设信息。404. Store the second preset information in a preset second data structure, so that the IoV device acquires the second preset information immediately.

本发明实施例中,若车联网设备的上报数据满足预设条件,将第二预设信息存储至预设的第二数据结构中,以使车联网设备即时获取第二预设信息(第二预设信息为针对在线状态车联网设备的控制指令)。优选的,预设的第二数据结构为一即时队列,即时队列中的第二预设信息被获取一次后即被删除或转移。其中,第二预设信息根据上报数据确定,可以是升级包和控制指令等。也即,通过即时队列,实时对车联网设备进行监控,并实时对车联网设备进行反馈,能够及时发现车辆的异常状况并处理,提高了车联网控制系统的效率,避免出现数据积压。In the embodiment of the present invention, if the reported data of the IoV device satisfies the preset condition, the second preset information is stored in the preset second data structure, so that the IOV device can obtain the second preset information (second The preset information is a control instruction for the online IoV device). Preferably, the preset second data structure is an instant queue, and the second preset information in the instant queue is deleted or transferred after being acquired once. Wherein, the second preset information is determined according to the reported data, and may be an upgrade package, a control instruction, and the like. That is to say, real-time monitoring and real-time feedback of the IOV equipment through the real-time queue can detect abnormal conditions of the vehicle and deal with them in time, improving the efficiency of the IOV control system and avoiding data backlogs.

本发明实施例中还提供一种车联网控制系统,如图5所示,为本发明实施例中车联网控制系统的一个实施例结构示意图,所述车联网控制系统除了包括图1中所示路由装置11、多个计算节点12以及多个数据采集网关13之外,所述车联网控制系统500还包括:The embodiment of the present invention also provides a car networking control system, as shown in Figure 5, which is a schematic structural diagram of an embodiment of the car networking control system in the embodiment of the present invention, the car networking control system includes the In addition to the routing device 11, multiple computing nodes 12, and multiple data collection gateways 13, the vehicle networking control system 500 also includes:

第一判断模块501,用于判断第一计算节点对应的所述多个数据采集网关中,是否存在数据采集速度大于数据上报速度的第一数据采集网关;The first judgment module 501 is configured to judge whether there is a first data collection gateway whose data collection speed is greater than the data reporting speed among the plurality of data collection gateways corresponding to the first computing node;

采集模块502,用于在存在所述第一数据采集网关时,利用空闲的目标数据采集网关采集所述第一数据采集网关的待采集数据。The collection module 502 is configured to use an idle target data collection gateway to collect the data to be collected by the first data collection gateway when the first data collection gateway exists.

进一步的,所述采集模块502具体包括:Further, the acquisition module 502 specifically includes:

获取子模块,用于获取所述第一计算节点的请求指令;An acquisition submodule, configured to acquire the request instruction of the first computing node;

确定子模块,用于根据所述请求指令确定所述目标数据采集网关;A determining submodule, configured to determine the target data collection gateway according to the request instruction;

采集子模块,用于通知所述目标数据采集网关,以利用所述目标数据采集网关采集所述第一数据采集网关的待采集数据。The collection sub-module is configured to notify the target data collection gateway to use the target data collection gateway to collect the data to be collected by the first data collection gateway.

进一步的,所述确定子模块具体用于:Further, the determining submodule is specifically used for:

根据所述请求指令获取与所述路由装置连接的多个计算节点的数据流量;Obtaining the data flow of multiple computing nodes connected to the routing device according to the request instruction;

将所述多个计算节点中数据流量最小的计算节点确定为所述目标计算节点;determining a computing node with the smallest data flow among the plurality of computing nodes as the target computing node;

将所述目标计算节点中的空闲的第二数据采集网关,确定为所述目标数据采集网关。An idle second data collection gateway in the target computing node is determined as the target data collection gateway.

进一步的,所述确定子模块具体用于:Further, the determining submodule is specifically used for:

根据所述请求指令判断所述第一计算节点对应的所述多个数据采集网关中,是否存在空闲的第三数据采集网关;judging according to the request instruction whether there is an idle third data collection gateway among the plurality of data collection gateways corresponding to the first computing node;

若存在,则确定所述第三数据采集网关为所述目标数据采集网关。If it exists, determine that the third data collection gateway is the target data collection gateway.

进一步的,所述车联网控制系统还包括:Further, the vehicle networking control system also includes:

第二判断模块,用于判断在预设时间内是否获取到车联网设备的上报数据;The second judging module is used to judge whether the reported data of the Internet of Vehicles device is obtained within a preset time;

存储模块,用于若未获取到所述车联网设备的上报数据,则将第一预设信息存储在预设的第一数据结构中,以使所述车联网设备在上线时从所述第一数据结构中获取所述第一预设信息。A storage module, configured to store first preset information in a preset first data structure if the reported data of the Internet of Vehicles device is not obtained, so that the Internet of Vehicles device can be accessed from the first preset information when going online. Acquiring the first preset information in a data structure.

进一步的,所述第一预设信息包括升级包和/或控制指令;所述车联网控制系统还包括删除模块,所述删除模块具体用于:Further, the first preset information includes an upgrade package and/or a control instruction; the Internet of Vehicles control system further includes a deletion module, and the deletion module is specifically used for:

获取所述第一预设信息的被获取次数;Acquire the number of times the first preset information is acquired;

判断所述被获取次数是否达到预设次数;judging whether the number of acquisitions reaches a preset number of times;

若是,则删除所述第一预设信息。If yes, delete the first preset information.

进一步的,所述存储模块具体用于:Further, the storage module is specifically used for:

在所述车联网控制系统在与所述车联网设备断开连接时,获取所述车联网设备的遗言信息;When the Internet of Vehicles control system is disconnected from the Internet of Vehicles device, acquiring the will information of the Internet of Vehicles device;

根据所述遗言信息确定所述第一预设信息;determining the first preset information according to the will information;

将所述第一预设信息存储至所述第一数据结构,以使所述车联网设备在上线时,从所述第一数据结构中获取所述第一预设信息。The first preset information is stored in the first data structure, so that the IoV device acquires the first preset information from the first data structure when going online.

本发明实施例中车联网控制系统包括路由装置以及与路由装置连接的多个计算节点,每个计算节点分别对应多个数据采集网关,路由装置用于接收车联网设备的上报数据,并转发给多个计算节点;数据采集网关用于从对应的计算节点采集数据,并上报给车联网控制系统,车联网控制系统还包括:第一判断模块,用于判断第一计算节点对应的多个数据采集网关中,是否存在数据采集速度大于数据上报速度的第一数据采集网关;采集模块,用于在存在第一数据采集网关时,利用空闲的目标数据采集网关采集第一数据采集网关的待采集数据。本发明实施例中在发现第一计算节点对应的数据采集网关中,存在数据采集速度大于数据上报速度的第一数据采集网关,及时利用第一数据采集网关之外空闲的目标采集网关,采集第一数据采集网关的待采集数据,解除第一数据采集网关处的数据积压,提高车联网控制系统处理数据的效率。In the embodiment of the present invention, the Internet of Vehicles control system includes a routing device and multiple computing nodes connected to the routing device. Each computing node corresponds to a plurality of data collection gateways. The routing device is used to receive the data reported by the Internet of Vehicles equipment and forward it to Multiple computing nodes; the data collection gateway is used to collect data from corresponding computing nodes and report to the IoV control system. The IOV control system also includes: a first judging module for judging multiple data corresponding to the first computing node In the collection gateway, whether there is a first data collection gateway whose data collection speed is greater than the data reporting speed; the collection module is used to collect the first data collection gateway to be collected by the idle target data collection gateway when there is a first data collection gateway data. In the embodiment of the present invention, it is found that among the data collection gateways corresponding to the first computing node, there is a first data collection gateway whose data collection speed is greater than the data reporting speed, and the idle target collection gateway other than the first data collection gateway is used in time to collect the second data collection gateway. The data to be collected by a data collection gateway relieves the data backlog at the first data collection gateway and improves the data processing efficiency of the Internet of Vehicles control system.

本发明实施例还提供一种服务器,服务器包括:The embodiment of the present invention also provides a server, and the server includes:

一个或多个处理器;one or more processors;

存储器;以及storage; and

一个或多个应用程序,其中一个或多个应用程序被存储于存储器中,并配置为由处理器执行上述任一数据采集方法实施例中的步骤。One or more application programs, wherein the one or more application programs are stored in the memory and are configured to be executed by the processor in the steps in any one of the above embodiments of the data collection method.

如图6所示,图6是本发明实施例提供的服务器的一个实施例结构示意图,其示出了本发明实施例所涉及的服务器的结构示意图,具体来讲:As shown in Figure 6, Figure 6 is a schematic structural diagram of an embodiment of the server provided by the embodiment of the present invention, which shows a schematic structural diagram of the server involved in the embodiment of the present invention, specifically:

该服务器可以包括一个或者一个以上处理核心的处理器601、一个或一个以上计算机可读存储介质的存储器602、电源603和输入单元604等部件。本领域技术人员可以理解,图6中示出的服务器结构并不构成对服务器的限定,可以包括比图示更多或更少的部件,或者组合某些部件,或者不同的部件布置。其中:The server may include a processor 601 of one or more processing cores, a memory 602 of one or more computer-readable storage media, a power supply 603, an input unit 604 and other components. Those skilled in the art can understand that the server structure shown in FIG. 6 is not limited to the server, and may include more or less components than shown in the figure, or combine some components, or arrange different components. in:

处理器601是该服务器的控制中心,利用各种接口和线路连接整个服务器的各个部分,通过运行或执行存储在存储器602内的软件程序和/或模块,以及调用存储在存储器602内的数据,执行服务器的各种功能和处理数据,从而对服务器进行整体监控。可选的,处理器601可包括一个或多个处理核心;优选的,处理器601可集成应用处理器和调制解调处理器,其中,应用处理器主要处理操作系统、用户界面和应用程序等,调制解调处理器主要处理无线通信。可以理解的是,上述调制解调处理器也可以不集成到处理器601中。The processor 601 is the control center of the server, and uses various interfaces and lines to connect various parts of the entire server, by running or executing software programs and/or modules stored in the memory 602, and calling data stored in the memory 602, Execute various functions of the server and process data to monitor the server as a whole. Optionally, the processor 601 may include one or more processing cores; preferably, the processor 601 may integrate an application processor and a modem processor, wherein the application processor mainly processes operating systems, user interfaces, and application programs, etc. , the modem processor mainly handles wireless communications. It can be understood that the foregoing modem processor may not be integrated into the processor 601 .

存储器602可用于存储软件程序以及模块,处理器601通过运行存储在存储器602的软件程序以及模块,从而执行各种功能应用以及数据处理。存储器602可主要包括存储程序区和存储数据区,其中,存储程序区可存储操作系统、至少一个功能所需的应用程序(比如声音播放功能、图像播放功能等)等;存储数据区可存储根据服务器的使用所创建的数据等。此外,存储器602可以包括高速随机存取存储器,还可以包括非易失性存储器,例如至少一个磁盘存储器件、闪存器件、或其他易失性固态存储器件。相应地,存储器602还可以包括存储器控制器,以提供处理器601对存储器602的访问。The memory 602 can be used to store software programs and modules, and the processor 601 executes various functional applications and data processing by running the software programs and modules stored in the memory 602 . The memory 602 can mainly include a program storage area and a data storage area, wherein the program storage area can store an operating system, at least one application program required by a function (such as a sound playback function, an image playback function, etc.); The data created by the use of the server, etc. In addition, the memory 602 may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one magnetic disk storage device, flash memory device, or other volatile solid-state storage devices. Correspondingly, the memory 602 may further include a memory controller to provide the processor 601 with access to the memory 602 .

服务器还包括给各个部件供电的电源603,优选的,电源603可以通过电源管理系统与处理器601逻辑相连,从而通过电源管理系统实现管理充电、放电、以及功耗管理等功能。电源603还可以包括一个或一个以上的直流或交流电源、再充电系统、电源故障检测电路、电源转换器或者逆变器、电源状态指示器等任意组件。The server also includes a power supply 603 for supplying power to various components. Preferably, the power supply 603 can be logically connected to the processor 601 through the power management system, so that functions such as charging, discharging, and power consumption management can be realized through the power management system. The power supply 603 may also include one or more DC or AC power supplies, recharging systems, power failure detection circuits, power converters or inverters, power status indicators and other arbitrary components.

该服务器还可包括输入单元604,该输入单元604可用于接收输入的数字或字符信息,以及产生与用户设置以及功能控制有关的键盘、鼠标、操作杆、光学或者轨迹球信号输入。The server can also include an input unit 604, which can be used to receive input numbers or character information, and generate keyboard, mouse, joystick, optical or trackball signal input related to user settings and function control.

尽管未示出,服务器还可以包括显示单元等,在此不再赘述。具体在本发明实施例中,所述服务器中存储有车联网控制系统,所述车联网控制系统包括路由装置以及与所述路由装置连接的多个计算节点,每个所述计算节点分别对应多个数据采集网关,服务器中的处理器601会按照如下的指令,将一个或一个以上的应用程序的进程对应的可执行文件加载到存储器602中,并由处理器601来运行存储在存储器602中的应用程序,从而实现各种功能,如下:Although not shown, the server may also include a display unit, etc., which will not be repeated here. Specifically, in the embodiment of the present invention, the server stores an Internet of Vehicles control system, the Internet of Vehicles control system includes a routing device and a plurality of computing nodes connected to the routing device, and each of the computing nodes corresponds to multiple A data acquisition gateway, the processor 601 in the server will load the executable file corresponding to the process of one or more application programs into the memory 602 according to the following instructions, and run and store in the memory 602 by the processor 601 The application program, so as to realize various functions, as follows:

通过所述路由装置接收车联网设备的上报数据,并转发给所述多个计算节点;receiving the reported data of the IoV device through the routing device, and forwarding it to the plurality of computing nodes;

通过所述数据采集网关从对应的计算节点采集数据;collecting data from corresponding computing nodes through the data collection gateway;

判断第一计算节点对应的所述多个数据采集网关中,是否存在数据采集速度大于数据上报速度的第一数据采集网关;Judging whether there is a first data collection gateway whose data collection speed is greater than the data reporting speed among the plurality of data collection gateways corresponding to the first computing node;

若存在,利用空闲的目标数据采集网关采集所述第一数据采集网关的待采集数据。If it exists, use an idle target data collection gateway to collect the data to be collected by the first data collection gateway.

本领域普通技术人员可以理解,上述实施例的各种方法中的全部或部分步骤可以通过指令来完成,或通过指令控制相关的硬件来完成,该指令可以存储于一计算机可读存储介质中,并由处理器进行加载和执行。Those of ordinary skill in the art can understand that all or part of the steps in the various methods of the above embodiments can be completed by instructions, or by instructions controlling related hardware, and the instructions can be stored in a computer-readable storage medium, and is loaded and executed by the processor.

为此,本发明实施例提供一种存储介质,该存储介质可以包括:只读存储器(ROM,Read Only Memory)、随机存取记忆体(RAM,Random Access Memory)、磁盘或光盘等。该存储介质中存储有多条指令,该指令能够被处理器进行加载,以执行本发明实施例所提供的任一种数据采集方法中的步骤。例如,该指令可以执行如下步骤:To this end, an embodiment of the present invention provides a storage medium, and the storage medium may include: a read only memory (ROM, Read Only Memory), a random access memory (RAM, Random Access Memory), a magnetic disk or an optical disk, and the like. A plurality of instructions are stored in the storage medium, and the instructions can be loaded by a processor to execute the steps in any data collection method provided by the embodiments of the present invention. For example, the command can perform the following steps:

通过所述路由装置接收车联网设备的上报数据,并转发给所述多个计算节点;receiving the reported data of the IoV device through the routing device, and forwarding it to the plurality of computing nodes;

通过所述数据采集网关从对应的计算节点采集数据;collecting data from corresponding computing nodes through the data collection gateway;

判断第一计算节点对应的所述多个数据采集网关中,是否存在数据采集速度大于数据上报速度的第一数据采集网关;Judging whether there is a first data collection gateway whose data collection speed is greater than the data reporting speed among the plurality of data collection gateways corresponding to the first computing node;

若存在,利用空闲的目标数据采集网关采集所述第一数据采集网关的待采集数据。If it exists, use an idle target data collection gateway to collect the data to be collected by the first data collection gateway.

在上述实施例中,对各个实施例的描述都各有侧重,某个实施例中没有详述的部分,可以参见上文针对其他实施例的详细描述,此处不再赘述。In the above-mentioned embodiments, the descriptions of each embodiment have their own emphases. For the part that is not described in detail in a certain embodiment, refer to the detailed description of other embodiments above, and will not be repeated here.

具体实施时,以上各个单元或结构可以作为独立的实体来实现,也可以进行任意组合,作为同一或若干个实体来实现,以上各个单元或结构的具体实施可参见前面的方法实施例,在此不再赘述。During specific implementation, each of the above units or structures can be implemented as an independent entity, or can be combined arbitrarily as the same or several entities. For the specific implementation of each of the above units or structures, please refer to the previous method embodiments, here No longer.

以上对本发明实施例所提供的一种数据采集方法及车联网控制系统进行了详细介绍,本文中应用了具体个例对本发明的原理及实施例进行了阐述,以上实施例的说明只是用于帮助理解本发明的方法及其核心思想;同时,对于本领域的技术人员,依据本发明的思想,在具体实施例及应用范围上均会有改变之处,综上,本说明书内容不应理解为对本发明的限制。A data acquisition method and a vehicle networking control system provided by the embodiments of the present invention have been introduced in detail above. In this paper, specific examples have been used to illustrate the principles and embodiments of the present invention. The descriptions of the above embodiments are only used to help Understand the method of the present invention and its core idea; at the same time, for those skilled in the art, according to the idea of the present invention, there will be changes in the specific embodiments and application scope. In summary, the content of this specification should not be understood as Limitations on the Invention.

Claims (5)

1.一种车联网控制系统,其特征在于,所述车联网控制系统包括路由装置以及与所述路由装置连接的多个计算节点,每个所述计算节点分别对应多个数据采集网关,所述路由装置用于接收车联网设备的上报数据,并转发给所述多个计算节点;所述数据采集网关用于从对应的计算节点采集数据,所述车联网控制系统还包括:1. A control system for the Internet of Vehicles, characterized in that the control system for the Internet of Vehicles includes a routing device and a plurality of computing nodes connected to the routing device, each of the computing nodes corresponds to a plurality of data acquisition gateways, so The routing device is used to receive the reported data of the Internet of Vehicles equipment and forward it to the plurality of computing nodes; the data collection gateway is used to collect data from the corresponding computing nodes, and the Internet of Vehicles control system also includes: 第一判断模块,用于按预设频率,依次判断各第一计算节点对应的所述多个数据采集网关中,是否存在数据采集速度大于数据上报速度的第一数据采集网关;The first judging module is used to sequentially judge whether there is a first data collection gateway whose data collection speed is greater than the data reporting speed among the plurality of data collection gateways corresponding to each first computing node according to a preset frequency; 采集模块,用于在存在所述第一数据采集网关时,利用空闲的目标数据采集网关采集所述第一数据采集网关的待采集数据,所述采集模块具体包括:A collection module, configured to use an idle target data collection gateway to collect the data to be collected by the first data collection gateway when the first data collection gateway exists, and the collection module specifically includes: 获取子模块,用于获取所述第一计算节点的请求指令;An acquisition submodule, configured to acquire the request instruction of the first computing node; 确定子模块,用于根据所述请求指令确定所述目标数据采集网关;其中,所述确定子模块具体用于:根据所述请求指令获取与所述路由装置连接的多个计算节点的数据流量;将所述多个计算节点中数据流量最小的计算节点确定为所述目标计算节点;将所述目标计算节点中的空闲的第二数据采集网关,确定为所述目标数据采集网关;或,The determining submodule is configured to determine the target data collection gateway according to the request instruction; wherein, the determining submodule is specifically used to: obtain the data flow of multiple computing nodes connected to the routing device according to the request instruction ; determining the computing node with the smallest data flow among the plurality of computing nodes as the target computing node; determining an idle second data collection gateway among the target computing nodes as the target data collection gateway; or, 根据所述请求指令判断所述第一计算节点对应的所述多个数据采集网关中,是否存在空闲的第三数据采集网关;若存在,则确定所述第三数据采集网关为所述目标数据采集网关;According to the request instruction, it is judged whether there is an idle third data collection gateway among the plurality of data collection gateways corresponding to the first computing node; if there is, determining that the third data collection gateway is the target data collection gateway; 采集子模块,用于通知所述目标数据采集网关,以利用所述目标数据采集网关采集所述第一数据采集网关的待采集数据。The collection sub-module is configured to notify the target data collection gateway to use the target data collection gateway to collect the data to be collected by the first data collection gateway. 2.根据权利要求1所述的车联网控制系统,其特征在于,所述车联网控制系统还包括:2. The Internet of Vehicles control system according to claim 1, wherein the Internet of Vehicles control system further comprises: 第二判断模块,用于判断在预设时间内是否获取到车联网设备的上报数据;The second judging module is used to judge whether the reported data of the Internet of Vehicles device is obtained within a preset time; 存储模块,用于若未获取到所述车联网设备的上报数据,则将第一预设信息存储在预设的第一数据结构中,以使所述车联网设备在上线时从所述第一数据结构中获取所述第一预设信息。A storage module, configured to store first preset information in a preset first data structure if the reported data of the Internet of Vehicles device is not obtained, so that the Internet of Vehicles device can be accessed from the first preset information when going online. Acquiring the first preset information in a data structure. 3.根据权利要求2所述的车联网控制系统,其特征在于,所述第一预设信息包括升级包和/或控制指令;所述车联网控制系统还包括删除模块,所述删除模块具体用于:3. The Internet of Vehicles control system according to claim 2, wherein the first preset information includes an upgrade package and/or a control instruction; the Internet of Vehicles control system further includes a deletion module, and the deletion module specifically Used for: 获取所述第一预设信息的被获取次数;Acquire the number of times the first preset information is acquired; 判断所述被获取次数是否达到预设次数;judging whether the number of acquisitions reaches a preset number of times; 若是,则删除所述第一预设信息。If yes, delete the first preset information. 4.根据权利要求2或3所述的车联网控制系统,其特征在于,所述存储模块具体用于:4. The vehicle networking control system according to claim 2 or 3, wherein the storage module is specifically used for: 在所述车联网控制系统在与所述车联网设备断开连接时,获取所述车联网设备的遗言信息;When the Internet of Vehicles control system is disconnected from the Internet of Vehicles device, acquiring the will information of the Internet of Vehicles device; 根据所述遗言信息确定所述第一预设信息;determining the first preset information according to the will information; 将所述第一预设信息存储至所述第一数据结构,以使所述车联网设备在上线时,从所述第一数据结构中获取所述第一预设信息。The first preset information is stored in the first data structure, so that the IoV device acquires the first preset information from the first data structure when going online. 5.一种数据采集方法,其特征在于,所述数据采集方法应用于车联网控制系统,所述车联网控制系统包括路由装置以及与所述路由装置连接的多个计算节点,每个所述计算节点分别对应多个数据采集网关,所述数据采集方法包括:5. A data acquisition method, characterized in that the data acquisition method is applied to a control system of the Internet of Vehicles, the control system of the Internet of Vehicles includes a routing device and a plurality of computing nodes connected to the routing device, each of the Computing nodes respectively correspond to multiple data collection gateways, and the data collection method includes: 通过所述路由装置接收车联网设备的上报数据,并转发给所述多个计算节点;receiving the reported data of the IoV device through the routing device, and forwarding it to the plurality of computing nodes; 通过所述数据采集网关从对应的计算节点采集数据;collecting data from corresponding computing nodes through the data collection gateway; 按预设频率,依次判断各第一计算节点对应的所述多个数据采集网关中,是否存在数据采集速度大于数据上报速度的第一数据采集网关;According to the preset frequency, sequentially judge whether there is a first data collection gateway whose data collection speed is greater than the data reporting speed among the plurality of data collection gateways corresponding to each first computing node; 若存在,利用空闲的目标数据采集网关采集所述第一数据采集网关的待采集数据;所述利用空闲的目标数据采集网关采集所述第一数据采集网关的待采集数据,包括:If it exists, using an idle target data collection gateway to collect the data to be collected by the first data collection gateway; said using the idle target data collection gateway to collect the data to be collected by the first data collection gateway includes: 获取所述第一计算节点的请求指令;Obtain a request instruction of the first computing node; 根据所述请求指令确定所述目标数据采集网关;determining the target data collection gateway according to the request instruction; 通知所述目标数据采集网关,以利用所述目标数据采集网关采集所述第一数据采集网关的待采集数据;Notifying the target data collection gateway to use the target data collection gateway to collect the data to be collected by the first data collection gateway; 所述根据所述请求指令确定所述目标数据采集网关,包括:The determining the target data collection gateway according to the request instruction includes: 根据所述请求指令获取与所述路由装置连接的多个计算节点的数据流量;Obtaining the data flow of multiple computing nodes connected to the routing device according to the request instruction; 将所述多个计算节点中数据流量最小的计算节点确定为所述目标计算节点;determining a computing node with the smallest data flow among the plurality of computing nodes as the target computing node; 将所述目标计算节点中的空闲的第二数据采集网关,确定为所述目标数据采集网关。An idle second data collection gateway in the target computing node is determined as the target data collection gateway.
CN201910430166.XA 2019-05-22 2019-05-22 Data acquisition method and car networking control system Active CN111988348B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910430166.XA CN111988348B (en) 2019-05-22 2019-05-22 Data acquisition method and car networking control system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910430166.XA CN111988348B (en) 2019-05-22 2019-05-22 Data acquisition method and car networking control system

Publications (2)

Publication Number Publication Date
CN111988348A CN111988348A (en) 2020-11-24
CN111988348B true CN111988348B (en) 2023-06-20

Family

ID=73437039

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910430166.XA Active CN111988348B (en) 2019-05-22 2019-05-22 Data acquisition method and car networking control system

Country Status (1)

Country Link
CN (1) CN111988348B (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114598571B (en) * 2020-12-07 2024-10-22 上汽通用汽车有限公司 Vehicle-mounted multi-gateway IP routing method and system based on application and vehicle
CN113213342A (en) * 2021-06-10 2021-08-06 广州特种机电设备检测研究院 Hoisting machinery anti-collision system and method based on Internet of things and geometric model

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102223677A (en) * 2011-07-04 2011-10-19 重庆邮电大学 Switching method and switching system based on IASA (inter access system anchor) load balancing device
CN104580528A (en) * 2015-02-03 2015-04-29 南京阖云骥联信息科技有限公司 Information transmission control method applied to Internet of Vehicles
CN105682121A (en) * 2016-01-29 2016-06-15 中国联合网络通信集团有限公司 Data acquisition method for sensor network, gateway and data acquisition system
WO2017114165A1 (en) * 2015-12-28 2017-07-06 阿里巴巴集团控股有限公司 Message traffic control method, apparatus, and related system
CN108600281A (en) * 2017-03-16 2018-09-28 杭州海康威视数字技术股份有限公司 A kind of cloud storage system, media data storage method and system

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9356868B2 (en) * 2013-08-23 2016-05-31 Broadcom Corporation Congestion detection and management at congestion-tree roots

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102223677A (en) * 2011-07-04 2011-10-19 重庆邮电大学 Switching method and switching system based on IASA (inter access system anchor) load balancing device
CN104580528A (en) * 2015-02-03 2015-04-29 南京阖云骥联信息科技有限公司 Information transmission control method applied to Internet of Vehicles
WO2017114165A1 (en) * 2015-12-28 2017-07-06 阿里巴巴集团控股有限公司 Message traffic control method, apparatus, and related system
CN105682121A (en) * 2016-01-29 2016-06-15 中国联合网络通信集团有限公司 Data acquisition method for sensor network, gateway and data acquisition system
CN108600281A (en) * 2017-03-16 2018-09-28 杭州海康威视数字技术股份有限公司 A kind of cloud storage system, media data storage method and system

Also Published As

Publication number Publication date
CN111988348A (en) 2020-11-24

Similar Documents

Publication Publication Date Title
KR102567204B1 (en) Vehicle-road cooperation apparatus and method, electronic device and storage medium
CN110399229B (en) Inter-process communication method, device, system, medium and terminal
KR102114767B1 (en) Vehicle-based communication methods, systems and devices
CN101909048A (en) Centralized trans-coding treatment method and device
CN111988348B (en) Data acquisition method and car networking control system
CN116915827A (en) Data transmission method, device, electronic equipment and media for Internet of Things edge gateway
CN101742197A (en) Front-end equipment, video file backup method and control method, device and system thereof
WO2024139295A1 (en) Service subscription method and apparatus, vehicle, and storage medium
CN114501374A (en) Dynamic service deployment method, system, device and storage medium for Internet of Vehicles
EP1895712A2 (en) System for monitoring the state of apparatuses in a communication network
CN104243094A (en) System and method for adapting characteristics of application layer protocol using sensed indication
CN111712800A (en) Message synchronization method and device, unmanned driving system and movable platform
CN111212151A (en) File transmission method, device and storage medium
CN111970497A (en) Video stream processing method and device, SDN controller and storage medium
JP2023029600A (en) wireless communication system
CN113992715B (en) Online state cloud monitoring and edge computing device and method
CN113794646A (en) Monitoring data transmission system and method in energy industry
CN113395303B (en) Information reporting method and device, logistics communication system and computer storage medium
CN115442317B (en) Message processing methods, devices, systems, equipment and media
CN116166582A (en) Data reading and writing method, system, equipment and storage medium
CN115086365A (en) Time-sensitive network vehicle-mounted communication method of data distribution service
CN116319650B (en) Port equipment data distribution method, device and system and container crane
CN114679417A (en) In-vehicle data distribution method, system, device and readable storage medium
CN115914376B (en) Internet of Things data processing method, device, equipment and computer-readable storage medium
CN112333787B (en) Data transmission method, device, storage medium, terminal and network access point equipment

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