技术领域Technical Field
本申请涉及车辆检测技术领域,特别是涉及一种车辆日志上传方法、装置、车端控制设备、存储介质和计算机程序产品。The present application relates to the field of vehicle detection technology, and in particular to a vehicle log uploading method, device, vehicle-side control equipment, storage medium and computer program product.
背景技术Background technique
目前,车辆在进行故障诊断时一般通过线下的方式导出车辆日志,并基于车辆日志得到诊断结果,但是通过线下导出日志的方式会大量增加运维成本,降低处理效率。基于此,相关技术中可以在云端获取车辆日志,并基于车辆日志进行远程诊断。然而整车系统包含大量的零部件,且每个零部件都可以产生车辆日志,现有的整车系统不能将所有零部件的车辆日志完整地上传至云端,使得云端获取的车辆日志不全,无法准确地定位车辆的故障原因。At present, when diagnosing a fault, the vehicle generally exports the vehicle log offline and obtains the diagnosis result based on the vehicle log. However, exporting the log offline will greatly increase the operation and maintenance cost and reduce the processing efficiency. Based on this, the related technology can obtain the vehicle log in the cloud and perform remote diagnosis based on the vehicle log. However, the whole vehicle system contains a large number of parts, and each part can generate a vehicle log. The existing whole vehicle system cannot upload the vehicle logs of all parts to the cloud completely, so the vehicle logs obtained in the cloud are incomplete and the cause of the vehicle failure cannot be accurately located.
发明内容Summary of the invention
基于此,有必要针对上述技术问题,提供一种能够完整地传输车辆日志的车辆日志上传方法、装置、车端控制设备、计算机可读存储介质和计算机程序产品。Based on this, it is necessary to provide a vehicle log uploading method, device, vehicle-side control device, computer-readable storage medium and computer program product that can completely transmit the vehicle log in order to solve the above technical problems.
第一方面,本申请提供了一种车辆日志上传方法。所述方法包括:In a first aspect, the present application provides a method for uploading a vehicle log. The method comprises:
获取日志上传任务;所述日志上传任务为云端下发的请求上传任务,和/或所述车端云服务控制器按预设时间周期触发的上传任务;所述日志上传任务包含待上传的日志对应的筛选条件;所述筛选条件至少包含零部件类型和时间范围;Obtain a log upload task; the log upload task is a request upload task issued by the cloud, and/or an upload task triggered by the vehicle-side cloud service controller according to a preset time period; the log upload task includes a screening condition corresponding to the log to be uploaded; the screening condition at least includes a component type and a time range;
从所述车辆包含的多个零部件中,确定与所述筛选条件中的零部件类型相同的目标零部件,并从各所述目标零部件对应的日志目录中获取匹配所述时间范围的至少一个目标日志;所述目标零部件包含当前零部件和/或非当前零部件,所述当前零部件为所述车端云服务控制器所属的零部件;Determine, from the multiple parts included in the vehicle, a target part of the same type as the part in the screening condition, and obtain at least one target log matching the time range from the log directory corresponding to each target part; the target part includes current parts and/or non-current parts, and the current parts are parts to which the vehicle-side cloud service controller belongs;
将至少一个所述目标日志上传至所述云端。Upload at least one of the target logs to the cloud.
在其中一个实施例中,筛选条件还包括日志类型,所述从各所述目标零部件对应的日志目录中获取匹配所述时间范围的至少一个目标日志,包括:In one embodiment, the screening condition further includes log type, and obtaining at least one target log matching the time range from the log directory corresponding to each target component includes:
确定各所述目标零部件的日志目录;所述当前零部件的日志目录为本地的日志目录;所述非当前零部件的日志目录基于统一资源定位符确定;Determine the log directory of each target component; the log directory of the current component is a local log directory; the log directory of the non-current component is determined based on the uniform resource locator;
从所述日志目录包含的日志中,筛选匹配所述日志类型,且所述日志的日志创建时间、日志最后修改时间中至少一个匹配所述时间范围的日志,确定为目标日志。From the logs contained in the log directory, logs matching the log type and having at least one of a log creation time and a log last modification time matching the time range are screened and determined as target logs.
在其中一个实施例中,所述从所述日志目录包含的日志中,筛选匹配所述日志类型,且所述日志的日志创建时间、日志最后修改时间中至少一个匹配所述时间范围的日志之前,还包括:In one of the embodiments, the step of screening the logs contained in the log directory to find the logs that match the log type and whose log creation time and log last modification time match the time range also includes:
针对所述日志目录包含的各日志,读取各日志对应的文件名称,并基于预设命名规则对所述文件名称进行解析,得到各所述日志的日志创建时间;For each log contained in the log directory, read the file name corresponding to each log, and parse the file name based on a preset naming rule to obtain the log creation time of each log;
读取各所述日志对应的文件属性,基于所述文件属性得到各所述日志的日志类型和日志最后修改时间。The file attributes corresponding to each of the logs are read, and the log type and the last modification time of each of the logs are obtained based on the file attributes.
在其中一个实施例中,所述从所述日志目录包含的日志中,筛选匹配所述日志类型,且所述日志的日志创建时间、日志最后修改时间中至少一个匹配所述时间范围的日志,确定为目标日志之后,还包括:In one of the embodiments, after selecting the logs in the log directory that match the log type and at least one of the log creation time and the log last modification time that matches the time range and determining the logs as target logs, the method further includes:
若所述目标零部件为非当前零部件,下载所述目标零部件对应的目标日志到本地,并对下载的所述目标日志进行压缩打包,得到目标压缩包;或者,下载所述目标零部件的目标压缩包到本地,所述目标压缩包为所述目标零部件基于其对应的目标日志进行压缩而得到;If the target component is not a current component, download the target log corresponding to the target component to the local computer, and compress and package the downloaded target log to obtain a target compressed package; or download the target compressed package of the target component to the local computer, wherein the target compressed package is obtained by compressing the target component based on its corresponding target log;
若所述目标零部件为当前零部件,对所述目标零部件的目标日志进行压缩打包,得到目标压缩包;If the target component is the current component, compress and package the target log of the target component to obtain a target compressed package;
存储所述目标压缩包至所述本地的预设目录;Storing the target compressed package in the local preset directory;
所述将至少一个所述目标日志上传至所述云端,包括:The uploading at least one of the target logs to the cloud comprises:
将所述预设目录中的至少一个所述目标压缩包上传至所述云端。Upload at least one of the target compressed packages in the preset directory to the cloud.
在其中一个实施例中,所述存储所述目标压缩包至所述本地的预设目录之后,还包括:In one embodiment, after storing the target compressed package in the local preset directory, the method further includes:
删除下载至所述本地中的所述目标零部件的目标日志;Deleting the target log of the target component downloaded to the local device;
所述将所述预设目录中的至少一个所述目标压缩包上传至所述云端之后,还包括:After uploading at least one of the target compressed packages in the preset directory to the cloud, the method further includes:
删除所述本地的预设目录中已上传至所述云端的目标压缩包。Delete the target compressed package uploaded to the cloud in the local preset directory.
在其中一个实施例中,所述将至少一个所述目标日志上传至所述云端,包括:In one embodiment, uploading at least one of the target logs to the cloud comprises:
将各所述目标零部件对应的目标日志传输至上传队列;Transmitting the target log corresponding to each target component to an upload queue;
将所述上传队列中的所述目标日志异步上传至所述云端。Asynchronously uploading the target log in the upload queue to the cloud.
在其中一个实施例中,在所述日志上传任务为云端下发的请求上传任务的情况下,所述获取日志上传任务,包括:In one embodiment, when the log upload task is a request upload task issued by the cloud, obtaining the log upload task includes:
接收云端下发的请求上传任务,将所述请求上传任务发送至任务处理队列;Receive the upload request task sent by the cloud, and send the upload request task to the task processing queue;
从所述任务处理队列异步获取所述请求上传任务,得到所述日志上传任务。The request upload task is asynchronously acquired from the task processing queue to obtain the log upload task.
第二方面,本申请还提供了一种车辆日志上传装置。所述装置包括:In a second aspect, the present application also provides a vehicle log upload device. The device comprises:
任务获取模块,用于获取日志上传任务;所述日志上传任务为云端下发的请求上传任务,和/或所述车端云服务控制器按预设时间周期触发的上传任务;所述日志上传任务包含待上传的日志对应的筛选条件;所述筛选条件至少包含零部件类型和时间范围;A task acquisition module is used to acquire a log upload task; the log upload task is a request upload task issued by the cloud, and/or an upload task triggered by the vehicle-side cloud service controller according to a preset time period; the log upload task includes a screening condition corresponding to the log to be uploaded; the screening condition at least includes a component type and a time range;
日志获取模块,用于从所述车辆包含的多个零部件中,确定与所述筛选条件中的零部件类型相同的目标零部件,并从各所述目标零部件对应的日志目录中获取匹配所述时间范围的至少一个目标日志;所述目标零部件包含当前零部件和/或非当前零部件,所述当前零部件为所述车端云服务控制器所属的零部件;A log acquisition module, configured to determine, from among a plurality of components included in the vehicle, a target component of the same type as the component in the screening condition, and to acquire at least one target log matching the time range from a log directory corresponding to each of the target components; the target component includes a current component and/or a non-current component, and the current component is a component to which the vehicle-side cloud service controller belongs;
日志上传模块,用于将至少一个所述目标日志上传至所述云端。The log uploading module is used to upload at least one of the target logs to the cloud.
第三方面,本申请还提供了一种车端控制设备。所述车端控制设备包括存储器和处理器,所述存储器存储有计算机程序,所述处理器执行所述计算机程序时实现如第一方面所述方法的步骤。In a third aspect, the present application further provides a vehicle-side control device, wherein the vehicle-side control device comprises a memory and a processor, wherein the memory stores a computer program, and when the processor executes the computer program, the steps of the method described in the first aspect are implemented.
第四方面,本申请还提供了一种计算机可读存储介质。所述计算机可读存储介质,其上存储有计算机程序,所述计算机程序被处理器执行时实现如第一方面所述方法的步骤。In a fourth aspect, the present application further provides a computer-readable storage medium having a computer program stored thereon, and when the computer program is executed by a processor, the steps of the method described in the first aspect are implemented.
第五方面,本申请还提供了一种计算机程序产品。所述计算机程序产品,包括计算机程序,该计算机程序被处理器执行时实现如第一方面所述方法的步骤。In a fifth aspect, the present application further provides a computer program product, wherein the computer program product comprises a computer program, and when the computer program is executed by a processor, the steps of the method described in the first aspect are implemented.
上述车辆日志上传方法、装置、车端控制设备、存储介质和计算机程序产品,通过获取云端下发的请求上传任务,或者车端云服务控制器按预设时间周期主动触发的上传任务,均能够启动车端的日志上传任务,并依据上传任务中的筛选条件,从车辆包含的多个零部件(可以是全部零部件)中,确定符合零部件类型的目标零部件。之后,车端云服务控制器继续依据筛选条件中的时间范围,从各目标零部件的日志中确定符合时间范围的目标日志,最后将目标日志上传至云端。其中,目标零部件可以是车端云服务控制器所属的当前零部件,也可以是非车端云服务控制器所属的非当前零部件,当前零部件和非当前零部件可以覆盖整个车端内的全部零部件,基于此,车端云服务控制器可以被动和/或主动地启动车端的日志上传任务,且可以从车辆包含的全部零部件的日志中,筛选得到符合筛选条件的日志,从而能够提升车端日志上传的完整性。The above-mentioned vehicle log upload method, device, vehicle-side control device, storage medium and computer program product can start the vehicle-side log upload task by obtaining the upload request task issued by the cloud, or the upload task actively triggered by the vehicle-side cloud service controller according to the preset time period, and determine the target component that meets the component type from the multiple components (which can be all components) contained in the vehicle according to the screening conditions in the upload task. After that, the vehicle-side cloud service controller continues to determine the target log that meets the time range from the logs of each target component according to the time range in the screening conditions, and finally uploads the target log to the cloud. Among them, the target component can be the current component belonging to the vehicle-side cloud service controller, or it can be a non-current component that does not belong to the vehicle-side cloud service controller. The current component and the non-current component can cover all components in the entire vehicle. Based on this, the vehicle-side cloud service controller can passively and/or actively start the vehicle-side log upload task, and can filter out the logs that meet the screening conditions from the logs of all components contained in the vehicle, thereby improving the integrity of the vehicle-side log upload.
附图说明BRIEF DESCRIPTION OF THE DRAWINGS
为了更清楚地说明本申请实施例或相关技术中的技术方案,下面将对实施例或相关技术描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本申请的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。In order to more clearly illustrate the technical solutions in the embodiments of the present application or the related technologies, the drawings required for use in the embodiments or the related technical descriptions are briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
图1为一个实施例中车辆日志上传方法的应用环境图;FIG1 is an application environment diagram of a vehicle log upload method according to an embodiment;
图2为一个实施例中车辆日志上传方法的流程示意图;FIG2 is a schematic diagram of a process of uploading a vehicle log in one embodiment;
图3为一个实施例中获取目标日志步骤的流程示意图;FIG3 is a schematic diagram of a process of obtaining a target log in one embodiment;
图4为一个实施例中获取日志详细信息的流程示意图;FIG4 is a schematic diagram of a process for obtaining detailed log information in one embodiment;
图5为一个实施例中车辆日志上传系统的框架图;FIG5 is a framework diagram of a vehicle log upload system in one embodiment;
图6为另一个实施例中车辆日志上传方法的流程示意图;FIG6 is a flow chart of a method for uploading a vehicle log in another embodiment;
图7为又一个实施例中车辆日志上传方法的流程示意图;FIG7 is a flow chart of a method for uploading a vehicle log in another embodiment;
图8为一个实施例中车辆日志上传装置的结构框图;FIG8 is a structural block diagram of a vehicle log upload device in one embodiment;
图9为一个实施例中车端控制设备的内部结构图。FIG. 9 is a diagram showing the internal structure of a vehicle-side control device in one embodiment.
具体实施方式Detailed ways
为了使本申请的目的、技术方案及优点更加清楚明白,以下结合附图及实施例,对本申请进行进一步详细说明。应当理解,此处描述的具体实施例仅仅用以解释本申请,并不用于限定本申请。In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.
本申请实施例提供的车辆日志上传方法,可以应用于如图1所示的应用环境中。其中,车端与云端104存在通信连接,车端中的车端云服务控制器103通过通信网络与云端104进行通信。车端包含多个零部件102,车端云服务控制器103可以存在于某个零部件102中。各零部件102运行时可生成对应的日志,各零部件之间可以通过车载网关进行通信。车端云服务控制器103可以从各个零部件中获取所需的日志,进而将获取到的日志上传至云端104。The vehicle log upload method provided in the embodiment of the present application can be applied to the application environment as shown in Figure 1. There is a communication connection between the vehicle side and the cloud 104, and the vehicle-side cloud service controller 103 in the vehicle side communicates with the cloud 104 through a communication network. The vehicle side includes multiple components 102, and the vehicle-side cloud service controller 103 can exist in a certain component 102. Each component 102 can generate a corresponding log when it is running, and the components can communicate with each other through the vehicle gateway. The vehicle-side cloud service controller 103 can obtain the required logs from each component, and then upload the obtained logs to the cloud 104.
其中,车端云服务控制器103可以但不限于是各种零部件内置的用于连接外部网络的控制器;零部件102可以但不限于是电子控制器、电动机、机械传动装置、车轮、电源、能量管理系统、充电机、动力转向系统、空调器和导航系统等。云端104可以用独立的服务器或者是多个服务器组成的服务器集群来实现。The vehicle-side cloud service controller 103 may be, but is not limited to, a controller built into various components for connecting to an external network; the components 102 may be, but are not limited to, electronic controllers, motors, mechanical transmission devices, wheels, power supplies, energy management systems, chargers, power steering systems, air conditioners, and navigation systems, etc. The cloud 104 may be implemented using an independent server or a server cluster consisting of multiple servers.
在一个示例性的实施例中,如图2所示,提供了一种车辆日志上传方法,以该方法应用于图1中的车端云服务控制器103为例进行说明,包括以下步骤S202至步骤S206。其中:In an exemplary embodiment, as shown in FIG2 , a vehicle log upload method is provided, which is described by taking the method applied to the vehicle-side cloud service controller 103 in FIG1 as an example, and includes the following steps S202 to S206 . Among them:
步骤S202,获取日志上传任务。Step S202, obtaining a log upload task.
其中,日志上传任务可以为云端向车端云服务控制器下发的请求上传任务,和/或车端云服务控制器按预设时间周期触发的上传任务;按预设时间周期主动触发的上传任务可以通过车端云服务控制器进行开启或关闭;预设时间周期可以根据实际需要设置。日志上传任务中包含待上传的日志对应的筛选条件;筛选条件至少包含零部件类型和时间范围。日志上传任务中还可以包含以下属性:任务标识符、零部件类型、日志类型、日志创建时间、日志最后修改时间等,其中零部件类型、日志类型、日志创建时间和日志最后修改时间均可以作为日志上传任务对应的筛选条件。此外,还可以基于日志上传任务中携带的日志创建时间和日志最后修改时间之间确定一个时间范围,将该时间范围作为对应的筛选条件。Among them, the log upload task can be a request upload task sent by the cloud to the vehicle-side cloud service controller, and/or an upload task triggered by the vehicle-side cloud service controller according to a preset time period; the upload task actively triggered according to the preset time period can be turned on or off by the vehicle-side cloud service controller; the preset time period can be set according to actual needs. The log upload task contains filtering conditions corresponding to the logs to be uploaded; the filtering conditions at least include component type and time range. The log upload task can also include the following attributes: task identifier, component type, log type, log creation time, log last modification time, etc., among which component type, log type, log creation time and log last modification time can all be used as filtering conditions corresponding to the log upload task. In addition, a time range can be determined based on the log creation time and log last modification time carried in the log upload task, and the time range can be used as the corresponding filtering condition.
具体地,车端云服务控制器可以接收云端发起的请求上传任务,请求上传任务中包含了所需日志的筛选条件。车端云服务控制器也可以根据当前时间与上一次发起上传任务的时间对应的时间间隔,自动启动日志上传任务。无论是云端发起的请求上传任务,还是车端云服务器根据预设时间周期启动的上传任务,均可以预先自定义所需上传的日志的筛选条件。Specifically, the vehicle-side cloud service controller can receive a request upload task initiated by the cloud, which includes the filtering conditions for the required logs. The vehicle-side cloud service controller can also automatically start the log upload task based on the time interval between the current time and the time when the upload task was last initiated. Whether it is a request upload task initiated by the cloud or an upload task initiated by the vehicle-side cloud server according to a preset time period, the filtering conditions for the logs to be uploaded can be customized in advance.
在一个示例中,车端云服务控制器接收云端发送的请求上传任务,请求上传任务可以包含任务编号:00001;零部件类型:发动机对应的零部件;日志类型:程序日志;日志创建时间:1672502400;日志最后修改时间:1711521237,其中,作为筛选条件之一的时间范围可以是日志创建时间1672502400和日志最后修改时间1711521237之间的范围。日志创建时间和日志最后修改时间可以通过世界标准时间UTC(Coordinated Universal Time)时间戳进行表示。In one example, the vehicle-side cloud service controller receives a request upload task sent by the cloud, and the request upload task may include a task number: 00001; component type: component corresponding to the engine; log type: program log; log creation time: 1672502400; log last modification time: 1711521237, wherein the time range used as one of the filtering conditions may be the range between the log creation time 1672502400 and the log last modification time 1711521237. The log creation time and the log last modification time may be represented by a Coordinated Universal Time (UTC) timestamp.
可选地,车端云服务控制器可以接收云端发送的日志上传请求,日志上传请求中可以包含所需日志的筛选条件;车端云服务控制器将日志上传请求放入相应的任务队列,基于任务队列启动日志上传任务。Optionally, the vehicle-side cloud service controller can receive a log upload request sent from the cloud, which can include screening conditions for the required logs; the vehicle-side cloud service controller puts the log upload request into a corresponding task queue, and starts the log upload task based on the task queue.
步骤S204,从车辆包含的多个零部件中,确定与筛选条件中的零部件类型相同的目标零部件,并从各目标零部件对应的日志目录中获取匹配时间范围的至少一个目标日志。Step S204: determining target components of the same type as the components in the screening condition from the multiple components included in the vehicle, and acquiring at least one target log in a matching time range from the log directory corresponding to each target component.
其中,目标零部件包含当前零部件和/或非当前零部件,当前零部件为车端云服务控制器所属的零部件,当前零部件可以是与车端云服务控制器存在物理连接关系或通信连接关系或逻辑对应关系,当前零部件也可以是为车端云服务控制器提供算力和存储空间的零部件,本申请不作具体限制。非当前零部件为与车端云服务控制器不存在所属关系的零部件。日志目录中可以存储零部件所产生的日志。Among them, the target components include current components and/or non-current components. The current components are components belonging to the vehicle-side cloud service controller. The current components can have a physical connection relationship, a communication connection relationship, or a logical correspondence relationship with the vehicle-side cloud service controller. The current components can also be components that provide computing power and storage space for the vehicle-side cloud service controller. This application does not impose specific restrictions. Non-current components are components that do not have an ownership relationship with the vehicle-side cloud service controller. The log directory can store logs generated by components.
具体地,车端云服务控制器可以对车辆包含的各零部件进行遍历,确定每个零部件的零部件类型是否与筛选条件中的零部件类型相同。若零部件的零部件类型与筛选条件中的零部件类型相同,则确定该零部件为目标零部件。车端云服务控制器可以通过遍历得到车辆中符合筛选条件的全部目标零部件。基于此,针对于每个目标零部件,车端云服务控制器可以在目标零部件的日志目录中确定各日志的日志创建时间和日志最后修改时间,若日志的日志创建时间和日志最后修改时间与筛选条件中的时间范围相匹配,则确定该日志是目标日志,从而得到目标零部件对应的至少一个目标日志。在车端云服务控制器完成各目标零部件的遍历后,能够得到车辆需要上传云端的目标日志。Specifically, the vehicle-side cloud service controller can traverse the various parts contained in the vehicle to determine whether the part type of each part is the same as the part type in the filtering conditions. If the part type of the part is the same as the part type in the filtering conditions, the part is determined to be a target part. The vehicle-side cloud service controller can obtain all target parts in the vehicle that meet the filtering conditions by traversing. Based on this, for each target part, the vehicle-side cloud service controller can determine the log creation time and the last log modification time of each log in the log directory of the target part. If the log creation time and the last log modification time of the log match the time range in the filtering conditions, the log is determined to be a target log, thereby obtaining at least one target log corresponding to the target part. After the vehicle-side cloud service controller completes the traversal of each target part, it can obtain the target log that the vehicle needs to upload to the cloud.
此外,目标零部件可以为当前零部件和/或非当前零部件。在目标零部件为当前零部件的情况下,车端云服务控制器可以直接读取当前零部件的日志目录,并获取日志目录中匹配时间范围的目标日志。在目标零部件为非当前零部件的情况下,车端云服务控制器可以通过车载网关获取非当前零部件包含的目标日志。In addition, the target component can be a current component and/or a non-current component. When the target component is a current component, the vehicle-side cloud service controller can directly read the log directory of the current component and obtain the target log matching the time range in the log directory. When the target component is a non-current component, the vehicle-side cloud service controller can obtain the target log contained in the non-current component through the vehicle gateway.
步骤S206,将至少一个目标日志上传至云端。Step S206: Upload at least one target log to the cloud.
其中,车端云服务控制器在确定各目标零部件对应的目标日志之后,可以通过互联网,将目标日志逐一上传至云端。作为一种示例,车端云服务控制器可以通过车载网关从多个目标零部件的日志目录中获取目标日志,并通过MQTTS(MQTT over TLS)或HTTPS(Hypertext Transfer Protocol Secure)将目标日志发送至云端。After determining the target log corresponding to each target component, the vehicle-side cloud service controller can upload the target logs one by one to the cloud through the Internet. As an example, the vehicle-side cloud service controller can obtain the target logs from the log directories of multiple target components through the vehicle gateway, and send the target logs to the cloud through MQTTS (MQTT over TLS) or HTTPS (Hypertext Transfer Protocol Secure).
可选地,车端云服务控制器与云端的通信过程,以及车端云服务控制器将目标日志上传至云端的通信过程,均采用安全套接字层SSL(Secure Sockets Layer)双向认证。Optionally, the communication process between the vehicle-side cloud service controller and the cloud, and the communication process in which the vehicle-side cloud service controller uploads the target log to the cloud, both use Secure Sockets Layer (SSL) two-way authentication.
上述车辆日志上传方法中,通过获取云端下发的请求上传任务,或者车端云服务控制器按预设时间周期主动触发的上传任务,均能够启动车端的日志上传任务,并依据上传任务中的筛选条件,从车辆包含的多个零部件(可以是全部零部件)中,确定符合零部件类型的目标零部件。之后,车端云服务控制器继续依据筛选条件中的时间范围,从各目标零部件的日志中确定符合时间范围的目标日志,最后将目标日志上传至云端。其中,目标零部件可以是车端云服务控制器所属的当前零部件,也可以是非车端云服务控制器所属的非当前零部件,当前零部件和非当前零部件可以覆盖整个车端内的全部零部件,基于此,车端云服务控制器可以被动和/或主动地启动车端的日志上传任务,且可以从车辆包含的全部零部件的日志中,筛选得到符合筛选条件的日志,从而能够提升车端日志上传的完整性。In the above vehicle log upload method, the log upload task of the vehicle side can be started by obtaining the upload request task issued by the cloud, or the upload task actively triggered by the vehicle-side cloud service controller according to the preset time period, and the target component that meets the component type is determined from the multiple components (which can be all components) contained in the vehicle according to the screening conditions in the upload task. After that, the vehicle-side cloud service controller continues to determine the target log that meets the time range from the logs of each target component according to the time range in the screening conditions, and finally uploads the target log to the cloud. Among them, the target component can be the current component belonging to the vehicle-side cloud service controller, or it can be a non-current component that does not belong to the vehicle-side cloud service controller. The current component and the non-current component can cover all components in the entire vehicle side. Based on this, the vehicle-side cloud service controller can passively and/or actively start the log upload task of the vehicle side, and can filter out the logs that meet the screening conditions from the logs of all components contained in the vehicle, thereby improving the integrity of the vehicle-side log upload.
在一个示例性的实施例中,如图3所示,筛选条件还包括日志类型,步骤“从各目标零部件对应的日志目录中获取匹配时间范围的至少一个目标日志”的具体实现过程,包括步骤S302至步骤S304。其中:In an exemplary embodiment, as shown in FIG3 , the screening condition further includes the log type, and the specific implementation process of the step of “obtaining at least one target log matching the time range from the log directory corresponding to each target component” includes steps S302 to S304. Among them:
步骤S302,确定各目标零部件的日志目录。Step S302, determining the log directory of each target component.
其中,筛选条件还包括日志类型,当前零部件的日志目录为本地的日志目录;非当前零部件的日志目录基于统一资源定位符确定。The filter condition also includes the log type. The log directory of the current component is a local log directory; the log directory of a non-current component is determined based on a uniform resource locator.
具体地,若目标零部件为当前零部件,则确定本地的日志目录为目标零部件的日志目录。若目标零部件的非当前零部件,则获取目标零部件对应的统一资源定位符URL(uniform resource location),车端云服务控制器可以向目标零部件对应的URL发起HTTP请求,进而访问目标零部件对应的日志目录。Specifically, if the target component is the current component, the local log directory is determined to be the log directory of the target component. If the target component is not the current component, the uniform resource locator URL (uniform resource location) corresponding to the target component is obtained, and the vehicle-side cloud service controller can initiate an HTTP request to the URL corresponding to the target component, and then access the log directory corresponding to the target component.
在一个示例中,车端云服务控制器向目标零部件对应的URL发送HTTP请求,HTTP请求可以包含所请求日志对应的筛选条件;HTTP请求的请求数据可以采用json格式。In one example, the vehicle-side cloud service controller sends an HTTP request to the URL corresponding to the target component, and the HTTP request may include filtering conditions corresponding to the requested log; the request data of the HTTP request may be in json format.
可选地,目标零部件中可以包含多种日志类型的日志。每种日志类型的日志可以存储在该日志类型对应的日志目录中。车端云服务控制器可以根据筛选条件中的日志类型,确定目标零部件的该日志类型对应的日志目录。Optionally, the target component may contain logs of multiple log types. Logs of each log type may be stored in a log directory corresponding to the log type. The vehicle-side cloud service controller may determine the log directory corresponding to the log type of the target component according to the log type in the filtering condition.
步骤S304,从日志目录包含的日志中,筛选匹配日志类型,且日志的日志创建时间、日志最后修改时间中至少一个匹配时间范围的日志,确定为目标日志。Step S304: Filter the logs in the log directory to find the logs that match the log type and have at least one of the log creation time and the log last modification time that matches the time range, and determine them as target logs.
具体地,车端云服务控制器从日志目录中获取全部的日志。对于每一个日志,获取日志的日志类型、日志的日志创建时间,以及日志的日志最后修改时间。首先,确定日志的日志类型是否与筛选条件中的日志类型相同,若日志的日志类型和筛选条件中的日志类型相同,则进行时间范围的匹配。时间范围的匹配具体如下:车端云服务器将日志的日志创建时间与筛选条件中的时间范围匹配,若日志创建时间在时间范围内,则日志匹配成功,确定日志为目标日志;若日志创建时间不在时间范围内,车端云服务器将该日志的日志最后修改时间与筛选条件中的时间范围匹配,若日志最后修改时间在时间范围内,则日志匹配成功,确定日志为目标日志;相应的,若日志创建时间不在时间范围内,且日志最后修改时间也不在时间范围内,则日志匹配失败,继续遍历日志目录中的下一个日志。Specifically, the vehicle-side cloud service controller obtains all logs from the log directory. For each log, obtain the log type, log creation time, and log last modification time of the log. First, determine whether the log type of the log is the same as the log type in the filtering condition. If the log type of the log is the same as the log type in the filtering condition, match the time range. The matching of the time range is as follows: the vehicle-side cloud server matches the log creation time of the log with the time range in the filtering condition. If the log creation time is within the time range, the log is successfully matched and the log is determined to be the target log; if the log creation time is not within the time range, the vehicle-side cloud server matches the log last modification time of the log with the time range in the filtering condition. If the log last modification time is within the time range, the log is successfully matched and the log is determined to be the target log; correspondingly, if the log creation time is not within the time range, and the log last modification time is also not within the time range, the log matching fails, and the next log in the log directory is traversed.
在一个示例中,日志目录中的日志对应的日志创建时间为1700000000,日志最后修改时间为1800000000。而筛选条件中的时间范围为1800000010至1900000000,则日志的日志创建时间以及日志最后修改时间均不在时间范围内,则确定日志匹配失败。若筛选条件中的时间范围为1700002000至181000000,则日志的日志最后修改时间在时间范围内,则确定日志匹配成功,确定为目标日志。In one example, the log creation time corresponding to the log in the log directory is 1700000000, and the log last modification time is 1800000000. If the time range in the screening condition is 1800000010 to 1900000000, the log creation time and the log last modification time of the log are not within the time range, and the log matching fails. If the time range in the screening condition is 1700002000 to 181000000, the log last modification time of the log is within the time range, and the log matching is successful and is determined to be the target log.
本实施例中,通过确定当前零部件和非当前零部件的日志目录,从而可获取目标零部件包含的全部日志,并根据筛选条件中的日志类型、日志创建时间、日志最后修改时间等属性,确定日志目录中匹配筛选条件的目标日志,能够提升获取整车零部件的日志目录的完整率,此外还可以依据筛选条件,准确地得到所需的目标日志。In this embodiment, by determining the log directories of the current components and non-current components, all logs contained in the target components can be obtained, and based on the log type, log creation time, log last modification time and other attributes in the filtering conditions, the target log in the log directory that matches the filtering conditions is determined, which can improve the completeness rate of obtaining the log directory of the vehicle parts. In addition, the required target log can be accurately obtained based on the filtering conditions.
在一个示例性的实施例中,如图4所示,步骤“从日志目录包含的日志中,筛选匹配日志类型,且日志的日志创建时间、日志最后修改时间中至少一个匹配时间范围的日志”之前,方法还包括步骤S402至步骤S404。其中:In an exemplary embodiment, as shown in FIG4 , before the step of “selecting the logs in the log directory for the log type that matches the log type, and for which at least one of the log creation time and the log last modification time matches the time range”, the method further includes steps S402 to S404. Among them:
步骤S402,针对日志目录包含的各日志,读取各日志对应的文件名称,并基于预设命名规则对文件名称进行解析,得到各日志的日志创建时间。Step S402: for each log contained in the log directory, read the file name corresponding to each log, and parse the file name based on a preset naming rule to obtain the log creation time of each log.
其中,预设命名规则为零部件在创建日志时确定文件名称所需使用的命名规则。预设命名规则中包含文件名称的组成结构,组成结构可以包括自定义名称、分隔符、日志创建时间和后缀名。零部件可以将预设命名规则中的各组成结构按照一定顺序排列,生成日志对应的文件名称。The preset naming rule is the naming rule that the components need to use to determine the file name when creating a log. The preset naming rule contains the structure of the file name, which may include a custom name, separator, log creation time, and suffix. The components can arrange the components in the preset naming rule in a certain order to generate the file name corresponding to the log.
在一个示例中,车端各零部件的日志的预设命名规则可以如下:In one example, the preset naming rules for the logs of various vehicle-side components may be as follows:
① 自定义名称可以是“xxxxxxxxxx”的字符串,自定义名称可以是各零部件对应的日志开发者自定义得到的。① The custom name can be a string of "xxxxxxxxxx". The custom name can be customized by the log developer corresponding to each component.
② 分隔符可以是下划线。② The separator can be an underscore.
③ 日志创建时间可以是UCT时间戳,例如1677990630。③ The log creation time can be a UCT timestamp, such as 1677990630.
④ 后缀名可以是“.log”。④ The suffix can be “.log”.
按照预定义的组合顺序,可以得到文件名称为“xxxxxxxxxx_1677990630.log”,也可以为“1677990630_xxxxxxxxxx.log”。According to the predefined combination sequence, the file name can be "xxxxxxxxxx_1677990630.log" or "1677990630_xxxxxxxxxx.log".
基于该预设命名规则,车端各零部件在生成日志时可以按照统一的命名规则命名,将日志创建时间保存在日志名称中,并得到如示例所示的日志名称。Based on the preset naming rule, each component on the vehicle side can be named according to the unified naming rule when generating a log, and the log creation time can be saved in the log name, and a log name as shown in the example can be obtained.
基于上述车端各零部件的日志的预设命名规则,进一步地,车端云服务控制器对日志目录中的各日志进行遍历,读取当前日志的文件名称,并通过预设命名规则对文件名称进行拆解,得到文件名称中包含的日志创建时间。Based on the preset naming rules of the logs of the above-mentioned vehicle-side components, the vehicle-side cloud service controller further traverses each log in the log directory, reads the file name of the current log, and disassembles the file name according to the preset naming rules to obtain the log creation time contained in the file name.
步骤S404,读取各日志对应的文件属性,基于文件属性得到各日志的日志类型和日志最后修改时间。Step S404, reading the file attributes corresponding to each log, and obtaining the log type and the last modification time of each log based on the file attributes.
具体地,车端云服务控制器读取日志的文件属性,从文件属性中获取当前日志的日志类型和日志最后修改时间。日志类型是在创建日志时生成的。日志最后修改时间会随着日志的更新,而实时改变。当车端云服务控制器完成对各日志的遍历后,得到各日志的日志类型和日志最后修改时间。Specifically, the vehicle-side cloud service controller reads the file attributes of the log and obtains the log type and the last modification time of the current log from the file attributes. The log type is generated when the log is created. The last modification time of the log will change in real time as the log is updated. When the vehicle-side cloud service controller completes the traversal of each log, it obtains the log type and the last modification time of each log.
可选地,若文件名称中包含的日志创建时间与筛选条件中的时间范围相匹配,且当前日志的日志类型与筛选条件中的日志类型相匹配,则直接确定当前日志为目标日志。车端云服务控制器无需执行获取日志最后修改时间的步骤。由此可以提升匹配筛选条件的效率,提升确定目标日志的速度。Optionally, if the log creation time contained in the file name matches the time range in the filter condition, and the log type of the current log matches the log type in the filter condition, the current log is directly determined to be the target log. The vehicle-side cloud service controller does not need to perform the step of obtaining the last modification time of the log. This can improve the efficiency of matching the filter condition and the speed of determining the target log.
本实施例中,通过日志的文件名称,以及日志的文件属性,分别获取日志创建时间,以及日志类型和日志最后修改时间,日志创建时间可以直接从名称中获取,提升获取日志创建时间的效率,从而可以快速而准确地筛选出目标日志。In this embodiment, the log creation time, log type and log last modification time are obtained through the file name of the log and the file attributes of the log. The log creation time can be directly obtained from the name, which improves the efficiency of obtaining the log creation time, so that the target log can be quickly and accurately screened out.
在一个示例性的实施例中,步骤“从日志目录包含的日志中,筛选匹配日志类型,且日志的日志创建时间、日志最后修改时间中至少一个匹配时间范围的日志,确定为目标日志”之后,方法还包括:In an exemplary embodiment, after the step of "selecting, from the logs contained in the log directory, a log that matches the log type and has at least one of a log creation time and a log last modification time that matches the time range, and determining the log as the target log", the method further includes:
若目标零部件为非当前零部件,下载目标零部件对应的目标日志到本地,并对下载的目标日志进行压缩打包,得到目标压缩包;或者,下载目标零部件的目标压缩包到本地,目标压缩包为目标零部件基于其对应的目标日志进行压缩而得到。若目标零部件为当前零部件,对目标零部件的目标日志进行压缩打包,得到目标压缩包。存储目标压缩包至本地的预设目录。If the target component is not the current component, download the target log corresponding to the target component to the local computer, and compress and package the downloaded target log to obtain the target compressed package; or, download the target compressed package of the target component to the local computer, and the target compressed package is obtained by compressing the target component based on its corresponding target log. If the target component is the current component, compress and package the target log of the target component to obtain the target compressed package. Store the target compressed package to the local preset directory.
其中,本地为车端云服务控制器所属的当前零部件的存储空间,或者为车端云服务控制器对应的存储空间。本地的预设目录为当前零部件中预设的临时存储目录,或者为车端云服务控制器中预设的临时存储目录。目标压缩包为目标日志压缩打包后的数据,目标压缩包的大小通常小于对应的目标日志的大小。Among them, the local is the storage space of the current component to which the vehicle-side cloud service controller belongs, or the storage space corresponding to the vehicle-side cloud service controller. The local preset directory is the preset temporary storage directory in the current component, or the preset temporary storage directory in the vehicle-side cloud service controller. The target compressed package is the compressed and packaged data of the target log. The size of the target compressed package is usually smaller than the size of the corresponding target log.
具体地,在确定目标零部件的目标日志之后,如果目标零部件是非当前零部件,车端云服务控制器通过HTTP的方式将目标日志下载到本地。车端云服务控制器对应的当前零部件可以对本地的目标日志进行压缩打包,得到目标压缩包。Specifically, after determining the target log of the target component, if the target component is not the current component, the vehicle-side cloud service controller downloads the target log to the local computer via HTTP. The current component corresponding to the vehicle-side cloud service controller can compress and package the local target log to obtain a target compressed package.
或者,如果目标零部件是非当前零部件,且目标零部件存在富余的CPU资源,目标零部件可以对目标日志进行压缩打包,生成目标压缩包。之后,车端云服务控制器可以将生成的目标压缩包通过HTTP的方式下载到本地。Alternatively, if the target component is not a current component and has sufficient CPU resources, the target component can compress and package the target log to generate a target compressed package. After that, the vehicle-side cloud service controller can download the generated target compressed package to the local computer via HTTP.
此外,在确定目标零部件的目标日志之后,如果目标零部件是当前零部件,车端云服务控制器可以将目标零部件对应的目标日志进行压缩打包,得到目标压缩包。In addition, after determining the target log of the target component, if the target component is the current component, the vehicle-side cloud service controller can compress and package the target log corresponding to the target component to obtain a target compressed package.
可选地,若匹配出的目标零部件包含非当前零部件和当前零部件,则各目标零部件可以根据自身的CPU资源情况,选择是否在目标零部件本地完成目标日志的压缩打包。在一个示例中,存在目标零部件A,目标零部件B和目标零部件C,其中目标零部件A的CPU资源负载率为20%,目标零部件B的CPU资源负载率为80%,目标零部件C的CPU资源负载率50%,则目标零部件A和目标零部件B的目标日志可以通过目标零部件A进行压缩打包,而目标零部件C的目标日志可以通过目标零部件C进行压缩打包。Optionally, if the matched target components include non-current components and current components, each target component can choose whether to complete the compression and packaging of the target log locally in the target component according to its own CPU resource situation. In an example, there are target components A, target components B, and target components C, where the CPU resource load rate of target component A is 20%, the CPU resource load rate of target component B is 80%, and the CPU resource load rate of target component C is 50%. Then the target logs of target components A and target component B can be compressed and packaged through target component A, and the target log of target component C can be compressed and packaged through target component C.
在其他实施例中,车端云服务控制器还可以在通信消息中指示各目标零部件是否需对目标日志进行压缩打包。由此通过车端云服务控制器动态控制各目标零部件是否进行目标日志的压缩打包,可以减少目标零部件的决策消耗,提升目标零部件的稳定性。In other embodiments, the vehicle-side cloud service controller can also indicate in the communication message whether each target component needs to compress and package the target log. Thus, by dynamically controlling whether each target component compresses and packages the target log through the vehicle-side cloud service controller, the decision-making consumption of the target component can be reduced and the stability of the target component can be improved.
进一步地,步骤“将至少一个目标日志上传至云端”的具体实现过程,可以包括:将预设目录中的至少一个目标压缩包上传至云端。Furthermore, the specific implementation process of the step of “uploading at least one target log to the cloud” may include: uploading at least one target compressed package in a preset directory to the cloud.
具体地,车端云服务控制器的本地中存储了压缩好的目标压缩包。车端云服务控制器将各目标压缩包按顺序上传至云端。云端在接收目标压缩包后可以进行解压缩,得到所需的目标日志。Specifically, the vehicle-side cloud service controller stores the compressed target compressed packages locally. The vehicle-side cloud service controller uploads each target compressed package to the cloud in sequence. After receiving the target compressed package, the cloud can decompress it to obtain the required target log.
本实施例中,通过确定目标零部件是非当前零部件和/或当前零部件,并采用对应的处理手段对目标零部件中的目标日志进行压缩打包,最终将各类型的目标零部件对应的目标压缩包存储到车端云服务控制器对应的本地中,从而集中将目标压缩包上传至云端,能够平衡非当前零部件的CPU资源使用情况,并且减小所需上传的目标日志的大小,从而提升车端零部件的稳定性,以及上传日志的效率。In this embodiment, by determining whether the target component is a non-current component and/or a current component, and using corresponding processing means to compress and package the target log in the target component, the target compressed package corresponding to each type of target component is finally stored in the local corresponding to the vehicle-side cloud service controller, so that the target compressed package is uploaded to the cloud in a centralized manner, which can balance the CPU resource usage of non-current components and reduce the size of the target log to be uploaded, thereby improving the stability of the vehicle-side components and the efficiency of uploading logs.
在一个示例性的实施例中,步骤“存储目标压缩包至本地的预设目录”之后,方法还包括:删除下载至本地中的目标零部件的目标日志。In an exemplary embodiment, after the step of "storing the target compressed package to a local preset directory", the method further includes: deleting the target log of the target component downloaded to the local.
具体地,车端云服务控制器确定目标压缩包存储至本地的预设目录后,可以删除从非当前零部件中下载的目标日志,即从本地中删除通过HTTP请求得到的目标日志。例如,车端云服务控制器接收到预设目录返回的存储成功的消息,则在本地中将消息对应的目标日志进行删除。Specifically, after the vehicle-side cloud service controller determines that the target compressed package is stored in the local preset directory, it can delete the target log downloaded from the non-current component, that is, delete the target log obtained through the HTTP request from the local. For example, if the vehicle-side cloud service controller receives a storage success message returned by the preset directory, it will delete the target log corresponding to the message locally.
相应地,步骤“将预设目录中的至少一个目标压缩包上传至云端”之后,还包括:删除本地的预设目录中已上传至云端的目标压缩包。Correspondingly, after the step of "uploading at least one target compressed package in the preset directory to the cloud", it also includes: deleting the target compressed package in the local preset directory that has been uploaded to the cloud.
具体地,车端云服务控制器确定预设目录中的目标压缩包已经完全上传至云端后,将预设目录中对应的目标压缩包进行删除。例如,车端云服务控制器接收到云端返回的上传成功的消息,则在预设目录中将消息对应的目标压缩包进行删除。Specifically, after the vehicle-side cloud service controller determines that the target compressed package in the preset directory has been completely uploaded to the cloud, the corresponding target compressed package in the preset directory is deleted. For example, when the vehicle-side cloud service controller receives a message of successful upload returned by the cloud, the target compressed package corresponding to the message is deleted in the preset directory.
本实施例中,通过删除本地的目标日志,以及删除本地的预设目录中的目标压缩包,能够将本地存储空间维持在安全范围内,提升存储空间的稳定性。.In this embodiment, by deleting the local target log and the target compressed package in the local preset directory, the local storage space can be maintained within a safe range and the stability of the storage space can be improved.
在一个示例性的实施例中,步骤“将至少一个目标日志上传至云端”的具体实现过程,包括:In an exemplary embodiment, the specific implementation process of the step of “uploading at least one target log to the cloud” includes:
将各目标零部件对应的目标日志传输至上传队列;将上传队列中的目标日志异步上传至云端。The target log corresponding to each target component is transmitted to the upload queue; the target log in the upload queue is asynchronously uploaded to the cloud.
其中,上传队列用于按照队列顺序将待上传的目标日志顺序向云端上传。异步上传可以理解为通过异步的方式对目标日志进行传输,异步指的是目标日志的上传和获取是同时进行的,即车端云服务控制器向云端上传目标日志的同时还可以继续进行其他操作,不需要等待日志数据上传传输完成。在异步上传时,目标日志的上传和获取是可以并行的,车端云服务控制器还可以同时进行多个操作。Among them, the upload queue is used to upload the target logs to be uploaded to the cloud in the order of the queue. Asynchronous upload can be understood as transmitting the target log in an asynchronous manner. Asynchronous means that the uploading and acquisition of the target log are carried out at the same time, that is, the vehicle-side cloud service controller can continue to perform other operations while uploading the target log to the cloud, without waiting for the log data upload and transmission to be completed. During asynchronous uploading, the uploading and acquisition of the target log can be parallel, and the vehicle-side cloud service controller can also perform multiple operations at the same time.
具体地,车端云服务控制器可以将目标日志的完整数据传输至上传队列,并通过异步上传的方式,将上传队列中的目标日志传输至云端。或者,车端云服务控制器也可以将目标日志的标识符传输至上传队列,在上传队列进行工作时,车端依据上传队列中的标识符,从存储目标日志的目录中获取目标日志,并通过异步上传的方式将目标日志上传至云端。Specifically, the vehicle-side cloud service controller can transfer the complete data of the target log to the upload queue, and transmit the target log in the upload queue to the cloud through asynchronous upload. Alternatively, the vehicle-side cloud service controller can also transmit the identifier of the target log to the upload queue. When the upload queue is working, the vehicle-side obtains the target log from the directory storing the target log based on the identifier in the upload queue, and uploads the target log to the cloud through asynchronous upload.
可选地,若目标日志被打包为目标压缩包,则可以将目标压缩包传输至上传队列,并将上传队列中的目标压缩包异步上传至云端。Optionally, if the target log is packaged into a target compressed package, the target compressed package may be transmitted to an upload queue, and the target compressed package in the upload queue may be asynchronously uploaded to the cloud.
本实施例中,通过上传队列作为上传至云端的中转站,可以降低各零部件上传时的计算资源,并且通过异步上传的方式能够降低车端的网络开销,从而提升日志上传时的稳定性。In this embodiment, the upload queue is used as a transit station for uploading to the cloud, which can reduce the computing resources of each component when uploading, and the network overhead on the vehicle side can be reduced by asynchronous uploading, thereby improving the stability of log uploading.
在一个示例性的实施例中,在日志上传任务为云端下发的请求上传任务的情况下,步骤“获取日志上传任务”的具体实现过程,包括:In an exemplary embodiment, when the log upload task is a request upload task issued by the cloud, the specific implementation process of the step "obtaining the log upload task" includes:
接收云端下发的请求上传任务,将请求上传任务发送至任务处理队列;Receive the upload request task sent by the cloud, and send the upload request task to the task processing queue;
从任务处理队列异步获取请求上传任务,得到日志上传任务。Asynchronously obtain the request upload task from the task processing queue to obtain the log upload task.
其中,任务处理队列中可以包含多个待处理的请求上传任务;车端云服务控制器可以从任务处理队列中排列顺序确定当前所需处理的请求上传任务。异步指的是车端云服务控制器在执行从任务处理队列中获取的日志上传任务的同时还可以执行其他任务。The task processing queue may contain multiple pending upload request tasks; the vehicle-side cloud service controller may determine the currently required upload request tasks from the order of the task processing queue. Asynchronous means that the vehicle-side cloud service controller can execute other tasks while executing the log upload task obtained from the task processing queue.
具体地,车端云服务控制器接收云端下发的各请求上传任务,并将先后接收到的请求上传任务,依次发送至任务处理队列。车端云服务控制器可以通过异步处理的方式处理任务处理队列中的请求上传任务。Specifically, the vehicle-side cloud service controller receives each upload request task sent by the cloud, and sends the uploaded request tasks received successively to the task processing queue in sequence. The vehicle-side cloud service controller can process the uploaded request tasks in the task processing queue in an asynchronous processing manner.
可选地,车端云服务控制器可以接收云端下发的日志文件请求,并依据日志文件请求生成对应的请求上传任务;车端云服务控制器将请求上传任务发送至任务处理队列。车端云服务控制器可以通过异步处理的方式处理任务处理队列中的请求上传任务。Optionally, the vehicle-side cloud service controller can receive the log file request sent by the cloud, and generate a corresponding request upload task according to the log file request; the vehicle-side cloud service controller sends the request upload task to the task processing queue. The vehicle-side cloud service controller can process the request upload task in the task processing queue in an asynchronous processing manner.
本实施例中,通过任务处理队列作为执行请求上传任务的中转站,车端云服务控制器可以通过异步处理降低所需耗费的计算资源,降低车端云服务控制器的网络开销,从而提升日志上传时的稳定性。In this embodiment, by using the task processing queue as a transit station for executing the request upload task, the vehicle-side cloud service controller can reduce the required computing resources through asynchronous processing, reduce the network overhead of the vehicle-side cloud service controller, and thus improve the stability of log uploading.
以下结合一个具体实施例,详细描述上述车辆日志上传方法的具体执行过程。车辆日志上传方法的具体执行原理,包括:The specific implementation process of the above vehicle log upload method is described in detail below in conjunction with a specific embodiment. The specific implementation principle of the vehicle log upload method includes:
1、文件命名规则。1. File naming rules.
文件命名示例如下,“XXXXXXXXXX_1677990630.log”。其中XXXXXXXXXX部分由各控制器自定义,1677990630为文件创建UTC时间戳,通过解析文件名及获取文件属性中的最后修改时间戳,可以完整得到每个文件的起始时间。此外,根据时间范围来查询文件是否匹配时,可以快速而准确的筛选出文件列表。应理解,UTC时间戳无时区概念,全球统一,不会因为车辆在不同国家、不同时区而产生时间差异的问题,具有更好的通用性。The file naming example is as follows, "XXXXXXXXXX_1677990630.log". The XXXXXXXXXX part is customized by each controller, and 1677990630 is the UTC timestamp for file creation. By parsing the file name and obtaining the last modified timestamp in the file attributes, the start time of each file can be fully obtained. In addition, when querying whether the file matches according to the time range, the file list can be quickly and accurately filtered out. It should be understood that the UTC timestamp has no time zone concept and is globally unified. It will not cause time differences due to vehicles in different countries and time zones, and has better versatility.
车端各零部件的日志的文件命名规则如下表所示:The file naming rules for the logs of various vehicle components are shown in the following table:
车端各零部件的日志的文件名称均由以上A + B + C + D构成,对文件内容无任何限制要求。The file names of the logs of each vehicle component are composed of the above A + B + C + D, and there are no restrictions on the file content.
2、车辆日志上传系统的框架结构。2. The framework structure of the vehicle log upload system.
如图5所示,附图为车辆日志上传方法所对应的车辆日志上传系统的框架图。其中,云端与车端云服务控制器通过互联网(MQTTS、HTTPS)连接,并且车端云服务控制器可以通过车端内部的车载网关将车端中各全部零部件进行通信。通过车载网关,车端云服务控制器可以获取各零部件的日志。此外,各零部件与车载网关可以通过HTTP服务进行通信。As shown in FIG5 , the attached figure is a framework diagram of the vehicle log upload system corresponding to the vehicle log upload method. Among them, the cloud and the vehicle-side cloud service controller are connected through the Internet (MQTTS, HTTPS), and the vehicle-side cloud service controller can communicate with all the components in the vehicle through the vehicle-side internal vehicle gateway. Through the vehicle gateway, the vehicle-side cloud service controller can obtain the logs of each component. In addition, each component and the vehicle gateway can communicate through HTTP service.
3、云端拉取车端日志的具体实施过程。3. The specific implementation process of pulling vehicle-side logs from the cloud.
如图6所示,云端拉取车端日志的具体实施过程,具体包括:As shown in Figure 6, the specific implementation process of pulling vehicle-side logs from the cloud includes:
步骤3.1,云端通过MQTTS下发日志文件请求。请求中包含任务id,零部件类型、日志类型、开始时间(UTC时间戳,即日志创建时间)、最后修改时间(UTC时间戳,即日志最后修改时间)Step 3.1: The cloud sends a log file request via MQTTS. The request contains the task id, component type, log type, start time (UTC timestamp, i.e. log creation time), and last modification time (UTC timestamp, i.e. log last modification time).
步骤3.2,车端云服务控制器收到日志文件请求后,生成对应的日志上传任务,并将日志上传任务放入任务处理队列中进行异步处理。若同步处理可能会产生阻塞而影响其他业务功能。Step 3.2: After receiving the log file request, the vehicle-side cloud service controller generates the corresponding log upload task and puts the log upload task into the task processing queue for asynchronous processing. If it is processed synchronously, it may cause blocking and affect other business functions.
步骤3.3,根据云端下发的零部件类型判断当前遍历的零部件是否为目标零部件,且确定为目标零部件的情况下,确定目标零部件是当前零部件,还是非当前零部件。Step 3.3, judging whether the currently traversed component is the target component according to the component type sent from the cloud, and if it is determined to be the target component, determining whether the target component is the current component or the non-current component.
步骤3.4,若目标零部件是当前零部件,则根据日志类型找到日志所在目录,枚举目录下的文件,根据文件名称解析出文件开始时间,读取文件属性得到文件结束时间,开始时间和结束时间只要其中有一个在日志文件请求的时间范围内,则该文件命中。日志文件请求中的开始时间、结束时间以及日志文件的开始时间、结束时间均为UTC时间戳,不需要做任何额外的转换就能快速而准确地做出判定。然后,将命中的日志文件压缩打包,放入HTTPS上传队列,进行异步上传,上传完成后再将本地的压缩文件删除,释放存储空间。Step 3.4, if the target component is the current component, find the directory where the log is located according to the log type, enumerate the files in the directory, parse the file start time according to the file name, read the file attributes to get the file end time, and as long as one of the start time and end time is within the time range of the log file request, the file is hit. The start time and end time in the log file request and the start time and end time of the log file are all UTC timestamps, and judgments can be made quickly and accurately without any additional conversion. Then, compress and package the hit log files, put them into the HTTPS upload queue, and upload them asynchronously. After the upload is completed, delete the local compressed files to release storage space.
步骤3.5,若目标零部件是非当前零部件,则根据零部件类型拿到对应的URL,然后发起HTTP请求到零部件服务,请求数据采用json格式。其中包含日志类型、开始时间(UTC时间戳)、结束时间(UTC时间戳)、是否在零部件中压缩打包。Step 3.5, if the target component is not the current component, get the corresponding URL according to the component type, and then initiate an HTTP request to the component service. The request data is in json format, which includes the log type, start time (UTC timestamp), end time (UTC timestamp), and whether it is compressed and packaged in the component.
因为压缩打包是计算密集性操作,需要消耗CPU资源,而部分零部件的资源有限、性能较低,那么可以根据实际情况来确定是在资源充足的当前零部件完成压缩打包任务,还是在其他零部件完成压缩打包任务,可以充分平衡好资源的利用,避免某个零部件压力过大而影响其他业务。Because compression and packaging is a computationally intensive operation that consumes CPU resources, and some components have limited resources and low performance, it is possible to determine whether to complete the compression and packaging task on the current component with sufficient resources or on other components based on actual conditions. This can fully balance the use of resources and avoid excessive pressure on a certain component affecting other businesses.
零部件以上述步骤3.3中的筛选方式完成目标零部件的筛选,并得到目标零部件对应的目标日志,然后将目标日志对应的文件列表或压缩包以json数据格式返回至车端云服务控制器。得到文件名列表或压缩包后,车端云服务控制器再通过HTTP的方式下载到本地,若压缩包是非车端云服务控制器所属的零部件完成的压缩打包,则直接将压缩包放入HTTPS上传队列,否则在车端云服务控制器本地将下载好的文件压缩打包,同时将车端云服务控制器本地的原始日志文件删除。在压缩文件上传完成后,再将车端云服务控制器中的压缩文件删除,释放存储空间。The components complete the screening of target components in the same way as in step 3.3 above, and obtain the target log corresponding to the target components, and then return the file list or compressed package corresponding to the target log to the vehicle-side cloud service controller in json data format. After obtaining the file name list or compressed package, the vehicle-side cloud service controller downloads it locally via HTTP. If the compressed package is a compressed package completed by a component that does not belong to the vehicle-side cloud service controller, the compressed package is directly placed in the HTTPS upload queue. Otherwise, the downloaded file is compressed and packaged locally on the vehicle-side cloud service controller, and the original log file locally on the vehicle-side cloud service controller is deleted. After the compressed file is uploaded, the compressed file in the vehicle-side cloud service controller is deleted to free up storage space.
步骤3.6,至此,一次远程调用完成,形成完整链路。Step 3.6, at this point, a remote call is completed and a complete link is formed.
4、车端主动上传车端日志的具体实施过程。4. The specific implementation process of the vehicle actively uploading the vehicle log.
如图7所示,车端主动上传车端日志的具体实施过程,具体包括:As shown in Figure 7, the specific implementation process of the vehicle side actively uploading the vehicle side log includes:
步骤4.1,车端云服务控制器开启日志自动上传任务。Step 4.1: The vehicle-side cloud service controller starts the automatic log upload task.
日志自动上传任务可以是云端创建的任务,日志自动上传任务的作用范围可以是整车的零部件,也可以是部分指定的目标零部件。The automatic log upload task can be a task created in the cloud, and the scope of the automatic log upload task can be the parts of the entire vehicle or some specified target parts.
步骤4.2,轮询检测当前是否到达周期上传时间,如每30分钟上传一次,可根据配置而定。Step 4.2, poll to detect whether the periodic upload time has arrived, such as uploading once every 30 minutes, which can be determined according to the configuration.
步骤4.3,若未达到周期上传时间则返回步骤4.2。Step 4.3: If the periodic upload time has not been reached, return to step 4.2.
步骤4.4,若到达周期上传时间,则车端云服务控制器对需要上传日志的不同零部件做不同处理。In step 4.4, if the periodic upload time is reached, the vehicle-side cloud service controller performs different processing on different components that need to upload logs.
步骤4.5,若当前周期日志主动上传任务对应的是车端云服务控制器所属的当前零部件,按云端拉取车端日志中步骤3.4的流程执行。Step 4.5: If the current periodic log active upload task corresponds to the current component of the vehicle-side cloud service controller, follow the process of step 3.4 in pulling the vehicle-side log from the cloud.
步骤4.6,若当前日志主动上传任务对应的是其他零部件,按云端拉取车端日志中步骤3.5的流程执行。Step 4.6: If the current log active upload task corresponds to other parts, follow the process of step 3.5 in pulling the vehicle-side log from the cloud.
步骤4.7,完成当前周期上传任务后,回到步骤4.2,继续下一轮检测。Step 4.7, after completing the upload task of the current cycle, return to step 4.2 and continue the next round of detection.
5、云端对车辆主动上传行为的控制。5. Cloud control of vehicle’s active uploading behavior.
云端可实时控制车辆任意零部件执行的周期上传任务的开启或关闭。例如,云端通过MQTTS下发配置指令,其中包含零部件类型、日志类型、启停标识。车端云服务控制器接收到指令后实时开启或关闭当前的周期上传任务,同时将配置指令数据落盘至本地,当车辆进入断电状态后,且下次启动时可沿用上次配置。The cloud can control the opening or closing of the periodic upload task executed by any vehicle component in real time. For example, the cloud sends configuration instructions through MQTTS, which include component type, log type, and start/stop flags. After receiving the instructions, the vehicle-side cloud service controller opens or closes the current periodic upload task in real time, and writes the configuration instruction data to the local disk. When the vehicle enters the power-off state, the last configuration can be used when it is started next time.
本实施例中,基于上述车辆日志上传系统,本申请实施例可以通过云端拉取车辆的运行日志或车端主动定时上传日志到云端的方式,可以在线上实时跟踪了解车辆的运行状况,以及车辆在产生异常时可以快速而准确地找到产生问题的原因,使原本需要线下才能解决的问题线上就能解决。各车端的零部件只需要将日志文件记录到某个目录,日志文件名按一定规则命名即可,对各零部件的日志记录模块无任何代码侵入。同时该方法可支持多种不同类型的日志。In this embodiment, based on the above-mentioned vehicle log upload system, the embodiment of the present application can pull the vehicle's operation log through the cloud or the vehicle side can actively upload the log to the cloud at regular intervals, so as to track and understand the vehicle's operation status in real time online, and when the vehicle is abnormal, the cause of the problem can be quickly and accurately found, so that the problems that originally needed to be solved offline can be solved online. The components on the vehicle side only need to record the log file to a certain directory, and the log file name can be named according to certain rules, without any code intrusion into the log recording module of each component. At the same time, this method can support multiple different types of logs.
应该理解的是,虽然如上所述的各实施例所涉及的流程图中的各个步骤按照箭头的指示依次显示,但是这些步骤并不是必然按照箭头指示的顺序依次执行。除非本文中有明确的说明,这些步骤的执行并没有严格的顺序限制,这些步骤可以以其它的顺序执行。而且,如上所述的各实施例所涉及的流程图中的至少一部分步骤可以包括多个步骤或者多个阶段,这些步骤或者阶段并不必然是在同一时刻执行完成,而是可以在不同的时刻执行,这些步骤或者阶段的执行顺序也不必然是依次进行,而是可以与其它步骤或者其它步骤中的步骤或者阶段的至少一部分轮流或者交替地执行。It should be understood that, although the various steps in the flowcharts involved in the above-mentioned embodiments are displayed in sequence according to the indication of the arrows, these steps are not necessarily executed in sequence according to the order indicated by the arrows. Unless there is a clear explanation in this article, the execution of these steps does not have a strict order restriction, and these steps can be executed in other orders. Moreover, at least a part of the steps in the flowcharts involved in the above-mentioned embodiments can include multiple steps or multiple stages, and these steps or stages are not necessarily executed at the same time, but can be executed at different times, and the execution order of these steps or stages is not necessarily carried out in sequence, but can be executed in turn or alternately with other steps or at least a part of the steps or stages in other steps.
基于同样的发明构思,本申请实施例还提供了一种用于实现上述所涉及的车辆日志上传方法的车辆日志上传装置。该装置所提供的解决问题的实现方案与上述方法中所记载的实现方案相似,故下面所提供的一个或多个车辆日志上传装置实施例中的具体限定可以参见上文中对于车辆日志上传方法的限定,在此不再赘述。Based on the same inventive concept, the embodiment of the present application also provides a vehicle log upload device for implementing the vehicle log upload method involved above. The implementation scheme for solving the problem provided by the device is similar to the implementation scheme recorded in the above method, so the specific limitations in one or more vehicle log upload device embodiments provided below can refer to the limitations on the vehicle log upload method above, and will not be repeated here.
在一个示例性的实施例中,如图8所示,提供了一种车辆日志上传装置800,包括:任务获取模块801、日志获取模块802和日志上传模块803,其中:In an exemplary embodiment, as shown in FIG8 , a vehicle log upload device 800 is provided, comprising: a task acquisition module 801 , a log acquisition module 802 and a log upload module 803 , wherein:
任务获取模块801,用于获取日志上传任务;日志上传任务为云端下发的请求上传任务,和/或车端云服务控制器按预设时间周期触发的上传任务;日志上传任务包含待上传的日志对应的筛选条件;筛选条件至少包含零部件类型和时间范围;The task acquisition module 801 is used to acquire a log upload task; the log upload task is a request upload task issued by the cloud, and/or an upload task triggered by the vehicle-side cloud service controller according to a preset time period; the log upload task includes a screening condition corresponding to the log to be uploaded; the screening condition at least includes a component type and a time range;
日志获取模块802,用于从车辆包含的多个零部件中,确定与筛选条件中的零部件类型相同的目标零部件,并从各目标零部件对应的日志目录中获取匹配时间范围的至少一个目标日志;目标零部件包含当前零部件和/或非当前零部件,当前零部件为车端云服务控制器所属的零部件;The log acquisition module 802 is used to determine, from among the multiple components included in the vehicle, a target component of the same type as the component in the screening condition, and to acquire at least one target log of a matching time range from a log directory corresponding to each target component; the target component includes a current component and/or a non-current component, and the current component is a component belonging to the vehicle-side cloud service controller;
日志上传模块803,用于将至少一个目标日志上传至云端。The log uploading module 803 is used to upload at least one target log to the cloud.
进一步地,日志获取模块802,具体用于确定各目标零部件的日志目录;当前零部件的日志目录为本地的日志目录;非当前零部件的日志目录基于统一资源定位符确定;从日志目录包含的日志中,筛选匹配日志类型,且日志的日志创建时间、日志最后修改时间中至少一个匹配时间范围的日志,确定为目标日志。Furthermore, the log acquisition module 802 is specifically used to determine the log directory of each target component; the log directory of the current component is a local log directory; the log directory of the non-current component is determined based on the uniform resource locator; from the logs contained in the log directory, the log type is filtered, and the log creation time and the log last modification time of the log have at least one matching time range, and are determined as the target log.
进一步地,日志获取模块802还包括日志信息获取单元,具体用于:针对日志目录包含的各日志,读取各日志对应的文件名称,并基于预设命名规则对文件名称进行解析,得到各日志的日志创建时间;读取各日志对应的文件属性,基于文件属性得到各日志的日志类型和日志最后修改时间。Furthermore, the log acquisition module 802 also includes a log information acquisition unit, which is specifically used to: read the file name corresponding to each log contained in the log directory, and parse the file name based on a preset naming rule to obtain the log creation time of each log; read the file attributes corresponding to each log, and obtain the log type and the last modification time of each log based on the file attributes.
进一步地,日志获取模块802还包括日志压缩单元,具体用于:若目标零部件为非当前零部件,下载目标零部件对应的目标日志到本地,并对下载的目标日志进行压缩打包,得到目标压缩包;或者,下载目标零部件的目标压缩包到本地,目标压缩包为目标零部件基于其对应的目标日志进行压缩而得到;若目标零部件为当前零部件,对目标零部件的目标日志进行压缩打包,得到目标压缩包;存储目标压缩包至本地的预设目录。日志上传模块803具体还用于:将预设目录中的至少一个目标压缩包上传至云端。Furthermore, the log acquisition module 802 also includes a log compression unit, which is specifically used to: if the target component is not a current component, download the target log corresponding to the target component to the local, and compress and package the downloaded target log to obtain a target compressed package; or, download the target compressed package of the target component to the local, the target compressed package is obtained by compressing the target component based on its corresponding target log; if the target component is a current component, compress and package the target log of the target component to obtain a target compressed package; store the target compressed package to a local preset directory. The log upload module 803 is also specifically used to: upload at least one target compressed package in the preset directory to the cloud.
进一步地,日志压缩单元,具体还用于:删除下载至本地中的目标零部件的目标日志;删除本地的预设目录中已上传至云端的目标压缩包。Furthermore, the log compression unit is specifically used to: delete the target log of the target component downloaded to the local; delete the target compressed package uploaded to the cloud in the local preset directory.
进一步地,日志上传模块803具体还用于:将各目标零部件对应的目标日志传输至上传队列;将上传队列中的目标日志异步上传至云端。Furthermore, the log uploading module 803 is specifically used to: transmit the target log corresponding to each target component to the upload queue; and asynchronously upload the target log in the upload queue to the cloud.
进一步地,在日志上传任务为云端下发的请求上传任务的情况下,日志获取模块802,具体还用于:接收云端下发的请求上传任务,将请求上传任务发送至任务处理队列;从任务处理队列异步获取请求上传任务,得到日志上传任务。Furthermore, in the case where the log upload task is a request upload task issued by the cloud, the log acquisition module 802 is specifically used to: receive the request upload task issued by the cloud, and send the request upload task to the task processing queue; asynchronously obtain the request upload task from the task processing queue to obtain the log upload task.
上述车辆日志上传装置中的各个模块可全部或部分通过软件、硬件及其组合来实现。上述各模块可以硬件形式内嵌于或独立于车端控制设备中的处理器中,也可以以软件形式存储于车端控制设备中的存储器中,以便于处理器调用执行以上各个模块对应的操作。Each module in the above-mentioned vehicle log upload device can be implemented in whole or in part by software, hardware or a combination thereof. Each of the above-mentioned modules can be embedded in or independent of the processor in the vehicle-side control device in the form of hardware, or can be stored in the memory in the vehicle-side control device in the form of software, so that the processor can call and execute the corresponding operations of each of the above modules.
在一个示例性的实施例中,提供了一种车端控制设备,该车端控制设备可以是服务器,其内部结构图可以如图9所示。该车端控制设备包括处理器、存储器。其中,处理器、存储器和输入/输出接口通过系统总线连接。该车端控制设备的处理器用于提供计算和控制能力。该车端控制设备的存储器存储有计算机程序。该存储器为计算机程序的运行提供环境。该计算机程序被处理器执行时以实现一种车辆日志上传方法。In an exemplary embodiment, a vehicle-side control device is provided, which may be a server, and its internal structure diagram may be shown in FIG9 . The vehicle-side control device includes a processor and a memory. The processor, the memory, and the input/output interface are connected via a system bus. The processor of the vehicle-side control device is used to provide computing and control capabilities. The memory of the vehicle-side control device stores a computer program. The memory provides an environment for the operation of the computer program. When the computer program is executed by the processor, a vehicle log upload method is implemented.
本领域技术人员可以理解,图9中示出的结构,仅仅是与本申请方案相关的部分结构的框图,并不构成对本申请方案所应用于其上的车端控制设备的限定,具体的车端控制设备可以包括比图中所示更多或更少的部件,或者组合某些部件,或者具有不同的部件布置。Those skilled in the art will understand that the structure shown in FIG. 9 is merely a block diagram of a partial structure related to the scheme of the present application, and does not constitute a limitation on the vehicle-side control device to which the scheme of the present application is applied. The specific vehicle-side control device may include more or fewer components than shown in the figure, or combine certain components, or have a different arrangement of components.
在一个示例性的实施例中,还提供了一种车端控制设备,包括存储器和处理器,存储器中存储有计算机程序,该处理器执行计算机程序时实现上述各方法实施例中的步骤。In an exemplary embodiment, a vehicle-side control device is also provided, including a memory and a processor, wherein a computer program is stored in the memory, and the processor implements the steps in the above-mentioned method embodiments when executing the computer program.
在一个实施例中,提供了一种计算机可读存储介质,其上存储有计算机程序,该计算机程序被处理器执行时实现上述各方法实施例中的步骤。In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the steps in the above-mentioned method embodiments are implemented.
在一个实施例中,提供了一种计算机程序产品,包括计算机程序,该计算机程序被处理器执行时实现上述各方法实施例中的步骤。In one embodiment, a computer program product is provided, including a computer program, which implements the steps in the above method embodiments when executed by a processor.
需要说明的是,本申请所涉及的用户信息(包括但不限于用户设备信息、用户个人信息等)和数据(包括但不限于用于分析的数据、存储的数据、展示的数据等),均为经用户授权或者经过各方充分授权的信息和数据,且相关数据的收集、使用和处理需要符合相关规定。It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of relevant data must comply with relevant regulations.
本领域普通技术人员可以理解实现上述实施例方法中的全部或部分流程,是可以通过计算机程序来指令相关的硬件来完成,所述的计算机程序可存储于一非易失性计算机可读取存储介质中,该计算机程序在执行时,可包括如上述各方法的实施例的流程。其中,本申请所提供的各实施例中所使用的对存储器、数据库或其它介质的任何引用,均可包括非易失性和易失性存储器中的至少一种。非易失性存储器可包括只读存储器(Read-OnlyMemory,ROM)、磁带、软盘、闪存、光存储器、高密度嵌入式非易失性存储器、阻变存储器(ReRAM)、磁变存储器(Magnetoresistive Random Access Memory,MRAM)、铁电存储器(Ferroelectric Random Access Memory,FRAM)、相变存储器(Phase Change Memory,PCM)、石墨烯存储器等。易失性存储器可包括随机存取存储器(Random Access Memory,RAM)或外部高速缓冲存储器等。作为说明而非局限,RAM可以是多种形式,比如静态随机存取存储器(Static Random Access Memory,SRAM)或动态随机存取存储器(Dynamic RandomAccess Memory,DRAM)等。本申请所提供的各实施例中所涉及的数据库可包括关系型数据库和非关系型数据库中至少一种。非关系型数据库可包括基于区块链的分布式数据库等,不限于此。本申请所提供的各实施例中所涉及的处理器可为通用处理器、中央处理器、图形处理器、数字信号处理器、可编程逻辑器、基于量子计算的数据处理逻辑器等,不限于此。Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to the memory, database or other medium used in the embodiments provided in this application can include at least one of non-volatile and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetoresistive random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. As an illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM). The database involved in each embodiment provided in this application may include at least one of a relational database and a non-relational database. Non-relational databases may include distributed databases based on blockchains, etc., but are not limited to this. The processor involved in each embodiment provided in this application may be a general-purpose processor, a central processing unit, a graphics processor, a digital signal processor, a programmable logic device, a data processing logic device based on quantum computing, etc., but are not limited to this.
以上实施例的各技术特征可以进行任意的组合,为使描述简洁,未对上述实施例中的各个技术特征所有可能的组合都进行描述,然而,只要这些技术特征的组合不存在矛盾,都应当认为是本说明书记载的范围。The technical features of the above embodiments may be arbitrarily combined. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
以上所述实施例仅表达了本申请的几种实施方式,其描述较为具体和详细,但并不能因此而理解为对本申请专利范围的限制。应当指出的是,对于本领域的普通技术人员来说,在不脱离本申请构思的前提下,还可以做出若干变形和改进,这些都属于本申请的保护范围。因此,本申请的保护范围应以所附权利要求为准。The above-described embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the present application. It should be pointed out that, for a person of ordinary skill in the art, several variations and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the protection scope of the present application shall be subject to the attached claims.
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN202410373785.0ACN118334772A (en) | 2024-03-29 | 2024-03-29 | Vehicle log upload method, device, vehicle-side control device and storage medium |
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN202410373785.0ACN118334772A (en) | 2024-03-29 | 2024-03-29 | Vehicle log upload method, device, vehicle-side control device and storage medium |
| Publication Number | Publication Date |
|---|---|
| CN118334772Atrue CN118334772A (en) | 2024-07-12 |
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| CN202410373785.0APendingCN118334772A (en) | 2024-03-29 | 2024-03-29 | Vehicle log upload method, device, vehicle-side control device and storage medium |
| Country | Link |
|---|---|
| CN (1) | CN118334772A (en) |
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN120599722A (en)* | 2025-08-07 | 2025-09-05 | 重庆赛力斯凤凰智创科技有限公司 | Vehicle log reporting method, system, device, computer equipment and storage medium |
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN120599722A (en)* | 2025-08-07 | 2025-09-05 | 重庆赛力斯凤凰智创科技有限公司 | Vehicle log reporting method, system, device, computer equipment and storage medium |
| Publication | Publication Date | Title |
|---|---|---|
| CN118334772A (en) | Vehicle log upload method, device, vehicle-side control device and storage medium | |
| WO2025007609A1 (en) | Log management method and apparatus for vehicle-mounted system, and computer-readable storage medium | |
| CN115884129A (en) | Log obtaining method, device and system of vehicle terminal and storage medium | |
| CN115580608A (en) | Locomotive log file transmission method, device, storage medium and electronic equipment | |
| CN115987963A (en) | A vehicle data upload method, wireless network controller and system | |
| CN119544702A (en) | Log data processing method, system and computer device | |
| CN112187873B (en) | Intelligent distribution method, device and system for Internet of vehicles data | |
| CN110362548B (en) | Log extraction method and related equipment | |
| CN118555311A (en) | Adaptive data collection method, device, equipment, and storage medium | |
| CN115271942A (en) | Block chain transaction processing method and device, electronic equipment and readable medium | |
| CN116132625A (en) | Supervision method and device for transaction flow | |
| CN115733806A (en) | Information transmission method, device, system, electronic equipment and storage medium | |
| CN115550360A (en) | Database-based operation node management method, device, system and medium | |
| CN114911869A (en) | Data and file storage system, method and device and electronic equipment | |
| CN115269516A (en) | Log data acquisition management method, system, storage medium and electronic equipment | |
| CN115221125A (en) | File processing method and device, electronic equipment and readable storage medium | |
| CN115225654A (en) | Communication method and device based on configurable communication protocol | |
| CN118445044B (en) | Method and device for parallel execution of multi-constraint flight control operations | |
| CN119135753B (en) | Nuclear power edge computing platform based on time sequence data processing system | |
| CN111143280B (en) | Data scheduling method, system, device and storage medium | |
| CN112882992A (en) | Method and apparatus for displaying information | |
| CN115174368B (en) | Method and system for generating and acquiring logs of terminal equipment of Internet of vehicles | |
| CN108805741A (en) | Fusion method, device and system of power quality data | |
| CN116016374B (en) | Blockchain-based data processing method, device, equipment, and readable storage medium | |
| CN113472808B (en) | Log processing method and device, storage medium and electronic device |
| 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 |