CN115499461A - Data acquisition method and system, cloud server, vehicle and storage medium - Google Patents

Data acquisition method and system, cloud server, vehicle and storage medium Download PDF

Info

Publication number
CN115499461A
CN115499461A CN202211012759.2A CN202211012759A CN115499461A CN 115499461 A CN115499461 A CN 115499461A CN 202211012759 A CN202211012759 A CN 202211012759A CN 115499461 A CN115499461 A CN 115499461A
Authority
CN
China
Prior art keywords
data
target
acquisition
vehicle
rule
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
CN202211012759.2A
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.)
Chongqing Changan Automobile Co Ltd
Original Assignee
Chongqing Changan Automobile Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Chongqing Changan Automobile Co Ltd filed Critical Chongqing Changan Automobile Co Ltd
Priority to CN202211012759.2A priority Critical patent/CN115499461A/en
Publication of CN115499461A publication Critical patent/CN115499461A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/12Protocols specially adapted for proprietary or special-purpose networking environments, e.g. medical networks, sensor networks, networks in vehicles or remote metering networks
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/10Protocols in which an application is distributed across nodes in the network
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/2866Architectures; Arrangements
    • H04L67/30Profiles
    • H04L67/306User profiles
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04QSELECTING
    • H04Q9/00Arrangements in telecontrol or telemetry systems for selectively calling a substation from a main station, in which substation desired apparatus is selected for applying a control signal thereto or for obtaining measured values therefrom
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L12/00Data switching networks
    • H04L12/28Data switching networks characterised by path configuration, e.g. LAN [Local Area Networks] or WAN [Wide Area Networks]
    • H04L12/40Bus networks
    • H04L2012/40208Bus networks characterized by the use of a particular bus standard
    • H04L2012/40215Controller Area Network CAN

Landscapes

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

Abstract

The application discloses a data acquisition method, a cloud server, a vehicle, a data acquisition system and a non-volatile computer-readable storage medium. The data acquisition method for the cloud server comprises the following steps: configuring data acquisition rules of the vehicle; receiving configuration parameters sent by a target vehicle; determining a target data acquisition rule of the target vehicle according to the configuration parameters and the data acquisition rule; sending a target data acquisition rule to a target vehicle; and receiving target data acquired by the target vehicle according to the target acquisition rule. Therefore, by using the data acquisition method of the cloud server, on one hand, the hardware cost is reduced, and on the other hand, the data can be uploaded to the cloud server in real time, so that the real-time analysis of the data is facilitated.

Description

Data acquisition method and system, cloud server, vehicle and storage medium
Technical Field
The invention relates to the technical field of intelligent driving, in particular to a data acquisition method, a cloud server, a vehicle, a data acquisition system and a nonvolatile computer readable storage medium.
Background
Along with the development of intelligent networking automobiles, the acquisition requirements for automobile end data are more and more, and the data acquisition requirements are uncertain. In the existing CAN data acquisition technology, messages are acquired through hardware, the hardware cost is increased, data cannot be uploaded to the cloud in real time, and real-time analysis is not facilitated.
Disclosure of Invention
The embodiment of the application provides a data acquisition method, a cloud server, a vehicle, a data acquisition system and a nonvolatile computer readable storage medium.
The application provides a data acquisition method for a cloud server, which comprises the following steps:
configuring data acquisition rules of the vehicle;
receiving configuration parameters sent by a target vehicle;
determining a target data acquisition rule of the target vehicle according to the configuration parameters and the data acquisition rule;
sending the target data acquisition rule to the target vehicle;
and receiving target data acquired by the target vehicle according to the target acquisition rule.
In this way, in the data acquisition method according to the embodiment of the present application, the target data acquisition rule of the target vehicle is determined by configuring the data acquisition rule of the vehicle and receiving the configuration parameters sent by the target vehicle, so as to receive the target data acquired by the target vehicle according to the target acquisition rule. By using the data acquisition method of the cloud server, on one hand, the hardware cost is reduced, and on the other hand, the data can be uploaded to the cloud server in real time, so that the real-time analysis of the data is facilitated.
In some embodiments, the data collection rules for configuring the vehicle include:
configuring a signal definition of data to be acquired to generate a data matrix to be acquired;
determining an acquisition mode, an acquisition priority, an acquisition condition and an acquisition duration of the target data;
and generating the data acquisition rule according to the data matrix to be acquired, the acquisition mode, the acquisition priority, the acquisition condition and the acquisition duration.
Therefore, the data matrix to be acquired is generated by configuring the signal definition of the data to be acquired, the acquisition mode, the acquisition priority, the acquisition condition and the acquisition duration are determined to generate the data acquisition rule, and the corresponding data acquisition rule can be defined according to different data acquisition requirements.
In some embodiments, configuring the signal definition of the data to be acquired to generate a data matrix to be acquired includes:
acquiring a user request;
and setting the name, the start bit, the length, the offset and the precision of the data to be acquired according to a user request to generate the data matrix to be acquired.
Therefore, the data matrix to be acquired is generated by setting the data to be acquired according to the user request, and the data matrix to be acquired is provided for the data acquisition rule, so that the user request basis is provided for the target data.
In some embodiments, the determining the target collection rule of the target vehicle according to the configuration parameters and the collection rule includes:
distributing the acquisition rules to preset vehicle groups and/or preset vehicle labels;
determining a target vehicle group and/or a target vehicle label in a preset vehicle group and/or a preset vehicle label according to the configuration parameters;
and taking the collection rule of the target vehicle group and/or the target vehicle label as the target collection rule.
Therefore, the collection rules are distributed to the preset vehicle groups and/or the preset vehicle labels, and the collection rules corresponding to the groups and the labels are found according to the preset vehicle groups and the preset vehicle labels, so that the target collection rules are obtained.
In some embodiments, the sending the target data collection rule to the target vehicle includes:
determining the version number of the target acquisition rule;
generating a configuration version number according to the version number of the target acquisition rule;
generating a configuration file by using the version configuration number and the target acquisition rule;
sending the configuration file to the target vehicle in an array manner.
Therefore, the version number of the target data acquisition rule is determined, and the configuration version number is generated, so that the target data acquisition rule is sent to the target vehicles, and each vehicle can acquire the target data according to the corresponding target data acquisition rule.
The present application further provides a data acquisition method for a vehicle, the data acquisition method comprising:
sending the configuration parameters to a cloud server to obtain a target data acquisition rule;
updating a local configuration file according to the target data acquisition rule;
reading the CAN message through the CAN conversion module and packaging to generate an Ethernet message;
starting a target acquisition thread according to the updated local configuration file to acquire target data from the Ethernet message;
and sending the target data to the cloud server.
Therefore, in the data acquisition method for the vehicle, the target data acquisition rule is acquired by sending the configuration parameters to the cloud server, the local configuration file is updated, the CAN message is read through the CAN conversion module and packaged into the Ethernet message, and therefore the target acquisition thread is started and the target data is acquired from the Ethernet message. On one hand, the dynamic adjustment of the acquisition rule CAN be realized by using the configuration file based on cloud configuration, and on the other hand, the acquisition of the CAN message is carried out by using the data bus based on the Ethernet, so that the data acquisition with high frequency and large-range coverage is realized.
In some embodiments, the configuration parameters include a vehicle identification code and a current configuration version.
In some embodiments, the reading the CAN packet and encapsulating the CAN packet by the CAN conversion module to generate the ethernet packet includes:
deploying the CAN conversion module;
acquiring the CAN message from a CAN bus or a CAN node through the CAN conversion module;
and packaging the CAN message to obtain the Ethernet message.
Therefore, the CAN message is acquired from the CAN bus or the CAN node by deploying the CAN conversion module, so that the CAN message is encapsulated to obtain the Ethernet message, the CAN message is acquired based on the data bus of the Ethernet, and the data acquisition with high frequency and large-range coverage is realized.
In some embodiments, the starting a target collection thread according to the updated local configuration file to collect target data from the ethernet packet includes:
starting a data subscription data thread to analyze and update the Ethernet message into a memory;
and starting a target acquisition thread according to the local configuration file to extract data in the memory to obtain target data.
Therefore, the Ethernet message is analyzed into CAN data, a target acquisition thread is started, and the CAN data is extracted, so that the target data is obtained.
In some embodiments, the starting a data subscription data thread to parse the ethernet packet and update the ethernet packet into the memory includes:
caching the DataType _ CanRouter of the Ethernet message in a memory queue through a data subscription thread;
expanding a data packet in payload of the Ethernet message to generate the CAN message;
analyzing the CAN message to obtain CAN data, wherein the CAN data comprises a CAN ID, a timestamp and a CAN data packet;
and updating the CAN data to the memory.
Therefore, the Ethernet message is expanded through the data subscription thread to generate the CAN message, the CAN message is analyzed to obtain CAN data, the CAN data is stored in the memory Map, the old data is covered by the new data, and the latest data is ensured to be always stored in the memory Map.
In some embodiments, the starting a target collection thread according to the local configuration file to extract data from the memory to obtain target data includes:
determining a target data acquisition type from data acquisition types according to the local configuration file, wherein the data acquisition types comprise continuous period acquisition, continuous change acquisition, condition period acquisition and condition change acquisition;
and starting a target acquisition thread corresponding to the target data acquisition type to extract the target data from the memory.
Therefore, the target data acquisition type is determined from the multiple data acquisition types according to the local configuration file, and a target acquisition thread corresponding to the target data acquisition type is started, so that corresponding data is extracted, and target data is acquired.
In some embodiments, the sending the target data to the cloud server includes:
starting a data uploading thread;
acquiring data to be uploaded in the target data by the data uploading thread in a polling mode;
and sending the data to be uploaded to the cloud server through a connecting channel connected with the cloud server.
Therefore, the data in the uploading queue is acquired by starting the data uploading thread and adopting a polling mechanism, so that the data are uploaded to the cloud server through the vehicle cloud connecting channel, and the data interaction between the vehicle side and the cloud side is realized.
The application also provides a cloud server, the cloud server includes:
the configuration module is used for configuring data acquisition rules of the vehicle;
the first receiving module is used for receiving the configuration parameters sent by the target vehicle;
the determining module is used for determining a target data acquisition rule of the target vehicle according to the configuration parameters and the data acquisition rule;
the first sending module is used for sending the target data acquisition rule to the target vehicle;
the first receiving module is further used for receiving target data acquired by the target vehicle according to the target acquisition rule.
The present application further provides a vehicle, comprising:
the uploading module is used for sending the configuration parameters to the cloud server to obtain a target data acquisition rule;
the updating module is used for updating a local configuration file according to the target data acquisition rule;
the generating module reads the CAN message through the CAN conversion module and generates an Ethernet message in a packaging way;
the starting module starts a target acquisition thread to acquire target data from the Ethernet message according to the updated configuration file through the target acquisition thread;
the uploading module is further used for sending the target data to the cloud server.
The application further provides a data acquisition system, which comprises a cloud server and a vehicle, wherein the vehicle is used for sending configuration parameters to the cloud server to obtain a target data acquisition rule, the cloud server is used for configuring the data acquisition rule of the vehicle, determining the target data acquisition rule of the target vehicle according to the configuration parameters and the data acquisition rule, and sending the target data acquisition rule to the target vehicle; the vehicle is further used for receiving target data acquired by the target vehicle according to the target acquisition rule, updating a local configuration file according to the target data acquisition rule, reading a CAN message through a CAN conversion module and packaging the CAN message to generate an Ethernet message, starting a target acquisition thread to acquire the target data from the Ethernet message according to the updated configuration file through the target acquisition thread, and sending the target data to the cloud server.
The present application also provides a non-transitory computer readable storage medium comprising a computer program which, when executed by a processor, causes the processor to perform the data acquisition method of any one of the above.
Additional aspects and advantages of embodiments of the present application will be set forth in part in the description which follows and, in part, will be obvious from the description, or may be learned by practice of embodiments of the present application.
Drawings
The above and/or additional aspects and advantages of the present application will become apparent and readily appreciated from the following description of the embodiments, taken in conjunction with the accompanying drawings of which:
FIG. 1 is a schematic flow chart of a data collection method according to some embodiments of the present application;
FIG. 2 is a schematic diagram of an architecture of a data acquisition system according to some embodiments of the present application;
fig. 3-12 are schematic flow charts of data acquisition methods according to certain embodiments of the present application.
Detailed Description
Reference will now be made in detail to the embodiments of the present application, examples of which are illustrated in the accompanying drawings, wherein like reference numerals refer to the same or similar elements or elements having the same or similar functions throughout. The embodiments described below by referring to the drawings are exemplary only for the purpose of explaining the embodiments of the present application, and are not to be construed as limiting the embodiments of the present application.
Referring to fig. 1, the present application provides a data acquisition method for a cloud server, the data acquisition method includes:
s10: configuring data acquisition rules of the vehicle;
s20: receiving configuration parameters sent by a target vehicle;
s30: determining a target data acquisition rule of the target vehicle according to the configuration parameters and the data acquisition rule;
s40: sending a target data acquisition rule to a target vehicle;
s50: and receiving target data acquired by the target vehicle according to the target acquisition rule.
The application also provides a high in the clouds server, and high in the clouds server includes: the device comprises a configuration module, a first receiving module, a determining module and a first sending module. S10 is implemented by a configuration module, S20 and S50 are implemented by a first receiving module, S30 is implemented by a determination module, and S40 is implemented by a first sending module, or the configuration module is configured to implement a data acquisition rule for configuring a vehicle, the first receiving module is configured to implement a module for receiving a configuration parameter sent by a target vehicle and receiving target data acquired by the target vehicle according to the target acquisition rule, the determination module is configured to determine the target data acquisition rule for the target vehicle according to the configuration parameter and the data acquisition rule, and the first sending module is configured to send the target data acquisition rule to the target vehicle.
Specifically, referring to fig. 2, in this embodiment, the cloud server interacts with the vehicle to implement the data acquisition method for the cloud server, and the cloud server includes a configuration module, a first receiving module, a determination module, and a first sending module, the data acquisition rule of the vehicle is configured by the configuration module, the first receiving module receives the configuration parameters sent by the vehicle, the first determination module determines the target data acquisition rule of the target vehicle, the first sending module sends the target data acquisition rule to the target vehicle, and finally, the first receiving module receives the target data acquired by the target vehicle according to the target acquisition rule.
It should be noted that the data collection rule refers to some rules established for collecting certain specific data (target data) in the vehicle. The data collection rules may be generated based on developer input, i.e., the data collection rules may be configured by the developer. It is to be understood that a target data collection rule refers to a data collection rule that is customized to collect certain specific data in a target vehicle.
The data acquisition rules can comprise a plurality of data acquisition rules, and the data acquisition rules can be respectively distributed to different vehicles, so that target data can be acquired in different vehicles. For example, in this embodiment, a plurality of vehicles may be grouped in advance, and different configuration parameters may be configured for different groups, so as to issue the configuration parameters to the different groups, respectively, so that the vehicles in each group may obtain the target data according to the corresponding configuration parameters.
Each data collection rule may include, but is not limited to, a data matrix to be collected, a collection mode, a collection priority, a collection condition, and a collection duration, and thus, it is understood that configuring a data collection rule refers to configuring a data matrix to be collected, a collection mode, a collection priority, a collection condition, a collection duration, and the like. It should be noted that the data matrix to be acquired is generated by configuring the signal definition of the data to be acquired, and the signal definition of the data to be acquired includes a name, a start bit, a length, an offset, and an accuracy.
For data acquisition, the commonly existing acquisition modes include periodic acquisition and variable acquisition, which can be divided into: continuous collection and condition collection. Thus, the data acquisition mode includes continuous period acquisition, continuous variation acquisition, condition period acquisition, condition variation acquisition.
The configuration parameters represent information of the target vehicle in a current state, and the current information may include, but is not limited to, identity information of the target vehicle, version information of built-in software, and the like. For example, the configuration parameters may include Vehicle Identification Number (VIN) and a current configuration version, and the configuration parameters are sent by the target Vehicle, and a Vehicle group, a Vehicle tag, and the like corresponding to the target Vehicle may be found according to the VIN, and a corresponding target data acquisition rule may be found according to the Vehicle group and the Vehicle tag, so as to send the target data acquisition rule to the target Vehicle, and acquire the target data according to the target acquisition rule.
It should be further noted that, while the cloud server configures and generates the data collection rule, it also generates a version number of the data collection rule, where the version number may be named by a system timestamp or other numbers that increase globally over time.
Therefore, in the data acquisition method and the cloud server in the embodiment of the application, through the data acquisition rule of the configuration vehicle, after the configuration parameters sent by the target vehicle are received, the corresponding target data acquisition rule can be distributed to the target vehicle according to the configuration parameters, and therefore after the target vehicle receives the target data acquisition rule, the generated target data can be acquired according to the target data acquisition rule and sent to the cloud server.
Referring to fig. 3, in some embodiments, S10 includes:
s11: configuring a signal definition of data to be acquired to generate a data matrix to be acquired;
s12: determining an acquisition mode, an acquisition priority, an acquisition condition and an acquisition duration of target data;
s13: and generating a data acquisition rule according to the data matrix to be acquired, the acquisition mode, the acquisition priority, the acquisition condition and the acquisition duration.
In some embodiments, the configuration module is configured to configure the signal definition of the data to be acquired to generate a data matrix to be acquired, determine an acquisition mode, an acquisition priority, an acquisition condition and an acquisition duration of the target data, and generate the data acquisition rule according to the data matrix to be acquired, the acquisition mode, the acquisition priority, the acquisition condition and the acquisition duration.
Specifically, the signal definition of the data to be acquired includes a name, a start bit, a length, an offset and an accuracy, the signal definition of the data to be acquired is configured to generate a data matrix to be acquired, and an acquisition mode, an acquisition priority, an acquisition condition and an acquisition duration of the target data are determined, so that a data acquisition rule is generated. The acquisition time period includes continuous acquisition, instantaneous acquisition, and time before and after acquisition, for example, if continuous acquisition, the acquisition time period is-1, if instantaneous acquisition, only one frame of data is acquired, the acquisition time period is 0, if time before and after acquisition, m seconds before and n seconds after acquisition, the configuration is-m- + n.
Therefore, the data matrix to be acquired is generated by configuring the signal definition of the data to be acquired, the acquisition mode, the acquisition priority, the acquisition condition and the acquisition duration are determined to generate the data acquisition rule, and the corresponding data acquisition rule can be defined according to different data acquisition requirements.
Referring to fig. 4, in some embodiments, S11 includes:
s111: acquiring a user request;
s112: and setting the name, the start bit, the length, the offset and the precision of the data to be acquired according to the user request to generate a data matrix to be acquired.
In some embodiments, the configuration module is configured to obtain a user request, and to set a name, a start bit, a length, an offset, and an accuracy of the data to be collected according to the user request to generate the data matrix to be collected.
Specifically, the data to be collected is determined by obtaining a user request, and the data to be collected can be signals of periods, changes, conditions and the like in the fields of vehicle bodies, power, air conditioners and the like, and further, the name, the start position, the length, the offset and the precision of the data to be collected are set according to the user request, so that a data matrix to be collected is generated.
Therefore, the data matrix to be acquired is generated by setting the data to be acquired according to the user request, and the data matrix to be acquired is provided for the data acquisition rule, so that the user request basis is provided for the target data.
Referring to fig. 5, in some embodiments, S30 includes:
s31: distributing the collection rules to preset vehicle groups and/or preset vehicle labels;
s32: determining a target vehicle group and/or a target vehicle label in a preset vehicle group and/or a preset vehicle label according to the configuration parameters;
s33: and taking the collection rule of the target vehicle group and/or the target vehicle label as a target collection rule.
In some embodiments, the determining module is configured to assign the collection rule to the preset vehicle group and/or the preset vehicle tag, and to determine the target vehicle group and/or the target vehicle tag in the preset vehicle group and/or the preset vehicle tag according to the configuration parameter, and to use the collection rule of the target vehicle group and/or the target vehicle tag as the target collection rule.
Specifically, one or more configured collection rules are selected and distributed to at least one of a preset vehicle group and a preset vehicle label. And determining the target vehicle group or the target vehicle label in the preset vehicle group or the preset vehicle label according to the configuration parameters. And determining a target vehicle group and a target vehicle label in the preset vehicle group and the preset vehicle label according to the configuration parameters. Further, the collection rule of at least one of the target vehicle group and the target vehicle tag may be used as the target collection rule.
Therefore, the collection rules are distributed to the preset vehicle groups and/or the preset vehicle labels, and the collection rules corresponding to the groups and the labels are found according to the preset vehicle groups and the preset vehicle labels, so that the target collection rules are obtained.
Referring to fig. 6, in some embodiments, S40 includes:
s41: determining the version number of a target acquisition rule;
s42: generating a configuration version number according to the version number of the target acquisition rule;
s43: generating a configuration file by the version configuration number and the target acquisition rule;
s44: the configuration file is sent to the target vehicle in an array.
In some embodiments, the first sending module is configured to determine a version number of the target collection rule, generate a configuration version number according to the version number of the target collection rule, generate a configuration file from the version configuration number and the target collection rule, and send the configuration file to the target vehicle in an array manner.
Specifically, the version number and the data acquisition rule are generated simultaneously, the version number can be named by a system timestamp or other numbers which are increased globally along with time, the maximum version number in the target acquisition rule is used as the configuration version number of the current configuration, the version configuration number and the target acquisition rule are used for generating a configuration file, further, the configuration file is sent to a target vehicle in an array mode, and after the vehicle acquires the configuration file, the local configuration is updated.
Therefore, the version number of the target data acquisition rule is determined, and the configuration version number is generated, so that the target data acquisition rule is sent to the target vehicles, and each vehicle can acquire the target data according to the corresponding target data acquisition rule.
Referring to fig. 7, the present application further provides a data collecting method for a vehicle, the data collecting method includes:
s01: sending the configuration parameters to a cloud server to obtain target data acquisition rules;
s02: updating a local configuration file according to a target data acquisition rule;
s03: reading the CAN message through the CAN conversion module and packaging to generate an Ethernet message;
s04: starting a target acquisition thread according to the updated local configuration file to acquire target data from the Ethernet message;
s05: and sending the target data to the cloud server.
In certain embodiments, the present application further provides a vehicle comprising an upload module, an update module, a generation module, and a start module. The system comprises an uploading module, a generating module, a starting module, an updating module and a thread starting module, wherein S01 and S05 are realized by the uploading module, S02 is realized by the updating module, S03 is realized by the generating module, S04 is realized by the starting module, or the uploading module is used for sending configuration parameters to a cloud server to obtain a target data acquisition rule and sending target data to the cloud server, the updating module is used for updating a local configuration file according to the target data acquisition rule, the generating module is used for reading a CAN message through a CAN conversion module and packaging the CAN message to generate an Ethernet message, and the starting module is used for starting a target acquisition thread according to the updated local configuration file to acquire the target data from the Ethernet message.
In some embodiments, the configuration parameters include a vehicle identification code and a current configuration version.
Specifically, please refer to fig. 2, in this embodiment, the cloud server interacts with the vehicle to implement the data collection method for the vehicle, and the vehicle includes an uploading module, an updating module, a generating module, and a starting module, the configuration parameters of the vehicle are sent to the cloud server through the uploading module to obtain the target data collection rule of the vehicle, the updating module updates the local configuration file according to the target data collection rule, the generating module reads the CAN message through the CAN conversion module and generates the ethernet message, the starting module starts the target collection thread according to the updated local configuration file to collect the target data from the ethernet message, and most of all, the uploading module uploads the target data to the cloud server.
The configuration parameters comprise Vehicle Identification Numbers (VINs) and current configuration versions, the target Vehicle sends the configuration parameters to the cloud server, the cloud server obtains target data acquisition rules, updates local configuration files according to the target data acquisition rules, reads CAN messages through a CAN conversion module, encapsulates the CAN messages to generate Ethernet messages, further starts a target acquisition thread according to the updated local configuration files, and acquires target data from the Ethernet messages based on a data bus of the Ethernet.
Therefore, in the data acquisition method for the vehicle, the target data acquisition rule is acquired by sending the configuration parameters to the cloud server, the local configuration file is updated, the CAN message is read through the CAN conversion module and encapsulated into the Ethernet message, and therefore the target acquisition thread is started and the target data is acquired from the Ethernet message. On one hand, the dynamic adjustment of the acquisition rule CAN be realized by using the configuration file based on cloud configuration, and on the other hand, the acquisition of the CAN message is carried out by using the data bus based on the Ethernet, so that the data acquisition with high frequency and large-range coverage is realized.
Referring to fig. 8, in some embodiments, S03 includes:
s031: deploying a CAN conversion module;
s032: acquiring a CAN message from a CAN bus or a CAN node through a CAN conversion module;
s033: and encapsulating the CAN message to obtain an Ethernet message.
In some embodiments, the generating module is configured to deploy the CAN conversion module, acquire the CAN packet from the CAN bus or the CAN node through the CAN conversion module, and encapsulate the CAN packet to obtain the ethernet packet.
Specifically, the CAN conversion module is deployed on an edge node, and the edge node may be a certain node in a CAN bus or a CAN node. The CAN conversion module is responsible for reading all CAN messages from a CAN bus or CAN nodes and packaging the CAN messages into Ethernet messages.
It should be understood that the application of ethernet to the vehicle end is becoming more and more common, the bandwidth of ethernet between the primary controllers reaches substantially 100Mbps, and the bandwidth of ethernet between the primary controllers based on the domain controller architecture reaches even 1000Mbps.
Therefore, the CAN message is acquired from the CAN bus or the CAN node by deploying the CAN conversion module, so that the CAN message is packaged to obtain the Ethernet message, CAN message acquisition is carried out based on the data bus of the Ethernet, and high-frequency and large-range coverage data acquisition is realized.
Referring to fig. 9, in some embodiments, S04 includes:
s041: starting a data subscription data thread to analyze and update the Ethernet message into a memory;
s042: and starting a target acquisition thread according to the local configuration file to extract data in the memory to obtain target data.
In some embodiments, the starting module is configured to start a data subscription data thread to analyze and update the ethernet packet into the memory, and to start a target acquisition thread according to the local configuration file to extract data from the memory to obtain target data.
Specifically, the data subscription thread is started to analyze the ethernet message into the CAN data, the analyzed CAN data are stored in the memory Map, further, the target acquisition thread is started through the local configuration file, and the CAN data are extracted from the memory Map according to the target acquisition rule, so that the target data are obtained.
Therefore, the Ethernet message is analyzed into CAN data, a target acquisition thread is started, and the CAN data is extracted, so that the target data is obtained.
Referring to fig. 10, in some embodiments, S041 includes:
s0411: caching the DataType _ CanRouter of the Ethernet message in a memory queue through a data subscription thread;
s0412: expanding a data packet in payload of the Ethernet message to generate a CAN message;
s0413: analyzing the CAN message to obtain CAN data, wherein the CAN data comprises a CAN ID, a timestamp and a CAN data packet;
s0414: and updating the CAN data into the memory.
In some embodiments, the start module is configured to cache a DataType _ CanRouter of the ethernet packet in a memory queue through a data subscription thread, expand a data packet in a payload of the ethernet packet, generate a CAN packet, analyze the CAN packet to obtain CAN data, where the CAN data includes a CAN ID, a timestamp, and a CAN data packet, and update the CAN data into a memory.
Specifically, a separate data subscription thread is started to be responsible for subscribing data on the total data bus, and data DataType _ CanRouter is cached in the memory queue. Meanwhile, data packets in a plurality of payloads are expanded into CAN messages, the CAN ID, the timestamp and the CAN data packet (8 bytes/64 bytes) of each CAN message are obtained through analysis, the analyzed data are stored into a memory Map, the CAN ID serves as key, the time and the CAN data packet are packaged together to serve as value, the memory Map uses new data to cover the old data according to the CAN ID, and the latest data are always stored in the memory Map.
Therefore, the Ethernet message is expanded through the data subscription thread to generate the CAN message, the CAN message is analyzed to obtain CAN data, the CAN data is stored in the memory Map, the old data is covered by the new data, and the latest data is ensured to be always stored in the memory Map.
Referring to fig. 11, in some embodiments, S042 includes:
s0421: determining a target data acquisition type from data acquisition types according to a local configuration file, wherein the data acquisition types comprise continuous period acquisition, continuous change acquisition, condition period acquisition and condition change acquisition;
s0422: and starting a target acquisition thread corresponding to the target data acquisition type to extract the target data in the memory.
In some embodiments, the starting module is configured to determine a target data acquisition type from the data acquisition types according to the local configuration file, and is configured to start a target acquisition thread corresponding to the target data acquisition type to extract target data from the memory.
Specifically, the data acquisition types include continuous period acquisition, continuous change acquisition, condition period acquisition, and condition change acquisition. The continuous period acquisition can start an independent continuous period acquisition thread in a data acquisition center, and the continuous period acquisition thread is responsible for filtering out all the cond = always and collMod =1 rules from the configuration file, namely the continuous period acquisition. Under the condition that a plurality of different data acquisition cycles exist at the same time, the cycle acquisition thread automatically realizes cycle scheduling logic. When the periodic acquisition thread starts to execute acquisition, a latest message corresponding to the CAN ID is taken out from the memory Map, then according to the analysis rule of Signal, the physical value = transmission value x factor + offset, a physical value is obtained, the value and the name are packaged into a json key value pair, wherein the name is used as key, the physical value is used as value, the Signal name and the Signal value are packaged into a data protocol, and the data acquisition mode of this time is marked as continuous periodic acquisition.
The continuous variation acquisition may also start a separate continuous variation acquisition thread. And after receiving the data of the corresponding CAN ID, the data subscription thread sends the data to an event acquisition thread. For attribute change acquisition, storing a corresponding CAN ID in a memory according to configured contents (attribute names and data analysis rules), storing one CAN ID, taking out the previous data in the memory after the new data arrives, comparing the previous data with the new data, obtaining a corresponding signal value according to the data analysis rules if a CAN data packet is inconsistent, comparing the signal values of two times, considering that the attribute is changed if the signal value is changed, packaging the signal name and the signal value into a data protocol, and simultaneously marking the data acquisition mode as continuous change acquisition.
The conditional cycle acquisition may also initiate a separate conditional cycle acquisition thread. The trigger condition needs to support the following condition judgments: the signal value changes to B, from a to B, to non-B, from a to non-B, and from non-a to non-B. Meanwhile, the combination of the above single conditions is supported, and the combination mode comprises the following steps: and, or not. The data acquisition logic is as follows: and when the event triggering condition in cond is met, acquiring the signals in signals. If data of n seconds before and after m seconds before the occurrence of an event needs to be acquired, after the data are received, analyzing the corresponding signals and caching the signals in a memory Map, wherein the structure of the memory Map is < m, queue >, m is the event method defined by the cloud, and queue is the corresponding signal queue. And after the event occurs, delaying for n seconds, acquiring the corresponding queue according to m, taking out all data, packaging the data to an enterprise standard protocol, and storing the data into an uploading queue.
Therefore, the target data acquisition type is determined from the multiple data acquisition types according to the local configuration file, and a target acquisition thread corresponding to the target data acquisition type is started, so that corresponding data is extracted, and target data is obtained.
Referring to fig. 12, in some embodiments, S05 includes:
s051: starting a data uploading thread;
s052: acquiring data to be uploaded in the target data in a polling mode through a data uploading thread;
s053: and sending the data to be uploaded to the cloud server through a connecting channel connected with the cloud server.
In some embodiments, the uploading module is configured to start a data uploading thread, acquire data to be uploaded in the target data in a polling manner through the data uploading thread, and send the data to be uploaded to the cloud server through a connection channel connected to the cloud server.
Specifically, this embodiment realizes the interaction of vehicle and high in the clouds server through the upload module, starts an independent data upload thread through the upload module, and the data upload thread adopts the mechanism of polling to obtain data from uploading the queue, and the interval of training can set up to about 500ms, and specific interval can set up by oneself, does not do the restriction here, and the upload module can be vehicle networking intelligent terminal (T-BOX). And each time, acquiring one piece of data from the uploading queue, and uploading the data to the cloud server through the vehicle cloud connection channel. The vehicle cloud connection channel is an information transmission channel between the vehicle and the cloud server, and may be a Message Queuing Technical Transport (MQTT) in the prior art.
Therefore, the data in the uploading queue is acquired by starting the data uploading thread and adopting a polling mechanism, so that the data are uploaded to the cloud server through the vehicle cloud connecting channel, and the data interaction between the vehicle side and the cloud side is realized.
The application further provides a data acquisition system which comprises a cloud server and a vehicle, wherein the vehicle is used for sending the configuration parameters to the cloud server to obtain the target data acquisition rule, the cloud server is used for configuring the data acquisition rule of the vehicle, determining the target data acquisition rule of the target vehicle according to the configuration parameters and the data acquisition rule, and sending the target data acquisition rule to the target vehicle; the vehicle is also used for receiving target data acquired by the target vehicle according to the target acquisition rule, updating a local configuration file according to the target data acquisition rule, reading the CAN message through the CAN conversion module and packaging to generate an Ethernet message, starting a target acquisition thread to acquire the target data from the Ethernet message according to the updated configuration file through the target acquisition thread, and sending the target data to the cloud server.
So, dispose data acquisition rule through the high in the clouds server, the vehicle carries out data acquisition to read the CAN message and produce the ethernet message through CAN conversion module, thereby send target data to the high in the clouds server. By adopting the data acquisition method of the cloud server, on one hand, the hardware cost is reduced, and on the other hand, the data can be uploaded to the cloud server in real time, so that the real-time analysis of the data is facilitated.
The present application also provides a non-transitory computer readable storage medium comprising a computer program which, when executed by a processor, causes the processor to perform the data acquisition method of any one of the above. The storage medium may be a magnetic disk, an optical disk, a Read-only memory (ROM), or the like.
In the description herein, references to the description of "certain embodiments," "in one example," "exemplary," etc., mean that a particular feature, structure, material, or characteristic described in connection with the embodiment or example is included in at least one embodiment or example of the application. In this specification, schematic representations of the above terms do not necessarily refer to the same embodiment or example. Furthermore, the particular features, structures, materials, or characteristics described may be combined in any suitable manner in any one or more embodiments or examples. Furthermore, various embodiments or examples and features of different embodiments or examples described in this specification can be combined and combined by one skilled in the art without contradiction.
Any process or method descriptions in flow charts or otherwise described herein may be understood as representing modules, segments, or portions of code which include one or more executable instructions for implementing specific logical functions or steps in the process, and alternate implementations are included within the scope of the preferred embodiment of the present application in which functions may be executed out of order from that shown or discussed, including substantially concurrently or in reverse order, depending on the functionality involved, as would be understood by those reasonably skilled in the art of the present application.
Although embodiments of the present application have been shown and described above, it is to be understood that the above embodiments are exemplary and not to be construed as limiting the present application, and that changes, modifications, substitutions and alterations can be made to the above embodiments by those of ordinary skill in the art within the scope of the present application.

Claims (16)

1. A data acquisition method is used for a cloud server, and is characterized by comprising the following steps:
configuring data acquisition rules of the vehicle;
receiving configuration parameters sent by a target vehicle;
determining a target data acquisition rule of the target vehicle according to the configuration parameters and the data acquisition rule;
sending the target data acquisition rule to the target vehicle;
and receiving target data acquired by the target vehicle according to the target acquisition rule.
2. The data collection method of claim 1, wherein the configuring the data collection rules of the vehicle comprises:
configuring a signal definition of data to be acquired to generate a data matrix to be acquired;
determining an acquisition mode, an acquisition priority, an acquisition condition and an acquisition duration of the target data;
and generating the data acquisition rule according to the data matrix to be acquired, the acquisition mode, the acquisition priority, the acquisition condition and the acquisition duration.
3. The data acquisition method of claim 2, wherein configuring the signal definition of the data to be acquired to generate a matrix of data to be acquired comprises:
acquiring a user request;
and setting the name, the start bit, the length, the offset and the precision of the data to be acquired according to a user request to generate the data matrix to be acquired.
4. The data collection method of claim 1, wherein determining the target collection rule for the target vehicle based on the configuration parameters and the collection rule comprises:
distributing the acquisition rules to preset vehicle groups and/or preset vehicle labels;
determining a target vehicle group and/or a target vehicle label in a preset vehicle group and/or a preset vehicle label according to the configuration parameters;
and taking the collection rule of the target vehicle group and/or the target vehicle label as the target collection rule.
5. The data collection method of claim 1, wherein said sending the target data collection rule to the target vehicle comprises:
determining the version number of the target acquisition rule;
generating a configuration version number according to the version number of the target acquisition rule;
generating a configuration file by using the version configuration number and the target acquisition rule;
sending the configuration file to the target vehicle in an array manner.
6. A data acquisition method for a vehicle, comprising:
sending the configuration parameters to a cloud server to obtain a target data acquisition rule;
updating a local configuration file according to the target data acquisition rule;
reading the CAN message through the CAN conversion module and packaging to generate an Ethernet message;
starting a target acquisition thread according to the updated local configuration file to acquire target data from the Ethernet message;
and sending the target data to the cloud server.
7. The data collection method of claim 6, wherein the configuration parameters include a vehicle identification code and a current configuration version.
8. The data collection method of claim 6, wherein the reading of the CAN messages and the encapsulation of the CAN messages by the CAN conversion module to generate Ethernet messages comprises:
deploying the CAN conversion module;
acquiring the CAN message from a CAN bus or a CAN node through the CAN conversion module;
and packaging the CAN message to obtain the Ethernet message.
9. The data collection method of claim 6, wherein starting a target collection thread according to the updated local configuration file to collect target data from an ethernet packet comprises:
starting a data subscription data thread to analyze and update the Ethernet message into a memory;
and starting a target acquisition thread according to the local configuration file to extract data in the memory to obtain target data.
10. The data collection method of claim 9, wherein the initiating a data subscription data thread to parse the ethernet packet and update the ethernet packet into the memory comprises:
caching the DataType _ CanRouter of the Ethernet message in a memory queue through a data subscription thread;
expanding a data packet in payload of the Ethernet message to generate the CAN message;
analyzing the CAN message to obtain CAN data, wherein the CAN data comprises a CAN ID, a timestamp and a CAN data packet;
and updating the CAN data to the memory.
11. The data collection method of claim 9, wherein starting a target collection thread according to the local configuration file to extract data from the memory to obtain target data comprises:
determining a target data acquisition type from data acquisition types according to the local configuration file, wherein the data acquisition types comprise continuous period acquisition, continuous change acquisition, condition period acquisition and condition change acquisition;
and starting a target acquisition thread corresponding to the target data acquisition type to extract the target data from the memory.
12. The data collection method of claim 6, wherein the sending the target data to the cloud server comprises:
starting a data uploading thread;
acquiring data to be uploaded in the target data by the data uploading thread in a polling mode;
and sending the data to be uploaded to the cloud server through a connecting channel connected with the cloud server.
13. A cloud server, comprising:
the configuration module is used for configuring data acquisition rules of the vehicle;
the first receiving module is used for receiving the configuration parameters sent by the target vehicle;
the determining module is used for determining a target data acquisition rule of the target vehicle according to the configuration parameters and the data acquisition rule;
the first sending module is used for sending the target data acquisition rule to the target vehicle;
the first receiving module is further used for receiving target data acquired by the target vehicle according to the target acquisition rule.
14. A vehicle, characterized by comprising:
the uploading module is used for sending the configuration parameters to the cloud server to acquire target data acquisition rules;
the updating module is used for updating a local configuration file according to the target data acquisition rule;
the generating module is used for reading the CAN message through the CAN conversion module and packaging the CAN message to generate an Ethernet message;
the starting module is used for starting a target acquisition thread to acquire target data from the Ethernet message according to the updated configuration file through the target acquisition thread;
the uploading module is further used for sending the target data to the cloud server.
15. The data acquisition system is characterized by comprising a cloud server and a vehicle, wherein the vehicle is used for sending configuration parameters to the cloud server to acquire a target data acquisition rule, the cloud server is used for configuring the data acquisition rule of the vehicle, determining the target data acquisition rule of the target vehicle according to the configuration parameters and the data acquisition rule, and sending the target data acquisition rule to the target vehicle; the vehicle is further used for receiving target data acquired by the target vehicle according to the target acquisition rule, updating a local configuration file according to the target data acquisition rule, reading a CAN message through a CAN conversion module and packaging the CAN message to generate an Ethernet message, starting a target acquisition thread to acquire the target data from the Ethernet message according to the updated configuration file through the target acquisition thread, and sending the target data to the cloud server.
16. A non-transitory computer-readable storage medium comprising a computer program which, when executed by a processor, causes the processor to perform the data acquisition method of any one of claims 1-12.
CN202211012759.2A 2022-08-23 2022-08-23 Data acquisition method and system, cloud server, vehicle and storage medium Pending CN115499461A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202211012759.2A CN115499461A (en) 2022-08-23 2022-08-23 Data acquisition method and system, cloud server, vehicle and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202211012759.2A CN115499461A (en) 2022-08-23 2022-08-23 Data acquisition method and system, cloud server, vehicle and storage medium

Publications (1)

Publication Number Publication Date
CN115499461A true CN115499461A (en) 2022-12-20

Family

ID=84466071

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202211012759.2A Pending CN115499461A (en) 2022-08-23 2022-08-23 Data acquisition method and system, cloud server, vehicle and storage medium

Country Status (1)

Country Link
CN (1) CN115499461A (en)

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109495547A (en) * 2018-10-26 2019-03-19 北京车和家信息技术有限公司 Signals of vehicles acquisition method, device and cloud server and vehicle
CN111010415A (en) * 2019-04-30 2020-04-14 长城汽车股份有限公司 Data transmission method and device for Internet of vehicles
CN112486878A (en) * 2020-11-25 2021-03-12 苏州智慧车芯科技有限公司 Vehicle data acquisition and uploading method, device, equipment, storage medium and system
CN112583762A (en) * 2019-09-27 2021-03-30 北汽福田汽车股份有限公司 Control method and device for vehicle data acquisition
CN114329035A (en) * 2021-12-31 2022-04-12 中国第一汽车股份有限公司 Data processing method and device, storage medium, processor and electronic device
CN114785784A (en) * 2022-04-14 2022-07-22 中国第一汽车股份有限公司 Data processing method and device and electronic equipment

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109495547A (en) * 2018-10-26 2019-03-19 北京车和家信息技术有限公司 Signals of vehicles acquisition method, device and cloud server and vehicle
CN111010415A (en) * 2019-04-30 2020-04-14 长城汽车股份有限公司 Data transmission method and device for Internet of vehicles
CN112583762A (en) * 2019-09-27 2021-03-30 北汽福田汽车股份有限公司 Control method and device for vehicle data acquisition
CN112486878A (en) * 2020-11-25 2021-03-12 苏州智慧车芯科技有限公司 Vehicle data acquisition and uploading method, device, equipment, storage medium and system
CN114329035A (en) * 2021-12-31 2022-04-12 中国第一汽车股份有限公司 Data processing method and device, storage medium, processor and electronic device
CN114785784A (en) * 2022-04-14 2022-07-22 中国第一汽车股份有限公司 Data processing method and device and electronic equipment

Similar Documents

Publication Publication Date Title
US20180032324A1 (en) Remote vehicle update installation scheduling
CN110347377B (en) Prometheus exporter database monitoring system
CN106131205B (en) Big data information processing system and method for Internet of Things
CN109391500A (en) A kind of configuring management method, device and equipment
WO2007083972A1 (en) Performing scheduled device management
EP1859358A2 (en) System and method for trap management and monitoring on wireless terminals
CN112764410B (en) Vehicle-mounted controller testing device, system and method
CN109495547B (en) Vehicle signal acquisition method and device, cloud server and vehicle
US20180074933A1 (en) Management of log data in electronic systems
US20040083246A1 (en) Method and system for performance management in a computer system
CN116760822A (en) Method, system and device for transmitting files of Internet of things equipment
CN112398696A (en) System and method for realizing zero configuration opening
CN111865809B (en) Equipment state sensing method, system and switch based on protocol non-sensing forwarding
CN115499461A (en) Data acquisition method and system, cloud server, vehicle and storage medium
CN114268927A (en) Vehicle-mounted communication method, device, equipment and storage medium
KR101548550B1 (en) Method for managing a communication between a server device and a customer device
WO2022053168A1 (en) Traffic classification rules based on analytics
CN113076128B (en) Method, device, electronic equipment and storage medium for robot configuration
CN112737821B (en) Data acquisition method and device
CN109249836B (en) New energy automobile charging pile data transmission method and system
CN112449006A (en) Data transmission method, computer and medium for seismic station data acquisition unit and seismic table network central data server
CN115412588B (en) Method and device for remotely updating configuration file and electronic equipment
CN111522642B (en) Method for acquiring and inquiring state monitoring data of wind turbine generator, and electronic equipment
WO2022230434A1 (en) Vehicle-mounted device, information processing method and program
EP3879397B1 (en) Method for downloading software in a plurality of meters

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