Data transmission method, apparatus, device, medium, and product
Patent Information
- Application Number
- CN202310872941.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-07-14
- Publication Date
- 2026-10-23
- Estimated Expiration
- 2043-07-14
AI Technical Summary
当开发人员在进行车辆控制系统的数据传输时,通常需要将每个数据逐个打包,再进行数据的传输,导致数据传输时间较长,传输效率较低
[0012]本申请提供的数据传输方法、装置、设备、介质及产品中,基于SOA架构的服务端获取待传输的第一控制命令对应的服务数据并转换为信号数据,得到第一控制命令对应的信号数据;再根据服务端本地加载的信号布局信息中定义的各种信号数据在数据包中的位置生成第一数据包发送给控制端;控制端接收第一数据包,根据控制端本地加载的信号布局信息,对第一数据包进行解析得到第一控制命令对应的信号数据。本申请的方案,针对数据传输量大的情况,在服务端将所有待传输的第一控制命令对应的服务数据转为信号数据后,基于信号布局将多个信号数据打包为一个数据包发送至控制端,控制端可基于自身本地加载的信号布局对接收的数据包进行解析得到多个信号数据,无需分别针对每个数据依次进行处理,从而减少数据传输的时间,提高数据传输的效率。
Smart Images

Figure CN116708418B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of vehicles, and more particularly to a data transmission method, apparatus, device, medium, and product. Background Technology
[0002] With advancements in transportation technology and increasing consumer demands, the level of vehicle electronics is rising year by year. From engine control to transmission control, from driving, braking, and steering system control to safety systems and instrument alarm systems, from power management to various efforts to improve comfort, the number of electronic control systems in vehicles is increasing. These systems not only need to communicate with each other but also need to transmit data.
[0003] Currently, vehicle control systems are becoming increasingly numerous and complex, with a dramatic increase in data transmission volume. When developers handle data transmission in vehicle control systems, they typically need to package each data item individually before transmitting it, resulting in long data transmission times and low efficiency. Summary of the Invention
[0004] This application provides a data transmission method, apparatus, device, medium, and product to improve data transmission efficiency.
[0005] On one hand, this application provides a data transmission method applied to a server based on an SOA architecture, comprising: acquiring service data corresponding to a first control command to be transmitted; converting the service data corresponding to the first control command into signal data to obtain signal data corresponding to the first control command; generating a first data packet based on the signal data corresponding to the first control command according to signal layout information loaded locally on the server; wherein the position of the signal data corresponding to the first control command in the first data packet is consistent with the position of various signal data defined in the signal layout information in the data packet; and sending the first data packet to a control terminal so that the control terminal can parse the first data packet according to the signal layout information loaded locally on the control terminal to obtain the signal data corresponding to the first control command.
[0006] On the other hand, this application also provides a data transmission method applied to a control terminal, comprising: receiving a first data packet, wherein the first data packet is generated by a server based on an SOA architecture, which converts service data corresponding to a first control command to be transmitted into signal data corresponding to the first control command, and generates the signal data based on signal layout information loaded locally on the server; wherein the position of the signal data corresponding to the first control command in the first data packet is consistent with the position of various signal data defined in the signal layout information in the data packet; and parsing the first data packet according to the signal layout information loaded locally on the control terminal to obtain the signal data corresponding to the first control command.
[0007] In another aspect, this application also provides a data transmission apparatus applied to a server based on an SOA architecture, comprising: a processing module, configured to acquire service data corresponding to a first control command to be transmitted; and to convert the service data corresponding to the first control command into signal data to obtain signal data corresponding to the first control command; a first generation module, configured to generate a first data packet based on the signal data corresponding to the first control command according to signal layout information locally loaded on the server; wherein the position of the signal data corresponding to the first control command in the first data packet is consistent with the position of various signal data defined in the signal layout information in the data packet; and a first sending module, configured to send the first data packet to a control terminal, so that the control terminal can parse the first data packet according to the signal layout information locally loaded on the control terminal to obtain the signal data corresponding to the first control command.
[0008] In another aspect, this application also provides a data transmission device applied to a control terminal, comprising: a second receiving module for receiving a first data packet, wherein the first data packet is generated by a server based on an SOA architecture, which converts service data corresponding to a first control command to be transmitted into signal data corresponding to the first control command, and generates the signal data based on signal layout information loaded locally on the server; wherein the position of the signal data corresponding to the first control command in the first data packet is consistent with the position of various signal data defined in the signal layout information in the data packet; and a second parsing module for parsing the first data packet to obtain the signal data corresponding to the first control command based on the signal layout information loaded locally on the control terminal.
[0009] In another aspect, this application provides an electronic device, including: a processor, and a memory communicatively connected to the processor; the memory stores computer-executable instructions; the processor executes the computer-executable instructions stored in the memory to implement the aforementioned method.
[0010] In another aspect, this application provides a computer-readable storage medium storing computer-executable instructions that, when executed by a processor, are used to implement the aforementioned method.
[0011] In another aspect, this application provides a computer program product, including a computer program that, when executed by a processor, implements the aforementioned method.
[0012] In the data transmission method, apparatus, device, medium, and product provided in this application, the server, based on an SOA architecture, obtains the service data corresponding to the first control command to be transmitted and converts it into signal data to obtain the signal data corresponding to the first control command. Then, according to the positions of various signal data defined in the signal layout information locally loaded on the server, a first data packet is generated and sent to the control end. The control end receives the first data packet and, according to the signal layout information locally loaded on the control end, parses the first data packet to obtain the signal data corresponding to the first control command. For situations with large data transmission volumes, the solution in this application, after converting all the service data corresponding to the first control command to be transmitted into signal data on the server, packages multiple signal data into a single data packet based on the signal layout and sends it to the control end. The control end can parse the received data packet based on its own locally loaded signal layout to obtain multiple signal data, eliminating the need to process each data separately, thereby reducing data transmission time and improving data transmission efficiency. Attached Figure Description
[0013] The accompanying drawings, which are incorporated in and form part of this specification, illustrate embodiments consistent with this application and, together with the description, serve to explain the principles of this application.
[0014] Figure 1 The diagram below illustrates a flowchart of the data transmission method provided in Embodiment 1 of this application.
[0015] Figure 2 The diagram above illustrates a flowchart of an example data transmission method.
[0016] Figure 3 A schematic diagram of a vehicle control system provided as an example;
[0017] Figure 4 The diagram above illustrates a flowchart of the data transmission method provided in Embodiment 2 of this application.
[0018] Figure 5 The diagram above illustrates a flowchart of an example data transmission method.
[0019] Figure 6 A flowchart illustrating a data transmission method provided in Embodiment 3 of this application;
[0020] Figure 7 The diagram below exemplarily illustrates the structure of the data transmission apparatus provided in Embodiment 4 of this application;
[0021] Figure 8 The diagram above illustrates a schematic representation of the structure of an example data transmission device.
[0022] Figure 9The diagram above illustrates a schematic representation of the structure of a data transmission apparatus provided in this example.
[0023] Figure 10 The diagram above illustrates a schematic representation of the structure of a data transmission apparatus provided in this example.
[0024] Figure 11 This is a schematic diagram of the structure of the electronic device provided in Embodiment 5 of this application.
[0025] The accompanying drawings illustrate specific embodiments of this application, which will be described in more detail below. These drawings and descriptions are not intended to limit the scope of the concept in any way, but rather to illustrate the concept of this application to those skilled in the art through reference to particular embodiments. Detailed Implementation
[0026] Exemplary embodiments will now be described in detail, examples of which are illustrated in the accompanying drawings. When the following description relates to the drawings, unless otherwise indicated, the same numbers in different drawings denote the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with this application. Rather, they are merely examples of apparatuses and methods consistent with some aspects of this application as detailed in the appended claims.
[0027] The terms "comprising" and "having" in this application are used to indicate an open-ended inclusion, meaning that additional elements / components / etc. may exist besides the listed elements / components / etc.; the terms "first" and "second," etc., are used only as markings or distinctions and are not intended to limit the order or quantity of the objects. Furthermore, the different elements and areas in the accompanying drawings are only schematic and are therefore not limited to the dimensions or distances shown in the drawings. The technical solutions will be described in detail below with reference to specific embodiments. These specific embodiments can be combined with each other, and the same or similar concepts or processes may not be repeated in some embodiments. The embodiments of this application will now be described with reference to the accompanying drawings.
[0028] In recent years, vehicle control systems have been widely applied in various fields, playing a decisive role in driving assistance and ensuring the safety of drivers and passengers. The architecture of a vehicle control system includes a server and a control unit. The server receives control commands input by the user, sends data to the control unit, and instructs the vehicle to execute the corresponding operations. The control unit collects, processes, and stores status data fed back by vehicle sensors and sends it to the server in response to control commands issued by the server. As vehicles develop towards intelligence and networking, features such as smart cockpits, audio-visual entertainment, and autonomous driving are becoming increasingly sophisticated, resulting in a much larger volume of transmitted data. Based on the existing vehicle control system architecture, a server-side architecture based on SOA (Service-Oriented Architecture) has emerged. SOA is a component model that connects different functional units of an application (called services) through well-defined interfaces and contracts. These interfaces are defined in a neutral manner, independent of the hardware platform, operating system, and programming language used to implement the services. This allows services built into the system to interact in a unified and universal way. In the automotive industry, SOA-based servers are becoming increasingly common, generating data in service data format, while the control unit can only recognize signal data format. Therefore, when transmitting data between SOA-based servers and traditional architecture-based control units, in addition to ensuring data transmission itself, the issue of data format conversion also needs to be considered.
[0029] As an example, one data transmission scheme involves converting and packaging each piece of data to be transmitted individually before sending it to the data receiver. This method results in long transmission times and low efficiency, making it difficult to meet the data transmission needs of intelligent vehicles. Therefore, improving data transmission efficiency and enabling faster data exchange between the server and control unit has become a crucial issue to consider.
[0030] Some aspects of the embodiments of this application relate to the above considerations. The following examples illustrate the solutions.
[0031] Example 1
[0032] Figure 1 The diagram illustrates a flowchart of the data transmission method provided in Embodiment 1 of this application. The executing entity in this example can be a data transmission device applied to a server based on an SOA architecture, such as... Figure 1 As shown, the method includes:
[0033] Step 101: Obtain the service data corresponding to the first control command to be transmitted; and convert the service data corresponding to the first control command into signal data to obtain the signal data corresponding to the first control command.
[0034] Step 102: Generate a first data packet based on the signal data corresponding to the first control command according to the signal layout information loaded locally on the server; wherein, the position of the signal data corresponding to the first control command in the first data packet is consistent with the position of various signal data defined in the signal layout information in the data packet;
[0035] Step 103: Send the first data packet to the control terminal so that the control terminal can parse the first data packet according to the signal layout information loaded locally on the control terminal to obtain the signal data corresponding to the first control command.
[0036] In practical applications, the execution entity of this method can be a data transmission device, which can be implemented in various ways. For example, it can be implemented through a computer program, such as application software; or it can be implemented as a medium storing the relevant computer program, such as a USB flash drive or cloud storage; or it can be implemented through a physical device that integrates or installs the relevant computer program, such as a chip. Specifically, the user inputs a first control command at the server end of the control system. For example, the first control command could be a command to open the door, close the door, lower the window, or turn on the lights. Upon receiving the first control command, the server end of the control system obtains the service data corresponding to the first control command, and then converts the obtained service data into signal data, thus obtaining the signal data corresponding to the first control command to be transmitted. Different control commands generate different service data, which in turn generate different types of signal data. Furthermore, the same control command may also generate different service data, which in turn generate different types of signal data. The format of the signal data includes, but is not limited to, Excel, ARXML, and JSON. The server is based on SOA architecture and can communicate with the control terminal only through an Ethernet interface. Therefore, it is not necessary to set up other types of traditional network interfaces (CAN, CANFD, Flexray, Lin), thereby reducing the transmission structure, simplifying the equipment structure and reducing costs.
[0037] The signal layout information loaded locally on the server indicates the position of various signal data within the data packet. This information needs to be pre-loaded on the server before data transmission. The specific position of each type of signal data within the data packet is not limited here; it only needs to satisfy that one type of signal data occupies one of the positions in the data packet, and different types of signal data correspond to different positions. For example, if the first control command is to turn on the headlights, the signal data corresponding to this command could include headlight on command signal data, headlight brightness command signal data, etc. In this case, the position of the headlight on command signal data in the data packet is defined as position 1, and the position of the headlight brightness command signal data is defined as position 2, or vice versa. It is sufficient that each position corresponds to only one type of signal data to clearly identify the type of signal data at each position in the data packet. Then, based on the signal layout information loaded locally on the server, a first data packet is generated based on the signal data corresponding to the first control command. The position of the signal data corresponding to the first control command in the first data packet needs to be consistent with the positions of the various signal data defined in the signal layout information within the data packet. For example, if the headlight-on command signal data is located at position 1 and the headlight brightness command signal data is located at position 2 in the signal layout loaded locally on the server, then in the first data packet generated above, if the first control command is the headlight-on command, the corresponding signal data should be located at the same position as defined in the signal layout information loaded locally on the server. That is, the signal data at position 1 in the first data packet should be the headlight-on command signal data corresponding to the first control command, and the signal data at position 2 in the first data packet should be the headlight brightness command signal data corresponding to the first control command.
[0038] In practical applications, to effectively manage and use signal layout information, it is common practice to pre-load the signal layout information onto the server based on the signal layout code. Optionally, as an example, control command names, information, and parameters from the signal database can be imported to the server, the signal layout code loaded, and then the signal layout information loaded onto the server based on the signal layout code. It should be noted that the above is only one example and does not exclude other methods of loading signal layout information onto the server.
[0039] Specifically, after generating the first data packet, it is sent to the control terminal. For example, the server can send the first data packet to the control terminal via Ethernet. Subsequently, the control terminal parses the first data packet to obtain the signal data corresponding to the first control command based on the signal layout information loaded locally on the control terminal. In the above example, based on the predefined and loaded signal layout information, the server can package the signal data corresponding to multiple control commands into the same data packet. The control terminal can accurately parse the data packet containing multiple signal data based on the signal layout information, without having to package and process the signal data corresponding to each control command individually. This supports batch processing, improving data processing efficiency. Furthermore, in this scheme, since the signal layout information can accurately characterize the type of signal data at each position in the data packet, there is no need to carry additional information to characterize the signal data, thereby reducing the amount of data during transmission, further reducing data transmission time, and improving data transmission efficiency.
[0040] Based on the aforementioned example, in step 101, obtaining the service data corresponding to the first control command to be transmitted includes: taking all control commands generated before the current transmission cycle arrives as the first control command; wherein each control command is generated according to the command configuration cycle of the control command; after converting the service data corresponding to the first control command into signal data and obtaining the signal data corresponding to the first control command, it further includes: writing the signal data corresponding to the first control command into a memory.
[0041] In step 102, the first data packet is generated based on the signal layout information loaded locally on the server and the signal data corresponding to the first control command. This includes: when the current transmission cycle arrives, the first data packet is generated based on the signal layout information loaded locally on the server and the signal data corresponding to the first control command in the current memory.
[0042] Specifically, all control commands generated before the arrival of the current transmission cycle are considered the first control command. The transmission cycle is the time interval between the start times of each signal data transmission from the SOA-based server to the control terminal. For example, if the current transmission cycle is 20ms and the start time is set to 12:00, the server will send the first signal data to the control terminal 20ms after 12:00, and then send the second signal data 20ms after 12:00, i.e., 40ms after 12:00. Specifically, the data to be transmitted at the start time of each transmission cycle can be all control commands generated by the server within the previous transmission cycle, i.e., before the arrival of the current transmission cycle—that is, the signal data corresponding to the first control command.
[0043] Each control command is generated according to its configuration cycle. In practical applications, a configuration cycle is established for each control command to facilitate data transmission and management. The configuration cycle of a control command is its generation cycle. For example, assuming a control command's configuration cycle is 15ms, the server will generate a new control command every 15ms.
[0044] Because different control commands have different command configuration periods, they may not be completely consistent with the transmission period. For example, assuming the transmission period is 20ms and the start time of the previous transmission period was 13:00, the server will perform the next data transmission at 20ms after 13:00. Alternatively, assuming a control command has a command configuration period of 5ms and the last time this control command was generated was 10ms after 13:00, the current generation of this control command will occur at 15ms after 13:00, meaning the next transmission period has not yet arrived. Therefore, to avoid data loss, the service data corresponding to the control command is converted into signal data, and after obtaining the signal data corresponding to the control command, it is written to memory. If this transmission cycle is the first transmission cycle, the service data corresponding to the first control command transmitted in this cycle is converted into signal data. After obtaining the signal data corresponding to the control command, it is directly written to the memory. If this transmission cycle is not the first transmission cycle, the service data corresponding to the first control command transmitted in this cycle is converted into signal data. After obtaining the signal data corresponding to the control command, the signal data corresponding to the first control command obtained in this cycle is overwritten with the signal data corresponding to the first control command obtained in the previous cycle and written to the memory. When the next data transmission time arrives, that is, when the 20ms after 13:00 arrives, the first data packet is generated based on the signal layout information loaded locally on the server and the signal data corresponding to the control command currently in the memory.
[0045] The scheme in this example uses all control commands generated before the current transmission cycle arrives as the first control command and stores the corresponding signal data in the memory. When the transmission cycle arrives, the first data packet is generated, making the data transmission more complete. Moreover, the data transmitted each time is the latest data in the memory, making the data transmission more accurate and reliable.
[0046] Based on the above example, there are multiple first data packets, each corresponding to a different command configuration period. The process of generating the first data packet, based on the signal layout information loaded locally on the server and the signal data corresponding to the first control command currently in memory, includes: dividing the signal data corresponding to the first control command according to the command configuration period to obtain signal data groups corresponding to different command configuration periods; wherein, the command configuration period of the control commands corresponding to all signal data in each signal data group corresponding to a command configuration period is the same; and for each signal data group corresponding to a command configuration period, generating the first data packet corresponding to that command configuration period based on the signal layout information loaded locally on the server and that signal data group.
[0047] Specifically, to facilitate rapid parsing by the control end, a data packet packaging method can be used to generate a data packet from signal data with the same command configuration period. Specifically, if the server generates multiple control commands before the next transmission cycle arrives (i.e., before the start time of the next transmission), and these multiple control commands include commands with different command configuration periods, then when the transmission cycle arrives, the signal data corresponding to the control commands with the same command configuration period can be packaged into a single data packet. Consequently, multiple first data packets will be obtained, each corresponding to a different command configuration period.
[0048] For example, suppose that during a transmission cycle, the server generates commands to turn on the headlights, control headlight brightness, control high / low beam, and control turn signals. The command configuration period for the turn on and headlight brightness commands is 15ms, while the command configuration period for the high / low beam and turn signal commands is 20ms. When the current transmission cycle arrives, the signal data corresponding to the turn on and headlight brightness commands can be grouped into the same signal data group, with a command configuration period of 15ms. The signal data corresponding to the high / low beam and turn signal commands can be grouped into the same signal data group, with a command configuration period of 20ms. Then, for each command configuration period's corresponding signal data group, based on the signal layout information loaded locally on the server, a first data packet corresponding to that command configuration period is generated. Combining the above example, two first data packets are generated: one corresponding to the 15ms command configuration period and the other to the 20ms command configuration period.
[0049] In the example above, signal data corresponding to commands with the same command configuration cycle are generated into a first data packet, ensuring that the command configuration cycles of all control commands corresponding to signal data within each first data packet are the same. This example demonstrates how signal data with the same command configuration cycle can be packaged, sent, received, and parsed together, making data transmission more convenient and efficient.
[0050] In addition to the aforementioned scenario where the server is the data sender and the control unit is the data receiver, practical applications also involve situations where the control unit sends data to the server. For example, in the case of data acquisition, sensors in the vehicle need to report the current status data of each component to the server. In this case, the control unit collects this data and reports it to the server. Another example is the case of transmitting a response. Referring to the previous example of the server sending data to the control unit, after receiving the data sent by the server, the control unit will send response status data to the server. Therefore, to implement the control unit sending data to the server, as an example, Figure 2 The diagram above illustrates a flowchart of an example data transmission method, such as... Figure 2 As shown, based on any example, the method also includes:
[0051] Step 104: Receive the second data packet. The second data packet is generated by the control terminal based on the signal data corresponding to the first state data to be transmitted, according to the signal layout information loaded locally on the control terminal.
[0052] Step 105: Based on the signal layout information loaded locally on the server, parse the second data packet to obtain the signal data corresponding to the first state data;
[0053] Step 106: Convert the signal data corresponding to the first state data into service data to obtain the service data corresponding to the first state data.
[0054] Specifically, when the control terminal needs to send data to the server, it generates a second data packet based on the signal data corresponding to the first state data to be transmitted, according to the signal layout information loaded locally on the control terminal. The control terminal then sends the second data packet to the SOA-based server. The method for loading the signal layout information locally on the control terminal is similar to that on the server, and will not be elaborated further here. Specifically, after receiving the second data packet, the server parses it according to the signal layout information loaded locally on the server to obtain the signal data corresponding to the first state data. Then, it converts the signal data corresponding to the first state data into service data, thus obtaining the service data corresponding to the first state data. The first state data includes, but is not limited to, data actively reported by the control terminal to the server and data fed back by the control terminal to the server in response to data sent by the server.
[0055] In this example, the SOA-based server receives the second data packet. This second data packet is generated by the control end based on the signal layout information loaded locally on the control end, and on the signal data corresponding to the first state data to be transmitted. Then, based on the signal layout information loaded locally on the server, the second data packet is parsed to obtain the signal data corresponding to the first state data. This signal data is then converted into service data to obtain the service data corresponding to the first state data. Through this scheme, the server receives the state data from the first control command and synchronously parses the second data packet. This achieves the mutual transmission of service data and signal data while reducing data transmission time and improving data transmission efficiency.
[0056] Optionally, the method for parsing the second data packet based on the signal layout information loaded locally on the server is not limited. In one example, the second data packet can be parsed according to the signal configuration period. Specifically, there are multiple second data packets, each corresponding to a different signal configuration period. In step 105, the second data packets are parsed according to the signal layout information loaded locally on the server to obtain the signal data corresponding to the first state data, including:
[0057] Based on each signal configuration period, the second data packet corresponding to that signal configuration period is parsed to obtain the signal data corresponding to the first state data.
[0058] Similarly, in practical applications, to facilitate data transmission and management, corresponding signal configuration periods are defined for status data. The signal configuration period of status data indicates how often the control terminal collects that status data. For example, assuming the signal configuration period for the "headlights are on" status data is 5ms, the control terminal collects the "headlights are on" status data every 5ms and generates the corresponding signal data. In this example, to facilitate the server's parsing of the second data packet, the above data transmission scheme can be executed based on the signal configuration period. For instance, when the transmission period for the control terminal to send data to the server arrives (for example, the transmission period for bidirectional data transmission can be set to be the same), the control terminal can divide the signal data corresponding to each first status data into groups according to the same signal configuration period, obtaining signal data groups corresponding to each signal configuration period, and generating corresponding second data packets. Correspondingly, the server will receive the second data packets corresponding to each signal configuration period. Furthermore, the server can parse the second data packet corresponding to each signal configuration period to obtain the signal data corresponding to the first status data, thereby achieving batch packaging, sending, and parsing of data and improving data transmission efficiency. In one example, the method further includes: if the parsing period corresponding to any signal configuration period has not yet been reached, then writing the received second data packet to the memory; based on each signal configuration period, parsing the second data packet corresponding to that signal configuration period to obtain the signal data corresponding to the first state data, including: when the parsing period corresponding to each signal configuration period arrives, parsing the second data packet corresponding to that signal configuration period in the memory to obtain the signal data corresponding to the first state data.
[0059] In one example, a corresponding parsing period can be set based on the signal configuration period. For instance, for a second data packet with a signal configuration period of 10ms, the server is set to parse it every 25ms. That is, the parsing period corresponding to the 10ms signal configuration period is 25ms, and the parsing period represents how often parsing is performed. The purpose of this is to centrally parse batches of data generated simultaneously (considering latency and errors in practical applications), so as to facilitate timely data parsing and batch processing, further improving data transmission efficiency. For example, assuming it starts from 15:00, the signal configuration period for the "door open" status data is set to 10ms, the transmission period is 20ms, and the parsing period corresponding to the 10ms signal configuration period is 25ms. Then, at 10ms after 15:00, the control terminal will collect the signal data corresponding to the "door open" status data and cache it in the control terminal's memory. After another 10ms, that is, at 20ms after 15:00, the control terminal will package the signal data corresponding to the "door open" status data in the memory into a second data packet and send it to the server. Accordingly, the server receives the second data packet. At this time, the parsing period corresponding to the 10ms signal configuration period, i.e., the 25ms after 15:00, has not yet arrived. Therefore, the server can store the received second data packet in its memory. If this is the first time the server has received the second data packet, it is directly stored in the server's memory; if this is not the first time the server has received the second data packet, the received second data packet overwrites the previously received second data packet and is stored in the server's memory. After another 5ms, i.e., when the 25ms after 15:00 arrives, the second data packet is parsed to obtain the signal data corresponding to the door being open status data.
[0060] As an example, different signal configuration periods can be set with different parsing periods to ensure timely data parsing. For instance, a signal configuration period of 5ms can be set to a corresponding parsing period of 10ms; a signal configuration period of 10ms can be set to a corresponding parsing period of 25ms. In practical applications, the parsing period can be set according to the actual situation. For example, considering that the server uses the DDS protocol while the control end uses a traditional protocol, there are differences in the signal timing periods during data transmission. Therefore, when setting the parsing period, the above factors can be considered to ensure that the data is parsed in a timely and reliable manner.
[0061] In the example above, the second data packet that has not yet reached its corresponding parsing period is written to the memory first, and then parsed when the parsing period arrives. This ensures the data integrity during the transmission process and improves the accuracy and reliability of data transmission.
[0062] Based on any of the preceding examples Figure 3 This is a schematic diagram of a vehicle control system provided as an example. Figure 3 As shown, the system includes a server and a control unit. The control unit includes a controller and at least one processor, with the processor connected to the controller. The controller can be a gateway, domain controller, etc. The processor includes the vehicle's MCUs, such as MCUs for the doors, windows, lights, etc. The controller and processor can be connected via a traditional network (CAN, CANFD, Flexray, Lin, or one or more of these). This example solution optimizes the vehicle control system architecture by connecting multiple processors to a single controller.
[0063] In the data transmission method provided in this embodiment, on the SOA-based server, service data corresponding to the first control command to be transmitted is obtained, and the service data corresponding to the first control command is converted into signal data. Then, based on the signal layout information loaded locally on the server, a first data packet is generated based on the signal data corresponding to the first control command. The first data packet is then sent to the control terminal. On the server, a second data packet is received. Then, based on the signal layout information loaded locally on the server, the second data packet is parsed to obtain the signal data corresponding to the first state data. The signal data corresponding to the first state data is then converted into service data to obtain the service data corresponding to the first state data. This solution, for cases with large data transmission volumes, converts all service data corresponding to the first control command to be transmitted into signal data on the server. Based on the signal layout, multiple signal data are packaged into a single data packet and sent to the control terminal. The control terminal can parse the received data packet based on its own locally loaded signal layout to obtain multiple signal data, eliminating the need to process each data separately, thereby reducing data transmission time and improving data transmission efficiency.
[0064] Example 2
[0065] Figure 4 The diagram above illustrates a flowchart of the data transmission method provided in Embodiment 2 of this application. The executing entity in this example can be a data transmission device applied at the control end, such as... Figure 4 As shown, the method includes:
[0066] Step 201: Receive the first data packet. The first data packet is generated by the server based on the SOA architecture, which converts the service data corresponding to the first control command to be transmitted into the signal data corresponding to the first control command, and generates it based on the signal layout information loaded locally on the server. The position of the signal data corresponding to the first control command in the first data packet is consistent with the position of various signal data defined in the signal layout information in the data packet.
[0067] Step 202: Based on the signal layout information loaded locally on the control terminal, parse the first data packet to obtain the signal data corresponding to the first control command.
[0068] In practical applications, the execution subject of this method can be a data transmission device, which can be implemented in various ways. For example, it can be implemented through a computer program, such as application software; or it can be implemented as a medium storing relevant computer programs, such as a USB flash drive or cloud drive; or it can be implemented through a physical device that integrates or installs relevant computer programs, such as a chip.
[0069] Specifically, when the server sends a control command to the control terminal, the service data corresponding to the first control command to be transmitted is converted into signal data corresponding to the first control command. Based on the signal layout information loaded locally on the server, a first data packet is generated, and the server, based on the SOA architecture, sends the first data packet to the control terminal. The position of the signal data corresponding to the first control command in the first data packet is consistent with the position of various signal data defined in the signal layout information within the data packet, as mentioned in the previous embodiments, and will not be elaborated further here.
[0070] Specifically, after receiving the first data packet, the control terminal parses it according to the signal layout information loaded locally on the control terminal to obtain the signal data corresponding to the first control command. The signal layout information loaded locally on the control terminal indicates the position of various signal data within the data packet. This signal layout information needs to be pre-loaded locally on the control terminal before data transmission. The specific position of each type of signal data within the data packet is not limited here. For example, the signal data corresponding to the "headlights are on" status could be at position 3, and the signal data corresponding to the "windows are closed" status could be at position 4, or vice versa. It is sufficient that one type of signal data is at one of the positions in the data packet, and different types of signal data correspond to different positions.
[0071] In practical applications, to effectively manage and use signal layout information, it is common practice to pre-load the signal layout information into the control terminal based on the signal layout code. Optionally, as an example, vehicle status names, information, parameters, etc., from the signal database can be imported into the control terminal, the signal layout code can be loaded, and then the signal layout information can be loaded into the control terminal based on the signal layout code. It should be noted that the above is only one example and does not exclude other methods of loading signal layout information into the control terminal.
[0072] In this example, the control terminal receives a first data packet. This first data packet is generated by the server, based on an SOA architecture, converting the service data corresponding to the first control command to be transmitted into signal data corresponding to the first control command. This signal data is generated based on signal layout information loaded locally on the server. Then, the control terminal parses the first data packet according to the signal layout information loaded locally to obtain the signal data corresponding to the first control command. Through this approach, the control terminal receives the first data packet and parses it based on the layout information loaded locally, resulting in more accurate and reliable signal data.
[0073] Optionally, the method for parsing the first data packet based on the signal layout information loaded locally on the control terminal is not limited. In one example, the first data packet can be parsed according to the command configuration cycle. Specifically, there are multiple first data packets, each corresponding to a different command configuration cycle. In step 202, the first data packets are parsed according to the signal layout information loaded locally on the control terminal to obtain the signal data corresponding to the first control command, including:
[0074] Based on each command configuration cycle, the first data packet corresponding to the command configuration cycle is parsed to obtain the signal data corresponding to the first control command.
[0075] In practical applications, command configuration cycles are established for each control command to facilitate data transmission and management. The command configuration cycle of a control command is its generation cycle. For example, assuming a command configuration cycle of 15ms for a certain control command, the server will generate a new control command every 15ms. In this example, to facilitate the server's parsing of the first data packet, the above data transmission scheme can be executed based on the command configuration cycle. For instance, when the transmission cycle for the server to send data to the control terminal arrives (for example, the transmission cycle for bidirectional data transmission can be set to be the same), the server can divide the signal data corresponding to each first control command into groups based on the same command configuration cycle, obtaining signal data groups corresponding to each command configuration cycle, and generating corresponding first data packets for each. Correspondingly, the control terminal will receive the first data packets corresponding to each command configuration cycle. Furthermore, the control terminal can parse the first data packets corresponding to each command configuration cycle to obtain the signal data corresponding to the first control command, thereby achieving batch packaging, sending, and parsing of data and improving data transmission efficiency.
[0076] In one example, the method further includes: if the parsing period corresponding to any command configuration period has not yet arrived, then writing the received first data packet to the memory; based on each command configuration period, parsing the first data packet corresponding to that command configuration period to obtain the signal data corresponding to the first control command, including: when the parsing period corresponding to each command configuration period arrives, parsing the first data packet corresponding to that command configuration period in the memory to obtain the signal data corresponding to the first control command.
[0077] In one example, a corresponding parsing period can be set based on the command configuration period. For instance, for the first data packet with a command configuration period of 5ms, the control end is set to parse it every 15ms. That is, the parsing period corresponding to the 5ms command configuration period is 15ms, and the parsing period represents how often parsing is performed. The purpose of this is to centrally parse batches of data generated simultaneously (considering latency and errors in practical applications), so as to facilitate timely data parsing and batch processing, further improving data transmission efficiency. For example, assuming it starts from 16:00, the command configuration period for the door closing command is set to 5ms, the transmission period is 10ms, and the parsing period corresponding to the 5ms command configuration period is 15ms. Then, at 5ms after 16:00, the server will generate the signal data corresponding to the door closing command, cache it in the server's memory, and after another 5ms, that is, at 10ms after 15:00, the server will package the signal data corresponding to the door closing command in the memory into the first data packet and send it to the control end. Accordingly, the control terminal receives the first data packet. At this time, the parsing period corresponding to the 5ms command configuration cycle has not yet been reached, so the control terminal can store the received first data packet in its memory. If this is the first time the control terminal has received the first data packet, it is directly stored in the control terminal's memory; if this is not the first time the control terminal has received the first data packet, the first data packet received this time overwrites the previously received first data packet and is stored in the control terminal's memory. After another 5ms, that is, when the 15ms after 15:00 arrives, the first data packet is parsed to obtain the signal data corresponding to the door closing command.
[0078] As an example, different command configuration periods can be set with different parsing periods to ensure timely data parsing. For instance, if the command configuration period is 10ms, the corresponding parsing period can be set to 20ms; if the command configuration period is 15ms, the corresponding parsing period can be set to 25ms. In practical applications, the parsing period can be set according to the actual situation. For example, considering that the server uses the DDS protocol while the control end uses a traditional protocol, there are differences in the signal timing periods during data transmission. Therefore, when setting the parsing period, the above factors can be referenced to ensure that the data is parsed in a timely and reliable manner.
[0079] In the example above, the first data packet that has not reached its corresponding parsing period is written to the memory first, and then parsed when the parsing period arrives, thereby ensuring data integrity during transmission and improving the accuracy and reliability of data transmission.
[0080] Figure 5 The diagram illustrates a flowchart of an example data transmission method, such as... Figure 5 As shown, based on any example, the method also includes:
[0081] Step 203: Generate a second data packet based on the signal data corresponding to the first state data to be transmitted, according to the signal layout information loaded locally on the control terminal.
[0082] Step 204: Send a second data packet to the server so that the server can parse the second data packet according to the signal layout information loaded locally on the server to obtain the signal data corresponding to the first state data, and obtain the service data corresponding to the first state data through conversion.
[0083] Specifically, based on the signal layout information locally loaded on the control terminal, a second data packet is generated based on the signal data corresponding to the first state data to be transmitted. The first state data includes, but is not limited to, data actively reported by the control terminal to the server and data fed back by the control terminal to the server in response to data sent by the server. The position of the signal data corresponding to the first state data in the second data packet must be consistent with the positions of various signal data defined in the signal layout information within the data packet. For example, if the signal data corresponding to the "headlights are on" state is located at position 3 in the signal layout locally loaded on the control terminal, and the signal data corresponding to the "windows are closed" state is located at position 4, then in the generated second data packet, the position of the signal data corresponding to the first state data should be the same as the position defined in the signal layout information locally loaded on the control terminal. That is, the signal data at position 3 in the second data packet should be the signal data corresponding to the "headlights are on" state, and the signal data at position 4 in the second data packet should be the signal data corresponding to the "windows are closed" state.
[0084] Specifically, after generating the second data packet, it is sent to the server. For example, the control terminal can send the second data packet to the server via Ethernet. Subsequently, the server parses the second data packet based on the signal layout information loaded locally to obtain the signal data corresponding to the first state data, and then converts it to obtain the service data corresponding to the first state data. In the above example, based on the predefined and loaded signal layout information, the control terminal can package the signal data corresponding to multiple state data into the same data packet. The server can accurately parse the data packet containing multiple signal data based on the signal layout information, without having to package the signal data corresponding to each state data individually and process them sequentially. This supports batch processing, improving data processing efficiency. Furthermore, in this scheme, since the signal layout information can accurately characterize the type of signal data at each position in the data packet, there is no need to carry additional information to characterize the signal data, thereby reducing the amount of data during transmission, further reducing data transmission time, and improving data transmission efficiency.
[0085] Based on the aforementioned example, the method further includes: taking all state data generated before the current transmission cycle arrives as first state data; wherein each state data is generated according to the signal configuration cycle of that state data; writing the signal data corresponding to the first state data into the memory; in step 203, generating a second data packet based on the signal layout information loaded locally at the control terminal and the signal data corresponding to the first state data to be transmitted includes: when the current transmission cycle arrives, generating a second data packet based on the signal layout information loaded locally at the control terminal and the signal data corresponding to the first state data in the current memory.
[0086] Specifically, all state data generated before the arrival of the current transmission cycle is used as the first state data. The transmission cycle is the time interval between the start times of each signal data transmission from the control terminal to the SOA-based server. For example, if the current transmission cycle is 25ms and the start time is set to 17:00, the control terminal will send the first signal data to the server 25ms after 17:00, and then send the second signal data 25ms later, at 50ms after 17:00. Specifically, the data to be transmitted at the start time of each transmission cycle can be all state data generated by the control terminal within the previous transmission cycle, i.e., before the arrival of the current transmission cycle—that is, the signal data corresponding to the first state data.
[0087] Each state data point is generated according to its signal configuration period. In practical applications, a signal configuration period is defined for each state data point to facilitate data transmission and management. The signal configuration period of a state data point indicates how often the control terminal collects that state data. For example, assuming the signal configuration period for a certain state data point is 20ms, the control terminal will collect that state data every 20ms and generate the corresponding signal data.
[0088] Because the signal configuration periods for different state data vary, they may not perfectly align with the transmission period. For example, assuming a transmission period of 25ms and the start time of the previous transmission period was 17:00, the control terminal will initiate the next data transmission 25ms after 17:00. Alternatively, assuming a certain state data has a signal configuration period of 10ms and the last time this state data was collected was 10ms after 17:00, the current collection of this state data will be completed 20ms after 17:00, before the next transmission period begins. Therefore, to avoid data loss, the signal data corresponding to this state data is written to memory. If this transmission period is the first transmission period, the signal data corresponding to the first state data transmitted in this period is directly written to memory. If this transmission period is not the first transmission period, the signal data corresponding to the first state data obtained in this period overwrites the signal data corresponding to the first state data obtained in the previous transmission period and is then written to memory. When the next data transmission time arrives, which is 25ms after 17:00, a second data packet is generated based on the signal layout information loaded locally on the control terminal and the signal data corresponding to the current state data in the memory.
[0089] The scheme in this example uses all the state data generated before the current transmission cycle arrives as the first state data and stores the corresponding signal data in the memory. When the transmission cycle arrives, the second data packet is generated, making the data transmission more complete. Moreover, the data transmitted each time is the latest data in the memory, making the data transmission more accurate and reliable.
[0090] Based on the above example, there are multiple second data packets, each corresponding to a different signal configuration period. The second data packet is generated according to the signal layout information locally loaded at the control terminal and the signal data corresponding to the first state data currently in the memory. This includes: dividing the signal data corresponding to the first state data to be transmitted according to the signal configuration period to obtain signal data groups corresponding to different signal configuration periods; wherein, the signal configuration period of the state data corresponding to all signal data in the signal data group corresponding to each signal configuration period is the same; for each signal data group corresponding to a signal configuration period, a second data packet corresponding to that signal configuration period is generated based on the signal layout information locally loaded at the control terminal and the signal data group.
[0091] Specifically, to facilitate rapid parsing by the server, a data packet packaging method can be used to generate a data packet from signal data with the same signal configuration period. Specifically, if the control terminal collects multiple status data points before the next transmission cycle arrives (i.e., before the start time of the next transmission), and these status data points contain status data with different signal configuration periods, then when the transmission cycle arrives, the signal data corresponding to the status data with the same signal configuration period can be packaged into a single data packet. Consequently, multiple second data packets will be obtained, each corresponding to a different signal configuration period.
[0092] For example, suppose that during a transmission cycle, the control terminal collects data on the following states: headlights on, windows down, doors open, and doors closed. The signal configuration period for the headlights on and windows down data is 5ms, while the signal configuration period for the doors open and doors closed data is 10ms. When the current transmission cycle arrives, the signal data corresponding to the headlights on and windows down data can be grouped into the same group with a 5ms signal configuration period. Similarly, the signal data corresponding to the doors open and doors closed data can be grouped into the same group with a 10ms signal configuration period. Then, for each signal configuration period's corresponding signal data group, a second data packet corresponding to that signal configuration period is generated based on the signal layout information locally loaded on the control terminal. Combining this example, two second data packets are generated: one corresponding to the 5ms signal configuration period and the other to the 10ms signal configuration period.
[0093] In the example above, signal data corresponding to state data with the same signal configuration period are generated into a second data packet, ensuring that the signal configuration period of all state data corresponding to all signal data in each second data packet is the same. This example demonstrates how signal data with the same signal configuration period can be packaged, sent, received, and parsed together, making data transmission more convenient and efficient.
[0094] Based on any of the preceding examples Figure 3 This is a schematic diagram of a vehicle control system provided as an example. Figure 3 As shown, the system includes a server and a control unit. The control unit includes a controller and at least one processor, with the processor connected to the controller. The control unit can be a gateway, domain controller, etc. The processor includes the vehicle's MCUs, such as the MCUs corresponding to the doors, windows, and lights. The control unit and the processor can be connected via a traditional network (one or more of CAN, CANFD, Flexray, and LIN). This example solution optimizes the vehicle control system architecture by connecting multiple processors to a single control unit.
[0095] In the data transmission method provided in this embodiment, at the control end, the server receives the first data packet generated by the server based on the SOA architecture, which converts the service data corresponding to the first control command to be transmitted into signal data corresponding to the first control command, and generates the first data packet based on the signal layout information loaded locally on the server. Then, the first data packet is parsed according to the signal layout information loaded locally on the control end to obtain the signal data corresponding to the first control command. The control end generates a second data packet based on the signal data corresponding to the first state data to be transmitted, according to the signal layout information loaded locally on the control end. Then, the control end sends the second data packet to the server, so that the server can parse the second data packet according to the signal layout information loaded locally on the server to obtain the signal data corresponding to the first state data, and convert it into service data. In this application, for situations with large data transmission volumes, the control end packages all the signal data corresponding to the first state data to be transmitted into a single data packet based on the signal layout and sends it to the server. The server can parse the received data packet based on its own locally loaded signal layout to obtain multiple signal data, without needing to process each data separately, thereby reducing data transmission time and improving data transmission efficiency.
[0096] Example 3
[0097] The data transmission method provided in this application will be described in detail below with a specific embodiment. Figure 6 A flowchart of a data transmission method provided in Embodiment 3 of this application is shown below. Figure 6 As shown, the process of the server sending data to the control terminal is as follows:
[0098] Step 601: Obtain the service data corresponding to the first control command to be transmitted on the server, and convert the service data corresponding to the first control command into signal data.
[0099] Step 602: Generate the first data packet based on the server's signal layout.
[0100] Step 603: Send the first data packet to the control terminal.
[0101] Step 604: The control terminal receives the first data packet.
[0102] Step 605: Based on the signal layout information loaded locally on the control terminal, parse the first data packet to obtain the signal data corresponding to the first control command.
[0103] Still Figure 6 As shown, the process of the control terminal sending data to the server is as follows:
[0104] Step 606: Generate a second data packet based on the signal data corresponding to the first state data to be transmitted, according to the signal layout information loaded locally on the control terminal.
[0105] Step 607: Send the second data packet to the server.
[0106] Step 608: The server receives the second data packet.
[0107] Step 609: Based on the signal layout information loaded locally on the server, parse the second data packet to obtain the signal data corresponding to the first state data.
[0108] Step 610: Convert the signal data corresponding to the first state data into service data to obtain the service data corresponding to the first state data.
[0109] The specific method of data transmission can be found in the foregoing embodiments. In summary, the data transmission method provided in this example reduces data transmission time and improves data transmission efficiency, especially for situations involving large data transmission volumes.
[0110] Example 4
[0111] Figure 7 The diagram above illustrates a schematic representation of the data transmission apparatus provided in Embodiment 4 of this application. Figure 7 As shown, the device includes:
[0112] Processing module 71 is used to acquire service data corresponding to the first control command to be transmitted; and to convert the service data corresponding to the first control command into signal data to obtain the signal data corresponding to the first control command.
[0113] The first generation module 72 is used to generate a first data packet based on the signal data corresponding to the first control command according to the signal layout information loaded locally on the server; wherein, the position of the signal data corresponding to the first control command in the first data packet is consistent with the position of various signal data defined in the signal layout information in the data packet;
[0114] The first sending module 73 is used to send a first data packet to the control terminal, so that the control terminal can parse the first data packet according to the signal layout information loaded locally on the control terminal to obtain the signal data corresponding to the first control command.
[0115] As an example, based on the aforementioned example, processing module 71 is specifically used to: use all control commands generated before the arrival of the current transmission cycle as the first control command; wherein each control command is generated according to its command configuration cycle; processing module 71 is also used to: write the signal data corresponding to the first control command into the memory; the first generation module 72 is specifically used to: when the current transmission cycle arrives, generate the first data packet according to the signal layout information loaded locally on the server and the signal data corresponding to the first control command currently in the memory. Through the scheme of this example, data transmission is more complete, and the data transmitted each time is the latest data in the memory, making data transmission more accurate and reliable.
[0116] Based on the above example, there are multiple first data packets, each corresponding to a different command configuration period. The first generation module is specifically used to: divide the signal data corresponding to the first control command according to the command configuration period, obtaining signal data groups corresponding to different command configuration periods; wherein, the command configuration periods of all control commands corresponding to the signal data groups corresponding to each command configuration period are the same; for each signal data group corresponding to a command configuration period, based on the signal layout information loaded locally on the server and the signal data group, generate the first data packet corresponding to that command configuration period. Through the scheme in this example, signal data corresponding to the same command configuration period can be packaged, sent, received, and parsed together, making data transmission more convenient and faster, and improving data transmission efficiency.
[0117] In practical applications, there are also scenarios where the control terminal sends data to the server. Therefore, as an example, to demonstrate how the control terminal sends data to the server, Figure 8 The diagram above illustrates a schematic representation of the structure of an example data transmission device, such as... Figure 8 As shown, in Figure 7 Based on the example shown, the device also includes:
[0118] The first receiving module 74 is used to receive the second data packet, which is generated by the control terminal based on the signal data corresponding to the first state data to be transmitted, according to the signal layout information loaded locally by the control terminal.
[0119] The first parsing module 75 is used to parse the second data packet according to the signal layout information loaded locally on the server to obtain the signal data corresponding to the first state data;
[0120] The conversion module 76 is used to convert the signal data corresponding to the first state data into service data to obtain the service data corresponding to the first state data.
[0121] In one example, the second data packet can be parsed according to the signal configuration period. Specifically, there are multiple second data packets, each corresponding to a different signal configuration period. The first parsing module is specifically used to: parse the second data packet corresponding to each signal configuration period to obtain the signal data corresponding to the first state data.
[0122] In one example, after receiving the second data packet, the first receiving module is further configured to: if the parsing period corresponding to any signal configuration period has not yet arrived, write the received second data packet to the memory; the first parsing module is specifically configured to: when the parsing period corresponding to each signal configuration period arrives, parse the second data packet corresponding to that signal configuration period in the memory to obtain the signal data corresponding to the first state data. In the above example, writing the second data packet that has not yet arrived at the corresponding parsing period to the memory first, and then parsing it when the parsing period arrives, ensures data integrity during transmission and improves the accuracy and reliability of data transmission.
[0123] Based on any of the foregoing examples, the vehicle control system architecture includes a server and a control unit; the control unit includes a controller and at least one processor, with the at least one processor connected to the controller. The control unit can be a gateway, domain controller, etc. The processor includes the MCU in the vehicle, and the control unit and the processor can be connected via a traditional network (one or more of CAN, CANFD, Flexray, and LIN). This example scheme, by connecting multiple processors to a single control unit, optimizes the architecture of the vehicle control system.
[0124] Figure 9 The diagram above illustrates a schematic representation of the structure of a data transmission apparatus provided in an example, such as... Figure 9 As shown, the device includes:
[0125] The second receiving module 91 is used to receive the first data packet. The first data packet is generated by the server based on the SOA architecture, which converts the service data corresponding to the first control command to be transmitted into the signal data corresponding to the first control command, and generates it based on the signal layout information loaded locally on the server. The position of the signal data corresponding to the first control command in the first data packet is consistent with the position of the signal data corresponding to each control command defined in the signal layout information in the data packet.
[0126] The second parsing module 92 is used to parse the first data packet to obtain the signal data corresponding to the first control command based on the signal layout information loaded locally on the control terminal.
[0127] In one example, the first data packet can be parsed according to the command configuration cycle. Specifically, there are multiple first data packets, each corresponding to a different command configuration cycle; the second parsing module is specifically used to: based on each command configuration cycle, parse the first data packet corresponding to that command configuration cycle to obtain the signal data corresponding to the first control command.
[0128] In one example, after receiving the first data packet, the second receiving module is further configured to: if the parsing period corresponding to any command configuration period has not yet arrived, write the received first data packet to the memory; the second parsing module is specifically configured to: when the parsing period corresponding to each command configuration period arrives, parse the first data packet corresponding to that command configuration period in the memory to obtain the signal data corresponding to the first control command.
[0129] In one example, a parsing cycle can be set according to the command configuration cycle. The parsing cycle represents how often parsing is performed. The purpose of this is to centrally parse batches of data generated simultaneously (considering latency and errors in practical applications), so as to facilitate timely data parsing and batch processing, further improving data transmission efficiency. In the example above, the first data packet that has not reached its corresponding parsing cycle is written to memory first, and parsing is performed when the parsing cycle arrives, thereby ensuring data integrity during transmission and improving the accuracy and reliability of data transmission.
[0130] Figure 10 The diagram above illustrates a schematic representation of the structure of a data transmission apparatus provided in an example, such as... Figure 10 As shown, in Figure 9 Based on the example shown, the device also includes:
[0131] The second generation module 93 is used to generate a second data packet based on the signal data corresponding to the first state data to be transmitted, according to the signal layout information loaded locally at the control terminal.
[0132] The second sending module 94 is used to send a second data packet to the server so that the server can parse the second data packet according to the signal layout information loaded locally on the server to obtain the signal data corresponding to the first state data, and obtain the service data corresponding to the first state data through conversion.
[0133] Building upon the aforementioned example, the device is further configured to: use all state data generated before the current transmission cycle arrives as first state data; wherein each state data is generated according to its signal configuration cycle; and write the signal data corresponding to the first state data into a memory; the second generation module is specifically configured to: when the current transmission cycle arrives, generate a second data packet based on the signal layout information locally loaded at the control terminal and the signal data corresponding to the first state data currently in the memory. This example scheme ensures more complete data transmission, and each transmitted data is the latest data in the memory, resulting in more accurate and reliable data transmission.
[0134] Based on the above example, there are multiple second data packets, each corresponding to a different signal configuration period. The second generation module is specifically used to: divide the signal data corresponding to the first state data to be transmitted according to the signal configuration period, obtaining signal data groups corresponding to different signal configuration periods; wherein, the signal configuration period of the state data corresponding to all signal data in the signal data group corresponding to each signal configuration period is the same; for each signal data group corresponding to a signal configuration period, a second data packet corresponding to that signal configuration period is generated based on the signal layout information loaded locally at the control terminal and the signal data group. Through the scheme in this example, signal data corresponding to the same signal configuration period can be packaged, sent, received, and parsed together, making data transmission more convenient and faster, and improving data transmission efficiency.
[0135] Based on any of the foregoing examples, the vehicle control system architecture includes a server and a control unit; the control unit includes a controller and at least one processor, with the at least one processor connected to the controller. The control unit can be a gateway, domain controller, etc. The processor includes the MCU in the vehicle, and the control unit and the processor can be connected via a traditional network (one or more of CAN, CANFD, Flexray, and LIN). This example scheme, by connecting multiple processors to a single control unit, optimizes the architecture of the vehicle control system.
[0136] In the data transmission device provided in this embodiment, the SOA-based server obtains the service data corresponding to the first control command to be transmitted and converts it into signal data to obtain the signal data corresponding to the first control command. Then, based on the positions of various signal data defined in the signal layout information locally loaded on the server, it generates a first data packet and sends it to the control terminal. The control terminal receives the first data packet and, based on the signal layout information locally loaded on the control terminal, parses the first data packet to obtain the signal data corresponding to the first control command. The control terminal, based on the signal data corresponding to the first state data to be transmitted, generates a second data packet based on the locally loaded signal layout information and sends it to the server. The server receives the second data packet and, based on the locally loaded signal layout information, parses the second data packet to obtain the signal data corresponding to the first state data and converts it into service data. This solution reduces data transmission time and improves data transmission efficiency, especially for cases with large data transmission volumes.
[0137] Example 5
[0138] Figure 11 This is a schematic diagram of the structure of the electronic device provided in Embodiment 5 of this application, as shown below. Figure 11 As shown, the electronic device includes:
[0139] The electronic device includes a processor 291 and a memory 292; it may also include a communication interface 293 and a bus 294. The processor 291, memory 292, and communication interface 293 can communicate with each other via the bus 294. The communication interface 293 can be used for information transmission. The processor 291 can invoke logical instructions stored in the memory 292 to execute the methods described in the example above.
[0140] Furthermore, the logic instructions in the aforementioned memory 292 can be implemented as software functional units and, when sold or used as independent products, can be stored in a computer-readable storage medium.
[0141] The memory 292, as a computer-readable storage medium, can be used to store software programs and computer-executable programs, such as program instructions / modules corresponding to the methods in the embodiments of this application. The processor 291 executes functional applications and data processing by running the software programs, instructions, and modules stored in the memory 292, that is, it implements the methods in the above method examples.
[0142] The memory 292 may include a program storage area and a data storage area. The program storage area may store the operating system and application programs required for at least one function; the data storage area may store data created based on the use of the terminal device. Furthermore, the memory 292 may include high-speed random access memory and may also include non-volatile memory.
[0143] This application also provides a computer-readable storage medium storing computer-executable instructions, which, when executed by a processor, are used to implement the method in any of the examples.
[0144] This application also provides a computer program product, which, when executed by a processor, implements the method in any of the embodiments.
[0145] Other embodiments of this application will readily occur to those skilled in the art upon consideration of the specification and practice of the invention disclosed herein. This application is intended to cover any variations, uses, or adaptations of this application that follow the general principles of this application and include common knowledge or customary techniques in the art not disclosed herein. The specification and examples are to be considered exemplary only, and the true scope and spirit of this application are indicated by the claims.
[0146] It should be understood that this application is not limited to the precise structure described above and shown in the accompanying drawings, and various modifications and changes can be made without departing from its scope. The scope of this application is limited only by the appended claims.
Claims
1. A data transmission method, characterized in that, Applied to a server based on an SOA architecture, the method includes: Obtain service data corresponding to the first control command to be transmitted; and convert the service data corresponding to the first control command into signal data to obtain the signal data corresponding to the first control command. Based on the signal layout information loaded locally on the server, a first data packet is generated based on the signal data corresponding to the first control command; wherein, the position of the signal data corresponding to the first control command in the first data packet is consistent with the position of various signal data defined in the signal layout information in the data packet; The first data packet is sent to the control terminal so that the control terminal can parse the first data packet according to the signal layout information loaded locally on the control terminal to obtain the signal data corresponding to the first control command; the signal layout information loaded locally on the server is the same as the signal layout information loaded locally on the control terminal. The step of obtaining the service data corresponding to the first control command to be transmitted includes: All control commands generated before the current transmission cycle arrives are taken as the first control command; wherein each control command is generated according to the command configuration cycle of that control command; After converting the service data corresponding to the first control command into signal data to obtain the signal data corresponding to the first control command, the method further includes: Write the signal data corresponding to the first control command to the memory; The step of generating a first data packet based on the signal data corresponding to the first control command according to the signal layout information loaded locally on the server includes: When the current transmission cycle arrives, the first data packet is generated based on the signal layout information loaded locally on the server and the signal data corresponding to the first control command currently in the memory.
2. The method according to claim 1, characterized in that, The method further includes: Receive a second data packet, which is generated by the control terminal based on the signal data corresponding to the first state data to be transmitted, according to the signal layout information locally loaded by the control terminal. Based on the signal layout information loaded locally on the server, the second data packet is parsed to obtain the signal data corresponding to the first state data; The signal data corresponding to the first state data is converted into service data to obtain the service data corresponding to the first state data.
3. The method according to claim 2, characterized in that, The second data packet is multiple, each corresponding to a different signal configuration period; the second data packet is parsed according to the signal layout information loaded locally on the server to obtain the signal data corresponding to the first state data, including: Based on each signal configuration period, the second data packet corresponding to that signal configuration period is parsed to obtain the signal data corresponding to the first state data.
4. The method according to claim 3, characterized in that, After receiving the second data packet, the process also includes: If the parsing period corresponding to any signal configuration period has not been reached, the received second data packet is written to the memory. The step of parsing the second data packet corresponding to each signal configuration period to obtain the signal data corresponding to the first state data includes: When the parsing period corresponding to each signal configuration period arrives, the second data packet corresponding to that signal configuration period in the memory is parsed to obtain the signal data corresponding to the first state data.
5. The method according to claim 1, characterized in that, The number of the first data packets is multiple, each corresponding to a different command configuration period; the step of generating the first data packet based on the signal layout information loaded locally on the server and the signal data corresponding to the first control command currently in the memory includes: The signal data corresponding to the first control command is divided according to the command configuration cycle to obtain signal data groups corresponding to different command configuration cycles; wherein, the command configuration cycle of the control commands corresponding to all signal data in the signal data group corresponding to each command configuration cycle is the same. For each command configuration period, a first data packet corresponding to that command configuration period is generated based on the signal layout information loaded locally on the server and the signal data group.
6. The method according to any one of claims 1-5, characterized in that, The control terminal includes a controller and at least one processor, wherein the at least one processor is connected to the controller.
7. A data transmission method, characterized in that, Applied to the control terminal, the method includes: The system receives a first data packet. This first data packet is a first control command generated by the server based on an SOA architecture before the current transmission cycle. The server obtains the service data corresponding to the first control command to be transmitted, converts this service data into signal data corresponding to the first control command, and writes this signal data to a memory. When the current transmission cycle arrives, the system generates a signal data packet based on the signal layout information loaded locally by the server and the signal data corresponding to the first control command currently in the memory. The position of the signal data corresponding to the first control command in the first data packet is consistent with the position of various signal data defined in the signal layout information within the data packet. Each control command is generated according to its command configuration cycle. Based on the signal layout information loaded locally on the control terminal, the first data packet is parsed to obtain the signal data corresponding to the first control command; the signal layout information loaded locally on the server is the same as the signal layout information loaded locally on the control terminal.
8. The method according to claim 7, characterized in that, The method further includes: Based on the signal layout information locally loaded at the control terminal, a second data packet is generated based on the signal data corresponding to the first state data to be transmitted. The second data packet is sent to the server so that the server can parse the second data packet according to the signal layout information loaded locally on the server to obtain the signal data corresponding to the first state data, and obtain the service data corresponding to the first state data through conversion.
9. The method according to claim 8, characterized in that, The method further includes: All state data generated before the current transmission cycle arrives are taken as the first state data; wherein, each state data is generated according to the signal configuration cycle of that state data; Write the signal data corresponding to the first state data into the memory; The step of generating a second data packet based on the signal data corresponding to the first state data to be transmitted, according to the signal layout information locally loaded at the control terminal, includes: When the current transmission cycle arrives, the second data packet is generated based on the signal layout information locally loaded at the control terminal and the signal data corresponding to the first state data in the current memory.
10. The method according to claim 9, characterized in that, The second data packet is multiple, each corresponding to a different signal configuration period; the step of generating the second data packet based on the signal layout information locally loaded at the control terminal and the signal data corresponding to the first state data currently in the memory includes: The signal data corresponding to the first state data to be transmitted is divided according to the signal configuration period to obtain signal data groups corresponding to different signal configuration periods; wherein, the signal configuration period of the state data corresponding to all signal data in the signal data group corresponding to each signal configuration period is the same. For each signal configuration period, a second data packet corresponding to that signal configuration period is generated based on the signal layout information locally loaded at the control terminal and the signal data packet.
11. The method according to claim 7, characterized in that, The number of the first data packets is multiple, each corresponding to a different command configuration period; the step of parsing the first data packets to obtain the signal data corresponding to the first control command based on the signal layout information locally loaded on the control terminal includes: Based on each command configuration cycle, the first data packet corresponding to the command configuration cycle is parsed to obtain the signal data corresponding to the first control command.
12. The method according to claim 11, characterized in that, After receiving the first data packet, the process further includes: If the parsing period corresponding to any command configuration period has not yet been reached, the first received data packet will be written to the memory. The step of parsing the first data packet corresponding to each command configuration cycle to obtain the signal data corresponding to the first control command includes: When the parsing cycle corresponding to each command configuration cycle arrives, the first data packet corresponding to the command configuration cycle in the memory is parsed to obtain the signal data corresponding to the first control command.
13. The method according to any one of claims 7-12, characterized in that, The control terminal includes a controller and at least one processor, wherein the at least one processor is connected to the controller.
14. A data transmission device, characterized in that, Applications to SOA-based server-side applications include: The processing module is used to acquire service data corresponding to the first control command to be transmitted; and to convert the service data corresponding to the first control command into signal data to obtain the signal data corresponding to the first control command. The first generation module is used to generate a first data packet based on the signal data corresponding to the first control command according to the signal layout information loaded locally on the server; wherein the position of the signal data corresponding to the first control command in the first data packet is consistent with the position of various signal data defined in the signal layout information in the data packet. A first sending module is configured to send the first data packet to a control terminal, so that the control terminal can parse the first data packet according to the signal layout information locally loaded on the control terminal to obtain the signal data corresponding to the first control command; the signal layout information locally loaded on the server is the same as the signal layout information locally loaded on the control terminal. The processing module is specifically used to take all control commands generated before the current transmission cycle arrives as the first control command; wherein each control command is generated according to the command configuration cycle of the control command. The processing module is further configured to write the signal data corresponding to the first control command into a memory; The first generation module is specifically used to generate the first data packet when the current transmission cycle arrives, based on the signal layout information locally loaded on the server and the signal data corresponding to the first control command in the current memory.
15. A data transmission device, characterized in that, Applications in the control terminal include: The second receiving module is used to receive a first data packet. This first data packet is a first control command generated by the server based on an SOA architecture before the current transmission cycle arrives. It obtains the service data corresponding to the first control command to be transmitted, converts the service data to obtain the signal data corresponding to the first control command, and writes the signal data to a memory. When the current transmission cycle arrives, the first control command is generated based on the signal layout information locally loaded by the server and the signal data corresponding to the first control command currently in the memory. The position of the signal data corresponding to the first control command in the first data packet is consistent with the position of various signal data defined in the signal layout information within the data packet. Each control command is generated according to its command configuration cycle. The second parsing module is used to parse the first data packet to obtain the signal data corresponding to the first control command based on the signal layout information loaded locally on the control terminal; the signal layout information loaded locally on the server is the same as the signal layout information loaded locally on the control terminal.
16. An electronic device, characterized in that, include: A processor, and a memory communicatively connected to the processor; The memory stores computer-executed instructions; The processor executes computer execution instructions stored in the memory to implement the method as claimed in any one of claims 1-6 or any one of claims 7-13.
17. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores computer-executable instructions, which, when executed by a processor, are used to implement the method as claimed in any one of claims 1-6 or any one of claims 7-13.
18. A computer program product, comprising a computer program, characterized in that, When the computer program is executed by a processor, it implements the method as claimed in any one of claims 1-6 or any one of claims 7-13.
Citation Information
Patent Citations
Train real-time data analysis method, device and equipment and storage medium
CN112702303A