A vehicle end data uploading method, receiving method, device, equipment and medium

By generating a proto configuration template on the vehicle side, obtaining the signal list and collection rules, caching them, and encapsulating data packets for uploading when an event is triggered, the problem of large workload in configuration file maintenance in existing technologies is solved, flexible data collection and uploading are achieved, and network overhead is reduced.

CN116684450BActive Publication Date: 2026-04-21CHONGQING CHANGAN TECH CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
CHONGQING CHANGAN TECH CO LTD
Filing Date
2023-06-30
Publication Date
2026-04-21

AI Technical Summary

Technical Problem

Existing technologies require maintaining two configuration files when uploading vehicle data in the form of proto serialized strings: one for vehicle event collection and the other for proto parsing. This results in a large workload for maintaining the configuration files and makes it impossible to flexibly adjust collection and encapsulation rules.

Method used

By obtaining a proto configuration template from the cloud based on the signal list and collection rules corresponding to the event, the collection rules and signal list of the event are obtained according to the template, the signal data is cached, and when the target event is triggered, the data packet is encapsulated and serialized based on the proto configuration template and uploaded to the cloud. Only one proto configuration template needs to be maintained to achieve flexible adjustment.

Benefits of technology

It reduces the workload of configuration file maintenance, reduces the size of cloud data packets, saves network overhead, and enables flexible management of event collection rules and encapsulation rules.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116684450B_ABST
    Figure CN116684450B_ABST
Patent Text Reader

Abstract

This invention relates to the field of vehicle data communication technology, and discloses a method, device, equipment, and medium for uploading and receiving vehicle-side data. The uploading method includes: obtaining event triggering rules and event proto configuration templates from the cloud; obtaining event collection rules and a signal list based on the proto configuration templates; caching the data corresponding to the signals in the signal list; determining whether a target event has been triggered based on the triggering rules; when a target event is triggered, obtaining the value of the target signal corresponding to the target event from the cached data, and encapsulating the target signal value into an event data packet; and serializing the event data packet into a string and uploading it to the cloud. This invention can reduce the workload of configuration file maintenance, and by using serialization to upload vehicle-side data to the cloud, it can reduce the size of the cloud data packet, thereby saving network overhead.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of vehicle data communication technology, specifically to a method for uploading and receiving data on a vehicle, a device, equipment, and medium. Background Technology

[0002] With the development of intelligent connected vehicles, vehicle-side signal data can be uploaded to cloud platforms via 4G / 5G networks. This allows users to access services such as viewing current vehicle status (door open / close status, door lock status, tire pressure, mileage, remaining driving range, etc.) and receiving vehicle function recommendations (by analyzing user driving preferences to suggest specific functions). Simultaneously, companies aim to collect as much vehicle signal data as possible to support product development through data analysis and mining. Furthermore, autonomous driving algorithms require continuous iteration and massive amounts of data. Therefore, a universal data acquisition system needs to be developed, capable of collecting signal data for business applications, as well as image and point cloud data to support the closed-loop of autonomous driving algorithms. Moreover, considering the flexibility of acquisition strategies, a configuration-based approach is necessary to flexibly adjust the data collection content.

[0003] The relevant technologies primarily focus on the configurable acquisition of signals from the vehicle's Controller Area Network (CAN), including the packaging of signals that change, occur periodically, or are triggered by special events. However, they do not address the encapsulation methods for data uploading to the cloud. Furthermore, the signal types emitted by various domain controllers in the vehicle are diverse, not limited to CAN signals, but also including direct physical value signals, JSON strings, and proto strings. Especially after certain events are triggered, the signals to be collected may contain various different types of signals, and the existing solutions cannot support the configurable acquisition of such complex rules. While cloud data is typically in the form of JSON strings, considering the network resource overhead of cloud data packets, using proto serialization can significantly save resources. However, to support configurable acquisition, two configuration files need to be maintained: one for vehicle event acquisition and one for proto parsing, resulting in a significant workload for configuration file maintenance. Summary of the Invention

[0004] In view of this, the present invention provides a method, method, apparatus, device and medium for uploading and receiving vehicle-side data, in order to solve the technical problem that when uploading data in the form of proto serialized strings, it is necessary to maintain two configuration files: one for vehicle-side event collection configuration and one for proto parsing configuration, which results in a large workload for maintaining the configuration files.

[0005] In a first aspect, the present invention provides a vehicle-side data uploading method, applied to a vehicle, the method comprising: obtaining event triggering rules and event proto configuration templates from the cloud, the proto configuration templates being generated by the cloud based on a signal list and collection rules corresponding to the event; obtaining event collection rules and a signal list based on the proto configuration templates; caching data corresponding to signals in the signal list according to the collection rules; determining whether a target event has been triggered according to the triggering rules; when the target event is triggered, obtaining the value of a target signal corresponding to the target event from the cached data based on the proto configuration templates, and encapsulating the value of the target signal into an event data packet; and serializing the event data packet into a string and uploading it to the cloud.

[0006] This invention discloses a vehicle-side data uploading method. It obtains a proto configuration template generated by the cloud based on a signal list and collection rules corresponding to an event. The method then retrieves the event's collection rules and signal list based on the proto configuration template, caches the data corresponding to signals in the signal list according to the collection rules, and determines whether a target event has been triggered based on the triggering rules. When the target event is determined to be triggered according to the triggering rules, the method retrieves the value of the target signal corresponding to the target event from the cached data based on the proto configuration template, encapsulates the value of the target signal into an event data packet, serializes the event data packet into a string, and uploads it to the cloud. Therefore, this invention enables dynamic and flexible management of target events and their corresponding target signals through a proto configuration template. When a target event is triggered, the value of the target signal is encapsulated, serialized, and uploaded to the cloud. Only the proto configuration template needs to be maintained to flexibly adjust the event collection and encapsulation rules, reducing the workload of configuration file maintenance. Furthermore, using proto serialization to upload vehicle-side data to the cloud reduces the size of the uploaded data packet, thus saving network overhead.

[0007] In one optional implementation, obtaining the event collection rules and signal list according to the proto configuration template includes: obtaining the name and member fields of the message structure according to the proto configuration template; obtaining the event collection rules according to the name of the message structure; obtaining the corresponding signal names according to the member fields, and assembling a signal list according to the signal names.

[0008] By parsing the name and member fields of the message structure in the proto configuration template, the collection rules and signal list are obtained. Only one configuration file is needed to maintain the collection rules and the signals that need to be collected for the event, reducing the workload of maintenance and avoiding inconsistencies between cloud and vehicle configurations.

[0009] In one optional implementation, the step of obtaining the value of the target signal corresponding to the target event from the cached data based on the proto configuration template, and encapsulating the value of the target signal into an event data packet, includes: loading the message structure of the target event from the proto configuration template; using the member fields of the message structure of the target event as the signal name of the target signal corresponding to the target event; querying the value of the target signal from the cached data according to the signal name; and assigning the value of the target signal to the member fields of the message structure of the target event, thereby completing the encapsulation of the event data packet.

[0010] By loading the message structure from the proto configuration template and then collecting and encapsulating the corresponding signals in the message structure, the signal data corresponding to each event can be accurately obtained, and the vehicle-side data can be uploaded to the cloud using the proto serialization method.

[0011] In one optional implementation, the step of assigning values ​​to member fields of the message structure of the target event based on the value of the target signal includes: determining whether the value of the target signal is a preset type message body; when the value of the target signal is a preset type message body, creating a sub-message structure in the message structure of the target event according to the proto configuration template; obtaining the value of the sub-signal from the message body corresponding to the target signal according to the sub-member fields of the sub-message structure; and assigning values ​​to the sub-member fields of the sub-message structure based on the value of the sub-signal.

[0012] By encapsulating specific target signals through sub-message structures, the applicability of data acquisition is improved.

[0013] In one optional implementation, determining whether a target event is triggered according to the triggering rule includes: obtaining the triggering signal and corresponding triggering condition of the target event according to the triggering rule; and determining whether the target event is triggered based on the value of the triggering signal, the triggering condition, and a preset combination logic.

[0014] By determining whether a target event is triggered based on the value of the trigger signal, the trigger condition, and a preset combination of logic, trigger rules can be flexibly set.

[0015] Secondly, the present invention provides a vehicle-side data receiving method applied in the cloud. The method includes: generating a proto configuration template for an event based on a signal list and collection rules corresponding to the event; issuing the proto configuration template and event triggering rules based on a request initiated by the vehicle; receiving a string uploaded by the vehicle and deserializing the string to obtain an event data packet, wherein the string represents the collection rules and signal list obtained by the vehicle based on the proto configuration template, caching data corresponding to signals in the signal list according to the collection rules, determining whether a target event is triggered according to the triggering rules, and when the target event is triggered, obtaining the value of the target signal corresponding to the target event from the cached data based on the proto configuration template, encapsulating the value of the target signal into an event data packet, and serializing the event data packet; and parsing the event data packet to obtain the value of the target signal.

[0016] This invention discloses a vehicle-side data receiving method that can dynamically and flexibly manage target events and their corresponding target signals through a proto configuration template. When a target event is triggered, the value of the target signal is encapsulated, serialized into a string, and uploaded to the cloud. Only the proto configuration template needs to be maintained to flexibly adjust the event collection rules and encapsulation rules, reducing the workload of configuration file maintenance. Furthermore, using proto serialization to upload vehicle-side data to the cloud can reduce the size of the cloud data packet, thereby saving network overhead.

[0017] In one optional implementation, generating the proto configuration template for the event based on the signal list and acquisition rules corresponding to the event includes: constructing the name of the message structure based on the acquisition rules corresponding to the event; constructing the member fields of the message structure based on the signal names in the signal list corresponding to the event; and generating the proto configuration template for the event based on the constructed message structure.

[0018] This invention allows the proto configuration template to simultaneously include the acquisition rules and the signal names of the signals to be acquired.

[0019] Thirdly, the present invention provides a vehicle-side data uploading device, the device comprising: a configuration acquisition module, used to acquire event triggering rules and event proto configuration templates from the cloud, the proto configuration templates being generated by the cloud based on a signal list and acquisition rules corresponding to the event; a configuration parsing module, used to acquire event acquisition rules and signal list based on the proto configuration templates; a data caching module, used to cache data corresponding to signals in the signal list according to the acquisition rules; a trigger judgment module, used to determine whether a target event is triggered according to the triggering rules; a data encapsulation module, used to, when the target event is triggered, acquire the value of the target signal corresponding to the target event from the cached data based on the proto configuration templates, and encapsulate the value of the target signal into an event data packet; and a data transmission module, used to serialize the event data packet into a string and upload it to the cloud.

[0020] Fourthly, the present invention provides a vehicle-side data receiving device, the device comprising: a configuration generation module, configured to generate a proto configuration template for an event based on a signal list and acquisition rules corresponding to the event; a configuration receiving module, configured to send the proto configuration template and event triggering rules based on a request initiated by the vehicle-side; a string receiving module, configured to receive a string uploaded by the vehicle-side and deserialize the string to obtain an event data packet, wherein the string represents the acquisition rules and signal list obtained by the vehicle-side based on the proto configuration template, the data corresponding to the signals in the signal list being cached according to the acquisition rules, the determination of whether a target event is triggered according to the triggering rules, and when the target event is triggered, the value of the target signal corresponding to the target event being obtained from the cached data based on the proto configuration template, the value of the target signal being encapsulated into an event data packet, and the event data packet being serialized; and a data packet parsing module, configured to parse the event data packet to obtain the value of the target signal.

[0021] Fifthly, the present invention provides a computer device, comprising: a memory and a processor, wherein the memory and the processor are communicatively connected to each other, the memory stores computer instructions, and the processor executes the computer instructions to perform the vehicle-side data uploading method of any embodiment of the first aspect above, or the vehicle-side data receiving method of any embodiment of the second aspect above.

[0022] In a sixth aspect, the present invention provides a computer-readable storage medium storing computer instructions, the computer instructions being configured to cause a computer to execute the vehicle-side data uploading method of any embodiment of the first aspect above, or the vehicle-side data receiving method of any embodiment of the second aspect above. Attached Figure Description

[0023] To more clearly illustrate the specific embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the specific embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of the present invention. For those skilled in the art, other drawings can be obtained from these drawings without creative effort.

[0024] Figure 1 This is a flowchart illustrating the vehicle-side data upload method according to an embodiment of the present invention;

[0025] Figure 2 This is a schematic diagram of the proto configuration template according to an embodiment of the present invention;

[0026] Figure 3 This is a schematic diagram of the message structure corresponding to a special event in an embodiment of the present invention.

[0027] Figure 4 This is a flowchart illustrating the vehicle-side data receiving method according to an embodiment of the present invention;

[0028] Figure 5 This is a structural block diagram of the vehicle-side data uploading device according to an embodiment of the present invention;

[0029] Figure 6 This is a structural block diagram of the vehicle-side data receiving device according to an embodiment of the present invention;

[0030] Figure 7 This is a schematic diagram of the hardware structure of a computer device according to an embodiment of the present invention. Detailed Implementation

[0031] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0032] In related technologies, vehicle-side data is typically uploaded to the cloud using JSON-structured strings. However, considering the network resource overhead of cloud data packets, using proto serialized strings can significantly save resources. But this requires maintaining two configuration files: one for vehicle-side event collection and the other for proto parsing, and may even lead to inconsistencies between cloud and vehicle-side configurations. Therefore, this invention provides a method for uploading vehicle-side data.

[0033] According to an embodiment of the present invention, a method for uploading vehicle-side data is provided. It should be noted that the steps shown in the flowchart in the accompanying drawings can be executed in a computer system such as a set of computer-executable instructions. Furthermore, although a logical order is shown in the flowchart, in some cases, the steps shown or described may be executed in a different order than that shown here.

[0034] This invention provides a vehicle-side data uploading method, which is applied to a vehicle-side device, specifically a data acquisition module installed on vehicles such as cars and trucks. With the development of intelligent connected vehicles, the vehicle-side signal data can be uploaded to the cloud via 4G / 5G networks, making it convenient for users to view the current vehicle status. At the same time, it also facilitates enterprises to perform data analysis and mining based on the vehicle signals, providing data support for product development.

[0035] Figure 1 This is a flowchart of the vehicle-side data upload method according to an embodiment of the present invention, such as... Figure 1 As shown, the process includes the following steps:

[0036] Step S101: Receive the event triggering rules and event proto configuration template sent from the cloud. The proto configuration template is generated by the cloud based on the signal list and collection rules corresponding to the event.

[0037] Specifically, when the vehicle-side process starts, it can send an HTTP request to the cloud to obtain the event triggering rules and the event proto configuration template.

[0038] The events transmitted from the cloud include, but are not limited to, data generated during vehicle operation, such as safety events, collision events, and control events. The vehicle collects data through sensors, including vehicle speed, driver's seatbelt status, turn signal switch status, and brake pedal position. For example, it records event data such as speed and acceleration changes, brake pedal status, and seatbelt usage in the 5 seconds before a collision. Another example is, in a collision event, data such as vehicle speed, engine speed, brake switch status, longitudinal acceleration, steering wheel angle, and seatbelt usage within a few seconds.

[0039] Triggering rules define the mapping between signals and events, specifying which signals trigger events. A single signal can participate in the triggering rule evaluation for multiple events. These rules are maintained in the cloud and can correspond to a single event trigger (e.g., an event is triggered when a signal's value reaches a threshold). Alternatively, multiple signals can correspond to a single event trigger (e.g., an event is triggered only when two signals simultaneously reach their thresholds).

[0040] The proto configuration template is generated by the cloud based on a pre-collected list of signals and collection rules corresponding to events. The list of signals corresponding to events includes the signals that need to be collected after the event is triggered, and the collection rules are the collection rules for the signals that need to be collected. For example, the collection rules include change collection, which only collects the changed fields when the signal changes; periodic collection, which collects and uploads signal data at regular intervals according to the upload period; and duration collection, which collects and uploads all data of the signal within a certain time period before and after the event is triggered.

[0041] Step S102: Obtain the event collection rules and signal list according to the proto configuration template.

[0042] Specifically, the required list of signals and acquisition rules are parsed out according to the predefined format in the proto configuration template.

[0043] Step S103: Cache the data corresponding to the signals in the signal list according to the acquisition rules.

[0044] Specifically, the vehicle-mounted system can collect signals from various controllers both within and outside the domain. The data sources for the vehicle-mounted system are numerous, including CAN message data (signals need to be parsed according to certain rules), actual physical signal values, and JSON strings. The vehicle-mounted system is not concerned with the source or type of data; it only distinguishes signals by their names. Therefore, it only needs to obtain the corresponding collection rules based on the signal name to determine the caching strategy.

[0045] Acquisition rules and caching strategies are corresponding; the vehicle-side can obtain the corresponding signal caching strategy based on the acquisition rules. After receiving signal data from different sources, a unified format adjustment is performed, and data caching is performed according to the caching strategy. For example, signal acquisition rules include periodic (CT), variation (IT), and duration (BA) acquisition rules. For the caching strategy corresponding to periodic and variation acquisition rules, only the latest data needs to be stored. For example, with periodic acquisition rules, the data is replaced with the latest data each time it arrives, and the latest data is updated periodically. For variation acquisition rules, after acquiring new data, it is first compared with historical data, and then the old data is replaced with the new data. For the caching strategy corresponding to duration acquisition rules, data from the previous few seconds needs to be transmitted after the event is triggered, requiring continuous caching.

[0046] Step S104: Determine whether the target event has been triggered according to the triggering rules.

[0047] Specifically, the triggering rules define when to trigger the target event. For example, a threshold is set, and the target event is triggered when the value of a certain signal exceeds this threshold. After the signal value is updated in the cache in real time, the vehicle will judge it according to the triggering rules and decide whether to trigger the target event.

[0048] Step S105: When the target event is triggered, the value of the target signal corresponding to the target event is obtained from the cached data based on the proto configuration template, and the value of the target signal is encapsulated into an event data packet.

[0049] When the target event is triggered, the value of the corresponding signal is retrieved from the cache according to the signal corresponding to the target event in the proto configuration template, and then encapsulated into an event data packet. This event data packet can contain the values ​​of multiple signals.

[0050] Step S106: Serialize the event data packet into a string and upload it to the cloud.

[0051] Specifically, event data packets are serialized using protobuf library functions and then uploaded to cloud storage. Event data packets encapsulated according to the proto configuration template can be serialized into strings. A long-term MQTT transmission channel is established between the vehicle and the cloud. Event data packets are uploaded to the cloud as serialized strings. This reduces the amount of data transmitted, saving overhead. Furthermore, the parsing of event data packets requires corresponding proto configuration rules, increasing data security.

[0052] This invention discloses a vehicle-side data uploading method. It obtains a proto configuration template generated by the cloud based on a signal list and collection rules corresponding to an event. The method then retrieves the event's collection rules and signal list from the proto configuration template, caches the data corresponding to signals in the signal list according to the collection rules, and determines whether a target event has been triggered based on triggering rules. When a target event is determined to be triggered according to the triggering rules, the method retrieves the value of the target signal corresponding to the target event from the cached data based on the proto configuration template, encapsulates the target signal value into an event data packet, serializes the event data packet into a string, and uploads it to the cloud. Therefore, this invention can dynamically and flexibly manage target events and their corresponding target signals through a proto configuration template. When a target event is triggered, the value of the target signal is encapsulated, serialized, and uploaded to the cloud. Only the proto configuration template needs to be maintained to flexibly adjust the event collection and encapsulation rules, reducing the workload of configuration file maintenance. Furthermore, using proto serialization to upload vehicle-side data to the cloud reduces the size of the uploaded data packet, thus saving network overhead.

[0053] In some optional implementations, step S102 above, obtaining the event acquisition rules and signal list according to the proto configuration template, includes:

[0054] Step S1021: Obtain the name and member fields of the message structure based on the proto configuration template.

[0055] Step S1022: Obtain the event collection rules based on the name of the message structure.

[0056] Step S1023: Obtain the corresponding signal name based on the member field, and assemble a signal list based on the signal name.

[0057] Specifically, the proto configuration template mainly consists of several message structures. Each message structure corresponds to an event, and each message structure contains multiple member fields, each corresponding to a specific signal. The collection rules are reflected in the event name, which is also loaded into the name of the message structure. The member fields of the message structure are the signal names that need to be collected for that event. Therefore, by parsing the name and member fields of the message structures in the proto configuration template, the collection rules and the signal names of the signals to be collected can be obtained, and a signal list can be constructed based on the signal names.

[0058] like Figure 2 As shown, the proto configuration template contains three message structures, corresponding to three types of events. UP_Dat_CarData_Dat_IT001 represents a change-based acquisition event, named IT001. Each member (field) represents a signal, and the acquisition rule is change-based acquisition, meaning only changed content is collected and uploaded. UP_Dat_CarData_Dat_CT001_10000 represents a periodic acquisition event, named CT001, with periodic acquisition rules, for example, an upload period of 10 seconds, periodically collecting and uploading the signals represented by each member field. UP_Dat_CarData_Dat_BA072 represents a continuous acquisition event, with acquisition rules based on continuous duration, meaning all signal data within a certain time period before and after the event is triggered is uploaded. During caching, all signals in the BA072_signalLists structure are continuously cached.

[0059] By parsing the name and member fields of the message structure in the proto configuration template, the collection rules and signal list are obtained. Only one configuration file is needed to maintain the collection rules and the signals that need to be collected for the event, reducing the workload of maintenance and avoiding inconsistencies between cloud and vehicle configurations.

[0060] In some optional implementations, in step S105, the value of the target signal corresponding to the target event is obtained from the cached data based on the proto configuration template, and the value of the target signal is encapsulated into an event data packet, including:

[0061] Step S1051: Load the message structure of the target event from the proto configuration template.

[0062] Specifically, after the target event is triggered, the corresponding message structure needs to be loaded from the proto configuration template.

[0063] Step S1052: Use the member fields in the message structure of the target event as the signal name of the target signal corresponding to the target event.

[0064] Specifically, each event corresponds to a message structure. Therefore, extracting the name of each member field from the message structure of the target event and using it as the signal name of the target signal corresponding to that target event can bind the collected signal to the target event, avoid collecting other unnecessary signals, and make it convenient to query the data of that signal from the cache later after obtaining the signal name.

[0065] Step S1053: Query the value of the target signal from the cached data based on the signal name.

[0066] Specifically, based on the signal name obtained in step S1052, the latest data value of that signal is retrieved from the cache for encapsulation of the event data packet. If the signal data is not found, an error message is returned.

[0067] Step S1054: Assign values ​​to the member fields of the message structure of the target event according to the value of the target signal, and complete the encapsulation of the event data packet.

[0068] Specifically, based on the value of the target signal obtained in step S1053, it is assigned to the corresponding member field in the message structure to complete the encapsulation of the event data packet, so that the event data packet includes the corresponding signal data information and can be uploaded to the cloud using the proto serialization method.

[0069] By loading the message structure from the proto configuration template and then collecting and encapsulating the corresponding signals in the message structure, the signal data corresponding to each event can be accurately obtained, and the vehicle-side data can be uploaded to the cloud using the proto serialization method.

[0070] In some optional implementations, step S1054, assigning values ​​to member fields in the message structure of the target event based on the value of the target signal, includes:

[0071] Step a1: Determine whether the value of the target signal is a preset type message body.

[0072] Step a2: When the value of the target signal is a preset type message body, a sub-message structure is created in the message structure of the target event according to the proto configuration template.

[0073] Step a3: Obtain the value of the sub-signal from the message body corresponding to the target signal based on the sub-member fields of the sub-message structure.

[0074] Step a4: Assign values ​​to the sub-member fields of the sub-message structure based on the value of the sub-signal.

[0075] Specifically, after obtaining the value of the target signal, its type needs to be determined. If the value is a message body of a preset type, the next parsing operation is performed. If the value is not a message body of a preset type, the value of the target signal is simply assigned to the corresponding member field. For example, the preset message body is a JSON message body.

[0076] Due to the diversity of vehicle-side data, special events and signals may occur during signal acquisition. For example, the data content of some target signals may be a JSON message body, requiring parsing of the target sub-signal from the JSON message body based on the proto configuration template. In this case, a sub-message for the target signal is designed in the message structure of the target event according to the member parameters of the JSON message body. Figure 3 As shown, when caching signals on the vehicle side, the entire JSON message body is directly cached as the signal value. After an event is triggered, the member fields of the message structure are dynamically loaded, and the signal value is queried and assigned. When encapsulating a signal, a sub-message is created for the target signal of type JSON. The member fields of the sub-message are dynamically traversed, the value of the corresponding sub-signal is obtained from the JSON message body, and encapsulated into a sub-message as the signal value.

[0077] By encapsulating specific target signals through sub-message structures, the applicability of data acquisition is improved.

[0078] In some optional implementations, step S104, determining whether the target event has been triggered according to the triggering rules, includes:

[0079] Step S1041: Obtain the trigger signal and corresponding trigger conditions of the target event according to the triggering rules.

[0080] Step S1042: Determine whether the target event is triggered based on the value of the trigger signal, the trigger condition, and the preset combination logic.

[0081] Specifically, when loading event triggering rules, a mapping relationship between signals and events can be set, specifying which signals will trigger events. The same signal can participate in the triggering rule judgment for multiple events; the signal participating in the triggering rule judgment is the trigger signal. A separate business logic processing flow can be designed for event triggering. This business logic processing flow can be loaded from the cloud or generated and saved on the vehicle side. Pre-defined combination logic is set within this flow. The input parameters of the flow are a set of signal names for several trigger signals. Within the flow, signal values ​​can be retrieved from the cache based on the signal name and used in the logical operations for event triggering judgment. There can be one or more triggering conditions. A single condition can be a single signal value judgment, such as being greater than, less than, or equal to a certain set value to satisfy the condition. Multiple conditions can be combined using AND, OR, or other logic for judgment.

[0082] By determining whether a target event is triggered based on the value of the trigger signal, the trigger condition, and preset combined logic, trigger rules can be flexibly set.

[0083] This invention also proposes a vehicle-side data receiving method, see [link to relevant documentation]. Figure 4 Applied to the cloud, the methods include:

[0084] Step S401: Generate the proto configuration template for the event based on the signal list and acquisition rules corresponding to the event.

[0085] Specifically, the signal list and collection rules for each event on the vehicle are determined in advance from the vehicle manufacturer or vehicle manager, and then the signal list and collection rules are reflected in the proto configuration template.

[0086] Step S402: Based on the request initiated by the vehicle, the proto configuration template and event triggering rules are issued.

[0087] Specifically, when the vehicle-side initializes the data collection process, it pulls and loads the configuration file and sends an HTTP request to the cloud. After receiving the request, the cloud sends out the proto configuration template and event triggering rules.

[0088] Step S403: Receive the string uploaded by the vehicle terminal and deserialize the string to obtain the event data packet. The string is the event collection rules and signal list obtained by the vehicle terminal according to the proto configuration template. According to the collection rules, the data corresponding to the signals in the signal list is cached. According to the triggering rules, it is determined whether the target event is triggered. When the target event is triggered, the value of the target signal corresponding to the target event is obtained from the cached data based on the proto configuration template, and the value of the target signal is encapsulated into an event data packet. The event data packet is then serialized to obtain the data packet.

[0089] Specifically, when an event is triggered, the vehicle collects signals according to the proto configuration template and uploads the string obtained after signal encapsulation and serialization. The cloud then deserializes the serialized string to obtain the event data packet.

[0090] Step S404: Parse the event data packet to obtain the value of the target signal.

[0091] The cloud parses the event data packets to obtain the value of the target signal of the event, i.e., the signal data information of the event. The cloud's parsing and encapsulation process for event data packets is the reverse, and will not be elaborated here, but the rules must remain consistent. Afterwards, the cloud can push the event data packets to other business modules, such as pushing to Kafka, mobile devices, etc.

[0092] This invention discloses a vehicle-side data receiving method that can dynamically and flexibly manage target events and their corresponding target signals through a proto configuration template. When a target event is triggered, the value of the target signal is encapsulated, serialized into a string, and uploaded to the cloud. Only the proto configuration template needs to be maintained to flexibly adjust the event collection rules and encapsulation rules, reducing the workload of configuration file maintenance. Furthermore, using proto serialization to upload vehicle-side data to the cloud can reduce the size of the cloud data packet, thereby saving network overhead.

[0093] In some optional implementations, step S401, generating a proto configuration template for the event based on the signal list and acquisition rules corresponding to the event, includes:

[0094] Step S4011: Construct the name of the message structure according to the collection rules corresponding to the event.

[0095] Step S4012: Construct the member fields of the message structure based on the signal name in the signal list corresponding to the event.

[0096] Step S4013: Generate the proto configuration template for the event based on the constructed message structure.

[0097] Specifically, the proto configuration template mainly consists of several message structures. Each message structure corresponds to an event, and each message structure contains multiple member fields, each corresponding to a specific signal. The collection rules are reflected in the event name, which is also loaded into the name of the message structure. The member fields of the message structure are the signal names that need to be collected for that event. Therefore, by parsing the name and member fields of the message structures in the proto configuration template, the collection rules and the signal names of the signals to be collected can be obtained, and a signal list can be constructed based on the signal names.

[0098] This invention also proposes a vehicle-side data uploading device, such as... Figure 5 As shown, the vehicle-side data upload device includes:

[0099] The configuration acquisition module 501 is used to obtain the event triggering rules and the event proto configuration template from the cloud. The proto configuration template is generated by the cloud based on the signal list and collection rules corresponding to the event. The specific content is the same as in the above method embodiment, and will not be repeated here.

[0100] The configuration parsing module 502 is used to obtain the event collection rules and signal list based on the proto configuration template. The specific content is the same as in the above method embodiment, and will not be repeated here.

[0101] The data caching module 503 is used to cache the data corresponding to the signals in the signal list according to the acquisition rules. The specific content is the same as in the above method embodiment, and will not be repeated here.

[0102] The trigger determination module 504 is used to determine whether the target event has been triggered based on the triggering rules. Its specific content is the same as the method embodiment described above, and will not be repeated here.

[0103] The data encapsulation module 505 is used to retrieve the value of the target signal corresponding to the target event from the cached data based on the proto configuration template when the target event is triggered, and encapsulate the value of the target signal into an event data packet. The specific content is the same as the method embodiment described above, and will not be repeated here.

[0104] The data transmission module 506 is used to serialize the event data packets into strings and then upload them to the cloud. The specific details are the same as in the above method embodiment and will not be repeated here.

[0105] This invention discloses a vehicle-side data uploading device that obtains a proto configuration template generated by the cloud based on a signal list and collection rules corresponding to an event. The device then obtains the event collection rules and signal list based on the proto configuration template, caches the data corresponding to the signals in the signal list according to the collection rules, and determines whether a target event has been triggered based on triggering rules. When a target event is determined to be triggered according to the triggering rules, the device retrieves the value of the target signal corresponding to the target event from the cached data based on the proto configuration template, encapsulates the value of the target signal into an event data packet, serializes the event data packet into a string, and uploads it to the cloud. Therefore, this invention can dynamically and flexibly manage target events and their corresponding target signals through a proto configuration template. When a target event is triggered, the device encapsulates and serializes the value of the target signal into a string before uploading it to the cloud. Only the proto configuration template needs to be maintained to flexibly adjust the event collection rules and encapsulation rules, reducing the workload of configuration file maintenance. Furthermore, using proto serialization to upload vehicle-side data to the cloud reduces the size of the cloud data packet, thus saving network overhead.

[0106] This invention also proposes a vehicle-side data receiving device, such as... Figure 6 As shown, the vehicle-side data receiving device includes:

[0107] The configuration generation module 601 is used to generate a proto configuration template for the event based on the signal list and acquisition rules corresponding to the event. The specific content is the same as in the above method embodiment and will not be repeated here.

[0108] The configuration receiving module 602 is used to send proto configuration templates and event triggering rules based on requests initiated by the vehicle. The specific content is the same as in the above method embodiment, and will not be repeated here.

[0109] The string receiving module 603 is used to receive the string uploaded by the vehicle terminal and deserialize the string to obtain an event data packet. The string represents the event collection rules and signal list obtained by the vehicle terminal based on the proto configuration template. According to the collection rules, the data corresponding to the signals in the signal list is cached. Based on the triggering rules, it is determined whether the target event has been triggered. When the target event is triggered, the value of the target signal corresponding to the target event is obtained from the cached data based on the proto configuration template, and the value of the target signal is encapsulated into an event data packet. The event data packet is then serialized. The specific details are the same as in the above method embodiment and will not be repeated here.

[0110] The data packet parsing module 604 is used to parse event data packets to obtain the value of the target signal. The specific details are the same as in the above method embodiment and will not be repeated here.

[0111] An embodiment of the present invention provides a vehicle-side data receiving device that can dynamically and flexibly manage target events and their corresponding target signals through a proto configuration template. When a target event is triggered, the value of the target signal is encapsulated, serialized into a string, and uploaded to the cloud. Only the proto configuration template needs to be maintained to flexibly adjust the event collection rules and encapsulation rules, reducing the workload of configuration file maintenance. Furthermore, using proto serialization to upload vehicle-side data to the cloud can reduce the size of the cloud data packet, thereby saving network overhead.

[0112] Further functional descriptions of the above modules and units are the same as those in the corresponding embodiments described above, and will not be repeated here.

[0113] In this embodiment, the vehicle-side data uploading device is presented in the form of a functional unit. Here, a unit refers to an ASIC (Application Specific Integrated Circuit) circuit, a processor and memory that execute one or more software or fixed programs, and / or other devices that can provide the above functions.

[0114] Please see Figure 7 , Figure 7 This is a schematic diagram of the structure of a computer device provided in an optional embodiment of the present invention, such as... Figure 7 As shown, the computer device includes one or more processors 10, memory 20, and interfaces for connecting the components, including high-speed interfaces and low-speed interfaces. The components communicate with each other via different buses and can be mounted on a common motherboard or otherwise installed as needed. The processors can process instructions executed within the computer device, including instructions stored in or on memory to display graphical information of a GUI on external input / output devices (such as display devices coupled to the interfaces). In some alternative implementations, multiple processors and / or multiple buses can be used with multiple memories and multiple memory modules, if desired. Similarly, multiple computer devices can be connected, each providing some of the necessary operations (e.g., as a server array, a group of blade servers, or a multiprocessor system). Figure 7 Take a processor 10 as an example.

[0115] Processor 10 may be a central processing unit, a network processor, or a combination thereof. Processor 10 may further include a hardware chip. The hardware chip may be an application-specific integrated circuit (ASIC), a programmable logic device (PLD), or a combination thereof. The programmable logic device may be a complex programmable logic device (CAMP), a field-programmable gate array (FPGA), a general-purpose array logic (GDA), or any combination thereof.

[0116] The memory 20 stores instructions executable by at least one processor 10 to cause at least one processor 10 to perform the method shown in the above embodiments.

[0117] The memory 20 may include a program storage area and a data storage area. The program storage area may store the operating system and applications required for at least one function; the data storage area may store data created based on the use of the computer device. Furthermore, the memory 20 may include high-speed random access memory and may also include non-transitory memory, such as at least one disk storage device, flash memory device, or other non-transitory solid-state storage device. In some alternative embodiments, the memory 20 may optionally include memory remotely located relative to the processor 10, and these remote memories may be connected to the computer device via a network. Examples of such networks include, but are not limited to, the Internet, intranets, local area networks, mobile communication networks, and combinations thereof.

[0118] The memory 20 may include volatile memory, such as random access memory; the memory may also include non-volatile memory, such as flash memory, hard disk or solid-state drive; the memory 20 may also include a combination of the above types of memory.

[0119] The computer device also includes a communication interface 30 for communicating with other devices or communication networks.

[0120] This invention also provides a computer-readable storage medium. The methods described above according to embodiments of the invention can be implemented in hardware or firmware, or implemented as computer code that can be recorded on a storage medium, or implemented as computer code downloaded via a network and originally stored on a remote storage medium or a non-transitory machine-readable storage medium and then stored on a local storage medium. Thus, the methods described herein can be processed by software stored on a storage medium using a general-purpose computer, a dedicated processor, or programmable or dedicated hardware. The storage medium can be a magnetic disk, optical disk, read-only memory, random access memory, flash memory, hard disk, or solid-state drive, etc.; further, the storage medium can also include combinations of the above types of memory. It is understood that computers, processors, microprocessor controllers, or programmable hardware include storage components capable of storing or receiving software or computer code, which, when accessed and executed by the computer, processor, or hardware, implements the methods shown in the above embodiments.

[0121] Although embodiments of the invention have been described in conjunction with the accompanying drawings, those skilled in the art can make various modifications and variations without departing from the spirit and scope of the invention, and such modifications and variations all fall within the scope defined by the appended claims.

Claims

1. A method for uploading vehicle-side data, characterized in that, Applied to the vehicle end, the method includes: Receive the event triggering rules and event proto configuration templates sent from the cloud. The proto configuration templates are generated by the cloud based on the signal list and collection rules corresponding to the event. The process of obtaining event collection rules and signal list based on the proto configuration template includes: obtaining the name and member fields of the message structure based on the proto configuration template; obtaining the event collection rules based on the name of the message structure; obtaining the corresponding signal names based on the member fields; and assembling a signal list based on the signal names. The data corresponding to the signals in the signal list are cached according to the acquisition rules. Determine whether the target event is triggered based on the triggering rules; When the target event is triggered, the value of the target signal corresponding to the target event is obtained from the cached data based on the proto configuration template, and the value of the target signal is encapsulated into an event data packet; The event data packet is serialized into a string and then uploaded to the cloud.

2. The method according to claim 1, characterized in that, The step of retrieving the value of the target signal corresponding to the target event from the cached data based on the proto configuration template, and encapsulating the value of the target signal into an event data packet, includes: Load the message structure of the target event from the proto configuration template; The member fields in the message structure of the target event are used as the signal names of the target signals corresponding to the target event; The value of the target signal is retrieved from the cached data based on the signal name; The event data packet is encapsulated by assigning values ​​to the member fields of the message structure of the target event based on the value of the target signal.

3. The method according to claim 2, characterized in that, The step of assigning values ​​to member fields in the message structure of the target event based on the value of the target signal includes: Determine whether the value of the target signal is a preset type message body; When the value of the target signal is a message body of a preset type, a sub-message structure is created in the message structure of the target event according to the proto configuration template; The value of the sub-signal is obtained from the message body corresponding to the target signal based on the sub-member fields of the sub-message structure; The sub-member fields of the sub-message structure are assigned values ​​based on the values ​​of the sub-signals.

4. The method according to claim 1, characterized in that, The step of determining whether the target event is triggered according to the triggering rules includes: The trigger signal and corresponding trigger conditions of the target event are obtained according to the triggering rules. The target event is determined based on the value of the trigger signal, the trigger condition, and the preset combination logic.

5. A method for receiving data at a vehicle end, characterized in that, Applied to the cloud, the method includes: Generate the proto configuration template for the event based on the signal list and acquisition rules corresponding to the event; The proto configuration template and event triggering rules are issued based on the request initiated by the vehicle. The system receives a string uploaded by the vehicle and deserializes the string to obtain an event data packet. The string represents the event collection rules and signal list obtained by the vehicle based on the proto configuration template. The system caches the data corresponding to the signals in the signal list according to the collection rules, determines whether the target event is triggered according to the triggering rules, and when the target event is triggered, the system obtains the value of the target signal corresponding to the target event from the cached data based on the proto configuration template, encapsulates the value of the target signal into an event data packet, and serializes the event data packet. The value of the target signal is obtained by parsing the event data packet; The event collection rules and signal list are obtained according to the proto configuration template, including: Obtain the name and member fields of the message structure based on the proto configuration template; The event collection rules are obtained based on the name of the message structure; Obtain the corresponding signal name based on the member field, and assemble a signal list based on the signal name.

6. The method according to claim 5, characterized in that, The process of generating the proto configuration template for an event based on the signal list and acquisition rules corresponding to the event includes: The name of the message structure is constructed based on the collection rules corresponding to the event; Construct the member fields of the message structure based on the signal name in the signal list corresponding to the event; Generate event proto configuration templates based on the constructed message structure.

7. A vehicle-side data uploading device, characterized in that, The device includes: The configuration acquisition module is used to obtain the event triggering rules and the event proto configuration template from the cloud. The proto configuration template is generated by the cloud based on the signal list and collection rules corresponding to the event. The configuration parsing module is used to obtain the event collection rules and signal list according to the proto configuration template, including: obtaining the name and member fields of the message structure according to the proto configuration template; obtaining the event collection rules according to the name of the message structure; obtaining the corresponding signal names according to the member fields, and assembling a signal list according to the signal names; The data caching module is used to cache the data corresponding to the signals in the signal list according to the acquisition rules; The triggering judgment module is used to determine whether the target event is triggered according to the triggering rules. The data encapsulation module is used to, when the target event is triggered, retrieve the value of the target signal corresponding to the target event from the cached data based on the proto configuration template, and encapsulate the value of the target signal into an event data packet; The data transmission module is used to serialize the event data packet into a string and then upload it to the cloud.

8. A vehicle-end data receiving device, characterized in that, The device includes: The configuration generation module is used to generate proto configuration templates for events based on the signal list and acquisition rules corresponding to the events. The configuration receiving module is used to send the proto configuration template and event triggering rules based on the request initiated by the vehicle. A string receiving module is used to receive strings uploaded by the vehicle terminal and deserialize the strings to obtain event data packets. The strings represent the event collection rules and signal list obtained by the vehicle terminal based on the proto configuration template. The vehicle terminal caches the data corresponding to the signals in the signal list according to the collection rules, determines whether a target event is triggered according to the triggering rules, and when the target event is triggered, retrieves the value of the target signal corresponding to the target event from the cached data based on the proto configuration template, encapsulates the value of the target signal into an event data packet, and serializes the event data packet. The process of obtaining the event collection rules and signal list according to the proto configuration template includes: obtaining the name and member fields of the message structure according to the proto configuration template; obtaining the event collection rules according to the name of the message structure; obtaining the corresponding signal names according to the member fields; and assembling a signal list based on the signal names. The data packet parsing module is used to parse the event data packet to obtain the value of the target signal.

9. A computer device, characterized in that, include: The system includes a memory and a processor, which are communicatively connected to each other. The memory stores computer instructions, and the processor executes the computer instructions to perform the vehicle-side data uploading method of any one of claims 1 to 4 or the vehicle-side data receiving method of claim 5 or 6.

10. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores computer instructions for causing the computer to perform the vehicle-side data uploading method according to any one of claims 1 to 4 or the vehicle-side data receiving method according to claim 5 or 6.

Citation Information

Patent Citations

  • Vehicle data processing method and device, equipment and medium

    CN116107624A