Data processing method, device, system, electronic device and readable storage medium
By using at least two reinjection channels on the Flexray bus for data reinjection, the problem of abnormal reinjection caused by excessive data volume is solved, and the efficiency of controller development and verification is improved.
Patent Information
- Application Number
- CN202311640649.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-12-01
- Publication Date
- 2024-09-06
- Estimated Expiration
- 2043-12-01
AI Technical Summary
The node reinjection capability on the Flexray bus is limited. When the amount of data exceeds a certain threshold, abnormal data reinjection will occur, affecting the development and verification efficiency of the controller.
By sending Flexray data to the injection module, and having it injected back to the data receiving unit by at least two Flexray reinjection channels based on the preset data injection configuration information, the transmission capacity is improved and exceptions caused by excessive data volume are avoided. Condition.
It effectively improves the transmission capability of data re-injection, prevents data anomalies, and ensures the efficiency of controller development and verification.
Smart Images

Figure CN117675434B
Abstract
Description
Technical Field
[0001] The present application relates to the field of data processing technology, and in particular to a data processing method, device, system, electronic device and readable storage medium. Background Art
[0002] At present, driverless technology is booming, and the most important thing is the data information collected in real situations. In the process of algorithm development, the most important thing is to use real data to verify the effect of the algorithm. Using the collected data to inject back into the controller can greatly improve the efficiency of development and verification.
[0003] However, in the related art, the back-injection capability of the nodes on the Flexray bus is limited. When the amount of data exceeds a certain threshold range, abnormal conditions may occur in the data back-injection, thereby affecting the subsequent development and verification efficiency of the controller.
[0004] Therefore, how to prevent abnormal situations in data back-injection caused by excessive data volume and ensure the efficiency of subsequent development and verification of the controller is a technical problem that urgently needs to be solved in the current field of data processing technology. Summary of the invention
[0005] The present application provides a data processing method, device, system, electronic device and readable storage medium, aiming to solve the technical problem of how to prevent abnormal situations from occurring in data back-injection due to excessive data volume and ensure the subsequent development and verification efficiency of the controller.
[0006] In one aspect, the present application provides a data processing method, the method comprising:
[0007] Get the Flexray data to be injected;
[0008] Acquire preset data reinjection configuration information, where the data reinjection configuration information is used to configure the Flexray data to be respectively reinjected by at least two Flexray reinjection channels of the injection module;
[0009] The Flexray data is sent to the injection module, and the Flexray data is respectively injected back to the data receiving unit through at least two of the Flexray injection channels based on the data injection configuration information.
[0010] In another aspect, the present application provides a data processing device, the device comprising:
[0011] A first acquisition unit, used for acquiring Flexray data to be re-injected;
[0012] A second acquisition unit is used to acquire preset data reinjection configuration information, where the data reinjection configuration information is used to configure the Flexray data to be respectively reinjected by at least two Flexray reinjection channels of the injection module;
[0013] The first sending unit is used to send the Flexray data to the injection module, and make the Flexray data be respectively injected to the data receiving unit through at least two Flexray injection channels based on the data injection configuration information.
[0014] On the other hand, the present application also provides a data processing system, comprising a data processing unit, an injection module and a data receiving unit, wherein the injection module is connected to the data processing unit and the data receiving unit respectively;
[0015] The data processing unit is used to obtain Flexray data to be reinjected; obtain preset data reinjection configuration information, wherein the data reinjection configuration information is used to configure the Flexray data to be respectively reinjected by at least two Flexray reinjection channels of the injection module; send the Flexray data to the injection module, and make the Flexray data respectively reinjected to the data receiving unit by at least two Flexray reinjection channels based on the data reinjection configuration information;
[0016] The injection module is used to enable the Flexray data to be respectively injected back to the data receiving unit through at least two of the Flexray injection channels based on the data injection configuration information;
[0017] The data receiving unit is used to receive the Flexray data respectively injected by at least two of the Flexray injection channels.
[0018] On the other hand, the present application also provides an electronic device, including a processor and a memory, wherein a computer program is stored in the memory, and when the computer program is executed by the processor, the data processing method is implemented.
[0019] On the other hand, the present application also provides a computer-readable storage medium on which a computer program is stored, and the computer program is loaded by a processor to execute the steps in the data processing method.
[0020] In an embodiment of the present application, Flexray data is sent to an injection module, and the Flexray data is respectively injected back to a data receiving unit through at least two Flexray injection channels based on preset data injection configuration information. Compared with the original data transmission scheme through the injection channel of a single node, the present application adopts at least two Flexray injection channels for data injection, and its transmission capacity is effectively improved, avoiding the abnormal data transmission on the Flexray bus due to the data volume exceeding a certain threshold range, thereby ensuring the subsequent development and verification efficiency of the controller. BRIEF DESCRIPTION OF THE DRAWINGS
[0021] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For those skilled in the art, other drawings can be obtained based on these drawings without creative work.
[0022] Figure 1 is a scenario schematic diagram of a data processing system provided in an embodiment of the present application;
[0023] Figure 2 It is a schematic diagram of an embodiment of a data processing method provided in an embodiment of the present application;
[0024] Figure 3 It is a schematic diagram of an embodiment of the Flexray bus principle provided in the embodiments of the present application;
[0025] Figure 4 is a schematic diagram of the structure of an embodiment of a data processing device provided in an embodiment of the present application;
[0026] Figure 5 It is a schematic diagram of the structure of an embodiment of the data processing unit provided in the embodiments of the present application. DETAILED DESCRIPTION
[0027] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without creative work are within the scope of protection of this application.
[0028] In the embodiment of the present application, Flexray is a time-triggered bus system that complies with the principle of TDMA (Time Division Multiple Access). Therefore, within the time control area, time slots will be allocated to certain messages, that is, a specified time period will be allocated to a specific message, and the time slots are repeated at a fixed period, which means that the time when the information is on the bus can be predicted, thereby ensuring its determinism.
[0029] Specifically, TDMA (Time Division Multiple Access) is a multiple access technology whose principle is to divide time into non-overlapping time slots and transmit data to different users or devices in different time slots to achieve parallel communication between multiple users or devices on the same frequency.
[0030] The principles of TDMA include:
[0031] 1. Time division: Divide time into time slots of fixed length, each of which is used by one user or device for data transmission. Different users or devices communicate in different time slots to ensure that their transmissions do not conflict with each other.
[0032] 2. Frequency reuse: TDMA can be used in combination with frequency reuse technology (such as FDMA, frequency division multiple access), that is, the spectrum is divided into multiple non-overlapping frequency bands, each of which is used for TDMA time slot transmission of one user or device. In this way, different users or devices can communicate in parallel on different frequency bands.
[0033] 3. Synchronous coordination: All users or devices need to transmit data under the same clock synchronization to ensure that the start and end times of all time slots are consistent. This can avoid time slot conflicts between different users or devices.
[0034] 4. Utilization efficiency: By effectively using time resources, TDMA can efficiently realize parallel communication of multiple users or devices and improve the utilization rate of spectrum resources.
[0035] In general, the principle of TDMA is based on time division and frequency reuse, which enables parallel communication of multiple users or devices through synchronous coordination and efficient use of time resources.
[0036] In the Flexray bus, it includes conceptual parameters such as large cycle, small cycle and time slice. The large cycle (Gross Cycle) is the basic unit of the entire communication cycle, which is composed of multiple small cycles (Mini Cycle). Each small cycle is a time slice used to transmit data and control information on the bus.
[0037] The big cycle is the largest time unit in the Flexray communication network, which determines the working cycle of the entire system. The big cycle is usually composed of M small cycles, and the length of each small cycle can be the same or different.
[0038] Each small cycle consists of a series of time slots, which are used to transmit data frames on the bus. Each time slot has a fixed length, which is used to determine the sending and receiving time of each node on the bus.
[0039] The length of the large cycle and the number of small cycles can be configured and adjusted according to application requirements. According to system design and requirements, different large cycle and small cycle configurations can be selected to meet communication needs and bandwidth allocation requirements.
[0040] For ease of understanding, a time slot (also known as a time slot) can be understood as a slot. The small cycle mentioned above can contain multiple slots. Figure 3 As shown, in the Flexray bus, the large cycle circulates continuously, and each large cycle includes M small cycles, namely Cycle1 to CycleM. The number of slots in each Cycle, the length of the Cycle, and the length of the Slot can be the same or different.
[0041] The inventor of the present application has found that in the related art, the node's injection capacity on the Flexray bus is limited. When the amount of data exceeds a certain threshold range, it will cause abnormalities in the data injection, thereby affecting the subsequent development and verification efficiency of the controller. To this end, the embodiment of the present application provides a data processing method, device, system, electronic device and readable storage medium, by sending Flexray data to an injection module, and making the Flexray data be injected to the data receiving unit by at least two Flexray injection channels based on the preset data injection configuration information. Compared with the original data transmission scheme through the injection channel of a single node, the present application uses at least two Flexray injection channels for data injection, and its transmission capacity is effectively improved, avoiding the situation that the data transmission on the Flexray bus is abnormal due to the amount of data exceeding a certain threshold range, ensuring the subsequent development and verification efficiency of the controller, and the specific scheme will be described in detail below.
[0042] like Figure 1 As shown, Figure 1 is a scenario schematic diagram of a data processing system provided in an embodiment of the present application, the data processing system may include a data processing unit 100, an injection module 200 and a data receiving unit 300, the data injection unit being connected to the data processing unit and the data receiving unit respectively;
[0043] The data processing unit is used to obtain Flexray data to be reinjected; obtain preset data reinjection configuration information, wherein the data reinjection configuration information is used to configure the Flexray data to be respectively reinjected by at least two Flexray reinjection channels of the injection module; send the Flexray data to the injection module, and make the Flexray data respectively reinjected to the data receiving unit by at least two Flexray reinjection channels based on the data reinjection configuration information;
[0044] The injection module is used to enable the Flexray data to be respectively injected back to the data receiving unit through at least two of the Flexray injection channels based on the data injection configuration information;
[0045] The data receiving unit is used to receive the Flexray data respectively injected by at least two of the Flexray injection channels.
[0046] The data processing unit 100 may be an industrial computer, or a component or a combination of components in an industrial computer for implementing data processing, such as a processor, or a combination of a processor, memory, etc. It may also be a circuit board designed specifically for implementing the method involved in the embodiment of the present invention, such as an FPGA circuit board.
[0047] The injection module 200 may include at least one injection unit, such as a injection board, or a circuit part that can be used to implement injection and is provided on other circuit boards (for example, integrating one or some injection circuits into an industrial computer motherboard). The at least one injection unit (such as a injection board) may be one, or two or more injection units (such as injection boards). Each injection unit (such as an injection board) may include at least two data injection channels. For the present application, the two data injection channels are two Flexray injection channels, and the data injection channels include ports for injecting data, such as the data injection channels of the Flexray bus, that is, the ports in the injection module 200 connected to the Flexray bus. In a further optional embodiment, other contents may also be included. That is to say, taking the injection board as an example, according to the basic definition of the data injection channel, the data processing unit 100 sends data to the injection board.
[0048] Specifically, the injection board may include a fully integrated board, a bus board, a video board and an Ethernet (Eth) board, and the selection is made according to actual needs. For example, when only Flexray data needs to be transmitted, the injection module 200 may only include a Flexray bus board, and when Flexray data and other types of data need to be transmitted, the injection module 200 may choose to use a fully integrated board, or a bus board, or a combination of a bus board and other types of data boards, and the selection can be made according to actual needs.
[0049] In addition, the re-injection board can be understood as a circuit board that can be used to realize data re-injection. The re-injection board may also be used to realize other purposes. Therefore, regardless of whether it can realize other functions, it can be understood as a re-injection board. For example, an Ethernet board (such as an in-vehicle Ethernet network card, an ordinary Ethernet network card, etc., which can be integrated into an industrial computer or connected to an industrial computer) can be a board that realizes Ethernet communication and can be used in other Ethernet communication scenarios to realize various communication functions. However, because it can realize Ethernet data re-injection by using its own functions, it can also be understood as a re-injection board. In addition, various re-injection boards can be externally connected to an industrial computer or integrated into an industrial computer.
[0050] It should be noted that when the injection module 200 includes only one injection board and the data to be injected includes bus data as well as video data and / or Ethernet data, the injection board is specifically selected as a fully integrated board, which can integrate data injection channels corresponding to various types of data.
[0051] It should be noted that in the embodiment of the present application, the back-injection board can realize multi-channel, and different routes and different types of buses can also be back-injected between each bus board and the industrial computer through different back-injection boards. The connection can be achieved through a connecting line, or the bus board can be inserted into the slot of the industrial computer to achieve the connection. The specific situation can be set according to actual needs and will not be elaborated here.
[0052] The data receiving unit 300 may include a controller such as an ECU, for example, a circuit board, a control device, etc. of the ECU.
[0053] The data processing system provided by the embodiment of the present application sends Flexray data to the injection module, and makes the Flexray data be respectively injected to the data receiving unit through at least two Flexray injection channels based on the preset data injection configuration information. Compared with the original data transmission scheme through the injection channel of a single node, the present application adopts at least two Flexray injection channels for data injection, and its transmission capacity is effectively improved, avoiding the abnormal data transmission on the Flexray bus due to the data volume exceeding a certain threshold range, thereby ensuring the subsequent development and verification efficiency of the controller.
[0054] Those skilled in the art will understand that Figure 1 The application environment shown in the figure is only one application scenario of the present application solution, and is not intended to limit the application scenario of the present application solution. Other application environments may also include Figure 1 More or fewer industrial computers as shown in Figure 1 Only one industrial computer is shown in the figure. It can be understood that the data processing system can also include one or more other industrial computers, which are not specifically limited here.
[0055] It should be noted that Figure 1 The scenario diagram of the data processing system shown is merely an example. The data processing system and scenario described in the embodiments of the present application are intended to more clearly illustrate the technical solution of the embodiments of the present application, and do not constitute a limitation on the technical solution provided in the embodiments of the present application. A person of ordinary skill in the art will appreciate that with the evolution of the data processing system and the emergence of new business scenarios, the technical solution provided in the embodiments of the present application is equally applicable to similar technical problems.
[0056] Next, the data processing method provided by the embodiment of the present application is introduced.
[0057] In the embodiment of the data processing method of the present application embodiment, a data processing device or a data processing unit 100 is used as an execution subject. For the sake of simplicity and ease of description, the execution subject will be omitted in the subsequent method embodiments. The data processing device or the data processing unit is applied to an industrial computer.
[0058] The data processing method described in the present application is described in detail below in conjunction with the accompanying drawings. Although the present application provides method operation steps as shown in the following embodiments or drawings, more or fewer operation steps may be included in the method based on routine or no creative labor. In the steps where there is no necessary causal relationship logically, the execution order of these steps is not limited to the execution order provided by the embodiments of the present application. The method can be executed in the order of the method shown in the embodiments or drawings or in parallel (such as a parallel processor or a multi-threaded processing environment) during the actual object processing process or when the device is executed.
[0059] See also Figures 2 to 5 , Figure 2 This is a flow chart of an embodiment of a data processing method provided in an embodiment of the present application. The data processing method includes steps 201 to 203:
[0060] 201. Obtain the Flexray data to be reinjected.
[0061] The data to be reinjected may be data synchronously recorded during the driving process of the vehicle, or may be data generated by a preset simulation device.
[0062] When the data to be injected is data recorded synchronously during the driving process of the vehicle, the preset data acquisition equipment (such as AD station, intelligent data acquisition workstation, recorder, etc.) can be used to record the data. The recorded data includes, for example, CAN data collected from the vehicle's CAN bus during the driving process of the vehicle, LIN data collected from the vehicle's LIN bus, Flexray data collected from the vehicle's Flexray bus, eth data collected from the vehicle's Ethernet, and video data collected from the camera in the vehicle.
[0063] After obtaining the above-mentioned data to be reinjected, the data to be reinjected can be stored in a preset storage device or database. When the data to be reinjected is needed, the data to be reinjected can be called or read from the preset storage device or database through the industrial computer to obtain the data to be reinjected.
[0064] Specifically, the data injected back on the Flexray bus may include, but is not limited to, information on vehicle perception, calculation, feedback, and brake wheel speed, steering, braking, equipment status, and other data.
[0065] Among them, Flexray data includes at least two categories of message data, and the at least two categories of message data can be two categories, three categories or even one hundred categories, which can be set according to actual needs. Different categories of message data are generally generated by different collection nodes on the vehicle.
[0066] Different types of message data usually have different data structures. Specifically, the message ID, data length, signal bit and other information can be defined according to the communication protocol and application requirements.
[0067] Furthermore, the reason why there are multiple different types of messages on the Flexray bus is to meet the communication requirements between different nodes. Different types of messages usually have different priorities and functions, and are used to inject different types of data into the system.
[0068] The following are some common types of messages:
[0069] 1. Control message: used to transmit system control information, such as network synchronization, start and stop commands, etc.
[0070] 2. Periodic message: A message sent periodically at a predetermined time interval, used to transmit real-time data, such as sensor data, motor control commands, etc.
[0071] 3. Event-triggered message: A message sent when a specific event is triggered, used to transmit immediate, non-periodic data, such as emergency stop signals, fault information, etc.
[0072] 4. Sync message: used to achieve time synchronization between nodes and ensure data consistency across the entire network.
[0073] 5. Command message: used to transmit commands and instructions to control the behavior of other nodes, such as remote node control, configuration update, etc.
[0074] The existence of these different types of messages can be flexibly configured and applied according to the functions and communication requirements of different nodes to meet the complex communication requirements of the system.
[0075] It should be noted that when the data acquisition device records Flexray data, the message transmitted by each slot can be preset for configuration. For specific configuration, please refer to the following embodiments, which will not be described in detail here.
[0076] 202. Obtain preset data reinjection configuration information, where the data reinjection configuration information is used to configure the Flexray data to be respectively reinjected into at least two Flexray reinjection channels of the injection module.
[0077] In an embodiment of the present application, before obtaining the preset data injection configuration information, the method may also pre-configure the data injection configuration information, which may specifically include the following contents: obtaining the target attributes in the at least two types of message data; based on the target attributes, pre-grouping the at least two types of message data to obtain at least two target grouped data; determining a mapping relationship between each target grouped data in the at least two target grouped data and each target Flexray injection channel in the at least two Flexray injection channels, so as to obtain a mapping relationship between each type of message data in the at least two types of message data and each target Flexray injection channel in the at least two Flexray injection channels.
[0078] The target attributes of at least two types of message data may include a type attribute of the message data, and may also include a mapping relationship attribute between the message and the slot.
[0079] In a specific embodiment of the present application, when the target attribute is a type attribute of message data, the at least two types of message data can be pre-grouped according to the type attribute to obtain at least two target grouped data. For example, if there are 193 types of messages, the 193 types of messages can be divided into at least two target grouped data, specifically two target grouped data, one is the first target grouped data, and the other is the second target grouped data.
[0080] Furthermore, in one embodiment of the present application, a mapping relationship between each target grouped data in the at least two target grouped data and a target Flexray data injection unit in the at least two Flexray data injection units is determined to obtain a mapping relationship between each type of message data in the at least two types of message data and the target Flexray data injection unit. For example, when the at least two Flexray data injection units are specifically two, namely, a first Flexray data injection unit and a second Flexray data injection unit; therefore, after the above-mentioned at least two types of message data are pre-grouped, the first target grouped data and the second target grouped data are obtained, and then the first target grouped data and the second target grouped data can be respectively mapped to the first Flexray data injection unit and the second Flexray data injection unit, to obtain a mapping relationship between the first target grouped data and the first Flexray data injection unit and a mapping relationship between the second target grouped data and the second Flexray data injection unit.
[0081] In another specific embodiment of the present application, when the target attribute is a mapping relationship attribute between a message and a slot, the at least two types of message data can be pre-grouped according to the mapping relationship attribute to obtain at least two target grouped data. For example, in the entire large cycle (including n1+n2+n3 slots), the messages of the first n1 slots are pre-divided into first target grouped data, the messages of the middle n2 slots are pre-divided into second target grouped data, and the messages of the last n3 slots are pre-divided into third target grouped data.
[0082] After configuring the data reinjection configuration information, the data reinjection configuration information can be stored in a preset storage device or database. When the data reinjection configuration needs to be used, the data reinjection configuration can be called or read from the preset storage device or database through the industrial computer to obtain the data reinjection configuration.
[0083] 203. Send the Flexray data to the injection module, and enable the Flexray data to be respectively injected into the data receiving unit through at least two Flexray injection channels based on the data injection configuration information.
[0084] In some embodiments of the present application, the Flexray data includes at least two types of message data, and the data injection configuration information includes a mapping relationship between each type of message data in the at least two types of message data and each target Flexray injection channel in at least two of the Flexray injection channels; the Flexray data is respectively injected to the data receiving unit by at least two of the Flexray injection channels based on the mapping relationship.
[0085] Specifically, at least two types of message data included in the Flexray data can be configured to be injected back to the data receiving unit through the corresponding target Flexray injection channel based on the mapping relationship.
[0086] In an embodiment of the present application, by sending Flexray data to an injection module, and making the Flexray data be respectively injected back to a data receiving unit through at least two of the Flexray injection channels based on preset data injection configuration information, compared with the original data transmission scheme through the injection channel of a single node, the present application adopts at least two Flexray injection channels for data injection, and its transmission capacity is effectively improved, avoiding the occurrence of abnormal data transmission on the Flexray bus due to the amount of data exceeding a certain threshold range, thereby ensuring the subsequent development and verification efficiency of the controller.
[0087] In some embodiments of the present application, in order to avoid conflicts, for the same Slot, only one Flexray data injection unit is allowed to transfer data to the Flexray bus. Specifically, this mechanism can be configured in the data injection configuration information above;
[0088] In some embodiments of the present application, the data processing unit may also adjust the message to be transmitted by each slot and the slot configured with the message. Regardless of the configuration, it must satisfy the following: each slot can be configured to transmit one or more messages.
[0089] In order to ensure that during the actual data transmission process: each Slot can be configured to transmit one or more messages, in some embodiments of the present application, the Flexray data is injected back to the data receiving unit based on the corresponding injection time slot requirements; before sending the Flexray data to the injection module, the method may also include: verifying that there is no conflict in the injection time slot requirements of each Flexray data.
[0090] In a specific embodiment, verifying and determining whether there is a conflict in the re-injection time slot requirements of each Flexray data may include: collecting all the Flexray data (messages) involved, and understanding the re-injection time slot requirements of each data; analyzing the re-injection time slot requirements of each message, including the time slot length, the time requirements of the sending time slot and the receiving time slot, etc.; creating a time slot allocation table based on the collected data and time slot requirements to indicate the time slots occupied by each message and the allocation of time slots; checking the time slot allocation table to detect whether there is a situation where messages require the same time slot in the same time slot or the time requirements conflict; if a time slot conflict is found, it needs to be adjusted and resolved. The conflict can be eliminated by reallocating the time slot, adjusting the time slot length or time requirements, etc.; after resolving the time slot conflict, checking the time slot allocation table again to ensure that there is no conflict in the time slot requirements of each message; in a preset software / hardware environment, simulating or actually performing experiments and tests to verify whether the time slot allocation in the time slot allocation table meets the requirements in the actual data transmission process.
[0091] Through the above steps, it is possible to verify and determine whether there is a conflict in the injection time slot requirements of each Flexray data, and make corresponding adjustments to ensure normal data transmission. The specific verification process may vary depending on the specific application and system, and needs to be adjusted and optimized according to the specific situation.
[0092] Furthermore, in some embodiments of the present application, the Flexray data is injected back to the data receiving unit based on the corresponding injection time slot requirement; at least part of the first Flexray data in the Flexray data is collected from the vehicle bus by a preset data acquisition device, and the injection time slot requirement of the first Flexray data matches the time slot of the vehicle Flexray bus of the vehicle when the first Flexray data is collected by the data acquisition device.
[0093] In some implementations of the present application, the Flexray data is injected back to the data receiving unit based on the corresponding injection time slot requirements; the Flexray data includes at least two types of message data; before sending the Flexray data to the injection module, the method also includes: in response to manual adjustment, adjusting the injection time slot requirements of a specified type of message data among the at least two types of message data.
[0094] In some embodiments of the present application, the Flexray data is injected back to the data receiving unit through the injection Flexray bus based on the corresponding injection time slot requirements; the method also includes: simulating and generating at least part of the second Flexray data in the Flexray data; based on the idle time slots in the large cycle of the injection Flexray bus, configuring corresponding injection time slot requirements for the second Flexray data.
[0095] In the actual data injection process, in addition to Flexray data, other types of data may also be included, such as at least one of Can data, Lin data, video data and Ethernet data. In order to achieve "synchronous" injection of Flexray data and the above other types of data, in the embodiment of the present application, the data to be injected may also include a second type of data, and the second type of data uses a bus matching the second type of data for data injection; the method may also include: it may also include the following steps 301-302:
[0096] 301. Based on the current cycle information of the Flexray bus and the target cycle data of the Flexray data starting to be injected into the data receiving unit, determine the sending timing data, the sending timing data is used to represent the time to start sending the Flexray data to the injection module, and the time to start sending the second type of data to the injection module. The Flexray bus is the bus for the injection module to inject the Flexray data back to the data receiving unit.
[0097] In some embodiments of the present application, the sending timing data includes first sending timing data for characterizing the start of sending the Flexray data to the injection module, the current cycle information of the Flexray bus and the target cycle data at which the Flexray data starts to be injected into the data receiving unit, and determining the sending timing data can specifically include: obtaining the current time, the target cycle data of the first frame of Flexray data injected by the Flexray bus, and the current cycle information of the Flexray bus at the current moment; determining the first sending timing data based on the current time, the target cycle data, the large cycle length, and the current cycle information.
[0098] Among them, the current time can be the current time generated by the industrial computer based on the internal clock. The time can be set according to the timing requirements. Specifically, the current time can be understood as the current time under the time dimension of the back-injection. For example, the time is adjusted back to a time before the data was collected. Specifically, the data to be back-injected (such as the first type of data, the second type of data) is collected in a certain time period of a certain month of a certain year. Then, the current time can be adjusted to: start from a certain moment before the time period (or the start time of the time period), and then realize the change of the current time based on the internal clock. The current time can also be the same as the actual time.
[0099] On this basis, the corresponding time parameters of the recorded data mentioned above can also be set according to actual needs.
[0100] The target cycle data of the first frame of Flexray data transmitted by the Flexray bus can be pre-configured before collection, and its related configuration information can be stored in a preset storage device or database. When needed, it can be directly called from the corresponding storage device and database through the industrial computer; similarly, the current cycle information of the Flexray bus can be obtained in advance, which will not be elaborated here.
[0101] The target cycle data can be understood as indicating in which small cycle and / or time slot (i.e., slot) the first frame Flexray data should be injected back to the data receiving unit. Furthermore, in one example, the relevant information of the small cycle and / or time slot (i.e., slot) of the first frame Flexray data can be used as part or all of the target cycle data. Of course, in other examples, in order to ensure the implementation of injection, the small cycle and time slot (i.e., slot) before the small cycle and time slot (i.e., slot) can also be used as the target cycle data.
[0102] The current cycle information can be understood as the small cycle and / or time slot (i.e., slot) where the Flexray bus is located when executing step 202 (or at a nearby time). In one example, the information of the small cycle and / or time slot (i.e., slot) where the Flexray bus is located when executing step 202 can be used as the current cycle information when executing step 202, which can be obtained from the Flexray bus or calculated. In another example, considering that obtaining the small cycle and / or time slot (i.e., slot) from the Flexray bus may cause delays and calculations may be biased, a small cycle and / or time slot after the small cycle and / or time slot (i.e., slot) can also be used as the current cycle information. In another example, in order to be suitable for accurate calculation, a small cycle and / or time slot before the small cycle and / or time slot (i.e., slot) can also be used as the current cycle information. In addition, the current cycle information changes with the cycle of the Flexray bus.
[0103] It can be seen that when it is known at what small cycle and / or time slot (i.e. slot) the injection needs to be made and at what small cycle and / or time slot (i.e. slot) the injection is currently made, since the circulation situation of the large cycle is objectively determined, compared with the injection scheme that does not consider the cycle situation, based on the current cycle information and the target cycle data, it is more helpful to make the obtained sending timing data match the cycle situation, meet the needs of the target cycle data, and ensure the injection synchronization of Flexray data and other data.
[0104] Further, the embodiment of the present application may focus on the target cycle data of the first frame of Flexray data transmitted by the Flexray bus and different characteristic parameters in the current cycle information of the Flexray bus to determine the first sending opportunity data, specifically including the following two methods:
[0105] In the first way, the embodiment of the present application focuses on Cycle, that is, the small cycle mentioned above. Therefore, based on the current time, the target cycle data, the large cycle and the current cycle information, the first sending timing data is determined, which can specifically include: obtaining the target small cycle of the first frame Flexray data in the target cycle data in the Flexray bus; obtaining the current small cycle of the Flexray bus at the current moment in the current cycle information; based on the current time, the large cycle, the current small cycle and the target small cycle, determine the first sending timing data.
[0106] In an embodiment of the present application, the first frame Flexray data in the target cycle data may be pre-configured in the target mini-cycle of the Flexray bus, that is, the first frame Flexray data may be pre-configured to perform data injection in the target mini-cycle).
[0107] Specifically, the industrial computer can directly or indirectly read the current small cycle at the current time from the Flexray bus at the corresponding time. For example, the injection module can read from the Flexray bus and feed back to the industrial computer.
[0108] In some embodiments of the present application, determining the first sending timing data based on the current time, the large cycle duration, the current small cycle and the target small cycle may specifically include: determining the time difference between the current small cycle and the target small cycle; if the current small cycle is earlier than the target small cycle in the large cycle, determining the first sending timing data based on the sum of the current time and the time difference, and the large cycle duration; if the current small cycle is not earlier than the target small cycle in the large cycle, determining the first sending timing data based on the difference between the current time and the time difference, and the large cycle duration.
[0109] In a specific embodiment of the present application, determining the first sending opportunity data based on the current time, the large cycle length, the current small cycle, and the target small cycle may specifically include:
[0110] If, in the large cycle, the current small cycle is earlier than the target small cycle, the calculation formula of the first sending timing data T0_FL_send is:
[0111] T0_FL_send=t_curr+|△t1|+T*n, n≥0 and n is an integer.
[0112] Wherein, t_curr represents the current time, Δt1 represents the time difference between the current small cycle and the target small cycle, T represents the length of the large cycle, and n is a specified parameter, which can be specified as 0, 1, 2, etc.
[0113] If the current small cycle is not earlier than the target small cycle in the large cycle, the calculation formula of the first sending timing data T0_FL_send is:
[0114] T0_FL_send=t_curr+T*(n+1)-|Δt|, n≥0 and n is an integer.
[0115] Wherein, t_curr represents the current time, Δt1 represents the time difference between the current small cycle and the target small cycle, T represents the length of the large cycle, and n is a specified parameter, which can be specified as 0, 1, 2, etc.
[0116] In the second way, the embodiment of the present application focuses on Slot, that is, the time slot in the previous text. Therefore, based on the current time, the target cycle data, the large cycle length and the current cycle information, the first sending timing data is determined, which can specifically include: obtaining the first target time slot of the first frame Flexray data in the target cycle data in the target small cycle of the Flexray bus; obtaining the second target time slot in the current small cycle of the Flexray bus at the current moment in the current cycle information; based on the current time, the large cycle length, the first target time slot and the second target time slot, determine the first sending timing data.
[0117] In some embodiments of the present application, determining the first sending timing data based on the current time, the large cycle duration, the first target time slot and the second target time slot may specifically include: determining the time difference between the second target time slot and the first target time slot; if the second target time slot is earlier than the first target time slot in the target small cycle, determining the first sending timing data based on the sum of the current time and the time difference, and the large cycle; if the second target time slot is not earlier than the first target time slot in the target small cycle, determining the first sending timing data based on the difference between the current time and the time difference, and the large cycle duration.
[0118] In a specific embodiment of the present application, determining the first sending opportunity data based on the current time, the large cycle duration, the first target time slot, and the second target time slot may specifically include:
[0119] If the second target time slot is earlier than the first target time slot, the calculation formula of the first sending timing data T0_FL_send is:
[0120] T0_FL_send=t_curr+|△t1|+T*n, n≥0 and n is an integer.
[0121] Wherein, t_curr represents the current time, Δt1 represents the time difference between the second target time slot and the first target time slot, T represents the length of the large cycle, and n is a specified parameter, which can be specified as 0, 1, 2, etc.
[0122] If the second target time slot is not earlier than the first target time slot, the calculation formula of the first sending timing data T0_FL_send is:
[0123] T0_FL_send=t_curr+T*(n+1)-|Δt|, n≥0 and n is an integer.
[0124] Wherein, t_curr represents the current time, Δt1 represents the time difference between the second target time slot and the first target time slot, T represents the length of the large cycle, and n is a specified parameter, which can be specified as 0, 1, 2, etc.
[0125] In some embodiments of the present application, the sending timing data also includes second sending timing data for characterizing the start of sending the second type of data to the injection module; the determining of the sending timing data based on the current cycle information of the Flexray bus may also include: determining the second sending timing data based on the first sending timing data.
[0126] In some embodiments of the present application, determining the second sending timing data based on the first sending timing data may include: obtaining a first time parameter corresponding to a first generation time of the first frame Flexray data and a second time parameter corresponding to a second generation time of the second type of data of the first frame; determining a time parameter difference between the second time parameter and the first time parameter; and determining the second sending timing data based on the time parameter difference and the first sending timing data.
[0127] The first generation time and the second generation time can be understood as the time when the corresponding data is generated. For example, if the corresponding data is collected from the vehicle, the first generation time and the second generation time can be understood as the time when the corresponding data is collected and generated. For another example, if the corresponding data is simulated, it is usually necessary to establish and run the corresponding model. The first generation time and the second generation time of the corresponding data are the times calculated during the model working process or detected by the virtual sensor. Of course, other possibilities are not excluded. As long as it can be used to indicate the time of the vehicle state, external environment, etc. represented by the first type of data and the second type of data, no matter how the first generation time and the second generation time are generated, they can be used as an optional implementation.
[0128] In one example, the first generation time refers to the time when the first frame of Flexray data is generated or produced by a preset target object, wherein the target object may be an actual vehicle, i.e., the generation time corresponding to the first frame of Flexray data generated by the actual vehicle during driving, or the target object may be a simulation device, i.e., the generation time corresponding to the first frame of Flexray data generated by the simulation device; similarly, the second generation time refers to the time when the first frame of the second type of data is generated or produced by a preset target object, wherein the target object may be an actual vehicle, i.e., the generation time corresponding to the first frame of Flexray data generated by the actual vehicle during driving, or the target object may be a simulation device, i.e., the generation time corresponding to the first frame of Flexray data generated by the simulation device.
[0129] For the data of the Flexray bus, each frame of Flexray data or the first frame of Flexray data may have a corresponding generation time. For ease of use and calculation, the corresponding time parameter may be set only for the first generation time of the first frame of Flexray data. It should be noted that the time parameter may be in the form of a timestamp, such as t_FL_data, or in other forms, such as a date and time string. Specifically, a specific date and time format may be used, such as "YYYY-MM-DD HH:MM:SS", and the corresponding recorded time parameter may be recorded in the form of a string.
[0130] For other data, namely the second type of data, taking video data as an example, each frame of image or the first frame of image data may have a corresponding generation time. For the convenience of use and calculation, the corresponding time parameter may be set only for the second generation time of the first frame of the second type of data. It should be noted that the time parameter may be in the form of a timestamp, such as t_Video_data, or in other forms, such as a date and time string. Specifically, a specific date and time format may be used, such as "YYYY-MM-DDHH:MM:SS", and the corresponding recorded time parameter may be recorded in the form of a string.
[0131] All the data recorded above can be pre-stored in a preset storage device or database, and when needed, it can be directly obtained through the industrial computer.
[0132] In a specific embodiment of the present application, the form of the timestamp is selected by the time parameter: first, the first timestamp t_FL_data corresponding to the first generation time of the first frame Flexray data and the second timestamp t0_Secondtype data_data corresponding to the second generation time of the second type data of the first frame can be obtained by the industrial computer in a preset storage device or database, and then the second sending timing data t0_Second type data_send is determined by the following formula:
[0133] t0_Second type data_send=t0_FL_send+(t0_Second type data_data-t0_FL_data).
[0134] Among them, t0_FL_send represents the first sending timing data, t0_Second type data_data represents the second timestamp, and t0_FL_data represents the first timestamp.
[0135] According to the above step 201, "the second type of data includes at least one type of data from the CAN bus (abbreviated as CAN data), the LIN bus (abbreviated as LIN data), the video data, and the Ethernet data", the second type of data may include only one of the above multiple data, or two or more types, and each type of data may include one or more transmission channels. That is, the data to be back-annotated may include only one type of bus data, or may include multiple types of bus data.
[0136] However, no matter which of the above situations is used, it is only necessary to calculate the second sending timing data corresponding to each of the multiple types of data respectively.
[0137] In a specific embodiment of the present application, the second type of data includes CAN data and video data. Then, the second sending timing data corresponding to the CAN data and the second sending timing data corresponding to the video data are calculated respectively. The specific calculation process is as follows:
[0138] The second sending timing data corresponding to the CAN data is t0_CAN_send=t0_FL_send+(t0_CAN_data-t0_FL_data);
[0139] Among them, t0_FL_send represents the first sending timing data, t0_CAN_data represents the second timestamp corresponding to the generation time of the first frame CAN data, and t0_FL_data represents the first timestamp.
[0140] The second sending timing data corresponding to the video data is t0_Video_send=t0_FL_send+(t0_Video_data-t0_FL_data);
[0141] Among them, t0_FL_send represents the first sending timing data, t0_Video_data represents the second timestamp corresponding to the generation time of the first frame of video data, and t0_FL_data represents the first timestamp.
[0142] 302. Based on the data injection configuration information and the sending timing data, the first type of data and the second type of data are sent to the injection module, so that: when the injection module injects the received Flexray data into the data receiving unit through the Flexray bus based on the change of the current cycle information of the Flexray bus, and injects the received second type of data into the data receiving unit through a line different from the Flexray bus, the difference between the injection time of the first frame of Flexray data in the Flexray data and the injection time of the first frame of the second type of data in the second type of data matches the difference between the first generation time of the first frame of Flexray data and the second generation time of the first frame of the second type of data.
[0143] In the embodiment of the present application, the industrial computer sends the first type of data and the second type of data to the injection module respectively based on the sending timing data determined in the previous text. According to the previous description, the sending timing data may include the first sending timing data, or may include the first sending timing data and the second sending timing data at the same time. In either case, as long as the "difference between the injection time of the first frame Flexray data in the Flexray data and the injection time of the first frame second type data in the second type data matches the difference between the first generation time of the first frame Flexray data and the second generation time of the first frame second type data" can be achieved, that is, the synchronization rate of the first type of data and the second type of data to be injected is improved. In the optimal case, the synchronization rate of the first type of data and the second type of data in the injection reaches 100%.
[0144] The embodiments of the present application actively determine the sending timing data. Compared with the uncontrollable scheme of sending timing that can only be back-injected based on the generation time of the data, the present application creatively conceives of actively controlling the sending timing.
[0145] On this basis, based on the working principle of the Flexray bus, when the injection module uses the Flexray bus for back injection, it must realize the back injection based on the change of the current cycle information of the Flexray bus. For example, when a certain data is specified to be back injected in a certain small cycle, the data can only be back injected when the current cycle information of the Flexray bus changes to the small cycle. Furthermore, since the sending timing data in this application is determined based on the current cycle information of the Flexray bus and the target cycle data of the back injection, compared with the scheme of back injection without considering the cycle situation, this application can help to ensure that the current actively determined sending timing data can meet the requirements of the target cycle data of the back injection. It can be seen that the active controllability of the sending timing in this application also fully considers the constraints of the cycle change of the Flexray bus on data back injection, which helps to ensure that: the difference between the back injection time of the first frame Flexray data in the Flexray data and the back injection time of the first frame of the second type of data in the second type of data matches the difference between the first generation time of the first frame Flexray data and the second generation time of the first frame of the second type of data. Therefore, the synchronization rate of back injection of the data of the Flexray bus and the data of other lines is improved, and the subsequent development and verification efficiency of the controller is improved.
[0146] In order to achieve "synchronous" injection of Flexray data and the above-mentioned other types of data, in addition to the method of steps 301 to 302, in other embodiments of the present application, the data to be injected back also includes a second type of data, and the second type of data uses a bus matching the second type of data for data injection; the method also includes steps 303 to 305:
[0147] 303. Determine a target cold start time of the Flexray bus based on preset target time information.
[0148] Among them, the preset target time information includes the injection time of the first frame Flexray data in the preset Flexray data being injected into the data receiving unit via the Flexray bus and / or the sending time of the first frame Flexray data being sent to the injection module, and the target cold start time is characterized by the time to start the Flexray bus.
[0149] The injection time of the first frame of Flexray data in the Flexray data being injected into the data receiving unit via the Flexray bus can be pre-configured according to actual needs. For example, in a specific embodiment of the present application, the injection time can be determined according to the acquisition time when the first frame of Flexray data is collected, and the acquisition time can be marked with a corresponding first timestamp.
[0150] In a specific embodiment, the first timestamp corresponding to the first frame of Flexray data may be selected as the injection time.
[0151] Similarly, the sending time of the first frame of Flexray data to the injection module can be pre-configured according to actual needs.
[0152] In some embodiments of the present application, determining the target cold start time of the Flexray bus based on preset target time information includes: determining the target cold start time of the Flexray bus based on the target cycle data for starting back injection of the Flexray data, the target time information, the starting cycle of the Flexray bus, and the large cycle length of the Flexray bus, wherein the starting cycle is characterized by the first large cycle in the cycle process after the cold start of the Flexray bus.
[0153] The target periodic data of the first frame of Flexray data transmitted by the Flexray bus can be pre-configured before collection, and its related configuration information can be stored in a preset storage device or database. When needed, it can be directly called from the corresponding storage device and database through the industrial computer; similarly, the periodic parameter data of the Flexray bus can be obtained in advance, which will not be elaborated here.
[0154] The target cycle data can be understood as indicating in which small cycle and / or time slot (i.e., slot) the first frame Flexray data should be injected back to the data receiving unit. Furthermore, in one example, the relevant information of the small cycle and / or time slot (i.e., slot) of the first frame Flexray data can be used as part or all of the target cycle data. Of course, in other examples, in order to ensure the implementation of injection, the small cycle and time slot (i.e., slot) before the small cycle and time slot (i.e., slot) can also be used as the target cycle data.
[0155] In the Flexray bus, the start-up period after startup is an initial phase in the Flexray protocol. During this phase, each node of the Flexray network will be synchronized and configured to ensure the normal operation of the network.
[0156] Specifically. The calculation cycle can be composed of four stages, namely: Static Segment: This stage is used to initialize the synchronization signal and clock of the network. In this stage, all nodes will synchronize the clock according to the reception of the startup code (StartupFrame) and configure the network topology. Dynamic Slot Assignment: This stage is used to assign the position of the time slot (Slot) and frame (Frame) to each node. In this stage, the master node of the network will assign the corresponding time slot and frame to each node according to the network topology and bandwidth requirements. Network Configuration: This stage is used to configure the communication parameters of the network and the rules for sending frames. In this stage, the master node of the network will send network configuration information to other nodes to ensure that all nodes communicate according to the same rules. Network Sync: This stage is used to ensure the synchronization performance of the network. In this stage, each node will synchronize according to the master clock of the network, and perform clock correction and phase synchronization to ensure accurate data transmission.
[0157] It should be noted that the entire calculation cycle is usually carried out in a millisecond time range, and the specific length of the cycle depends on the configuration and requirements of the network.
[0158] It can be seen that when it is known in what small cycle and / or time slot (i.e., slot) the injection is required, as well as the target cycle data and the starting cycle of the Flexray bus, since the circulation of the large cycle is objectively determined, compared with the injection scheme that does not consider the start time of the Flexray bus, based on the starting cycle, target cycle data and target time information of the Flexray bus, it is more helpful to make the obtained target cold start time match the cycle situation, meet the requirements of the target cycle data, and ensure the controllability of the Flexray data injection.
[0159] In some embodiments of the present application, the target cycle data for starting back injection based on the Flexray data, the target time information, the starting cycle of the Flexray bus and the large cycle duration of the Flexray bus are determined to determine the target cold start time of the Flexray bus, including: determining a first time difference between starting the Flexray bus and the starting cycle; determining a second time difference between the target cycle data and the starting point of the large cycle; determining the target cold start time of the Flexray bus based on the target time information, the first time difference, the second time difference and the large cycle duration.
[0160] In the embodiment of the present application, the first time difference Δt1 between starting the Flexray bus and starting the calculation cycle is determined, which can be obtained by statistics or by direct calling or reading.
[0161] Specifically, when the first time difference has not been measured, a statistical method can be used to statistically calculate the first time difference between starting the Flexray bus and starting the calculation period on site; and if the data has been recorded in a corresponding storage device or database before using the first time difference, it can be directly called or read.
[0162] In the embodiment of the present application, the target cycle data can select the target small cycle of the first frame Flexray data in the Flexray bus, that is, the Cycle mentioned above. Therefore, when determining the second time difference between the target cycle data and the starting point of the large cycle of the Flexray bus, because the target small cycle CycleX is known, when knowing the total number M of small cycles included in the large cycle duration T, the position or proportion of the target small cycle in the large cycle duration can be determined, and the second time difference △t2 can be calculated by the following formula:
[0163] △t2=(X / M)*T.
[0164] Wherein, X is the position or serial number of the target small cycle in the large cycle duration T, and M is the total number of small cycles included in the large cycle duration T.
[0165] In some other embodiments of the present application, the target cycle data may also select the first target time slot of the first frame Flexray data in the target small cycle of the Flexray bus, that is, the Slot in the previous text, which is different from the target small cycle Cycle in the previous text, and the reference objects are different, but the calculation principles are the same. For details, please refer to the calculation principles in the embodiments below, which will not be repeated here.
[0166] In some embodiments of the present application, determining the target cold start time of the Flexray bus based on the target time information, the first time difference, the second time difference and the large cycle duration includes: determining the time and value of the first time difference and the second time difference; determining the target cold start time of the Flexray bus based on the difference between the target time information and the time and value and the large cycle duration.
[0167] In a specific embodiment of the present application, the target cold start time t_start of the Flexray bus is determined based on the difference between the target time information and the time and value and the large cycle duration, and can be calculated using the following formula:
[0168] t_start=t_send-((|△t1|+|△t2|)+n*T), n≥0 and n is an integer;
[0169] Among them, t_send is the injection time of the first frame of Flexray data in the Flexray data being injected into the data receiving unit via the Flexray bus or the sending time of the first frame of Flexray data being sent to the injection module, △t1 is the first time difference, △t2 is the second time difference, T is the large cycle length, and n is a specified parameter, which can be specified as 0, 1, 2, etc.
[0170] 304. Based on the target cold start time, start the Flexray bus by at least two cold start nodes connected to the Flexray bus.
[0171] Among them, at least two cold start nodes are target nodes on the Flexray bus, and the target nodes are nodes in the injection module rather than nodes in the data receiving unit.
[0172] It should be noted that at least two cold start nodes can be set in the same bus board in the injection module, or can be set in different bus boards, and can be specifically set according to actual needs.
[0173] In some embodiments of the present application, based on a target cold start time, a Flexray bus is started by at least two cold start nodes connected to the Flexray bus, including: based on the target cold start time, determining a target sending timing for the cold start node to send a start frame; based on the target sending timing, generating configuration information of the Flexray bus; and starting the Flexray bus based on the configuration information and at least two cold start nodes connected to the Flexray bus.
[0174] Specifically, based on the target sending timing, the configuration information of the Flexray bus is generated. The target sending timing of the cold start node sending the start frame can be adjusted based on the pre-acquired initial configuration information, thereby generating the configuration information of the Flexray bus; or the configuration information of the Flexray bus can be generated directly according to the target sending timing.
[0175] The configuration information may include but is not limited to cycle length, static frame payload data length, number of static time slots, static time slot length, number of mini time slots, mini time slot length, target sending timing of sending the start frame, etc.
[0176] It should be noted that the action of starting the Flexray bus is called a cold start, and the node that sends the start frame is usually called a cold start node. The start frame is similar to a start trigger, which can be used to start all nodes on the Flexray network.
[0177] 305. Based on the target time information, the Flexray data is sent to the injection module, so that the injection module injects the Flexray data into the data receiving unit through the Flexray bus, so that: the injection module injects the received Flexray data back to the data receiving unit through the Flexray bus based on the change of the current cycle information of the Flexray bus.
[0178] In the embodiment of the present application, the target cold start time is actively determined. Compared with the solution in which the cold start time is uncontrollable, the present application creatively conceives of the active control of the target cold start time. On this basis, based on the working principle of the Flexray bus, when the injection module uses the Flexray bus for reinjection, it must realize reinjection based on the change of the current cycle information of the Flexray bus. For example, when certain data is specified to be reinjected in a small cycle, the data can only be reinjected when the current cycle information of the Flexray bus changes to the small cycle. Furthermore, since the target cold start time of the Flexray bus in the present application is determined based on the preset target time information, compared with the solution of reinjection without considering the start time of the Flexray bus, the present application can help to ensure that the current actively determined target cold start time can meet The requirements for the target time information of reinjection show that the active controllable start time of the Flexray bus in this application also fully considers the constraints of the periodic changes of the Flexray bus on data reinjection, which helps to ensure that: the injection module can be based on the changes in the current periodic information of the Flexray bus. The Flexray data received can be injected back to the data receiving unit through the Flexray bus at the time corresponding to the target time information. Therefore, by freely controlling the start time of the Flexray bus, the time for Flexray data to be injected back to the data receiving unit can be controlled, thereby improving the subsequent development and verification efficiency of the controller.
[0179] In some embodiments of the present application, sending the Flexray data to the injection module based on the target time information includes: taking a first time parameter corresponding to a first generation time of the first frame Flexray data as the target time information, and sending the Flexray data to the injection module based on the first time parameter; further, the data processing method also includes: sending the second type of data to the injection module based on a second time parameter corresponding to a second generation time of the first frame second type data in the pre-acquired second type data, so that when the injection module injects the received second type data back to the data receiving unit through a line different from the Flexray bus, the difference between the injection time of the first frame Flexray data and the injection time of the first frame second type data in the second type data matches the difference between the first generation time and the second generation time.
[0180] The first generation time and the second generation time can be understood as the time when the corresponding data is generated. For example, if the corresponding data is collected from the vehicle, the first generation time and the second generation time can be understood as the time when the corresponding data is collected and generated. For another example, if the corresponding data is simulated, it is usually necessary to establish and run the corresponding model. The first generation time and the second generation time of the corresponding data are the times calculated during the model working process or detected by the virtual sensor. Of course, other possibilities are not excluded. As long as it can be used to indicate the time of the vehicle state, external environment, etc. represented by the first type of data and the second type of data, no matter how the first generation time and the second generation time are generated, they can be used as an optional implementation.
[0181] In one example, the first generation time refers to the time when the first frame of Flexray data is generated or produced by a preset target object, wherein the target object may be an actual vehicle, i.e., the generation time corresponding to the first frame of Flexray data generated by the actual vehicle during driving, or the target object may be a simulation device, i.e., the generation time corresponding to the first frame of Flexray data generated by the simulation device; similarly, the second generation time refers to the time when the first frame of the second type of data is generated or produced by a preset target object, wherein the target object may be an actual vehicle, i.e., the generation time corresponding to the first frame of Flexray data generated by the actual vehicle during driving, or the target object may be a simulation device, i.e., the generation time corresponding to the first frame of Flexray data generated by the simulation device.
[0182] For the data of the Flexray bus, each frame of Flexray data or the first frame of Flexray data may have a corresponding generation time. For ease of use and calculation, the corresponding first time parameter may be set only for the first generation time of the first frame of Flexray data. It should be noted that the first time parameter may be in the form of a timestamp, such as t_FL_data, or in other forms, such as a date and time string. Specifically, a specific date and time format may be used, such as "YYYY-MM-DDHH:MM:SS", and the corresponding recorded time parameter may be recorded in the form of a string.
[0183] For other data, i.e., the second type of data, taking video data as an example, each frame of image or the first frame of image data may have a corresponding generation time. For ease of use and calculation, the corresponding second time parameter may be set only for the second generation time of the first frame of the second type of data. It should be noted that the second time parameter may be in the form of a timestamp, such as t_Video_data, or in other forms, such as a date and time string. Specifically, a specific date and time format may be used, such as "YYYY-MM-DD HH:MM:SS", to record the corresponding recorded time parameter in the form of a string.
[0184] All the data recorded above can be pre-stored in a preset storage device or database, and when needed, it can be directly obtained through the industrial computer.
[0185] The second type of data may include at least one of CAN bus data (abbreviated as CAN data), LIN bus data (abbreviated as LIN data), Flexray data, video data, and Ethernet data.
[0186] In the embodiment of the present application, the target cold start time is actively determined. On this basis, based on the working principle of the Flexray bus, when the injection module uses the Flexray bus for reinjection, it must realize reinjection based on the change of the current cycle information of the Flexray bus. For example, when certain data is specified to be reinjected in a small cycle, the data can only be reinjected when the current cycle information of the Flexray bus changes to the small cycle. Furthermore, since the target cold start time of the Flexray bus in this application is determined based on the preset target time information, compared with the scheme of reinjection without considering the start time of the Flexray bus, this application can help to ensure that the current actively determined target cold start time can meet the requirements of the target time information for reinjection (that is, sending the Flexray data to the injection module at the first time parameter). At the same time, based on the second time parameter corresponding to the second generation time of the first frame of the second type of data in the pre-acquired second type of data, the second type of data is sent to the injection module. It can be seen that the active controllable start time of the Flexray bus in the present application also fully considers the constraints of the periodic changes of the Flexray bus on data injection, which helps to ensure: the difference between the injection time of the first frame of Flexray data in the Flexray data and the injection time of the first frame of the second type of data in the second type of data matches the difference between the first generation time of the first frame of Flexray data and the second generation time of the first frame of the second type of data. Therefore, the synchronization rate of injecting data of the Flexray bus with data of other lines is improved, and the subsequent development and verification efficiency of the controller is improved.
[0187] In some specific embodiments of the present application, when the second type of data includes at least one of bus data, the data injection channel corresponding to the first type of data and the data injection channel corresponding to the second type of data can be set in one injection board or respectively set in multiple injection boards; when the second type of data includes video data and / or Ethernet data, the data injection channel corresponding to the first type of data and the data injection channel corresponding to the second type of data can be respectively set in multiple injection boards.
[0188] Specifically, when the first type of data includes Flexray data and the second type of data includes at least one of CAN data and LIN data, for example, the second type of data includes CAN data, the data injection channel corresponding to the first type of data and the data injection channel corresponding to the second type of data can be set in one injection board. In addition, another Flexray injection channel can be set in the same injection board as the previous Flexray injection channel, or in different injection boards.
[0189] When the first type of data includes Flexray data and the second type of data includes at least one of CAN data and LIN data, for example, the second type of data includes CAN data, the data injection channel corresponding to the first type of data and the data injection channel corresponding to the second type of data can be respectively set in multiple injection boards. In addition, another Flexray injection channel can be set in the same injection board as the previous Flexray injection channel, or in different injection boards.
[0190] When the first type of data includes Flexray data and the second type of data includes video data and / or Ethernet data, the data injection channel corresponding to the first type of data and the data injection channel corresponding to the second type of data can be respectively set in multiple injection boards. In addition, another Flexray injection channel can be set in the same injection board as the previous Flexray injection channel, or in different injection boards.
[0191] When the first type of data includes Flexray data, and the second type of data includes at least one of CAN data and LIN data, and also includes video data and Ethernet data, the data injection channel corresponding to the first type of data and the data injection channel corresponding to other bus data in the second type of data can be set in one injection board, and the video data and Ethernet data are respectively set in other corresponding injection boards. In addition, another Flexray injection channel can be set in the same injection board as the previous Flexray injection channel, or in different injection boards.
[0192] In some other embodiments of the present application, inside the reinjection board, there may be data reinjection channels that are strictly distinguished and can both receive and send data, and there may also be data reinjection channels that are not strictly distinguished and can both receive and send data. For example, after various data are received from different entrances (or even the same entrance), they are routed and distributed to corresponding data injection channels by an MCU (or FPGA). Then, when the data stream is distributed by the intermediate MCU, there are not necessarily independent data reinjection channels. Therefore, the above content is only for the convenience of understanding that in the process of data reinjection, data injection can be performed through different combinations of hardware settings, but is not limited to this.
[0193] Specifically, the above-mentioned injection board is a device for data injection on the communication bus, which can receive data on the bus and inject it back into the specified target device or system. This can be used to monitor, analyze and record data communication on the bus for development, verification, testing or training tasks.
[0194] The second type of data to be injected into the injection board may include CAN bus data (abbreviated as CAN data), LIN bus data (abbreviated as LIN data), video data, and at least one of Ethernet data. The specific data included can be set according to actual needs.
[0195] In order to better implement the data processing method in the embodiment of the present application, based on the data processing method, a data processing device is also provided in the embodiment of the present application, such as Figure 4 As shown, the data processing device 400 includes:
[0196] A first acquisition unit 401 is used to acquire Flexray data to be re-injected;
[0197] A second acquisition unit 402 is used to acquire preset data reinjection configuration information, where the data reinjection configuration information is used to configure the Flexray data to be respectively reinjected by at least two Flexray reinjection channels of the injection module;
[0198] The first sending unit 403 is configured to send the Flexray data to the injection module, and enable the Flexray data to be respectively injected back to the data receiving unit through at least two of the Flexray injection channels based on the data injection configuration information.
[0199] In some embodiments of the present application, the Flexray data includes at least two types of message data, and the data injection configuration information includes a mapping relationship between each type of message data in the at least two types of message data and each target Flexray injection channel in at least two of the Flexray injection channels; the Flexray data is respectively injected to the data receiving unit by at least two of the Flexray injection channels based on the mapping relationship.
[0200] In some embodiments of the present application, before obtaining the preset data injection configuration information, the device is also used to: obtain the target attributes of all message data in the at least two categories of message data; based on the target attributes, pre-group the at least two categories of message data to obtain at least two target grouped data; determine the mapping relationship between each target grouped data in the at least two target grouped data and each target Flexray injection channel in the at least two Flexray injection channels to obtain the mapping relationship between each category of message data in the at least two categories of message data and each target Flexray injection channel in the at least two Flexray injection channels.
[0201] In some embodiments of the present application, the Flexray data is injected back to the data receiving unit based on the corresponding injection time slot requirement; at least part of the first Flexray data in the Flexray data is collected from the vehicle bus by a preset data acquisition device, and the injection time slot requirement of the first Flexray data matches the time slot of the vehicle Flexray bus of the vehicle when the first Flexray data is collected by the data acquisition device.
[0202] In some embodiments of the present application, the Flexray data is injected back to the data receiving unit based on the corresponding injection time slot requirements; the Flexray data includes at least two types of message data; before sending the Flexray data to the injection module, the device is also used to: in response to manual adjustment, adjust the injection time slot requirements of a specified type of message data among the at least two types of message data.
[0203] In some embodiments of the present application, the Flexray data is injected back to the data receiving unit through the injection Flexray bus based on the corresponding injection time slot requirements; the device is also used to: simulate and generate at least part of the second Flexray data in the Flexray data; based on the idle time slots in the large cycle of the injection Flexray bus, configure the corresponding injection time slot requirements for the second Flexray data.
[0204] In some embodiments of the present application, the Flexray data is injected back to the data receiving unit based on the corresponding injection time slot requirements; before sending the Flexray data to the injection module, the device is also used to: verify that there is no conflict in the injection time slot requirements of each Flexray data.
[0205] In an embodiment of the present application, Flexray data is sent to an injection module, and the Flexray data is respectively injected back to a data receiving unit through at least two Flexray injection channels based on preset data injection configuration information. Compared with the original data transmission scheme through the injection channel of a single node, the present application adopts at least two Flexray injection channels for data injection, and its transmission capacity is effectively improved, avoiding the abnormal data transmission on the Flexray bus due to the data volume exceeding a certain threshold range, thereby ensuring the subsequent development and verification efficiency of the controller.
[0206] In addition to the above-mentioned data processing method and device, the embodiment of the present application further provides an electronic device, which may be an industrial computer or a data processing unit, which integrates any data processing device provided in the embodiment of the present application, and the industrial computer includes:
[0207] one or more processors;
[0208] Memory; and
[0209] One or more applications, wherein the one or more applications are stored in the memory and are configured to be executed by the processor to perform the operations of any method described in any of the above data processing method embodiments.
[0210] The present application also provides an industrial computer that integrates any data processing device provided in the present application. Figure 5 As shown, it shows a schematic diagram of the structure of the industrial computer involved in the embodiment of the present application, specifically:
[0211] The industrial computer may include one or more processing core processors 501, one or more computer readable storage medium storage units 502, a power supply 503, an input unit 504 and other components. Those skilled in the art will understand that Figure 5 The industrial computer structure shown in the figure does not constitute a limitation on the industrial computer, and may include more or fewer components than shown in the figure, or combine certain components, or arrange the components differently. Among them:
[0212] The processor 501 is the control center of the industrial computer. It uses various interfaces and lines to connect various parts of the entire industrial computer. By running or executing software programs and / or modules stored in the storage unit 502 and calling the data stored in the storage unit 502, it executes various functions of the industrial computer and processes data, thereby monitoring the industrial computer as a whole. Optionally, the processor 501 may include one or more processing cores; preferably, the processor 501 may integrate an application processor and a modem processor, wherein the application processor mainly processes the operating system, user interface, and application programs, and the modem processor mainly processes wireless communications. It is understandable that the above-mentioned modem processor may not be integrated into the processor 501.
[0213] The storage unit 502 can be used to store software programs and modules. The processor 501 executes various functional applications and data processing by running the software programs and modules stored in the storage unit 502. The storage unit 502 can mainly include a program storage area and a data storage area, wherein the program storage area can store an operating system, an application required for at least one function (such as a sound playback function, an image playback function, etc.), etc.; the data storage area can store data created according to the use of the industrial computer, etc. In addition, the storage unit 502 can include a high-speed random access memory, and can also include a non-volatile memory, such as at least one disk storage device, a flash memory device, or other volatile solid-state storage devices. Accordingly, the storage unit 502 can also include a memory controller to provide the processor 501 with access to the storage unit 502.
[0214] The industrial computer also includes a power supply 503 for supplying power to various components. Preferably, the power supply 503 can be logically connected to the processor 501 through a power management system, so as to manage charging, discharging, and power consumption through the power management system. The power supply 503 can also include one or more DC or AC power supplies, recharging systems, power failure detection circuits, power converters or inverters, power status indicators, and other arbitrary components.
[0215] The industrial computer may further include an input unit 504, which may be used to receive input digital or character information and generate keyboard, mouse, joystick, optical or trackball signal input related to user settings and function control.
[0216] Although not shown, the industrial computer may also include a display unit, etc., which will not be described in detail herein. Specifically, in the embodiment of the present application, the processor 501 in the industrial computer will load the executable files corresponding to the processes of one or more application programs into the storage unit 502 according to the following instructions, and the processor 501 will run the application programs stored in the storage unit 502, thereby realizing various functions.
[0217] To this end, an embodiment of the present application provides a computer-readable storage medium, which may include: a read-only memory (ROM), a random access memory (RAM), a disk or an optical disk, etc. The computer-readable storage medium stores a plurality of instructions, which can be loaded by a processor to execute the steps in any data processing method provided in the embodiment of the present application. For example, the instruction can execute the steps in the above embodiment.
[0218] In the above embodiments, the description of each embodiment has its own emphasis. For parts that are not described in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.
[0219] The above is a detailed introduction to a data processing method, device, system, electronic device and readable storage medium provided in the embodiments of the present application. Specific examples are used herein to illustrate the principles and implementation methods of the present application. The description of the above embodiments is only used to help understand the method of the present application and its core idea. At the same time, for technical personnel in this field, according to the idea of the present application, there will be changes in the specific implementation method and application scope. In summary, the content of this specification should not be understood as a limitation on the present application.
Claims
1. A data processing method, characterized in that: The method comprises: Acquire Flexray data to be re-injected, wherein the Flexray data includes at least two types of message data; Acquire preset data injection configuration information, the data injection configuration information including mapping relationships between each type of message data in the at least two types of message data and each target Flexray injection channel in the at least two Flexray injection channels, the data injection configuration information being used to configure the Flexray data to be respectively injected into the at least two Flexray injection channels of the injection module; The Flexray data is sent to the injection module, and the Flexray data is respectively injected back to the data receiving unit through at least two Flexray injection channels based on the mapping relationship.
2. The data processing method according to claim 1, characterized in that: Before obtaining the preset data injection configuration information, the method further includes: Obtaining target attributes of all message data in the at least two types of message data; Based on the target attribute, pre-grouping the at least two types of message data to obtain at least two target group data; Determine a mapping relationship between each target group data in the at least two target group data and each target Flexray reinjection channel in the at least two Flexray reinjection channels to obtain a mapping relationship between each type of message data in the at least two types of message data and each target Flexray reinjection channel in the at least two Flexray reinjection channels.
3. The data processing method according to claim 1, characterized in that: The Flexray data is injected back to the data receiving unit based on the corresponding injection time slot requirement; at least part of the first Flexray data in the Flexray data is collected from the vehicle bus by a preset data acquisition device, and the injection time slot requirement of the first Flexray data matches the time slot of the vehicle Flexray bus of the vehicle when the first Flexray data is collected by the data acquisition device.
4. The data processing method according to claim 1, characterized in that: The Flexray data is injected back to the data receiving unit based on the corresponding injection time slot requirement; The Flexray data includes at least two types of message data; Before sending the Flexray data to the injection module, the method further comprises: In response to the manual adjustment, the re-injection time slot requirement of the designated type of message data among the at least two types of message data is adjusted.
5. The data processing method according to claim 1, characterized in that: The Flexray data is injected back to the data receiving unit through the injection Flexray bus based on the corresponding injection time slot requirement; The method further comprises: Simulating and generating at least a portion of second Flexray data in the Flexray data; Based on the idle time slots in the large cycle of the reinjected Flexray bus, a corresponding reinjection time slot requirement is configured for the second Flexray data.
6. The data processing method according to claim 4 or 5, characterized in that: The Flexray data is injected back to the data receiving unit based on the corresponding injection time slot requirement; Before sending the Flexray data to the injection module, the method further includes: verifying and determining that there is no conflict in the injection time slot requirements of each Flexray data.
7. A data processing device, characterized in that: The device comprises: A first acquisition unit, configured to acquire Flexray data to be re-injected, wherein the Flexray data includes at least two types of message data; a second acquisition unit, configured to acquire preset data reinjection configuration information, wherein the data reinjection configuration information includes a mapping relationship between each type of message data in the at least two types of message data and each target Flexray reinjection channel in the at least two Flexray reinjection channels, and the data reinjection configuration information is used to configure the Flexray data to be respectively reinjected by the at least two Flexray reinjection channels of the injection module; The first sending unit is used to send the Flexray data to the injection module, and make the Flexray data be respectively injected back to the data receiving unit through at least two of the Flexray injection channels based on the mapping relationship.
8. A data processing system, characterized in that: It comprises a data processing unit, an injection module and a data receiving unit, wherein the injection module is connected to the data processing unit and the data receiving unit respectively; The data processing unit is used to obtain Flexray data to be reinjected, the Flexray data including at least two types of message data; obtain preset data reinjection configuration information, the data reinjection configuration information including mapping relationships between each type of message data in the at least two types of message data and each target Flexray reinjection channel in at least two Flexray reinjection channels, the data reinjection configuration information is used to configure the Flexray data to be respectively reinjected by at least two Flexray reinjection channels of the injection module; send the Flexray data to the injection module, and make the Flexray data respectively reinjected to the data receiving unit by at least two Flexray reinjection channels based on the mapping relationship; The injection module is used to enable the Flexray data to be respectively injected back to the data receiving unit through at least two of the Flexray injection channels based on the data injection configuration information; The data receiving unit is used to receive the Flexray data respectively injected by at least two of the Flexray injection channels.
9. An electronic device, characterized in that: The method comprises a processor and a memory, wherein a computer program is stored in the memory, and when the computer program is executed by the processor, the method according to any one of claims 1 to 6 is implemented.
10. A computer-readable storage medium, characterized in that: A computer program is stored thereon, and the computer program is loaded by a processor to execute the steps in the data processing method according to any one of claims 1 to 6.
