CN114679417A - In-vehicle data distribution method, system, device and readable storage medium - Google Patents

In-vehicle data distribution method, system, device and readable storage medium Download PDF

Info

Publication number
CN114679417A
CN114679417A CN202210247970.6A CN202210247970A CN114679417A CN 114679417 A CN114679417 A CN 114679417A CN 202210247970 A CN202210247970 A CN 202210247970A CN 114679417 A CN114679417 A CN 114679417A
Authority
CN
China
Prior art keywords
vehicle
data
message queue
management platform
mounted data
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202210247970.6A
Other languages
Chinese (zh)
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.)
DeepRoute AI Ltd
Original Assignee
DeepRoute AI 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 DeepRoute AI Ltd filed Critical DeepRoute AI Ltd
Priority to CN202210247970.6A priority Critical patent/CN114679417A/en
Publication of CN114679417A publication Critical patent/CN114679417A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L47/00Traffic control in data switching networks
    • H04L47/10Flow control; Congestion control
    • H04L47/24Traffic characterised by specific attributes, e.g. priority or QoS
    • H04L47/2425Traffic characterised by specific attributes, e.g. priority or QoS for supporting services specification, e.g. SLA
    • H04L47/2433Allocation of priorities to traffic types
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L47/00Traffic control in data switching networks
    • H04L47/10Flow control; Congestion control
    • H04L47/24Traffic characterised by specific attributes, e.g. priority or QoS
    • H04L47/2441Traffic characterised by specific attributes, e.g. priority or QoS relying on flow classification, e.g. using integrated services [IntServ]
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L47/00Traffic control in data switching networks
    • H04L47/50Queue scheduling
    • H04L47/62Queue scheduling characterised by scheduling criteria
    • H04L47/622Queue service order
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L49/00Packet switching elements
    • H04L49/90Buffering arrangements
    • H04L49/9063Intermediate storage in different physical parts of a node or terminal

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Information Transfer Between Computers (AREA)

Abstract

本申请涉及车载数据处理技术领域,公开了车载数据的分发方法、系统、装置及可读存储介质。该方法包括:获取至少一车载系统回传的车载数据;将车载数据缓存于消息队列中;从消息队列的前端获取至少部分车载数据,并根据至少部分车载数据的类型,分发到对应的车辆管理平台。通过上述方式,能够保证车载数据的持久化,以及减少车辆管理平台接收车载数据的数据量,提升车辆管理平台对车载数据的处理效率。

Figure 202210247970

The present application relates to the technical field of in-vehicle data processing, and discloses a method, system, device and readable storage medium for distributing in-vehicle data. The method includes: acquiring on-board data returned by at least one on-board system; buffering the on-board data in a message queue; acquiring at least part of the on-board data from the front end of the message queue, and distributing to the corresponding vehicle management system according to the type of at least part of the on-board data platform. Through the above method, the persistence of the on-board data can be ensured, the data amount of the on-board data received by the vehicle management platform can be reduced, and the processing efficiency of the on-board data by the vehicle management platform can be improved.

Figure 202210247970

Description

车载数据的分发方法、系统、装置及可读存储介质In-vehicle data distribution method, system, device and readable storage medium

技术领域technical field

本申请涉及车载数据处理技术领域,特别涉及车载数据的分发方法、系统、装置及可读存储介质。The present application relates to the technical field of in-vehicle data processing, and in particular, to a method, system, device and readable storage medium for distributing in-vehicle data.

背景技术Background technique

目前随着互联网的快速发展以及5G的快速普及,万物互联的时代即将到来,车辆可以通过网络实时回传传感器收集的各项数据,公司各部门需要这些数据进行对其分析以及算法的迭代演进,为了快速处理这些数据以及对这些数据精确的分析,公司各部门开发了相应的平台,但这些管理平台需要的车载数据并不相同,如果一股脑的把所有车载数据直接传给各个管理平台进行处理,非常耗时,处理效率比较低。At present, with the rapid development of the Internet and the rapid popularization of 5G, the era of the Internet of Everything is coming. Vehicles can send back various data collected by sensors in real time through the network. All departments of the company need these data for their analysis and iterative evolution of algorithms. In order to process these data quickly and accurately analyze the data, each department of the company has developed corresponding platforms, but the on-board data required by these management platforms are not the same. It is very time-consuming and the processing efficiency is relatively low.

如,不同部门的管理平台对数据的需求不同,例如车辆状态监控平台,需要车辆在线情况、每个车自动驾驶里程数、车辆异常上报信息、车辆订单信息等等,对车辆实时状态要求较高,需要把数据实时发送给它;硬件研发平台,需要知道车辆各个硬件状态信息;路线规划平台需要知道车辆行驶的位置信息;算法平台需要车辆历史数据等等。For example, the management platforms of different departments have different requirements for data, such as the vehicle status monitoring platform, which requires vehicle online status, automatic driving mileage of each vehicle, vehicle abnormal reporting information, vehicle order information, etc., which requires higher real-time vehicle status. , the data needs to be sent to it in real time; the hardware research and development platform needs to know the hardware status information of the vehicle; the route planning platform needs to know the location information of the vehicle; the algorithm platform needs the historical data of the vehicle and so on.

发明内容SUMMARY OF THE INVENTION

本申请提供车载数据的分发方法、系统、装置及可读存储介质,能够保证车载数据的持久化,以及减少车辆管理平台接收车载数据的数据量,提升车辆管理平台对车载数据的处理效率。The present application provides a method, system, device and readable storage medium for distributing vehicle data, which can ensure the persistence of vehicle data, reduce the amount of data received by the vehicle management platform, and improve the processing efficiency of vehicle data by the vehicle management platform.

为解决上述技术问题,本申请采用的一个技术方案是:提供一种车载数据的分发方法,该方法包括:获取至少一车载系统回传的车载数据;将车载数据缓存于消息队列中;从消息队列的前端获取至少部分车载数据,并根据至少部分车载数据的类型,分发到对应的车辆管理平台。In order to solve the above technical problems, a technical solution adopted in the present application is to provide a method for distributing on-board data, the method comprising: acquiring on-board data returned by at least one on-board system; buffering the on-board data in a message queue; The front end of the queue acquires at least part of the vehicle-mounted data, and distributes it to the corresponding vehicle management platform according to the type of at least part of the vehicle-mounted data.

其中,将车载数据缓存于消息队列中之前,包括:按照预设字段对车载数据进行封装;将车载数据缓存于消息队列中,包括:将封装后的车载数据缓存于消息队列中。Wherein, before the on-board data is cached in the message queue, it includes: encapsulating the on-board data according to a preset field; and caching the on-board data in the message queue includes: buffering the encapsulated on-board data in the message queue.

其中,按照预设字段对车载数据进行封装,包括:按照上下文字段、事件类型字段、元数据字段、优先级字段和有效载荷字段对车载数据进行封装。Wherein, encapsulating the in-vehicle data according to the preset fields includes: encapsulating the in-vehicle data according to the context field, the event type field, the metadata field, the priority field and the payload field.

其中,从消息队列的前端获取至少部分车载数据,包括:监听消息队列的车载数据,并在监听到车载数据时,从消息队列的前端获取至少部分车载数据。Wherein, acquiring at least part of the on-board data from the front end of the message queue includes: monitoring the on-board data of the message queue, and when monitoring the on-board data, acquiring at least part of the on-board data from the front end of the message queue.

其中,将车载数据缓存于消息队列中之前,包括:按照事件类型字段对车载数据进行封装;从消息队列的前端获取至少部分车载数据,并根据至少部分车载数据的类型,分发到对应的车辆管理平台,包括:确定至少部分车载数据中的目标车载数据的事件类型是否与车辆管理平台的预设事件类型匹配;若匹配,再次对目标车载数据进行数据封装,并分发至对应的车辆管理平台;若不匹配,则舍弃目标车载数据。Wherein, before the on-board data is cached in the message queue, it includes: encapsulating the on-board data according to the event type field; acquiring at least part of the on-board data from the front end of the message queue, and distributing to the corresponding vehicle management system according to the type of at least part of the on-board data The platform includes: determining whether the event type of the target on-board data in at least part of the on-board data matches the preset event type of the vehicle management platform; if it matches, data encapsulates the target on-board data again, and distributes it to the corresponding vehicle management platform; If it does not match, the target vehicle data is discarded.

其中,再次对目标车载数据进行数据封装,并分发至对应的车辆管理平台,包括:对封装后的至少部分车载数据进行过滤操作;将过滤后的至少部分车载数据分发到对应的车辆管理平台。Wherein, performing data encapsulation on the target vehicle-mounted data again and distributing it to the corresponding vehicle management platform includes: filtering at least part of the encapsulated vehicle-mounted data; and distributing at least part of the filtered vehicle-mounted data to the corresponding vehicle management platform.

其中,将过滤后的至少部分车载数据分发到对应的车辆管理平台,包括:判断至少部分车载数据的数据格式是否满足要求;若否,将至少部分车载数据的数据格式转换为车辆管理平台的数据格式后,分发至车辆管理平台。Wherein, distributing the filtered at least part of the vehicle-mounted data to the corresponding vehicle management platform includes: judging whether the data format of at least part of the vehicle-mounted data meets the requirements; if not, converting the data format of at least part of the vehicle-mounted data into the data of the vehicle management platform After the format is completed, it is distributed to the vehicle management platform.

其中,该方法还包括:确定车辆管理平台对应的发布者和发布者状态;若发布者状态处于激活状态,通过发布者将至少部分车载数据发布到车辆管理平台。Wherein, the method further includes: determining a publisher and a publisher status corresponding to the vehicle management platform; if the publisher status is in an active state, publishing at least part of the vehicle-mounted data to the vehicle management platform through the publisher.

其中,该方法还包括:在至少部分车载数据成功发布到车辆管理平台时,重置发布者状态,并向消息队列发送反馈信息。Wherein, the method further includes: when at least part of the vehicle-mounted data is successfully published to the vehicle management platform, resetting the publisher state, and sending feedback information to the message queue.

其中,该方法还包括:在至少部分车载数据发布到车辆管理平台失败时,统计发布者连续失败次数,并基于连续失败次数进行熔断处理。The method further includes: when at least part of the vehicle-mounted data fails to be released to the vehicle management platform, counting the number of consecutive failures by the publisher, and performing fuse processing based on the number of consecutive failures.

其中,该方法还包括:根据至少部分车载数据建立待处理条目列表;检查是否存在需要恢复的消费者的待处理条目列表;若是,从待处理条目列表的开始位置消费;若否,从待处理条目列表的未消费位置消费。Wherein, the method further includes: establishing a list of items to be processed according to at least part of the vehicle-mounted data; checking whether there is a list of items to be processed for consumers who need to be restored; if so, consuming from the starting position of the list of items to be processed; Unconsumed location consumption of the entry list.

为解决上述技术问题,本申请采用的另一个技术方案是:提供一种车载数据分发系统,该车载数据分发系统包括:数据接口模块,用于获取至少一车载系统回传的车载数据;消息队列模块,连接数据接口模块,用于利用消息队列缓存车载数据;数据分发模块,连接消息队列模块,用于从消息队列的前端获取至少部分车载数据,并根据至少部分车载数据的类型,分发到对应的车辆管理平台。In order to solve the above technical problems, another technical solution adopted in the present application is to provide an on-board data distribution system, the on-board data distribution system includes: a data interface module for acquiring on-board data returned by at least one on-board system; a message queue; The module, connected to the data interface module, is used to cache the on-board data by using the message queue; the data distribution module, connected to the message queue module, is used to obtain at least part of the on-board data from the front end of the message queue, and according to the type of at least part of the on-board data, distribute it to the corresponding data. vehicle management platform.

其中,数据分发系统还包括:远程配置模块,用于对数据分发系统进行远程系统配置。Wherein, the data distribution system further includes: a remote configuration module for performing remote system configuration on the data distribution system.

为解决上述技术问题,本申请采用的另一个技术方案是:提供一种车载数据的分发装置,该分发装置包括处理器和处理器耦接的存储器;其中,存储器用于存储计算机程序,处理器用于执行计算机程序,以实现如上述技术方案提供的方法。In order to solve the above-mentioned technical problem, another technical solution adopted in the present application is: to provide a vehicle-mounted data distribution device, the distribution device includes a processor and a memory coupled to the processor; wherein, the memory is used for storing computer programs, and the processor uses to execute the computer program to implement the method provided by the above technical solution.

为解决上述技术问题,本申请采用的另一个技术方案是:提供一种计算机可读存储介质,该计算机可读存储介质用于存储计算机程序,计算机程序在被处理器执行时,用于实现如上述技术方案提供的方法。In order to solve the above-mentioned technical problems, another technical solution adopted in the present application is to provide a computer-readable storage medium, which is used for storing a computer program, and when the computer program is executed by the processor, it is used to realize such as: The method provided by the above technical solution.

本申请实施例的有益效果是:区别于现有技术,本申请提供的车载数据的分发方法、系统、装置及可读存储介质,该方法包括:获取至少一车载系统回传的车载数据;将车载数据缓存于消息队列中;从消息队列的前端获取至少部分车载数据,并根据至少部分车载数据的类型,分发到对应的车辆管理平台。通过上述方式,一方面,利用消息队列缓存车载数据,能够保证车载数据的持久化,另一方面,根据至少部分车载数据的类型,分发到对应的车辆管理平台,能够减少车辆管理平台接收车载数据的数据量,提升车辆管理平台对车载数据的处理效率。The beneficial effects of the embodiments of the present application are: different from the prior art, the method, system, device and readable storage medium for distributing on-board data provided by the present application include: acquiring on-board data returned by at least one on-board system; The in-vehicle data is cached in the message queue; at least part of the in-vehicle data is obtained from the front end of the message queue, and distributed to the corresponding vehicle management platform according to the type of at least part of the in-vehicle data. Through the above method, on the one hand, the use of message queues to cache on-board data can ensure the persistence of on-board data. On the other hand, according to the type of at least part of the on-board data, it is distributed to the corresponding vehicle management platform, which can reduce the number of on-board data received by the vehicle management platform. It can improve the processing efficiency of vehicle data on the vehicle management platform.

附图说明Description of drawings

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

图1是本申请提供的车载数据的分发方法一实施例的流程示意图;1 is a schematic flowchart of an embodiment of a method for distributing on-board data provided by the present application;

图2是本申请提供的车载数据的分发方法一应用场景示意图;2 is a schematic diagram of an application scenario of a method for distributing on-board data provided by the present application;

图3是本申请提供的车载数据的分发方法另一实施例的流程示意图;3 is a schematic flowchart of another embodiment of a method for distributing on-board data provided by the present application;

图4是本申请提供的车载数据的分发方法另一实施例的流程示意图;4 is a schematic flowchart of another embodiment of a method for distributing on-board data provided by the present application;

图5是本申请提供的步骤45一实施例的流程示意图;5 is a schematic flowchart of an embodiment of step 45 provided by the present application;

图6是本申请提供的步骤452一实施例的流程示意图;6 is a schematic flowchart of an embodiment of step 452 provided by the present application;

图7是本申请提供的车载数据的分发方法另一实施例的流程示意图;7 is a schematic flowchart of another embodiment of a method for distributing on-board data provided by the present application;

图8是本申请提供的车载数据的分发方法另一实施例的流程示意图;8 is a schematic flowchart of another embodiment of a method for distributing on-board data provided by the present application;

图9是本申请提供的车载数据分发系统一实施例的结构示意图;9 is a schematic structural diagram of an embodiment of a vehicle-mounted data distribution system provided by the present application;

图10是本申请提供的车载数据分发系统一应用场景示意图;10 is a schematic diagram of an application scenario of the vehicle-mounted data distribution system provided by the present application;

图11是本申请提供的数据接口模块的工作流程示意图;Fig. 11 is the workflow schematic diagram of the data interface module provided by this application;

图12是本申请提供的数据分发模块的工作流程示意图;Fig. 12 is the workflow schematic diagram of the data distribution module provided by this application;

图13是本申请提供的数据分发模块的另一工作流程示意图;Fig. 13 is another workflow schematic diagram of the data distribution module provided by the present application;

图14是本申请提供的数据分发模块的另一工作流程示意图;Fig. 14 is another workflow schematic diagram of the data distribution module provided by the present application;

图15是本申请提供的数据分发模块的另一工作流程示意图;Fig. 15 is another workflow schematic diagram of the data distribution module provided by the present application;

图16是本申请提供的数据分发模块的另一工作流程示意图;Fig. 16 is another workflow schematic diagram of the data distribution module provided by the present application;

图17是本申请提供的数据分发模块的另一工作流程示意图;Fig. 17 is another workflow schematic diagram of the data distribution module provided by the present application;

图18是本申请提供的车载数据分发系统另一实施例的结构示意图;18 is a schematic structural diagram of another embodiment of a vehicle-mounted data distribution system provided by the present application;

图19是本申请提供的车载数据的分发装置一实施例的结构示意图;19 is a schematic structural diagram of an embodiment of a vehicle-mounted data distribution device provided by the present application;

图20是本申请提供的计算机可读存储介质一实施例的结构示意图。FIG. 20 is a schematic structural diagram of an embodiment of a computer-readable storage medium provided by the present application.

具体实施方式Detailed ways

下面将结合本申请实施例中的附图,对本申请实施例中的技术方案进行清楚、完整地描述。可以理解的是,此处所描述的具体实施例仅用于解释本申请,而非对本申请的限定。另外还需要说明的是,为了便于描述,附图中仅示出了与本申请相关的部分而非全部结构。基于本申请中的实施例,本领域普通技术人员在没有做出创造性劳动前提下所获得的所有其他实施例,都属于本申请保护的范围。The technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present application. It should be understood that the specific embodiments described herein are only used to explain the present application, but not to limit the present application. In addition, it should be noted that, for the convenience of description, the drawings only show some but not all the structures related to the present application. Based on the embodiments in this application, all other embodiments obtained by those of ordinary skill in the art without creative efforts shall fall within the protection scope of this application.

在本文中提及“实施例”意味着,结合实施例描述的特定特征、结构或特性可以包含在本申请的至少一个实施例中。在说明书中的各个位置出现该短语并不一定均是指相同的实施例,也不是与其它实施例互斥的独立的或备选的实施例。本领域技术人员显式地和隐式地理解的是,本文所描述的实施例可以与其它实施例相结合。Reference herein to an "embodiment" means that a particular feature, structure, or characteristic described in connection with the embodiment can be included in at least one embodiment of the present application. The appearances of the phrase in various places in the specification are not necessarily all referring to the same embodiment, nor a separate or alternative embodiment that is mutually exclusive of other embodiments. It is explicitly and implicitly understood by those skilled in the art that the embodiments described herein may be combined with other embodiments.

参阅图1,图1是本申请提供的车载数据的分发方法一实施例的流程示意图。该方法包括:Referring to FIG. 1 , FIG. 1 is a schematic flowchart of an embodiment of a method for distributing vehicle data provided by the present application. The method includes:

步骤11:获取至少一车载系统回传的车载数据。Step 11: Acquire vehicle-mounted data returned by at least one vehicle-mounted system.

在一些实施例中,可以利用无线传输的方式,获取至少一车载系统回传的车载数据。如,设置多个数据接口,每一数据接口分布式层级分布。每一数据接口用于获取一车载系统回传的车载数据。In some embodiments, in-vehicle data returned by at least one in-vehicle system may be acquired by means of wireless transmission. For example, multiple data interfaces are set, and each data interface is distributed hierarchically. Each data interface is used to obtain in-vehicle data returned by an in-vehicle system.

在一些实施例中,可以按照预设周期获取至少一车载系统回传的车载数据。In some embodiments, in-vehicle data returned by at least one in-vehicle system may be acquired according to a preset period.

在一些实施例中,可以实时接收至少一车载系统回传的车载数据。In some embodiments, in-vehicle data returned by at least one in-vehicle system can be received in real time.

其中,车载数据可以包括车辆在线情况、驾驶里程数、车辆异常数据、车辆订单信息,车辆各个硬件状态信息、车辆行驶的位置信息、车辆历史数据等。The vehicle-mounted data may include vehicle online status, driving mileage, vehicle abnormality data, vehicle order information, vehicle hardware status information, vehicle driving location information, vehicle historical data, and the like.

步骤12:将车载数据缓存于消息队列中。Step 12: Cache the vehicle data in the message queue.

在一些实施例中,消息队列可以是redis stream消息队列。stream消息队列提供消息的持久化和主被复制功能,可以让任何客户端访问任何时刻的数据,并且记住每个客户端的访问位置,还能保证数据不丢失。它的写入速度非常快,非常适合做该实时分发系统中间件。In some embodiments, the message queue may be a redis stream message queue. The stream message queue provides message persistence and master-replicated functions, allowing any client to access data at any time, remember the access location of each client, and ensure that data is not lost. Its writing speed is very fast, and it is very suitable for the middleware of this real-time distribution system.

在一些实施例中,消息队列还可以是ZeroMQ、RabbitMQ、ActiveMQ和Kafka/Jafka中至少一种。In some embodiments, the message queue may also be at least one of ZeroMQ, RabbitMQ, ActiveMQ, and Kafka/Jafka.

步骤13:从消息队列的前端获取至少部分车载数据,并根据至少部分车载数据的类型,分发到对应的车辆管理平台。Step 13: Acquire at least part of the vehicle-mounted data from the front end of the message queue, and distribute it to the corresponding vehicle management platform according to the type of at least part of the vehicle-mounted data.

其中,至少部分车载数据的类型可以分为车辆在线情况、驾驶里程数、车辆异常数据、车辆订单信息,车辆各个硬件状态信息、车辆行驶的位置信息、车辆历史数据等。The types of at least part of the vehicle-mounted data can be classified into vehicle online status, driving mileage, vehicle abnormal data, vehicle order information, vehicle hardware status information, vehicle location information, vehicle history data, and the like.

在一些实施例中,监听消息队列的车载数据,并在监听到车载数据时,从消息队列的前端获取至少部分车载数据,并根据至少部分车载数据的类型,分发到对应的车辆管理平台。In some embodiments, the in-vehicle data of the message queue is monitored, and when the in-vehicle data is monitored, at least part of the in-vehicle data is obtained from the front end of the message queue, and distributed to the corresponding vehicle management platform according to the type of at least part of the in-vehicle data.

在一应用场景中,结合图2进行说明:In an application scenario, it is described with reference to Figure 2:

通过步骤11实时获取车载系统A、车载系统B、车载系统C回传的车载数据。Through step 11, the in-vehicle data returned by the in-vehicle system A, the in-vehicle system B, and the in-vehicle system C are acquired in real time.

在获取到车载系统A、车载系统B、车载系统C回传的车载数据后,将车载数据发送至消息队列中缓存。After acquiring the in-vehicle data returned by the in-vehicle system A, the in-vehicle system B, and the in-vehicle system C, the in-vehicle data is sent to the message queue for buffering.

在消息队列中缓存有车载数据后,从消息队列的前端获取至少部分车载数据,并根据至少部分车载数据的类型,分发到对应的车辆管理平台D、车辆管理平台E、车辆管理平台F。After the on-board data is cached in the message queue, at least part of the on-board data is obtained from the front end of the message queue, and distributed to the corresponding vehicle management platform D, vehicle management platform E, and vehicle management platform F according to the type of at least part of the on-board data.

如,消息队列中存在100条车载数据。从消息队列的前端获取20条车载数据,并根据这20条车载数据的类型,分发到对应的车辆管理平台D、车辆管理平台E或车辆管理平台F。在分发成功后,反馈至消息队列模块20。消息队列模块20将这20条车载数据进行清除。数据分发模块30再次从消息队列的剩余的80条车载数据中按照顺序获取20条车载数据,并根据这20条车载数据的类型,分发到对应的车辆管理平台D、车辆管理平台E、车辆管理平台F。在分发成功后,反馈至消息队列模块20。依次循序,将消息队列中的车载数据全部分发。For example, there are 100 pieces of vehicle data in the message queue. Acquire 20 pieces of vehicle-mounted data from the front end of the message queue, and distribute them to the corresponding vehicle management platform D, vehicle management platform E or vehicle management platform F according to the types of the 20 vehicle-mounted data. After the distribution is successful, it is fed back to the message queue module 20 . The message queue module 20 clears the 20 pieces of on-board data. The data distribution module 30 obtains 20 pieces of in-vehicle data in sequence from the remaining 80 pieces of in-vehicle data in the message queue, and distributes them to the corresponding vehicle management platform D, vehicle management platform E, and vehicle management platform according to the type of the 20 pieces of in-vehicle data. platform F. After the distribution is successful, it is fed back to the message queue module 20 . Distribute all the on-board data in the message queue in sequence.

如,车辆管理平台D需要对应车辆在线情况的车载数据,车辆管理平台E需要对应驾驶里程数的车载数据、车辆管理平台F需要对应车辆异常数据的车载数据。则数据分发模块30根据至少部分车载数据的类型,分发到对应的车辆管理平台D、车辆管理平台E和车辆管理平台F。For example, vehicle management platform D needs on-board data corresponding to the online status of vehicles, vehicle management platform E needs on-board data corresponding to driving mileage, and vehicle management platform F needs on-board data corresponding to abnormal vehicle data. Then, the data distribution module 30 distributes to the corresponding vehicle management platform D, vehicle management platform E and vehicle management platform F according to the type of at least part of the vehicle-mounted data.

在本实施例中,通过获取至少一车载系统回传的车载数据;将车载数据缓存于消息队列中;从消息队列的前端获取至少部分车载数据,并根据至少部分车载数据的类型,分发到对应的车辆管理平台的方式,一方面,利用消息队列缓存车载数据功能,能够保证车载数据的持久化,另一方面,根据至少部分车载数据的类型,分发到对应的车辆管理平台,能够减少车辆管理平台接收车载数据的数据量,提升车辆管理平台对车载数据的处理效率。In this embodiment, the in-vehicle data returned by at least one in-vehicle system is acquired; the in-vehicle data is cached in a message queue; at least part of the in-vehicle data is acquired from the front end of the message queue, and according to the type of at least part of the in-vehicle data, distributed to corresponding On the one hand, the function of caching on-board data using message queue can ensure the persistence of on-board data; The platform receives the data volume of in-vehicle data, and improves the processing efficiency of in-vehicle data by the vehicle management platform.

参阅图3,图3是本申请提供的车载数据的分发方法另一实施例的流程示意图。该方法包括:Referring to FIG. 3 , FIG. 3 is a schematic flowchart of another embodiment of the method for distributing on-board data provided by the present application. The method includes:

步骤31:获取至少一车载系统回传的车载数据。Step 31: Acquire vehicle-mounted data returned by at least one vehicle-mounted system.

步骤32:按照预设字段对车载数据进行封装。Step 32: Encapsulate the vehicle data according to the preset fields.

其中,预设字段可以提前设置。如,可以预先在配置文件中进行预设字段配置。由此,在配置文件中预设封装要求。Among them, the preset field can be set in advance. For example, preset fields can be configured in the configuration file in advance. Thus, the packaging requirements are preset in the configuration file.

在一些实施例中,可以按照上下文字段、事件类型字段、元数据字段、优先级字段和有效载荷字段对车载数据进行封装。In some embodiments, onboard data may be encapsulated in a context field, event type field, metadata field, priority field, and payload field.

其中,上下文字段context,能够包含上下文信息,对链路追踪及跨平台链路追踪、排查问题非常重要。如,上下文字段可以设置为“dict={}”。Among them, the context field context can contain context information, which is very important for link tracking and cross-platform link tracking and troubleshooting. For example, the context field can be set to "dict={}".

事件类型字段event_type和路径参数topic的值一致,对后续分发非常重要。如,事件类型字段可以设置为字符串类型。The event type field event_type has the same value as the path parameter topic, which is very important for subsequent distribution. For example, the event type field can be set to string type.

元数据字段metadata用于记录一些车载数据的信息情况,根据需要填写。元数据字段可以设置为“dict”。The metadata field metadata is used to record the information of some in-vehicle data, fill in as needed. The metadata field can be set to "dict".

优先级字段priority默认为sample,一般不要修改,对后续分发采用什么通知处理非常重要。优先级字段可以设置为“sample”。The priority field priority is sample by default. Generally, do not modify it. It is very important to use the notification processing for subsequent distribution. The priority field can be set to "sample".

有效载荷字段payload用于存放消息体。有效载荷字段可以设置为“dict”。The payload field payload is used to store the message body. The payload field can be set to "dict".

步骤33:将封装后的车载数据缓存于消息队列中。Step 33: Cache the packaged vehicle data in the message queue.

步骤34:从消息队列的前端获取至少部分车载数据,并根据至少部分车载数据的类型,分发到对应的车辆管理平台。Step 34: Acquire at least part of the vehicle-mounted data from the front end of the message queue, and distribute to the corresponding vehicle management platform according to the type of at least part of the vehicle-mounted data.

在步骤34中,可以进一步利用车载数据的事件类型进行判断,确定该车载数据是否符合目标车辆管理平台。如符合,再根据至少部分车载数据的类型,分发到对应的车辆管理平台。In step 34, the event type of the in-vehicle data may be further used for judgment to determine whether the in-vehicle data conforms to the target vehicle management platform. If so, it is then distributed to the corresponding vehicle management platform according to the type of at least part of the vehicle-mounted data.

在本实施例中,按照预设字段对车载数据进行封装,能够便于后续的数据分发,以及利用消息队列缓存车载数据,能够保证车载数据的持久化,另一方面,根据至少部分车载数据的类型,分发到对应的车辆管理平台,能够减少车辆管理平台接收车载数据的数据量,提升车辆管理平台对车载数据的处理效率。In this embodiment, the on-board data is encapsulated according to preset fields, which can facilitate subsequent data distribution, and the message queue is used to cache on-board data, which can ensure the persistence of on-board data. On the other hand, according to the type of at least part of the on-board data , distributed to the corresponding vehicle management platform, which can reduce the amount of data received by the vehicle management platform and improve the processing efficiency of the vehicle management platform for the vehicle data.

参阅图4,图4是本申请提供的车载数据的分发方法另一实施例的流程示意图。该方法包括:Referring to FIG. 4 , FIG. 4 is a schematic flowchart of another embodiment of the method for distributing on-board data provided by the present application. The method includes:

步骤41:获取至少一车载系统回传的车载数据。Step 41: Acquire vehicle-mounted data returned by at least one vehicle-mounted system.

步骤42:按照事件类型字段对车载数据进行封装。Step 42: Encapsulate the in-vehicle data according to the event type field.

其中,步骤42还可以根据上述任一实施例,进行多种字段的封装。Wherein, in step 42, encapsulation of various fields may also be performed according to any of the foregoing embodiments.

步骤43:将封装后的车载数据缓存于消息队列中。Step 43: Cache the encapsulated vehicle data in the message queue.

步骤44:确定至少部分车载数据中的目标车载数据的事件类型是否与车辆管理平台的预设事件类型匹配。Step 44: Determine whether the event type of the target vehicle data in at least part of the vehicle data matches the preset event type of the vehicle management platform.

若匹配,执行步骤45,若不匹配,执行步骤46。If it matches, go to step 45, if not, go to step 46.

步骤45:再次对目标车载数据进行数据封装,并分发至对应的车辆管理平台。Step 45: Perform data encapsulation on the target vehicle data again, and distribute to the corresponding vehicle management platform.

因在消息队列中,车载数据的数据类型为字符串类型,所以在分发之前需要再次进行数据封装,以封装为车辆管理平台需要的数据类型。Because in the message queue, the data type of the vehicle data is string type, so it is necessary to encapsulate the data again before distribution to encapsulate the data type required by the vehicle management platform.

在一些实施例中,参阅图5,步骤45可以是以下流程:In some embodiments, referring to FIG. 5, step 45 may be the following flow:

步骤451:对封装后的至少部分车载数据进行过滤操作。Step 451: Perform a filtering operation on at least part of the encapsulated vehicle-mounted data.

在步骤451中,按照至少部分车载数据的类型进行过滤。如,车辆管理平台需要车辆在线情况的车载数据,则将其他车载数据过滤掉,保留车辆在线情况的车载数据。In step 451, filtering is performed according to the type of at least part of the vehicle-mounted data. For example, if the vehicle management platform needs the on-board data of the online status of the vehicle, other on-board data will be filtered out, and the on-board data of the online status of the vehicle will be retained.

步骤452:将过滤后的至少部分车载数据分发到对应的车辆管理平台。Step 452: Distribute at least part of the filtered vehicle-mounted data to the corresponding vehicle management platform.

在一些实施例中,参阅图6,步骤452可以是以下流程:In some embodiments, referring to FIG. 6, step 452 may be the following flow:

步骤61:判断至少部分车载数据的数据格式是否满足要求。Step 61: Determine whether the data format of at least part of the vehicle-mounted data meets the requirements.

可以理解,不同的车辆管理平台存在不同的数据格式,因此,判断至少部分车载数据的数据格式是否满足要求。It can be understood that different vehicle management platforms have different data formats. Therefore, it is determined whether the data formats of at least part of the vehicle-mounted data meet the requirements.

若是,则直接分发至车辆管理平台,若否,执行步骤62。If yes, it is directly distributed to the vehicle management platform; if not, step 62 is executed.

步骤62:将至少部分车载数据的数据格式转换为车辆管理平台的数据格式后,分发至车辆管理平台。Step 62: After converting the data format of at least part of the vehicle data into the data format of the vehicle management platform, distribute to the vehicle management platform.

步骤46:舍弃目标车载数据。Step 46: Discard the target vehicle data.

可以理解,舍弃目标车载数据是不对其中一车辆管理平台进行分发,但是该目标车载数据可以能会分发至其他车辆管理平台。It can be understood that discarding the target on-board data is not to distribute to one of the vehicle management platforms, but the target on-board data may be distributed to other vehicle management platforms.

在本实施例中,首先按照事件类型字段对车载数据进行封装,能够便于后续的数据分发按照事件类型进行匹配,以初步确定相应车辆管理平台的车载数据,其次,对车载数据进行过滤,以满足相应车载管理平台对数据的需求,进一步,通过数据格式转换,便于车载数据顺利发布至车辆管理平台。基于此,利用消息队列缓存车载数据,能够保证车载数据的持久化,以及将至少部分车载数据分发到对应的车辆管理平台,能够减少车辆管理平台接收车载数据的数据量,提升车辆管理平台对车载数据的处理效率。In this embodiment, the on-board data is firstly encapsulated according to the event type field, which can facilitate subsequent data distribution to be matched according to the event type, so as to preliminarily determine the on-board data of the corresponding vehicle management platform. According to the data requirements of the on-board management platform, further, through the data format conversion, it is convenient for the on-board data to be released to the vehicle management platform smoothly. Based on this, the use of message queues to cache in-vehicle data can ensure the persistence of in-vehicle data, and at least part of the in-vehicle data is distributed to the corresponding vehicle management platform, which can reduce the amount of data received by the vehicle management platform. Data processing efficiency.

参阅图7,图7是本申请提供的车载数据的分发方法另一实施例的流程示意图。该方法包括:Referring to FIG. 7 , FIG. 7 is a schematic flowchart of another embodiment of the method for distributing on-board data provided by the present application. The method includes:

步骤71:确定车辆管理平台对应的发布者和发布者状态。Step 71: Determine the publisher and publisher status corresponding to the vehicle management platform.

其中,发布者可以理解为是车辆管理平台的URL(Uniform Resoure Locator,统一资源定位器)。通过该URL,可以确定出相应的车辆管理平台的状态,即发布者状态。The publisher can be understood as a URL (Uniform Resoure Locator, Uniform Resource Locator) of the vehicle management platform. Through this URL, the status of the corresponding vehicle management platform, that is, the publisher status, can be determined.

如,通过ping URL的方式检测发布者状态。For example, the publisher status is detected by pinging the URL.

步骤72:若发布者状态处于激活状态,通过发布者将至少部分车载数据发布到车辆管理平台。Step 72: If the publisher state is in the active state, publish at least part of the vehicle data to the vehicle management platform through the publisher.

若发布者状态处于激活状态,说明该车辆管理平台通信正常,则可以向其发布数据。If the publisher status is active, it means that the vehicle management platform communicates normally, and data can be published to it.

在一些实施例中,在至少部分车载数据成功发布到车辆管理平台时,重置发布者状态,并向消息队列发送反馈信息。In some embodiments, when at least part of the in-vehicle data is successfully published to the vehicle management platform, the publisher status is reset, and feedback information is sent to the message queue.

可以理解,通过成功发布便重置发布者状态,能够便于实时检测车辆管理平台状态,即发布者状态。It can be understood that the status of the publisher is reset after successful publishing, which can facilitate real-time detection of the status of the vehicle management platform, that is, the status of the publisher.

如,前一次发布者状态处于未激活状态,但是本次发布者状态处于激活状态,则在至少部分车载数据成功发布到车辆管理平台时,重置发布者状态,以使发布者状态处于激活状态。For example, if the previous publisher status was inactive, but this time the publisher status is active, when at least part of the vehicle data is successfully published to the vehicle management platform, reset the publisher status to make the publisher status active .

在一些实施例中,在至少部分车载数据发布到车辆管理平台失败时,统计发布者连续失败次数,并基于连续失败次数进行熔断处理。In some embodiments, when at least part of the in-vehicle data fails to be published to the vehicle management platform, the number of consecutive failures by the publisher is counted, and the fuse processing is performed based on the number of consecutive failures.

可以理解,若发布失败,说明当前车辆管理平台处于异常阶段,若连续失败次数超过阈值,说明车辆管理平台处于异常阶段的时间较久,则短期内无法向其发布数据,则进行熔断处理,停止向该车辆管理平台发布数据,以节约系统资源。It can be understood that if the release fails, it means that the current vehicle management platform is in an abnormal stage. If the number of consecutive failures exceeds the threshold, it means that the vehicle management platform has been in the abnormal stage for a long time, and the data cannot be released to it in a short period of time. Publish data to the vehicle management platform to save system resources.

其中,可以设置一熔断时间,则熔断时间到达后,再次确定发布者状态。Wherein, a fusing time can be set, and after the fusing time arrives, the publisher status is determined again.

在本实施例中,按照发布者的状态,决定是否将至少部分车载数据发布到车辆管理平台,以此节约系统资源,避免重复发布,且不成功的问题。In this embodiment, according to the state of the publisher, it is decided whether to publish at least part of the vehicle-mounted data to the vehicle management platform, so as to save system resources and avoid the problem of repeated publishing and failure.

参阅图8,图8是本申请提供的车载数据的分发方法另一实施例的流程示意图。该方法包括:Referring to FIG. 8 , FIG. 8 is a schematic flowchart of another embodiment of the method for distributing vehicle data provided by the present application. The method includes:

步骤81:获取至少一车载系统回传的车载数据。Step 81: Acquire vehicle-mounted data returned by at least one vehicle-mounted system.

步骤82:将车载数据缓存于消息队列中。Step 82: Cache the on-board data in the message queue.

步骤81-步骤82与上述任一实施例具有相同或相似的技术方案,这里不做赘述。Steps 81 to 82 have the same or similar technical solutions as any of the above-mentioned embodiments, and will not be repeated here.

步骤83:从消息队列的前端获取至少部分车载数据,根据至少部分车载数据建立待处理条目列表。Step 83: Acquire at least part of the vehicle-mounted data from the front end of the message queue, and create a to-be-processed item list according to the at least part of the vehicle-mounted data.

步骤84:检查是否存在需要恢复的消费者的待处理条目列表。Step 84: Check if there is a pending entry list for the consumer that needs to be restored.

其中,消费者可以理解为数据分发的进程,当一个消费者正常时,会对待处理条目列表中的车载数据按照上述任一实施例中的分发方式,将数据分发到对应的车辆管理平台。The consumer can understand the process of data distribution. When a consumer is normal, the vehicle data in the item list to be processed will be distributed to the corresponding vehicle management platform according to the distribution method in any of the above embodiments.

若当前消费者死亡,即进程中断,需要再次激活另一进程,即新建一消费者,继续进行数据分发。If the current consumer dies, that is, the process is interrupted, another process needs to be activated again, that is, a new consumer is created to continue data distribution.

在步骤84中,若检查存在需要恢复的消费者的待处理条目列表,执行步骤85。若检查不存在需要恢复的消费者的待处理条目列表,执行步骤86。若不存在,则说明消费者正常。In step 84, if it is checked that there is a pending entry list for a consumer that needs to be restored, step 85 is performed. If it is checked that there is no pending item list for the consumer that needs to be restored, step 86 is performed. If it does not exist, it means that the consumer is normal.

步骤85:从待处理条目列表的开始位置消费。Step 85: Consume from the beginning of the list of pending items.

待处理条目列表中消费的模式是,从头开始处理,每处理一条目,则对其进行清除。因此,在待处理条目列表是需要恢复的时候,需要从开始位置消费。The pattern of consumption in the list of pending entries is to start processing from the beginning and clear each entry as it is processed. Therefore, when the list of pending items needs to be restored, it needs to be consumed from the starting position.

步骤86:从待处理条目列表的未消费位置消费。Step 86: Consume from the unconsumed position of the pending item list.

步骤87:根据至少部分车载数据的类型,分发到对应的车辆管理平台。Step 87: Distribute to the corresponding vehicle management platform according to the type of at least part of the vehicle-mounted data.

在本实施例中,对消费者进行监控,当消费者死亡后,建立新的消费者,利用新的消费者对待处理条目列表中的车载数据进行处理,以提升车载数据的处理效率。In this embodiment, the consumer is monitored, and when the consumer dies, a new consumer is established, and the vehicle-mounted data in the item list to be processed by the new consumer is used for processing, so as to improve the processing efficiency of the vehicle-mounted data.

参阅图9,图9是本申请提供的车载数据分发系统一实施例的结构示意图。该车载数据分发系统100包括:数据接口模块10、消息队列模块20和数据分发模块30。Referring to FIG. 9 , FIG. 9 is a schematic structural diagram of an embodiment of a vehicle-mounted data distribution system provided by the present application. The in-vehicle data distribution system 100 includes: a data interface module 10 , a message queue module 20 and a data distribution module 30 .

其中,数据接口模块10用于获取至少一车载系统回传的车载数据。Wherein, the data interface module 10 is used for acquiring the in-vehicle data returned by at least one in-vehicle system.

在一些实施例中,数据接口模块10可以具有多个子数据接口,每一子数据接口分布式层级分布。每一子数据接口用于获取一车载系统回传的车载数据。In some embodiments, the data interface module 10 may have multiple sub-data interfaces, and each sub-data interface is distributed hierarchically. Each sub-data interface is used to obtain the in-vehicle data returned by an in-vehicle system.

在一些实施例中,数据接口模块10可以按照预设周期获取至少一车载系统回传的车载数据。In some embodiments, the data interface module 10 may acquire on-board data returned by at least one on-board system according to a preset period.

在一些实施例中,数据接口模块10可以实时接收至少一车载系统回传的车载数据。In some embodiments, the data interface module 10 can receive in-vehicle data returned by at least one in-vehicle system in real time.

其中,车载数据可以包括车辆在线情况、驾驶里程数、车辆异常数据、车辆订单信息,车辆各个硬件状态信息、车辆行驶的位置信息、车辆历史数据等。The vehicle-mounted data may include vehicle online status, driving mileage, vehicle abnormality data, vehicle order information, vehicle hardware status information, vehicle driving location information, vehicle historical data, and the like.

消息队列模块20连接数据接口模块10,用于利用消息队列缓存车载数据。The message queue module 20 is connected to the data interface module 10, and is used for buffering the on-board data by using the message queue.

在一些实施例中,消息队列模块20中的消息队列可以是redis stream消息队列。stream消息队列提供消息的持久化和主被复制功能,可以让任何客户端访问任何时刻的数据,并且记住每个客户端的访问位置,还能保证数据不丢失。它的写入速度非常快,非常适合做该实时分发系统中间件。In some embodiments, the message queue in the message queue module 20 may be a redis stream message queue. The stream message queue provides message persistence and master-replicated functions, allowing any client to access data at any time, remember the access location of each client, and ensure that data is not lost. Its writing speed is very fast, and it is very suitable for the middleware of this real-time distribution system.

在一些实施例中,消息队列模块20中的消息队列还可以是ZeroMQ、RabbitMQ、ActiveMQ和Kafka/Jafka中至少一种。In some embodiments, the message queue in the message queue module 20 may also be at least one of ZeroMQ, RabbitMQ, ActiveMQ and Kafka/Jafka.

数据分发模块30连接消息队列模块20,用于从消息队列的前端获取至少部分车载数据,并根据至少部分车载数据的类型,分发到对应的车辆管理平台。The data distribution module 30 is connected to the message queue module 20 for acquiring at least part of the vehicle data from the front end of the message queue, and distributing to the corresponding vehicle management platform according to the type of at least part of the vehicle data.

在一应用场景中,结合图10进行说明:In an application scenario, it is described with reference to Figure 10:

数据接口模块10能够实时获取车载系统A、车载系统B、车载系统C回传的车载数据。The data interface module 10 can acquire the in-vehicle data returned by the in-vehicle system A, the in-vehicle system B, and the in-vehicle system C in real time.

数据接口模块10在获取到车载系统A、车载系统B、车载系统C回传的车载数据后,将车载数据发送至消息队列模块20中。After acquiring the in-vehicle data returned by the in-vehicle system A, the in-vehicle system B, and the in-vehicle system C, the data interface module 10 sends the in-vehicle data to the message queue module 20 .

消息队列模块20利用消息队列缓存车载数据。The message queue module 20 uses the message queue to buffer vehicle data.

在消息队列模块20中缓存有车载数据后,数据分发模块30从消息队列的前端获取至少部分车载数据,并根据至少部分车载数据的类型,分发到对应的车辆管理平台D、车辆管理平台E、车辆管理平台F。After the on-board data is cached in the message queue module 20, the data distribution module 30 obtains at least part of the on-board data from the front end of the message queue, and distributes at least part of the on-board data to the corresponding vehicle management platform D, vehicle management platform E, Vehicle management platform F.

如,消息队列中存在100条车载数据。数据分发模块30从消息队列的前端获取20条车载数据,并根据这20条车载数据的类型,分发到对应的车辆管理平台D、车辆管理平台E或车辆管理平台F。在分发成功后,反馈至消息队列模块20。消息队列模块20将这20条车载数据进行清除。数据分发模块30再次从消息队列的剩余的80条车载数据中按照顺序获取20条车载数据,并根据这20条车载数据的类型,分发到对应的车辆管理平台D、车辆管理平台E、车辆管理平台F。在分发成功后,反馈至消息队列模块20。依次循序,将消息队列中的车载数据全部分发。For example, there are 100 pieces of vehicle data in the message queue. The data distribution module 30 obtains 20 pieces of vehicle-mounted data from the front end of the message queue, and distributes them to the corresponding vehicle management platform D, vehicle management platform E or vehicle management platform F according to the types of the 20 vehicle-mounted data. After the distribution is successful, it is fed back to the message queue module 20 . The message queue module 20 clears the 20 pieces of on-board data. The data distribution module 30 obtains 20 pieces of in-vehicle data in sequence from the remaining 80 pieces of in-vehicle data in the message queue, and distributes them to the corresponding vehicle management platform D, vehicle management platform E, and vehicle management platform according to the type of the 20 pieces of in-vehicle data. platform F. After the distribution is successful, it is fed back to the message queue module 20 . Distribute all the on-board data in the message queue in sequence.

如,车辆管理平台D需要对应车辆在线情况的车载数据,车辆管理平台E需要对应驾驶里程数的车载数据、车辆管理平台F需要对应车辆异常数据的车载数据。则数据分发模块30根据至少部分车载数据的类型,分发到对应的车辆管理平台D、车辆管理平台E和车辆管理平台F。For example, vehicle management platform D needs on-board data corresponding to the online status of vehicles, vehicle management platform E needs on-board data corresponding to driving mileage, and vehicle management platform F needs on-board data corresponding to abnormal vehicle data. Then, the data distribution module 30 distributes to the corresponding vehicle management platform D, vehicle management platform E and vehicle management platform F according to the type of at least part of the vehicle-mounted data.

在本实施例中,该车载数据分发系统包括:数据接口模块,用于获取至少一车载系统回传的车载数据;消息队列模块,连接数据接口模块,用于利用消息队列缓存车载数据;数据分发模块,连接消息队列模块,用于从消息队列的前端获取至少部分车载数据,并根据至少部分车载数据的类型,分发到对应的车辆管理平台。通过上述方式,利用消息队列模块将数据接口模块和数据分发模块分离,一方面,消息队列模块提供缓存车载数据功能,能够保证车载数据的持久化,另一方面,分离的数据接口模块和数据分发模块可以避免因数据分发模块的逻辑变动重启引发数据接口模块发送车载数据失败导致车载数据丢失的情况,从而保证车载数据的安全性,极大降低车载数据分发系统的维护难度,另一方面,根据至少部分车载数据的类型,分发到对应的车辆管理平台,能够减少车辆管理平台接收车载数据的数据量,提升车辆管理平台对车载数据的处理效率。In this embodiment, the in-vehicle data distribution system includes: a data interface module for acquiring in-vehicle data returned by at least one in-vehicle system; a message queue module, connected to the data interface module, for caching the in-vehicle data by using the message queue; data distribution The module is connected to the message queue module, and is used for acquiring at least part of the vehicle-mounted data from the front end of the message queue, and distributing to the corresponding vehicle management platform according to the type of at least part of the vehicle-mounted data. In the above way, the data interface module and the data distribution module are separated by the message queue module. On the one hand, the message queue module provides the function of caching on-board data, which can ensure the persistence of on-board data. On the other hand, the separated data interface module and data distribution module The module can avoid the situation that the data interface module fails to send the vehicle data due to the restart of the logic change of the data distribution module, which leads to the loss of the vehicle data, thereby ensuring the security of the vehicle data and greatly reducing the maintenance difficulty of the vehicle data distribution system. On the other hand, according to the Distributing at least some types of vehicle-mounted data to the corresponding vehicle management platform can reduce the amount of data received by the vehicle management platform and improve the processing efficiency of vehicle-mounted data by the vehicle management platform.

在一些实施例中,数据接口模块10还用于按照预设配置参数对车载数据按照进行封装;消息队列模块20还用于利用消息队列缓存封装后的车载数据。In some embodiments, the data interface module 10 is further configured to encapsulate the in-vehicle data according to preset configuration parameters; the message queue module 20 is further configured to cache the encapsulated in-vehicle data by using a message queue.

在一些实施例中,可以预先在数据接口模块10对应的配置文件中进行参数配置。如,数据接口模块10对应的数据类型、车载数据需要封装的事件类型。由此,在配置文件中预设封装要求。数据接口模块10在接收到车载数据后,对车载数据按照预设配置参数进行封装。然后将封装后的车载数据缓存于消息队列模块的消息队列中。In some embodiments, parameter configuration may be performed in a configuration file corresponding to the data interface module 10 in advance. For example, the data type corresponding to the data interface module 10 and the event type that needs to be encapsulated for the on-board data. Thus, the packaging requirements are preset in the configuration file. After receiving the on-board data, the data interface module 10 encapsulates the on-board data according to preset configuration parameters. Then, the packaged vehicle data is cached in the message queue of the message queue module.

在一应用场景中,结合图11,对数据接口模块10的工作流程进行说明:In an application scenario, with reference to FIG. 11 , the workflow of the data interface module 10 is described:

数据源将数据data发送到dispatcher-api服务,dispatcher-api服务再将其封装后写入redis消息队列。其中,dispatcher-api相当于数据接口模块10。数据data相当于上述的车载数据。The data source sends the data to the dispatcher-api service, and the dispatcher-api service encapsulates it and writes it to the redis message queue. Among them, dispatcher-api is equivalent to the data interface module 10 . The data data is equivalent to the above-mentioned in-vehicle data.

dispatcher-api服务获取nacos配置中对应的config文件,按照config文件中的配置信息对车载数据进行封装,然后将封装的车载数据缓存于redis消息队列。The dispatcher-api service obtains the corresponding config file in the nacos configuration, encapsulates the on-board data according to the configuration information in the config file, and then caches the encapsulated on-board data in the redis message queue.

其中,config文件中的配置信息可以包含context、event_type、metadata、priority和payload字段。The configuration information in the config file can include context, event_type, metadata, priority, and payload fields.

context:此字段包含上下文信息,对链路追踪及跨平台链路追踪、排查问题非常重要。context: This field contains context information, which is very important for link tracking and cross-platform link tracking and troubleshooting.

event_type:事件类型,和路径参数topic的值一致,对后面dispatcher-server服务管道过滤非常重要。event_type: The event type, consistent with the value of the path parameter topic, is very important for the subsequent dispatcher-server service pipeline filtering.

metadata:该字段记录一些此条消息的信息情况,根据需要填写。metadata: This field records some information about this message, fill in as needed.

priority:优先级字段默认为sample,一般不要修改,对dispatcher-server服务采用什么通知处理非常重要。priority: The priority field defaults to sample. Generally, do not modify it. It is very important to use the notification processing for the dispatcher-server service.

payload:这里存放的就是消息体。Payload: The message body is stored here.

在一些实施例中,dispatcher-api服务所使用的配置信息从nacos服务获取,同时监听nacos配置,如果手动更新nacos配置,dispatcher-api服务就会同步该配置,动态更新服务。In some embodiments, the configuration information used by the dispatcher-api service is obtained from the nacos service, while monitoring the nacos configuration. If the nacos configuration is manually updated, the dispatcher-api service will synchronize the configuration and dynamically update the service.

在本实施例中,通过对车载数据进行封装,以使不同格式或类型的车载数据进行统一,便于提高后续的分发效率。In this embodiment, by encapsulating the in-vehicle data, the in-vehicle data of different formats or types are unified, which is convenient to improve the subsequent distribution efficiency.

在一些实施例中,数据分发模块30还用于监听消息队列的车载数据,并在监听到车载数据时,从消息队列的前端获取至少部分车载数据。In some embodiments, the data distribution module 30 is further configured to monitor the in-vehicle data of the message queue, and obtain at least part of the in-vehicle data from the front end of the message queue when the in-vehicle data is monitored.

在一些实施例中,数据接口模块10还用于按照事件类型字段对车载数据进行封装;数据分发模块30还用于确定至少部分车载数据中的目标车载数据的事件类型是否与车辆管理平台的预设事件类型匹配;若匹配,再次对目标车载数据进行数据封装,并分发至对应的车辆管理平台;若不匹配,则舍弃目标车载数据。In some embodiments, the data interface module 10 is further configured to encapsulate the in-vehicle data according to the event type field; the data distribution module 30 is further configured to determine whether the event type of the target in-vehicle data in at least a part of the in-vehicle data is consistent with the pre-defined event type of the vehicle management platform. It is assumed that the event type matches; if it matches, the target vehicle data is encapsulated again and distributed to the corresponding vehicle management platform; if it does not match, the target vehicle data is discarded.

数据分发模块30还用于对封装后的至少部分车载数据进行过滤操作;将过滤后的至少部分车载数据分发到对应的车辆管理平台。The data distribution module 30 is further configured to perform a filtering operation on at least part of the encapsulated vehicle-mounted data; and distribute the filtered at least part of the vehicle-mounted data to the corresponding vehicle management platform.

数据分发模块30还用于判断至少部分车载数据的数据格式是否满足要求;若否,将至少部分车载数据的数据格式转换为车辆管理平台的数据格式后,分发至车辆管理平台。The data distribution module 30 is also used to determine whether the data format of at least part of the vehicle data meets the requirements; if not, convert the data format of at least part of the vehicle data into the data format of the vehicle management platform and distribute to the vehicle management platform.

在一应用场景中,结合图12进行说明:In an application scenario, it is described with reference to Figure 12:

dispatcher-server服务监听redis队列,从redis队列读取数据,然后将数据送入相应的管道pipeline,通过event filter事件过滤器,对其进行过滤,过滤后,在对其进行数据封装,封装完成后根据定制的过滤条件对数据进行过滤,符合条件的再选择用户配置的发布者进行发布。dispatcher-server服务相当于数据分发模块30。The dispatcher-server service listens to the redis queue, reads the data from the redis queue, and then sends the data to the corresponding pipeline, and filters it through the event filter event filter. After filtering, the data is encapsulated. After the encapsulation is completed Filter the data according to the customized filter conditions, and then select the publisher configured by the user to publish if the conditions are met. The dispatcher-server service is equivalent to the data distribution module 30 .

其中,发布者可以是kafka、es、http、test等管理平台。定制的过滤条件可以根据发布者确定,如,发布者对应的管理平台需要的数据,如需要车辆运行日志,则将此设置为过滤条件。Among them, the publisher can be a management platform such as kafka, es, http, test, etc. The customized filter condition can be determined according to the publisher, for example, the data required by the management platform corresponding to the publisher, if the vehicle operation log is required, set this as the filter condition.

其中,dispatcher-server服务配置问题也是采用从nacos获取,监听nacos配置,可以热更新配置。Among them, the dispatcher-server service configuration problem is also obtained from nacos, monitors the nacos configuration, and can hot update the configuration.

在一些实施例中,结合图13进行说明:In some embodiments, described in conjunction with Figure 13:

数据分发模块30监听消息队列的车载数据,并在监听到车载数据时,把消息队列中封装的车载数据批量取出,使用线程池并行处理该批次车载数据,线程处理过程是先解析此消息,遍历所有endpoint,判断event_type是否匹配,如果匹配就选择对应priority函数处理此车载数据,然后封装该车载数据,判断是否满足过滤条件,不满足就直接丢弃,满足就判断是否需要格式转换(这里是为了适配不同车载管理平台对数据格式有不同要求),如果需要就进行格式转换,不需要就直接发布。The data distribution module 30 monitors the on-board data of the message queue, and when monitoring the on-board data, takes out the on-board data encapsulated in the message queue in batches, and uses the thread pool to process the batch of on-board data in parallel. The thread processing process is to parse the message first, Traverse all endpoints to determine whether the event_type matches. If it matches, select the corresponding priority function to process the vehicle data, and then encapsulate the vehicle data to determine whether the filter conditions are met. If not, discard it directly. If it is satisfied, determine whether format conversion is required (here is for Adapting to different vehicle management platforms has different requirements for data formats), format conversion if necessary, and direct release if not needed.

在一些实施例中,结合图14对发布流程进行说明:In some embodiments, the publishing process is described in conjunction with FIG. 14 :

发布流程先判断发布者是否激活,只有激活的发布者才可以发布消息,未激活的需要检查发布者状态,看熔断等待时间是否超出动态设置的熔断时长,如果超出就激活该发布者,重新设置熔断时长,采用指数增长方式,但上限是5分钟。发布者发完消息后判断是否发布成功,如果成功了,就重置发布者状态,否则就统计失败次数,超出5次失败就进行熔断处理。The publishing process first determines whether the publisher is activated. Only activated publishers can publish messages. If they are not activated, you need to check the status of the publisher to see if the fuse waiting time exceeds the dynamically set fuse time. If it exceeds, activate the publisher and reset it. The duration of the circuit breaker is exponentially increased, but the upper limit is 5 minutes. After the publisher finishes sending the message, it determines whether the publication is successful. If it is successful, the publisher status is reset. Otherwise, the number of failures is counted, and if it exceeds 5 failures, the fuse processing is performed.

其中,管道pipeline配置使用yaml文件。yaml文件可以定义sources、sinks和transfers,其中,sources和sinks是必须定义的。Among them, the pipeline configuration uses the yaml file. The yaml file can define sources, sinks and transfers, where sources and sinks must be defined.

每个source必须定义name、meters和sinks,meters里定义了资源的数据信息,例如sentry-source会把topic为sentry的所有数据过滤出来,通过kafka_sink的publisher发送到kafka上去。再例如hardware-source需要过滤更精细的数据,可以在filters里详细定义,而且该数据源sink里定义了两个发布者,且都需要数据格式转换,格式转换器可以在transfers里定义。其中,还需要定义发布者对应的URL。Each source must define name, meters and sinks. The data information of the resource is defined in the meters. For example, sentry-source will filter out all the data whose topic is sentry, and send it to kafka through the publisher of kafka_sink. For another example, hardware-source needs to filter finer data, which can be defined in filters, and two publishers are defined in the data source sink, and both require data format conversion. The format converter can be defined in transfers. Among them, the URL corresponding to the publisher also needs to be defined.

根据需要添加过滤条件,把过滤的数据通过publisher发送出去,如果目标平台需要的数据格式不同,可以根据需要定义transfer,以此类推,车辆监控平台、硬件研发平台、定位模块、感知模块和PNC模块都可以根据需要定义过滤的数据及相应的格式转换器,完成分发想要的数据。Add filter conditions as needed, and send the filtered data through the publisher. If the data format required by the target platform is different, you can define transfer as needed, and so on. Vehicle monitoring platform, hardware R&D platform, positioning module, perception module and PNC module You can define filtered data and corresponding format converters as needed to complete the distribution of the desired data.

在一些实施例中,数据分发模块30还用于检查是否存在需要恢复的消费者的待处理条目列表,若是,从待处理条目列表的开始位置消费,若否,从待处理条目列表的未消费位置消费,其中,待处理条目列表对应消息队列中的部分车载数据。In some embodiments, the data distribution module 30 is further configured to check whether there is a pending item list of the consumer that needs to be restored, if so, consume from the beginning of the pending item list, if not, from the unconsumed item list of the pending item list Location consumption, where the list of items to be processed corresponds to part of the vehicle data in the message queue.

在一些实施例中,结合图15-图17进行说明:In some embodiments, described in conjunction with Figures 15-17:

本系统数据分发模块30开发的redis驱动主要有三个线程,分别是维持消费者心跳的线程,如图15所示;数据恢复的线程,如图16所示;正常消费线程,如图17所示。The redis driver developed by the data distribution module 30 of this system mainly has three threads, which are the thread for maintaining the heartbeat of consumers, as shown in Figure 15; the thread for data recovery, as shown in Figure 16; the normal consumption thread, as shown in Figure 17 .

正常消费流程,先检查是否有需要恢复的dead(死去的)消费者的PEL(PendingEntries List,待处理条目列表),如果有,就从该PEL开始位置消费,如果没有,就从PEL最新位置消费。每次从PEL读取一批车载数据,批的大小可以通过参数控制,拿到这批车载数据后,开始分发车载数据,分发车载数据采用线程池,并发执行,加快消费速度。分发消息线程执行完执行回调函数ack,向PEL确认车载数据处理完成,PEL将其从列表中移除。In the normal consumption process, first check whether there is a PEL (PendingEntries List, pending entry list) of the dead consumer that needs to be restored. If there is, consume from the starting position of the PEL. If not, consume from the latest position of the PEL. . Each time a batch of in-vehicle data is read from PEL, the size of the batch can be controlled by parameters. After getting this batch of in-vehicle data, it starts to distribute the in-vehicle data. The thread pool is used to distribute the in-vehicle data, which is executed concurrently to speed up consumption. After the distribution message thread executes the callback function ack, it confirms to PEL that the on-board data processing is complete, and PEL removes it from the list.

如果消费者dead,就会走恢复流程,会把该消费者未处理完的PEL分配给其他消费者继续消费。如果dead的消费者失去心跳超时,就会把该消费者清理掉,重新生成另一消费者,进行数据分发。If the consumer is dead, it will go through the recovery process, and the unprocessed PEL of the consumer will be allocated to other consumers to continue consumption. If the dead consumer loses the heartbeat timeout, the consumer will be cleaned up, and another consumer will be regenerated for data distribution.

参阅图18,图18是本申请提供的车载数据分发系统另一实施例的结构示意图。该车载数据分发系统100包括:数据接口模块10、消息队列模块20、数据分发模块30和远程配置模块40。Referring to FIG. 18 , FIG. 18 is a schematic structural diagram of another embodiment of a vehicle-mounted data distribution system provided by the present application. The in-vehicle data distribution system 100 includes: a data interface module 10 , a message queue module 20 , a data distribution module 30 and a remote configuration module 40 .

其中,远程配置模块40用于对数据分发系统100进行远程系统配置。The remote configuration module 40 is used for remote system configuration of the data distribution system 100 .

在一些实施例中,远程配置模块40可以是以网页的形式存在。用户通过登录该网页进行数据分发系统100的系统进行配置。以此,无需用户对数据分发系统100直接进行操作,减少对数据分发系统100的影响,提升系统配置的便捷性。其中,远程配置模块40可以采用nacos配置。然后监听nacos配置的更新,远程即可控制服务配置更新等。In some embodiments, the remote configuration module 40 may exist in the form of a web page. The user performs system configuration of the data distribution system 100 by logging into the web page. In this way, there is no need for the user to directly operate the data distribution system 100 , the impact on the data distribution system 100 is reduced, and the convenience of system configuration is improved. Wherein, the remote configuration module 40 may adopt nacos configuration. Then monitor the update of the nacos configuration, and remotely control the service configuration update, etc.

综上所述,本申请提供的上述任一实施例可以解决多车数据源数据分发到不同平台,多对多关系,并且是实时发送,对用户透明,支持多种不同类型服务接口,可根据需要远程随意配置,配置后立即生效,扩展方便快捷等等。To sum up, any of the above-mentioned embodiments provided in this application can solve the problem of distributing multi-vehicle data source data to different platforms, in a many-to-many relationship, and in real-time transmission, transparent to users, and supporting a variety of different types of service interfaces. It needs to be configured remotely at will, and it will take effect immediately after the configuration, and the expansion is convenient and fast, and so on.

该数据分发系统100采用数据接口模块10和数据分发模块30分离式结构,数据接口模块10可根据消息队列监控输入输出流量信息多节点部署,同时采用动态路由,路径参数可变,可根据路径参数识别不同数据源,维护方便。数据分发模块30可根据消息队列监控输入输出流量信息多节点部署,根据业务需求可能频繁变更,采用分离式加消息队列模块20缓冲结构可以避免因数据分发模块30变动重启服务引发数据源发送数据失败导致数据丢失的情况,从提高数据的安全性,同时降低平台维护难度。The data distribution system 100 adopts a separate structure of the data interface module 10 and the data distribution module 30. The data interface module 10 can monitor the multi-node deployment of input and output flow information according to the message queue, and adopts dynamic routing at the same time. Identify different data sources for easy maintenance. The data distribution module 30 can monitor the multi-node deployment of input and output flow information according to the message queue, which may change frequently according to business requirements. The use of a separate buffer structure with the message queue module 20 can avoid the failure of the data source to send data due to the change of the data distribution module 30 and restarting the service. The situation that leads to data loss can improve data security and reduce the difficulty of platform maintenance.

在一些实施例中,数据分发系统100可以使用redis v5.0及以上版本新增的stream消息队列,它提供了消息的持久化和主被复制功能,可以让任何客户端访问任何时刻的数据,并且记住每个客户端的访问位置,还能保证数据不丢失。它的写入速度非常快,非常适合做该实时分发系统中间件。In some embodiments, the data distribution system 100 can use the newly added stream message queue of redis v5.0 and above, which provides message persistence and master-replicated functions, allowing any client to access data at any time, And remember the access location of each client, and also ensure that data is not lost. Its writing speed is very fast, and it is very suitable for the middleware of this real-time distribution system.

同时在该数据分发系统100也增加了输入输出等流量统计信息,结合Prometheus采集及grafana可视化展示,对该数据分发系统100实时监控。At the same time, the data distribution system 100 also adds traffic statistics information such as input and output, combined with Prometheus collection and grafana visual display, to monitor the data distribution system 100 in real time.

参阅图19,图19是本申请提供的车载数据的分发装置一实施例的结构示意图。该分发装置190包括处理器191和处理器191耦接的存储器192;其中,存储器192用于存储计算机程序,处理器191用于执行计算机程序,以实现以下方法:Referring to FIG. 19 , FIG. 19 is a schematic structural diagram of an embodiment of an in-vehicle data distribution apparatus provided by the present application. The distribution device 190 includes a processor 191 and a memory 192 coupled to the processor 191; wherein, the memory 192 is used to store computer programs, and the processor 191 is used to execute the computer programs to implement the following methods:

获取至少一车载系统回传的车载数据;将车载数据缓存于消息队列中;从消息队列的前端获取至少部分车载数据,并根据至少部分车载数据的类型,分发到对应的车辆管理平台。Acquire on-board data returned by at least one on-board system; cache the on-board data in a message queue; obtain at least part of the on-board data from the front end of the message queue, and distribute to the corresponding vehicle management platform according to the type of at least part of the on-board data.

可以理解,处理器191还用于执行计算机程序,以实现上述任一实施例的方法。It can be understood that the processor 191 is further configured to execute a computer program to implement the method of any of the above embodiments.

参阅图20,图20是本申请提供的计算机可读存储介质一实施例的结构示意图。该计算机可读存储介质200用于存储计算机程序201,计算机程序201在被处理器执行时,用于实现以下方法:Referring to FIG. 20, FIG. 20 is a schematic structural diagram of an embodiment of a computer-readable storage medium provided by the present application. The computer-readable storage medium 200 is used to store a computer program 201, and when the computer program 201 is executed by the processor, is used to implement the following methods:

获取至少一车载系统回传的车载数据;将车载数据缓存于消息队列中;从消息队列的前端获取至少部分车载数据,并根据至少部分车载数据的类型,分发到对应的车辆管理平台。Acquire on-board data returned by at least one on-board system; cache the on-board data in a message queue; obtain at least part of the on-board data from the front end of the message queue, and distribute to the corresponding vehicle management platform according to the type of at least part of the on-board data.

可以理解,计算机程序201在被处理器执行时,还用于实现上述任一实施例的方法。It can be understood that, when the computer program 201 is executed by the processor, it is also used to implement the method of any of the foregoing embodiments.

在本申请所提供的几个实施方式中,应该理解到,所揭露的方法以及设备,可以通过其它的方式实现。例如,以上所描述的设备实施方式仅仅是示意性的,例如,所述电路或单元的划分,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式,例如多个单元或组件可以结合或者可以集成到另一个系统,或一些特征可以忽略,或不执行。In the several embodiments provided in this application, it should be understood that the disclosed method and device may be implemented in other manners. For example, the device implementations described above are only illustrative. For example, the division of the circuits or units is only a logical function division. In actual implementation, there may be other divisions. For example, multiple units or components may be Incorporation may either be integrated into another system, or some features may be omitted, or not implemented.

所述作为分离部件说明的单元可以是或者也可以不是物理上分开的,作为单元显示的部件可以是或者也可以不是物理单元,即可以位于一个地方,或者也可以分布到多个网络单元上。可以根据实际的需要选择其中的部分或者全部单元来实现本实施方式方案的目的。The units described as separate components may or may not be physically separated, and components displayed as units 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 units may be selected according to actual needs to achieve the purpose of the solution in this implementation manner.

另外,在本申请各个实施方式中的各功能单元可以集成在一个处理单元中,也可以是各个单元单独物理存在,也可以两个或两个以上单元集成在一个单元中。上述集成的单元既可以采用硬件的形式实现,也可以采用软件功能单元的形式实现。In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically alone, or two or more units may be integrated into one unit. The above-mentioned integrated units may be implemented in the form of hardware, or may be implemented in the form of software functional units.

以上所述仅为本申请的实施方式,并非因此限制本申请的专利范围,凡是根据本申请说明书及附图内容所作的等效结构或等效流程变换,或直接或间接运用在其他相关的技术领域,均同理包括在本申请的专利保护范围内。The above description is only an embodiment of the present application, and is not intended to limit the scope of the patent of the present application. Any equivalent structure or equivalent process transformation made according to the contents of the description and drawings of the present application, or directly or indirectly applied to other related technologies Fields are similarly included within the scope of patent protection of this application.

Claims (14)

1. A method for distributing vehicle-mounted data, the method comprising:
acquiring vehicle-mounted data returned by at least one vehicle-mounted system;
caching the vehicle-mounted data in a message queue;
and acquiring at least part of vehicle-mounted data from the front end of the message queue, and distributing the vehicle-mounted data to a corresponding vehicle management platform according to the type of the at least part of vehicle-mounted data.
2. The method of claim 1, wherein prior to buffering the in-vehicle data in a message queue, the method comprises:
packaging the vehicle-mounted data according to a preset field;
the caching of the vehicle-mounted data in a message queue comprises the following steps:
and buffering the packaged vehicle-mounted data in the message queue.
3. The method according to claim 2, wherein the encapsulating the vehicle data according to the preset field comprises:
And encapsulating the vehicle-mounted data according to a context field, an event type field, a metadata field, a priority field and a payload field.
4. The method of claim 1, wherein the obtaining at least a portion of the vehicle data from the front end of the message queue comprises:
and monitoring the vehicle-mounted data of the message queue, and acquiring at least part of the vehicle-mounted data from the front end of the message queue when the vehicle-mounted data is monitored.
5. The method of claim 1, wherein prior to buffering the vehicle data in a message queue, comprising:
packaging the vehicle-mounted data according to the event type field;
the step of acquiring at least part of vehicle-mounted data from the front end of the message queue and distributing the vehicle-mounted data to the corresponding vehicle management platform according to the type of the at least part of vehicle-mounted data comprises the following steps:
determining whether the event type of target vehicle-mounted data in the at least part of vehicle-mounted data is matched with a preset event type of the vehicle management platform;
if the matching is carried out, carrying out data packaging on the target vehicle-mounted data again, and distributing the data to the corresponding vehicle management platform;
And if not, discarding the target vehicle-mounted data.
6. The method according to claim 5, wherein the step of data packaging the target vehicle-mounted data again and distributing the target vehicle-mounted data to the corresponding vehicle management platform comprises the following steps:
filtering the at least part of the packaged vehicle-mounted data;
and distributing the at least part of the filtered vehicle-mounted data to the corresponding vehicle management platform.
7. The method of claim 6, wherein the distributing the at least partial filtered in-vehicle data to the corresponding vehicle management platform comprises:
judging whether the data format of the at least part of the vehicle-mounted data meets the requirement or not;
if not, the data format of at least part of the vehicle-mounted data is converted into the data format of the vehicle management platform, and then the data format is distributed to the vehicle management platform.
8. The method of claim 1, further comprising:
determining a publisher and a publisher state corresponding to the vehicle management platform;
and if the publisher state is in an activated state, publishing the at least part of the vehicle-mounted data to the vehicle management platform through the publisher.
9. The method of claim 8, further comprising:
and when at least part of the vehicle-mounted data is successfully published to the vehicle management platform, resetting the publisher state and sending feedback information to the message queue.
10. The method of claim 8, further comprising:
and when the at least part of vehicle-mounted data is failed to be published to the vehicle management platform, counting the continuous failure times of the publisher, and performing fusing processing based on the continuous failure times.
11. The method of claim 1, further comprising:
establishing a list of items to be processed according to at least part of the vehicle-mounted data;
checking whether a to-be-processed item list of the consumer needing to be recovered exists;
if yes, consuming from the starting position of the list of the items to be processed;
if not, consuming from the unconsumed location of the pending entry list.
12. An in-vehicle data distribution system characterized by comprising:
the data interface module is used for acquiring vehicle-mounted data returned by at least one vehicle-mounted system;
the message queue module is connected with the data interface module and used for caching the vehicle-mounted data by using a message queue;
And the data distribution module is connected with the message queue module and used for acquiring at least part of vehicle-mounted data from the front end of the message queue and distributing the vehicle-mounted data to the corresponding vehicle management platform according to the type of the at least part of vehicle-mounted data.
13. The distribution device of the vehicle-mounted data is characterized by comprising a processor and a memory coupled with the processor; wherein the memory is adapted to store a computer program and the processor is adapted to execute the computer program to implement the method according to any of claims 1-11.
14. A computer-readable storage medium, characterized in that the computer-readable storage medium is used to store a computer program which, when being executed by a processor, is used to carry out the method according to any one of claims 1-11.
CN202210247970.6A 2022-03-14 2022-03-14 In-vehicle data distribution method, system, device and readable storage medium Pending CN114679417A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210247970.6A CN114679417A (en) 2022-03-14 2022-03-14 In-vehicle data distribution method, system, device and readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210247970.6A CN114679417A (en) 2022-03-14 2022-03-14 In-vehicle data distribution method, system, device and readable storage medium

Publications (1)

Publication Number Publication Date
CN114679417A true CN114679417A (en) 2022-06-28

Family

ID=82074353

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210247970.6A Pending CN114679417A (en) 2022-03-14 2022-03-14 In-vehicle data distribution method, system, device and readable storage medium

Country Status (1)

Country Link
CN (1) CN114679417A (en)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110288107A (en) * 2019-06-04 2019-09-27 北京汽车股份有限公司 The method and system of more new trip, car-mounted terminal, mobile terminal and cloud platform
CN111324815A (en) * 2020-03-05 2020-06-23 奇瑞汽车股份有限公司 Automobile information processing method and device and storage medium
CN111723139A (en) * 2020-06-15 2020-09-29 北京首汽智行科技有限公司 Data reporting method
CN111740953A (en) * 2020-05-13 2020-10-02 南斗六星系统集成有限公司 Data access forwarding method and system for vehicle supervision platform
CN112199210A (en) * 2020-09-21 2021-01-08 中国建设银行股份有限公司 Data processing method and device based on Internet of things, computer equipment and medium

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110288107A (en) * 2019-06-04 2019-09-27 北京汽车股份有限公司 The method and system of more new trip, car-mounted terminal, mobile terminal and cloud platform
CN111324815A (en) * 2020-03-05 2020-06-23 奇瑞汽车股份有限公司 Automobile information processing method and device and storage medium
CN111740953A (en) * 2020-05-13 2020-10-02 南斗六星系统集成有限公司 Data access forwarding method and system for vehicle supervision platform
CN111723139A (en) * 2020-06-15 2020-09-29 北京首汽智行科技有限公司 Data reporting method
CN112199210A (en) * 2020-09-21 2021-01-08 中国建设银行股份有限公司 Data processing method and device based on Internet of things, computer equipment and medium

Similar Documents

Publication Publication Date Title
US9621441B2 (en) Methods and computer program products for analysis of network traffic by port level and/or protocol level filtering in a network device
CN108335075B (en) A processing system and method for logistics big data
CN110858850B (en) Comprehensive network management method, device and system for rail transit system
US9722900B2 (en) Methods and computer program products for transaction analysis of network traffic in a network device
US8645532B2 (en) Methods and computer program products for monitoring the contents of network traffic in a network device
CN111970195B (en) Data transmission method and streaming data transmission system
CA3067387A1 (en) Systems and methods for collecting, monitoring, and analyzing vehicle data from a plurality of vehicles using edge computing
CN113190524A (en) Industrial big data acquisition method and system
CN113660231A (en) Message parsing method, device, equipment and storage medium
CN115981956A (en) SPDK service process monitoring method, device, equipment, storage medium and program product
CN110035096A (en) A kind of vehicle early warning processing system and early warning system based on Storm
CN203825819U (en) Real-time remote vehicle safety monitoring device, server, and system
CN114679417A (en) In-vehicle data distribution method, system, device and readable storage medium
CN115883330B (en) Alarm event processing method, system, equipment and storage medium
CN114268927A (en) A vehicle communication method, device, equipment and storage medium
CN115914346A (en) Internet of things message processing method, device, electronic device and storage medium
CN117082102A (en) Vehicle data processing methods, devices and equipment based on service-oriented architecture
CN110032131A (en) Electric vehicle state monitoring processing system and monitoring system based on Storm
CN103944777B (en) Distributed monitoring system information processing method and system
CN117370053A (en) Information system service operation-oriented panoramic monitoring method and system
CN116800647A (en) Link tracking method and device, electronic equipment and media
CN115550112A (en) Power edge intelligent gateway and power edge data processing method
CN113873033A (en) A fault-tolerant intelligent edge computing gateway platform
CN115118754B (en) Remote monitoring and testing system and monitoring and testing method for electric vehicles
CN116471298B (en) Data acquisition method, data acquisition system based on distributed architecture and vehicle

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
RJ01 Rejection of invention patent application after publication

Application publication date: 20220628

RJ01 Rejection of invention patent application after publication