Data transmission method, control device, medium, system and vehicle
By preprocessing the data in the data acquisition device of the intelligent connected car and writing and reading the ring buffer, and splicing message messages based on the time vector, the problems of data transmission delay and capacity in the intelligent connected car are solved, and the transmission of low-latency and large-capacity data is achieved.
Patent Information
- Application Number
- CN202411495706.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-24
- Publication Date
- 2025-02-28
AI Technical Summary
In intelligent connected vehicles, the data transmission of the entire vehicle communication bus is limited by the load rate, resulting in the shortest transmission cycle of data packets being usually set at about 2ms, and it is difficult to meet the continuous reading requirements of microsecond low-latency data by systems such as electromagnetic active suspension.
By preprocessing the first data collected by the data acquisition device, a plurality of second data is acquired, and writing and reading processing is performed in the ring buffer. According to the time vector corresponding to each second data, a plurality of second data is spliced and processed to form a message message, and transmitted to the signal communication bus.
It realizes the transmission of the second data in the form of a message to the signal communication bus without increasing memory or bus load, which meets the continuous reading requirements of microsecond-level low-latency data, and realizes the transmission of low-latency large-capacity data with time vector synchronization.
Smart Images

Figure CN119544739A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of data processing technology, and in particular to a data transmission method, a control device, a medium, a system and a vehicle. Background Art
[0002] In intelligent connected vehicles, data transmission on the vehicle communication bus is limited by the load rate, resulting in the shortest data message transmission cycle usually being set at around 2ms, and the number of high-frequency messages being limited. For systems that require extremely high dynamic response performance, such as electromagnetic active suspension, the motor's operating speed can reach microseconds, but the buffer size in existing single-chip microcomputer designs is limited, making it difficult to store high-frequency changing data for a long time without increasing memory or bus load. Therefore, existing technologies are difficult to meet the continuous reading requirements of such systems for low-latency data at the microsecond level, and there is room for improvement. Summary of the invention
[0003] Embodiments of the present invention provide a data transmission method, a control device, a medium, a system and a vehicle to solve the problem of being unable to continuously read data with low latency in microseconds.
[0004] A data transmission method, comprising: Preprocessing the first data collected by the data collection device to obtain a plurality of second data; Determine the ring buffer; Starting from the starting position of the write pointer of the ring buffer, sequentially write a plurality of the second data to the ring buffer, and starting from the starting position of the read pointer of the ring buffer, sequentially read a plurality of the second data of the ring buffer; When a plurality of the second data meet the preset transmission condition, the plurality of the second data are spliced and processed according to the time vector corresponding to each of the second data to form a message, and the message is transmitted to the signal communication bus.
[0005] Further, determining the ring buffer includes: Determine the data reading and writing cycle and bus communication cycle; The ring buffer is determined according to the data read and write cycle and the bus communication cycle.
[0006] Further, determining the ring buffer according to the data read and write cycle and the bus communication cycle includes: Determining the number of sectors according to the data read and write cycle and the bus communication cycle; According to the number of sectors, assigning a sector address to each of the sectors; Determine a write pointer start position and a read pointer start position according to the sector address; The ring buffer is determined according to the number of sectors, the sector addresses, the write pointer starting position and the read pointer starting position.
[0007] Further, determining the number of sectors according to the data read and write cycle and the bus communication cycle includes: determining the number of sectors according to a multiple of the bus communication cycle and the data read and write cycle.
[0008] Furthermore, the preset transmission condition includes that the sum of the reading times corresponding to each of the second data is equal to the bus communication cycle of the signal communication bus.
[0009] Furthermore, the step of concatenating a plurality of the second data according to the time vector corresponding to each of the second data to form a message includes: Determine a splicing time vector of a plurality of the second data according to a time vector corresponding to each of the second data; The plurality of second data are spliced according to the splicing time vectors of the plurality of second data to form a message.
[0010] A control device comprises a memory, a processor and a computer program stored in the memory and executable on the processor, wherein the processor implements the above-mentioned data transmission method when executing the computer program.
[0011] A computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the data transmission method is implemented.
[0012] An electromagnetic active suspension system comprises a data acquisition device, a signal communication bus and the above control module; The data acquisition device is connected to the signal communication bus and is used to collect the first data; The control module is connected to the signal communication bus, and is used to receive the first data, process the first data, form the message, and transmit the message to the signal communication bus.
[0013] A vehicle comprises the electromagnetic active suspension system mentioned above.
[0014] The above-mentioned data transmission method, control device, medium, system and vehicle pre-process the first data collected by the data acquisition device, obtain multiple second data, determine the circular buffer, start from the starting position of the write pointer of the circular buffer, write multiple second data to the circular buffer in sequence, start from the starting position of the read pointer of the circular buffer, and read the second data of multiple circular buffers in sequence, thereby realizing the second data being written and read through the circular buffer, first-in-first-out, and quickly and continuously transmitting the second data in the form of message messages to the signal communication bus. When the multiple second data meet the preset transmission conditions, the multiple second data are spliced according to the time vector corresponding to each second data to form a message message, and the message message is transmitted to the signal communication bus. The multiple second data are spliced using the time vector corresponding to each second data to realize the transmission of low-latency and large-capacity data with time vector synchronization. BRIEF DESCRIPTION OF THE DRAWINGS
[0015] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the accompanying drawings required for use in the description of the embodiments of the present invention will be briefly introduced below. Obviously, the accompanying drawings in the following description are only some embodiments of the present invention. For ordinary technicians in this field, other accompanying drawings can be obtained based on these accompanying drawings without paying creative labor.
[0016] Figure 1 is a flow chart of a data transmission method in one embodiment of the present invention; Figure 2 is another flow chart of a data transmission method according to an embodiment of the present invention; Figure 3 is another flow chart of a data transmission method according to an embodiment of the present invention; Figure 4 is another flow chart of a data transmission method according to an embodiment of the present invention; Figure 5 is a schematic diagram of a ring buffer area in one embodiment of the present invention; Figure 6 is a schematic diagram of a data transmission method in one embodiment of the present invention; Figure 7 is another schematic diagram of a data transmission method in one embodiment of the present invention; Figure 8 is a time curve diagram of the motor speed in one embodiment of the present invention; Fig. 9 is another time curve diagram of the motor speed in one embodiment of the present invention;. DETAILED DESCRIPTION
[0017] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0018] It should be understood that the present invention can be implemented in different forms and should not be interpreted as limited to the embodiments set forth herein. On the contrary, these embodiments are provided to make the disclosure thorough and complete and to fully convey the scope of the present invention to those skilled in the art.
[0019] In order to fully understand the present invention, detailed structures and steps will be presented in the following description to illustrate the technical solutions proposed by the present invention. The preferred embodiments of the present invention are described in detail below, but in addition to these detailed descriptions, the present invention may also have other implementations.
[0020] The present embodiment provides a data transmission method, which is applied in a vehicle. Specifically, it is applied in an electromagnetic active suspension system of a vehicle. Exemplarily, the electromagnetic active suspension system includes a data acquisition device, a control device, an actuator module, a suspension structure and a signal communication bus. The actuator module is connected to the suspension structure. The data acquisition device, the control device and the actuator module are connected through a signal communication bus. Exemplarily, the data acquisition device includes a signal sensor. The signal sensor includes but is not limited to an acceleration sensor, a displacement sensor and a speed sensor. The actuator module includes an electromagnetic coil / solenoid valve for quickly adjusting the stiffness or damping of the suspension structure. Exemplarily, the suspension structure includes a spring that provides a basic support force and a damper that absorbs and slows down the vibration of the suspension structure. The signal communication bus is a CAN communication bus. In this example, the signal sensor monitors the motion state of the vehicle in real time and transmits the vehicle dynamic data to the control device; the control device analyzes the vehicle dynamic data and calculates the required suspension adjustment parameters, and then sends the control instructions corresponding to the suspension adjustment parameters to the actuator module; the actuator module adjusts the stiffness and damping of the suspension according to the control instructions to adapt to different road conditions and driving requirements.
[0021] This embodiment provides a data transmission method, such as Figure 1 As shown, applied in the above control device, including: S101: Preprocess the first data collected by the data collection device to obtain a plurality of second data.
[0022] S102: Determine a ring buffer.
[0023] S103: Starting from the start position of the write pointer of the ring buffer, a plurality of second data are sequentially written into the ring buffer, and starting from the start position of the read pointer of the ring buffer, a plurality of second data of the ring buffer are sequentially read.
[0024] S104: When the plurality of second data meet the preset transmission condition, the plurality of second data are spliced according to the time vector corresponding to each second data to form a message, and the message is transmitted to the signal communication bus.
[0025] Wherein, the data acquisition device includes the above-mentioned signal sensor, and the first data refers to the data collected by the data acquisition device. The first data includes vehicle dynamic data. Exemplarily, the vehicle dynamic data includes the acceleration of the vertical movement of the vehicle, the displacement or compression of the suspension system, and the speed of the wheel or the body. The second data refers to the data obtained after preprocessing the first data. Exemplarily, preprocessing the first data includes data calibration, filtering, conversion, compensation and calculation. For example, data calibration can be to calibrate the first data according to the characteristics of the signal sensor to eliminate system errors. Filtering can be to use a digital filter, such as a sliding average filter and a low-pass filter, to remove noise in the first data. Conversion can be to convert the first data into actual physical quantities, such as temperature, humidity and pressure. Compensation can be to perform environmental compensation on the first data, such as temperature compensation and humidity compensation. Calculation can be to perform necessary mathematical calculations on the first data, such as average value, maximum value, minimum value and difference.
[0026] As an example, in step S101, the first data collected by the data acquisition device is preprocessed to obtain multiple second data. Exemplarily, after the data acquisition device collects the first data, it sends it to the control device, and the control device preprocesses the first data, and obtains a second data according to the data read and write cycle, that is, every other data read and write cycle. Optionally, after the data acquisition device collects the first data, it can send the first data to the control device through a signal communication bus, or it can send the first data to the control device directly. In this example, the data read and write cycle is the operation cycle of the control device. Preferably, the data read and write cycle is the fastest operation cycle of the control device. Exemplarily, the fastest operation cycle is 0.1ms (milliseconds).
[0027] As an example, in step S102, a ring buffer is determined. Exemplarily, the ring buffer includes multiple sectors, the multiple sectors form a ring, and each sector corresponds to a sector address. Based on the sector address corresponding to each sector, the control module writes data on multiple sectors of the ring buffer through a write pointer and a read pointer. In this example, the control module determines that the ring buffer is used to cache multiple second data, and based on the first-in-first-out overwriting principle of the ring buffer, compared with the cache method of clearing and rewriting after the cache is full, it can achieve longer data storage on the basis of a smaller storage space.
[0028] As an example, in step S103, starting from the write pointer starting position of the ring buffer, multiple second data are sequentially written to the ring buffer, and starting from the read pointer starting position of the ring buffer, the second data of multiple ring buffers are sequentially read. It can be understood that the write pointer starting position and the read pointer starting position correspond to the same sector address to ensure the authenticity and continuity of data reading and writing. Exemplarily, starting from the write pointer starting position of the ring buffer, multiple second data are sequentially written to the ring buffer, and when returning to the write pointer starting position, the next cycle of writing multiple second data begins. When the control module writes multiple second data to the ring buffer, starting from the read pointer starting position of the ring buffer, the second data of multiple ring buffers are sequentially read, and the second data of the ring buffer is read while writing, and the first-in-first-out is realized on the basis of a smaller storage space, so as to realize longer data storage. In this example, the control module starts from the write pointer starting position of the ring buffer according to the data read and write cycle, writes multiple second data to the ring buffer in sequence, and at the same time, starts from the read pointer starting position of the ring buffer, reads the second data of multiple ring buffers in sequence. Wherein, the data read and write cycle is the cycle of the control module writing data and reading data. The control module has the same cycle for writing data and reading data.
[0029] As an example, in step S104, when the plurality of second data meet the preset transmission condition, the plurality of second data are spliced and processed according to the time vector corresponding to each second data to form a message, and the message is transmitted to the signal communication bus. In this example, the preset transmission condition refers to the condition for transmitting the second data. Exemplarily, the preset transmission condition is set according to the bus communication cycle of the signal communication bus to ensure the continuity of the plurality of second data within the bus communication cycle of the signal communication bus.
[0030] Exemplarily, after the control device reads a plurality of second data according to the data read and write cycle, when the plurality of second data meet the preset transmission conditions, the plurality of second data are spliced according to the time vector corresponding to each second data, and then the plurality of spliced second data are encapsulated into a message, and the message is transmitted to the signal communication bus to realize data transmission. In this example, without changing the communication protocol or expanding the memory space, the second data is quickly read and written on the ring buffer, and the second data is stored in the form of a message through the signal communication bus, for example, stored in a hard disk, and the plurality of second data are spliced using the time vector corresponding to each second data, so as to realize the transmission of low-latency and large-capacity data with time vector synchronization.
[0031] For example, Figure 6 and Figure 7 As shown, BUFFER is a ring buffer, MCU is a control device, and the control device writes second data date1-date20 to the sector corresponding to the storage address of the ring buffer every 0.1 milliseconds. The second data date1-date20 adopts the first-in-first-out principle and is read by the control device. According to the time vector corresponding to each second data, multiple second data are spliced to form a message. Exemplarily, the message generates a frame every 20 milliseconds, for example Figure 6 It can be understood that the second data in the message message corresponding to the second frame to the fifth frame is the data repeatedly written by the control device in the ring buffer. Figure 7 Shown are multiple second data splicing processes.
[0032] For example, taking the motor speed of the electromagnetic active suspension motor system as an example, when a road load changes at a high frequency, the position of the active suspension motor will also change at a high frequency. At this time, the control device analyzes and calculates the signal sensor sampling data to obtain the motor speed. The time interval is 0.1ms, and the CAN communication bus communication cycle is 2ms. If the CAN communication bus is read, although the data can be read continuously, the data is seriously distorted. If the data in the control device cache is read, although the data is relatively real, due to the display of the memory space, the cached data samples are limited, and the data cannot be continuously real.
[0033] like Figure 8 and 9 As shown, there is a comparison between the curve graph of the motor speed changing over time collected by the present application and the curve graph of the motor speed changing over time collected by the prior art. Among them, green represents the curve graph of the motor speed changing over time in the prior art. Red represents the curve graph of the motor speed changing over time collected by the present application. Compared with the prior art, the present application can realize the transmission of low-latency and large-capacity data with time vector synchronization, and ensure the continuity and authenticity during the data transmission process.
[0034] In this embodiment, the first data collected by the data acquisition device is preprocessed, multiple second data are obtained, and a circular buffer is determined. Starting from the starting position of the write pointer of the circular buffer, multiple second data are written to the circular buffer in sequence. Starting from the starting position of the read pointer of the circular buffer, the second data of multiple circular buffers are read in sequence, thereby realizing that the second data is written and read through the circular buffer at the same time, first-in-first-out, and the second data is quickly and continuously transmitted to the signal communication bus in the form of message messages. When the multiple second data meet the preset transmission conditions, the multiple second data are spliced according to the time vector corresponding to each second data to form a message message, and the message message is transmitted to the signal communication bus. The multiple second data are spliced using the time vector corresponding to each second data to realize the transmission of low-latency and large-capacity data with time vector synchronization.
[0035] In one embodiment, if Figure 2 As shown, in step S102, determining the ring buffer includes: S201: Determine a data read and write cycle and a bus communication cycle.
[0036] S202: Determine a ring buffer according to a data read and write cycle and a bus communication cycle.
[0037] As an example, in step S201, the control device determines the data read and write cycle and the bus communication cycle of the second data. Exemplarily, determining the data read and write cycle includes performing multiple read and write tests on the circular buffer, obtaining the read and write test time corresponding to the multiple read and write tests, and determining the data read and write cycle based on the average time of each read and write test. It can be understood that the number of times the read and write test is performed on the circular buffer can be set according to actual experience, and is not limited here. Determining the bus communication cycle includes obtaining the bus clock frequency, and determining the bus communication cycle based on the bus clock frequency. In this embodiment, since different types of control devices have different data read and write cycles, the accuracy of the data read and write cycle can be improved by performing multiple read and write tests on the circular buffer, obtaining the read and write test time corresponding to the multiple read and write tests, and determining the data read and write cycle based on the average time of each read and write test.
[0038] It should be noted that the data read and write cycle and the bus communication cycle can also be set by the user.
[0039] As an example, in step S202, a ring buffer is determined according to a data read / write cycle and a bus communication cycle. Exemplarily, the number of sectors of the ring buffer is determined according to a proportional relationship between the data read / write cycle and the bus communication cycle, thereby determining the ring buffer according to the number of sectors. In this example, the ring buffer is determined by the data read / write cycle and the bus communication cycle to ensure that within the bus communication cycle, the control device quickly writes and reads more second data in the ring buffer according to the data read / write cycle, thereby achieving low-latency and high-capacity data transmission.
[0040] In this embodiment, by determining the data read and write cycle and the bus communication cycle, a circular buffer is determined according to the data read and write cycle and the bus communication cycle, so that the circular buffer can write a larger amount of second data within the bus communication cycle, thereby realizing low-latency and large-capacity data transmission.
[0041] In one embodiment, if Figure 3 As shown, in step S202, a ring buffer is determined according to a data read and write cycle and a bus communication cycle, including: S301: Determine the number of sectors according to the data read and write cycle and the bus communication cycle.
[0042] S302: Allocate a sector address for each sector according to the number of sectors.
[0043] S303: Determine the write pointer start position and the read pointer start position according to the sector address.
[0044] S304: Determine a ring buffer according to the number of sectors, sector addresses, a write pointer start position, and a read pointer start position.
[0045] As an example, in step S301, according to the data read and write cycle and the bus communication cycle, the number of sectors is determined. In this example, it is sufficient to ensure that the product between the data read and write cycle and the number of sectors is less than or equal to the bus communication cycle, thereby ensuring that more continuous second data can be transmitted within the bus communication cycle, thereby realizing the transmission of low-latency large-capacity data. Preferably, the number of sectors is determined according to the multiple between the bus communication cycle and the data read and write cycle to ensure that the most continuous second data can be transmitted within the bus communication cycle. Exemplarily, assuming that the data read and write cycle is 0.1ms and the bus communication cycle is 2ms, it is determined that the multiple between the bus communication cycle and the data read and write cycle is 20, then it is determined that the number of sectors is 20. Therefore, within a 2ms bus communication cycle, 20 second data can be transmitted.
[0046] As an example, in step S302, a sector address of each sector is allocated according to the number of sectors. Figure 5As shown, the number of sectors is 20, and the allocated addresses are 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18 and 19 respectively.
[0047] As an example, in step S303, the write pointer starting position and the read pointer starting position are determined according to the sector address. Exemplarily, the first address of the sector address is determined as the write pointer starting position and the read pointer starting position. When reading and writing start, the value of the sector address is continuously increased to locate the next read and write position. It can be understood that when the control device reads and writes to the write pointer starting position and the read pointer starting position, data reading and writing starts again from the write pointer starting position and the read pointer starting position.
[0048] As an example, in step S304, the ring buffer is determined according to the number of sectors, the sector address, the write pointer starting position and the read pointer starting position. In this example, the control device initializes the ring buffer according to the number of sectors, the sector address, the write pointer starting position and the read pointer starting position to facilitate subsequent caching of the second data.
[0049] In this embodiment, the number of sectors is determined according to the data read and write cycle and the bus communication cycle, the sector address of each sector is allocated according to the number of sectors, the starting position of the write pointer and the starting position of the read pointer are determined according to the sector address, and a circular buffer is determined according to the number of sectors, the sector address, the starting position of the write pointer and the starting position of the read pointer. The control module determines that the circular buffer is used to cache multiple second data. Compared with the caching method of clearing and then writing after the cache is full, it can achieve longer data storage based on a smaller storage space.
[0050] In one embodiment, the preset transmission condition includes that the sum of the reading time corresponding to each second data is equal to the bus communication cycle of the signal communication bus. In this embodiment, the sum of the reading time corresponding to each second data is equal to the bus communication cycle of the signal communication bus, thereby ensuring the continuity of the second data in the message transmitted by the signal communication bus.
[0051] In one embodiment, if Figure 4 As shown, in step S104, multiple second data are spliced according to the time vector corresponding to each second data to form a message, including: S401: Determine a splicing time vector of multiple second data according to a time vector corresponding to each second data.
[0052] S402: splicing the plurality of second data according to the splicing time vectors of the plurality of second data to form a message.
[0053] As an example, in step S401, according to the time vector corresponding to each second data, the splicing time vector of the plurality of second data is determined to ensure the continuity between the plurality of second data. Exemplarily, according to the time vector corresponding to each second data, the reading time corresponding to each second data is sorted to determine the time relationship of the plurality of second data after splicing, that is, the splicing time vector.
[0054] As an example, in step S402, a plurality of second data are spliced according to splicing time vectors of the plurality of second data to form a message.
[0055] Exemplarily, the plurality of second data are concatenated according to the following code logic: time=sig1(:,1); for(i-1:length(time)) time_splicing(2e*i,1)=time(i) end for(i=1:length(time)-1) for(j-1:19) time_splicing(20*i+j,1)=time(i)+(time(i+1)-time(i)) / 20*j; end end for(1-1:19) time_splicing(i)=time(1)-(time(2)-time(1)) / 20*(20-i) end Spd_Array-[sig1(:,2),sig2(:,2),sig3(:,2),sig4(:,2),sig5(:,2),sig6(:,2),... sig7(:,2),sig8(:,2),sig9(:,2),sig10(:,2),sig11(:,2),sig12(:,2),sig13(:,2),sig14(:,2),... sig15(:,2),sig16(:,2),sig17(:,2),sig18(:,2),sig19(:,2),sig20(:,2)]'; [m,n]=size(Spd_Array); for(i-1:m*n) Spd(i,1)=Spd_Array(i); end Among them, time sig1 is the time vector corresponding to the second data, time_splicing is the splicing time vector of the second data, and Spd is the multiple second data with time vectors after splicing.
[0056] In this example, after the multiple second data are spliced according to the splicing time vectors of the multiple second data, the multiple second data after the splicing are encapsulated to form a message.
[0057] In this embodiment, the splicing time vector of multiple second data is determined according to the time vector corresponding to each second data, and the multiple second data are spliced according to the splicing time vector of the multiple second data to form a message, so as to transmit the message to the signal communication bus, and the multiple second data are spliced using the time vector corresponding to each second data to realize the transmission of low-latency and large-capacity data with synchronized time vector.
[0058] It should be understood that the order of execution of the steps in the above embodiment does not necessarily mean the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiment of the present invention.
[0059] In one embodiment, a control device is provided, including a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, the data transmission method in the above embodiment is implemented. To avoid repetition, it will not be described here.
[0060] In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the data transmission method in the above embodiment is implemented.
[0061] Those of ordinary skill in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be implemented by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to memory, storage, database or other media used in the embodiments provided in this application may include non-volatile and / or volatile memory. Non-volatile memory may include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM) or flash memory. Volatile memory may include random access memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in many forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous link (Synchlink) DRAM (SLDRAM), memory bus (Rambus) direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM), etc.
[0062] Those skilled in the art can clearly understand that for the convenience and simplicity of description, only the division of the above-mentioned functional units and modules is used as an example. In actual applications, the above-mentioned functions can be distributed and completed by different functional units and modules as needed, that is, the internal structure of the device can be divided into different functional units or modules to complete all or part of the functions described above.
[0063] The present embodiment provides an electromagnetic active suspension system, including a data acquisition device, a signal communication bus and the above-mentioned control module; the data acquisition device is connected to the signal communication bus and is used to collect first data; the control module is connected to the signal communication bus and is used to receive the first data, process the first data, form a message, and transmit the message to the signal communication bus.
[0064] This embodiment provides a vehicle, comprising the above-mentioned electromagnetic active suspension system.
[0065] The embodiments described above are only used to illustrate the technical solutions of the present invention, rather than to limit the same. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that the technical solutions described in the aforementioned embodiments may still be modified, or some of the technical features may be replaced by equivalents. Such modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present invention, and should all be included in the protection scope of the present invention.
Claims
1. A data transmission method, characterized in that: include: Preprocessing the first data collected by the data collection device to obtain a plurality of second data; Determine the ring buffer; Starting from the starting position of the write pointer of the ring buffer, sequentially write a plurality of the second data to the ring buffer, and starting from the starting position of the read pointer of the ring buffer, sequentially read a plurality of the second data of the ring buffer; When a plurality of the second data meet the preset transmission condition, the plurality of the second data are spliced and processed according to the time vector corresponding to each of the second data to form a message, and the message is transmitted to the signal communication bus.
2. The data transmission method according to claim 1, characterized in that: Determining the ring buffer includes: Determine the data reading and writing cycle and bus communication cycle; The ring buffer is determined according to the data read and write cycle and the bus communication cycle.
3. The data transmission method according to claim 2, characterized in that: The step of determining the ring buffer according to the data read and write cycle and the bus communication cycle includes: Determining the number of sectors according to the data read and write cycle and the bus communication cycle; According to the number of sectors, assigning a sector address to each of the sectors; Determine a write pointer start position and a read pointer start position according to the sector address; The ring buffer is determined according to the number of sectors, the sector addresses, the write pointer starting position and the read pointer starting position.
4. The data transmission method according to claim 3, characterized in that: Determining the number of sectors according to the data read and write cycle and the bus communication cycle includes: determining the number of sectors according to a multiple of the bus communication cycle and the data read and write cycle.
5. The data transmission method according to claim 1, characterized in that: The preset transmission condition includes that the sum of the reading times corresponding to each of the second data is equal to the bus communication cycle of the signal communication bus.
6. The data transmission method according to claim 1, characterized in that: The step of concatenating a plurality of the second data according to the time vector corresponding to each of the second data to form a message includes: Determine a splicing time vector of a plurality of the second data according to a time vector corresponding to each of the second data; The plurality of second data are spliced according to the splicing time vectors of the plurality of second data to form a message.
7. A control device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the computer program, the data transmission method according to any one of claims 1 to 6 is implemented.
8. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the data transmission method according to any one of claims 1 to 6 is implemented.
9. An electromagnetic active suspension system, characterized in that: comprising a data acquisition device, a signal communication bus and a control module as claimed in claim 7; The data acquisition device is connected to the signal communication bus and is used to collect the first data; The control module is connected to the signal communication bus, and is used to receive the first data, process the first data, form the message, and transmit the message to the signal communication bus.
10. A vehicle, characterized in that: Comprising the electromagnetic active suspension system as claimed in claim 9.