Data communication method and device, vehicle and electronic equipment
By setting up multiple scheduling interfaces on the car's Ethernet switch, and determining the target interface and opening the queue sub-valve based on the data transmission list and transmission time, the problem of the traditional CAN bus being unable to meet high bandwidth requirements is solved, and real-time data transmission is achieved. performance and quality improvement.
Patent Information
- Application Number
- CN202211641684.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-12-20
- Publication Date
- 2025-01-21
- Estimated Expiration
- 2042-12-20
AI Technical Summary
The controllers of traditional cars mainly communicate through the CAN bus, which cannot meet the needs of massive data and high bandwidth, resulting in a large delay in data transmission between modules.
Set up multiple scheduling interfaces on the Ethernet switch to connect to the system chip, Ethernet physical layer and terminal equipment. By obtaining the data sending list and detecting the sending time, the target scheduling interface is determined and the corresponding queue sub-valve is opened to achieve data efficiency. transmission.
It improves the real-time and quality of data transmission, meets the high bandwidth needs of ADAS, L2, L2+ and other technical fields, and reduces the communication delay between vehicle electronic modules.
Smart Images

Figure CN116192778B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of data communication, and in particular, to a data communication method and device, a vehicle, and an electronic device. Background Art
[0002] In the prior art, with the development of automobile intelligence, there are more and more electronic devices in automobiles, and the communication between different devices is becoming more and more frequent. The controllers of traditional automobiles mainly communicate through the CAN bus, but it can no longer meet the needs of massive data and high bandwidth, so the data transmission between modules is affected.
[0003] Most existing car controllers communicate with each other mainly through the CAN bus. The maximum nominal transmission rate of the CAN bus is 5Mbit / s, which can no longer meet the bandwidth requirements of the vehicle's ADAS, L2, and L2+. Frame loss and delay problems will occur during signal transmission, and the quality and real-time performance of the data will be seriously affected. The current automotive Ethernet interfaces are relatively few and cannot independently complete data transmission between different modules.
[0004] With respect to the above-mentioned problems existing in the prior art, no effective solutions have been proposed. Summary of the invention
[0005] The main purpose of the present application is to provide a data communication method and device, a vehicle and an electronic device to solve the technical problem that in the prior art, the controllers of traditional automobiles mainly communicate with each other through the CAN bus, but this cannot meet the needs of massive data and high bandwidth, thus causing a large delay in data transmission between modules.
[0006] According to one aspect of an embodiment of the present invention, a data communication method is provided, wherein a plurality of scheduling interfaces are arranged on an Ethernet switch, and the plurality of scheduling interfaces are respectively connected to a plurality of system chips, an Ethernet physical layer, and a plurality of terminal devices, and comprises: obtaining a data sending list of a target system chip, wherein the data sending list defines a plurality of data queues to be sent and sending times for sending the plurality of data queues; upon detecting that the sending time of a target data queue in the data sending list has been reached, determining a target scheduling interface for transmitting the target data queue, wherein the target data queue is any one of the plurality of data queues; controlling a target queue sub-valve corresponding to the target scheduling interface to open, so that the target data queue is sent to a target terminal device through the target scheduling interface, wherein the target queue sub-valve is a software valve defined by a bit value, and the target scheduling interface corresponds one-to-one to the target queue sub-valve.
[0007] Furthermore, before controlling the target queue sub-valve corresponding to the target scheduling interface to open so that the target data queue is sent to the target terminal device through the target scheduling interface, the method includes: determining multiple terminal devices connected to multiple scheduling interfaces, and determining multiple bits corresponding to the multiple terminal devices; assigning multiple first numerical values to the multiple bit positions, and generating a character string based on the multiple first numerical values, wherein when the value on the bit position is the first numerical value, the queue sub-valve corresponding to the bit position is in a closed state; defining the character string as a communication valve in a closed state, wherein the communication valve includes multiple queue sub-valves, and each bit position corresponds to a target queue sub-valve.
[0008] Further, controlling the target queue sub-valve corresponding to the target scheduling interface to open includes: controlling the value on the bit corresponding to the target queue sub-valve to be replaced with a second value to open the target queue sub-valve.
[0009] Furthermore, while controlling the target queue sub-valve corresponding to the target scheduling interface to open, the method also includes: controlling the values on the bits corresponding to the non-target queue sub-valves to remain at the first values.
[0010] Furthermore, when it is detected that the sending time of the target data queue in the data sending list has been reached, a target scheduling interface for transmitting the target data queue is determined, including: when it is detected that the sending time of the target data queue has been reached, a target terminal device for receiving the target data queue is determined; the MAC address of the target terminal device is obtained, and the target scheduling interface is determined based on the MAC address, wherein the scheduling interface corresponds one-to-one to the MAC address.
[0011] Furthermore, the target queue sub-valve corresponding to the target scheduling interface is controlled to open so that the target data queue is sent to the target terminal device through the target scheduling interface, including: determining the sending duration of the target data queue; based on the sending duration, controlling the target queue sub-valve to open the sending duration so that the target data queue is sent to the target terminal device within the sending duration.
[0012] Furthermore, when the target queue sub-valve corresponding to the target scheduling interface is controlled to be opened, the method also includes: when it is detected that there is at least one non-target data queue in the data queue to be passed through the target queue sub-valve at the same time, determining multiple priorities corresponding to at least one non-target data queue and the target data queue respectively; determining the data queue with the highest priority, and controlling the data queue with the highest priority to pass through the target queue sub-valve first.
[0013] According to another aspect of an embodiment of the present invention, a data communication device is also provided. A plurality of scheduling interfaces are arranged on an Ethernet switch, and the plurality of scheduling interfaces are respectively connected to a plurality of system chips, an Ethernet physical layer and a plurality of terminal devices, and include: a first acquisition unit, used to acquire a data sending list of a target system chip, wherein the data sending list defines a plurality of data queues to be sent and the sending time of the plurality of data queues; a first determination unit, used to determine a target scheduling interface for transmitting a target data queue when it is detected that the sending time of a target data queue in the data sending list has arrived, wherein the target data queue is any one of the plurality of data queues; a first control unit, used to control a target queue sub-valve corresponding to the target scheduling interface to open, so that the target data queue is sent to a target terminal device through the target scheduling interface, wherein the target queue sub-valve is a software valve defined by a bit value, and the target scheduling interface corresponds one-to-one to the target queue sub-valve.
[0014] According to another aspect of an embodiment of the present invention, a vehicle is provided, comprising an Ethernet switch and a data communication device, wherein a plurality of scheduling interfaces are arranged on the Ethernet switch, and the plurality of scheduling interfaces are respectively connected to a plurality of system chips, an Ethernet physical layer and a plurality of terminal devices, and the data communication device executes a data communication method as claimed in any one of claims 1 to 7.
[0015] According to another aspect of an embodiment of the present invention, there is also provided an electronic device, comprising: one or more processors, a memory and one or more programs, wherein the one or more programs are stored in the memory and are configured to be executed by the one or more processors, and the one or more programs include a data communication method for executing any one of claims 1 to 7.
[0016] In an embodiment of the present invention, a data sending list of a target system chip is obtained, wherein the data sending list defines multiple data queues to be sent and the sending times of the multiple data queues; when it is detected that the sending time of the target data queue in the data sending list has been reached, a target scheduling interface for transmitting the target data queue is determined, wherein the target data queue is any one of the multiple data queues; the target queue sub-valve corresponding to the target scheduling interface is controlled to open, so that the target data queue is sent to the target terminal device through the target scheduling interface, wherein the target queue sub-valve is a software valve defined by a bit value, and the target scheduling interface corresponds to the target queue sub-valve one-to-one, thereby solving the technical problem that the controllers of traditional automobiles in the prior art mainly communicate through the CAN bus, but can no longer meet the needs of massive data and high bandwidth, thus causing a large transmission delay of data between modules, thereby achieving the technical effect of improving the real-time performance of data transmission. BRIEF DESCRIPTION OF THE DRAWINGS
[0017] The drawings constituting part of the present application are used to provide a further understanding of the present application. The exemplary embodiments and descriptions of the present application are used to explain the present application and do not constitute an improper limitation on the present application. In the drawings:
[0018] Figure 1 A schematic diagram of an Ethernet switch provided for this application;
[0019] Figure 2 is a flow chart of a data communication method provided according to an embodiment of the present application;
[0020] Figure 3 A schematic diagram of a system chip sending a data queue to a terminal;
[0021] Figure 4 A schematic diagram of data queue transmission when the data queue priority is defined for the application;
[0022] Figure 5 It is a schematic diagram of a data communication device provided according to an embodiment of the present application. DETAILED DESCRIPTION
[0023] It should be noted that, in the absence of conflict, the embodiments and features in the embodiments of the present application can be combined with each other. The present application will be described in detail below with reference to the accompanying drawings and in combination with the embodiments.
[0024] In order to enable those skilled in the art to better understand the solution of the present application, the technical solution in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of the present application.
[0025] It should be noted that the terms "first", "second", etc. in the specification and claims of the present application and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequential order. It should be understood that the data used in this way can be interchanged where appropriate, so that the embodiments of the present application described here. In addition, the terms "including" and "having" and any of their variations are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device comprising a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.
[0026] It should be understood that when an element (such as a layer, film, region, or substrate) is described as being "on" another element, the element may be directly on the other element, or there may be intermediate elements. Moreover, in the specification and claims, when it is described that an element is "connected" to another element, the element may be "directly connected" to the other element, or "connected" to the other element through a third element.
[0027] For the convenience of description, some nouns or terms involved in the embodiments of the present application are explained below:
[0028] MCU: Microcontroller Unit, micro control unit;
[0029] SOC: System on chip;
[0030] CAN: Controller Area Network, controller area network;
[0031] TSN: Time-Sensitive Networking, time-sensitive network;
[0032] PHY: Physical, physical layer.
[0033] As mentioned in the background technology, in the prior art, controllers of traditional automobiles mainly communicate with each other through the CAN bus, but this can no longer meet the needs of massive data and high bandwidth, thus leading to the technical problem of large data transmission delay between modules. In order to solve the above problem, in a typical implementation of the present application, a data communication method and device, a vehicle and an electronic device are provided.
[0034] According to an embodiment of the present application, a data communication method is provided.
[0035] The present application provides an Ethernet switch, the specific schematic diagram is as follows Figure 1 As shown, the Ethernet switch is provided with a plurality of scheduling interfaces, which are respectively connected to a plurality of system chips, an Ethernet physical layer and a plurality of terminal devices. Specifically, in the embodiment provided by the Ethernet switch schematic diagram, the Ethernet switch is connected to SOC1, SOC2, SOC3 and MCU through the scheduling interface, and is also connected to the Ethernet physical layer.
[0036] Figure 1In the specific embodiment shown, the switch Ethernet circuit includes five interfaces of the switch, which are connected to MCU, PHY, SOC1, SOC2, and SOC3 respectively, and all adopt RGMII working mode. AVB and TSN are supported. AVB mainly provides three functions: reserved bandwidth, traffic priority, and time synchronization. TSN extends two functions based on AVB, mainly time scheduling traffic and preempting frames.
[0037] It should be noted that TSN includes multiple protocols such as 802.1AS-Rev, 802.1Qbv, 802.1Qbu, and 802.1CB. Global clock synchronization is an important mechanism for achieving deterministic communication among network nodes. 802.1AS-Rev supports and is compatible with time synchronization between different TSN devices, while increasing support for fault tolerance and multiple master clock sources. 802.1Qbv creates and distributes a time schedule between participating network devices to control the valve switch of the sending queue at the exit of the TSN switch.
[0038] Figure 2 1 is a flow chart of a data communication method provided according to an embodiment of the present application. Figure 2 As shown, the method comprises the following steps:
[0039] Step S201, obtaining a data transmission list of a target system chip, wherein the data transmission list defines a plurality of data queues to be transmitted and transmission times of the plurality of data queues;
[0040] As described above, in the present application, for each system chip, a data transmission list corresponding to the system chip is defined, and the list defines a plurality of data queues to be transmitted corresponding to the system chip and a transmission time corresponding to each queue.
[0041] Step S202, when it is detected that the sending time of the target data queue in the data sending list has arrived, determining a target scheduling interface for transmitting the target data queue, wherein the target data queue is any one of the multiple data queues;
[0042] Step S203, control the target queue sub-valve corresponding to the target scheduling interface to open, so that the target data queue is sent to the target terminal device through the target scheduling interface, wherein the target queue sub-valve is a software valve defined by a bit value, and the target scheduling interface corresponds to the target queue sub-valve one by one.
[0043] As described above, since each system chip corresponds to multiple data queues to be sent, the present application defines a queue valve for multiple terminals connected to the Ethernet switch corresponding to the multiple data queues, wherein the queue valve includes multiple queue sub-valves, and each scheduling interface corresponds to a queue sub-valve one by one.
[0044] Therefore, this application defines planned traffic, and after the data queue where the planned traffic is located arrives in the predetermined time window, the data queue is released for transmission through the queue sub-valve, while other queues of unplanned traffic in the same time window will be blocked from transmission, thereby eliminating the possibility of planned traffic being blocked by unplanned traffic, which means that the delay through each switch is certain, and the message delay through the TSN network can be guaranteed.
[0045] In an optional embodiment, before controlling the target queue sub-valve corresponding to the target scheduling interface to open so that the target data queue is sent to the target terminal device through the target scheduling interface, the method includes: determining multiple terminal devices connected to multiple scheduling interfaces, and determining multiple bits corresponding to the multiple terminal devices; assigning multiple first numerical values to multiple bits, and generating a character string based on the multiple first numerical values, wherein when the value on the bit is the first numerical value, the queue sub-valve corresponding to the bit is in a closed state; defining the character string as a communication valve in a closed state, wherein the communication valve includes multiple queue sub-valves, and each bit corresponds to a target queue sub-valve.
[0046] In the above, the queue valve is represented by an 8-bit binary string (XXXXXXXX). From right to left, the first bit on the right represents the switch state of queue 0, the second bit on the right represents the switch state of queue 1, and so on. When a bit is 0, it means off, that is, the message in the queue is not allowed to be sent; when a bit is 1, it means on, that is, the message in the queue is allowed to be sent. It should be noted that when there is no data queue to be transmitted through the Ethernet switch, the values of all bits are 0.
[0047] In an optional embodiment, controlling the target queue sub-valve corresponding to the target scheduling interface to open includes: controlling the value on the bit corresponding to the target queue sub-valve to be changed to a second value, so that the target queue sub-valve is opened. While controlling the target queue sub-valve corresponding to the target scheduling interface to open, the method also includes: controlling the values on the bits corresponding to the non-target queue sub-valves to remain at the first value. When it is necessary to control the target queue sub-valve to open or close, it is only necessary to control the value on the corresponding queue sub-valve to change.
[0048] In an optional embodiment, when it is detected that the sending time of the target data queue in the data sending list has been reached, a target scheduling interface for transmitting the target data queue is determined, including: when it is detected that the sending time of the target data queue has been reached, a target terminal device for receiving the target data queue is determined; the MAC address of the target terminal device is obtained, and the target scheduling interface is determined based on the MAC address, wherein the scheduling interface corresponds one-to-one to the MAC address.
[0049] The above places, such as Figure 3 As shown, Figure 3 The schematic diagram of the system chip sending a data queue to a terminal. In this schematic diagram, by determining the address of the terminal receiving the data queue, the scheduling interface of the Ethernet switch connected to the terminal can be determined. As shown in the figure, there are three terminals in this example, and the terminal addresses are MAC: 1-1-1, 2-2-2, and 3-3-3. Among them, the message sent by SOC (MAC address is 10-10-10) to Terminal 1 (MAC address is 1-1-1) enters queue 0, the message sent by SOC to Terminal 2 (MAC address is 2-2-2) enters queue 1, and the message sent by SOC to Terminal 3 (MAC address is 3-3-3) enters queue 3.
[0050] Among them, node 1 is used to control the message sent by SOC to Terminal 1, the queue sub-switch state is 1 (the corresponding binary number is 00000001), and the switch state lasts for 200000 nanoseconds;
[0051] Node 2 is used to control the message sent from SOC to Terminal 2. The queue sub-switch state is 2 (the corresponding binary number is 00000010), and the switch state lasts for 300000 nanoseconds.
[0052] Node 3 is used to control the message sent by SOC to Terminal 3. The queue sub-switch state is 8 (the corresponding binary number is 00001000), and the switch state duration is 100000 nanoseconds. Among them, the opening duration of the queue sub-switch is the sending duration of the data queue pre-defined in the data sending list.
[0053] In an optional embodiment, when the target queue sub-valve corresponding to the target scheduling interface is controlled to be opened, the method also includes: when it is detected that there is at least one non-target data queue in the data queue to be passed through the target queue sub-valve at the same time, determining multiple priorities corresponding to at least one non-target data queue and the target data queue respectively; determining the data queue with the highest priority, and controlling the data queue with the highest priority to pass through the target queue sub-valve first.
[0054] As mentioned above, the queue valve provided by the present application can protect critical messages from interference from other network traffic, but it does not necessarily lead to optimal bandwidth usage or minimal communication delay. When these factors are important, the preemption mechanism defined in 802.1Qbu can be used. 802.1Qbu allows the interruption of the transmission of standard Ethernet or jumbo frames to allow the transmission of high priority frames, and then resumes the transmission without discarding the interrupted message fragments that were previously transmitted.
[0055] Figure 4 The transmission diagram of the data queue provided in this application is as follows: Figure 4 As shown in the figure, data 1 is critical information, data 2 is non-critical information, and data 2 arrives first and starts to be transmitted. In the MAC with preemptive mechanism, when data 1 arrives, the transmission of data 2 is allowed to be interrupted, and data 1 is transmitted first. After data 1 is transmitted, data 2 will be transmitted. This ensures that critical information can be transmitted earlier.
[0056] This application provides a data communication method and Ethernet switch, defines queue valves and data queue priorities, ensures the quality and real-time performance of data transmission, and uses the TSN mechanism to implement the time scheduling flow and preemptive frame mechanism of data. Therefore, the vehicle Ethernet communication system of this application improves the communication rate between traditional vehicle controllers and can be better applied to technical fields such as ADAS, L2, and L2+; at the same time, the AVB and TSN mechanisms adopted by the vehicle Ethernet communication system ensure the data quality and real-time performance when the data is transmitted through Ethernet, and the communication delay between each electronic module is lower.
[0057] An embodiment of the present application also provides a vehicle, which includes an Ethernet switch and a data communication device. The Ethernet switch is provided with multiple scheduling interfaces, and the multiple scheduling interfaces are respectively connected to multiple system chips, Ethernet physical layers and multiple terminal devices. The data communication device executes a data communication method.
[0058] It should be noted that the steps shown in the flowcharts of the accompanying drawings can be executed in a computer system such as a set of computer executable instructions, and that, although a logical order is shown in the flowcharts, in some cases, the steps shown or described can be executed in an order different from that shown here.
[0059] The embodiment of the present application also provides a data communication device. It should be noted that the data communication device of the embodiment of the present application can be used to execute the data communication method provided by the embodiment of the present application. The following introduces a data communication device provided by the embodiment of the present application.
[0060] Figure 5Schematic diagram of a data communication device provided according to an embodiment of the present application. Figure 5 As shown, the device includes: a first acquisition unit 501, used to acquire a data sending list of a target system chip, wherein the data sending list defines multiple data queues to be sent and the sending time of sending the multiple data queues; a first determination unit 502, used to determine a target scheduling interface for transmitting a target data queue when it is detected that the sending time of the target data queue in the data sending list has been reached, wherein the target data queue is any one of the multiple data queues; a first control unit 503, used to control the target queue sub-valve corresponding to the target scheduling interface to open, so that the target data queue is sent to the target terminal device through the target scheduling interface, wherein the target queue sub-valve is a software valve defined by a bit value, and the target scheduling interface corresponds to the target queue sub-valve one-to-one.
[0061] In an optional embodiment, the device includes: a second determination unit, used to determine multiple terminal devices connected to multiple scheduling interfaces and multiple bits corresponding to the multiple terminal devices before controlling the target queue sub-valve corresponding to the target scheduling interface to open so that the target data queue is sent to the target terminal device through the target scheduling interface; a first generation unit, used to assign multiple first numerical values to multiple bits, and generate a character string based on the multiple first numerical values, wherein when the value on the bit is the first numerical value, the queue sub-valve corresponding to the bit is in a closed state; a definition unit, used to define the character string as a communication valve in a closed state, wherein the communication valve includes multiple queue sub-valves, and each bit corresponds to a target queue sub-valve.
[0062] In an optional embodiment, the first control unit 503 includes: a first control subunit, used to control the value on the bit corresponding to the target queue sub-valve to be changed to a second value, so that the target queue sub-valve is opened.
[0063] In an optional embodiment, the device also includes: a second control unit, which is used to control the target queue sub-valve corresponding to the target scheduling interface to open, while controlling the values on the bits corresponding to the non-target queue sub-valves to remain at the first values.
[0064] In an optional embodiment, the first determination unit 502 includes: a first determination subunit, used to determine the target terminal device for receiving the target data queue when it is detected that the sending time of the target data queue has been reached; a first acquisition subunit, used to obtain the MAC address of the target terminal device, and determine the target scheduling interface based on the MAC address, wherein the scheduling interface corresponds one-to-one to the MAC address.
[0065] In an optional embodiment, the first control unit 503 includes: a second determination subunit, used to determine the sending duration of the target data queue; a second control subunit, used to control the target queue sub-valve to open the sending duration based on the sending duration, so that the target data queue is sent to the target terminal device within the sending duration.
[0066] In an optional embodiment, the device also includes: a third determination unit, which is used to control the target queue sub-valve corresponding to the target scheduling interface to open, and when it is detected that there is at least one non-target data queue in the data queue to be passed through the target queue sub-valve at the same time, determine multiple priorities corresponding to at least one non-target data queue and the target data queue respectively; a fourth determination unit, which is used to determine the data queue with the highest priority, and control the data queue with the highest priority to pass through the target queue sub-valve first.
[0067] A data communication device includes a processor and a memory. The first acquisition unit 501 and the like are stored in the memory as program units, and the processor executes the program units stored in the memory to implement corresponding functions.
[0068] The processor includes a kernel, which retrieves the corresponding program unit from the memory. One or more kernels can be set, and the kernel parameters can be adjusted to solve the technical problem that the controllers of traditional automobiles mainly communicate through the CAN bus in the prior art, but it can no longer meet the needs of massive data and high bandwidth, thus causing large data transmission delays between modules.
[0069] The memory may include non-permanent memory in a computer-readable medium, random access memory (RAM) and / or non-volatile memory, such as read-only memory (ROM) or flash RAM, and the memory includes at least one memory chip.
[0070] An embodiment of the present invention provides a computer-readable storage medium on which a program is stored. When the program is executed by a processor, a data communication method is implemented.
[0071] An embodiment of the present invention provides a processor, which is used to run a program, wherein a data communication method is executed when the program is run.
[0072] An embodiment of the present invention provides a device, which includes a processor, a memory, and a program stored in the memory and executable on the processor. When the processor executes the program, at least the following steps are implemented: obtaining a data sending list of a target system chip, wherein the data sending list defines multiple data queues to be sent and sending times for sending the multiple data queues; when it is detected that the sending time of a target data queue in the data sending list has been reached, determining a target scheduling interface for transmitting the target data queue, wherein the target data queue is any one of the multiple data queues; controlling a target queue sub-valve corresponding to the target scheduling interface to open so that the target data queue is sent to a target terminal device through the target scheduling interface, wherein the target queue sub-valve is a software valve defined by a bit value, and the target scheduling interface corresponds one-to-one to the target queue sub-valve.
[0073] Optionally, before controlling the target queue sub-valve corresponding to the target scheduling interface to open so that the target data queue is sent to the target terminal device through the target scheduling interface, the method includes: determining multiple terminal devices connected to multiple scheduling interfaces, and determining multiple bits corresponding to the multiple terminal devices; assigning multiple first numerical values to the multiple bit positions, and generating a character string based on the multiple first numerical values, wherein when the value on the bit position is the first numerical value, the queue sub-valve corresponding to the bit position is in a closed state; defining the character string as a communication valve in a closed state, wherein the communication valve includes multiple queue sub-valves, and each bit position corresponds to a target queue sub-valve.
[0074] Optionally, controlling the target queue sub-valve corresponding to the target scheduling interface to open includes: controlling the value on the bit corresponding to the target queue sub-valve to be replaced with a second value to open the target queue sub-valve.
[0075] Optionally, while controlling the target queue sub-valve corresponding to the target scheduling interface to open, the method further includes: controlling the values on the bits corresponding to the non-target queue sub-valves to remain at the first values.
[0076] Optionally, when it is detected that the sending time of the target data queue in the data sending list has been reached, a target scheduling interface for transmitting the target data queue is determined, including: when it is detected that the sending time of the target data queue has been reached, a target terminal device for receiving the target data queue is determined; the MAC address of the target terminal device is obtained, and the target scheduling interface is determined based on the MAC address, wherein the scheduling interface corresponds one-to-one to the MAC address.
[0077] Optionally, the target queue sub-valve corresponding to the target scheduling interface is controlled to open so that the target data queue is sent to the target terminal device through the target scheduling interface, including: determining the sending duration of the target data queue; based on the sending duration, controlling the target queue sub-valve to open the sending duration so that the target data queue is sent to the target terminal device within the sending duration.
[0078] Optionally, when the target queue sub-valve corresponding to the target scheduling interface is controlled to be opened, the method further includes: when it is detected that there is at least one non-target data queue in the data queue to be passed through the target queue sub-valve at the same time, determining a plurality of priorities corresponding to the at least one non-target data queue and the target data queue respectively; determining the data queue with the highest priority, and controlling the data queue with the highest priority to pass through the target queue sub-valve first. The device in this article can be a server, a PC, a PAD, a mobile phone, etc.
[0079] The present application also provides a computer program product, which, when executed on a data processing device, is suitable for executing a program that initializes at least the following method steps: obtaining a data sending list of a target system chip, wherein the data sending list defines multiple data queues to be sent and the sending time of the multiple data queues; when it is detected that the sending time of the target data queue in the data sending list has been reached, determining a target scheduling interface for transmitting the target data queue, wherein the target data queue is any one of the multiple data queues; controlling the target queue sub-valve corresponding to the target scheduling interface to open, so that the target data queue is sent to the target terminal device through the target scheduling interface, wherein the target queue sub-valve is a software valve defined by a bit value, and the target scheduling interface corresponds one-to-one to the target queue sub-valve.
[0080] Optionally, before controlling the target queue sub-valve corresponding to the target scheduling interface to open so that the target data queue is sent to the target terminal device through the target scheduling interface, the method includes: determining multiple terminal devices connected to multiple scheduling interfaces, and determining multiple bits corresponding to the multiple terminal devices; assigning multiple first numerical values to the multiple bit positions, and generating a character string based on the multiple first numerical values, wherein when the value on the bit position is the first numerical value, the queue sub-valve corresponding to the bit position is in a closed state; defining the character string as a communication valve in a closed state, wherein the communication valve includes multiple queue sub-valves, and each bit position corresponds to a target queue sub-valve.
[0081] Optionally, controlling the target queue sub-valve corresponding to the target scheduling interface to open includes: controlling the value on the bit corresponding to the target queue sub-valve to be replaced with a second value to open the target queue sub-valve.
[0082] Optionally, while controlling the target queue sub-valve corresponding to the target scheduling interface to open, the method further includes: controlling the values on the bits corresponding to the non-target queue sub-valves to remain at the first values.
[0083] Optionally, when it is detected that the sending time of the target data queue in the data sending list has been reached, a target scheduling interface for transmitting the target data queue is determined, including: when it is detected that the sending time of the target data queue has been reached, a target terminal device for receiving the target data queue is determined; the MAC address of the target terminal device is obtained, and the target scheduling interface is determined based on the MAC address, wherein the scheduling interface corresponds one-to-one to the MAC address.
[0084] Optionally, the target queue sub-valve corresponding to the target scheduling interface is controlled to open so that the target data queue is sent to the target terminal device through the target scheduling interface, including: determining the sending duration of the target data queue; based on the sending duration, controlling the target queue sub-valve to open the sending duration so that the target data queue is sent to the target terminal device within the sending duration.
[0085] Optionally, when the target queue sub-valve corresponding to the target scheduling interface is controlled to open, the method also includes: when it is detected that there is at least one non-target data queue in the data queue to be passed through the target queue sub-valve at the same time, determining multiple priorities corresponding to at least one non-target data queue and the target data queue respectively; determining the data queue with the highest priority, and controlling the data queue with the highest priority to pass through the target queue sub-valve first.
[0086] In the above embodiments of the present invention, the description of each embodiment has its own emphasis. For parts that are not described in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.
[0087] In the several embodiments provided in this application, it should be understood that the disclosed technical content can be implemented in other ways. Among them, the device embodiments described above are only schematic. For example, the division of units can be a logical function division. There may be other division methods in actual implementation. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of units or modules, which can be electrical or other forms.
[0088] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed over multiple units. Some or all of the units may be selected according to actual needs to achieve the purpose of the present embodiment.
[0089] In addition, each functional unit in each embodiment of the present invention may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.
[0090] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art, or all or part of the technical solution can be embodied in the form of a software product. The computer software product is stored in a storage medium, including several instructions for a computer device (which can be a personal computer, server or network device, etc.) to perform all or part of the steps of the methods of each embodiment of the present invention. The aforementioned storage medium includes: U disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), mobile hard disk, disk or optical disk, etc. Various media that can store program codes.
[0091] The above are only preferred embodiments of the present application and are not intended to limit the present application. For those skilled in the art, the present application may have various modifications and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application shall be included in the protection scope of the present application.
Claims
1. A data communication method, characterized in that: The Ethernet switch is provided with a plurality of scheduling interfaces, and the plurality of scheduling interfaces are respectively connected to a plurality of system chips, an Ethernet physical layer, and a plurality of terminal devices. The method comprises: Acquire a data transmission list of a target system chip, wherein the data transmission list defines a plurality of data queues to be transmitted and a transmission time for transmitting the plurality of data queues; When it is detected that the sending time of the target data queue in the data sending list has arrived, determining a target scheduling interface for transmitting the target data queue, wherein the target data queue is any one of the multiple data queues; Control the target queue sub-valve corresponding to the target scheduling interface to open, so that the target data queue is sent to the target terminal device through the target scheduling interface, wherein the target queue sub-valve is a software valve defined by a bit value, and the target scheduling interface corresponds to the target queue sub-valve one by one, Before controlling the target queue sub-valve corresponding to the target scheduling interface to open so that the target data queue is sent to the target terminal device through the target scheduling interface, the method includes: Determine a plurality of terminal devices connected to a plurality of the scheduling interfaces, and determine a plurality of bits corresponding to the plurality of the terminal devices; Assigning a plurality of first values to a plurality of the bits, and generating a character string according to the plurality of the first values, wherein when the value on the bit is the first value, the queue sub-valve corresponding to the bit is in a closed state; The character string is defined as a communication valve in a closed state, wherein the communication valve includes a plurality of queue sub-valves, and each of the bit positions corresponds to one of the target queue sub-valve, Controlling the target queue sub-valve corresponding to the target scheduling interface to open includes: Control the value of the bit corresponding to the target queue sub-valve to be changed to a second value, so that the target queue sub-valve is opened, While controlling the target queue sub-valve corresponding to the target scheduling interface to open, the method further includes: The values of the bits corresponding to the sub-valves controlling the non-target queues are all kept as the first values. When it is detected that the sending time of the target data queue in the data sending list has arrived, determining a target scheduling interface for transmitting the target data queue includes: When it is detected that the sending time of the target data queue has arrived, determining the target terminal device for receiving the target data queue; The MAC address of the target terminal device is obtained, and the target scheduling interface is determined according to the MAC address, wherein the scheduling interface corresponds to the MAC address one by one.
2. The method according to claim 1, characterized in that Controlling the target queue sub-valve corresponding to the target scheduling interface to open so that the target data queue is sent to the target terminal device through the target scheduling interface, including: Determining a sending duration of the target data queue; According to the sending duration, the target queue sub-valve is controlled to open the sending duration, so that the target data queue is sent to the target terminal device within the sending duration.
3. The method according to claim 1, characterized in that When controlling the target queue sub-valve corresponding to the target scheduling interface to open, the method further includes: In the case where it is detected that there is at least one non-target data queue in the data queue to be passed through the target queue sub-valve at the same time, determining a plurality of priorities corresponding to the at least one non-target data queue and the target data queue respectively; Determine a data queue with the highest priority, and control the data queue with the highest priority to preferentially pass through the target queue sub-valve.
4. A data communication device, characterized in that: The Ethernet switch is provided with a plurality of scheduling interfaces, and the plurality of scheduling interfaces are respectively connected to a plurality of system chips, an Ethernet physical layer and a plurality of terminal devices, and the device comprises: A first acquisition unit is used to acquire a data transmission list of a target system chip, wherein the data transmission list defines a plurality of data queues to be sent and a sending time for sending the plurality of data queues; A first determining unit is used to determine a target scheduling interface for transmitting the target data queue when detecting that the sending time of the target data queue in the data sending list has arrived, wherein the target data queue is any one of the multiple data queues; A first control unit is used to control the target queue sub-valve corresponding to the target scheduling interface to open, so that the target data queue is sent to the target terminal device through the target scheduling interface, wherein the target queue sub-valve is a software valve defined by a bit value, and the target scheduling interface corresponds to the target queue sub-valve one by one, The device also includes: A second determining unit is used to determine a plurality of terminal devices connected to a plurality of the scheduling interfaces and determine a plurality of bits corresponding to the plurality of the terminal devices before controlling the target queue sub-valve corresponding to the target scheduling interface to open so that the target data queue is sent to the target terminal device through the target scheduling interface; A first generating unit, configured to assign a plurality of first values to a plurality of the bit positions, and generate a character string according to the plurality of the first values, wherein when the value on the bit position is the first value, the queue sub-valve corresponding to the bit position is in a closed state; A definition unit, configured to define the string as a communication valve in a closed state, wherein the communication valve includes a plurality of queue sub-valves, and each of the bit positions corresponds to one of the target queue sub-valve, The first control unit comprises: The first control subunit is used to control the value on the bit corresponding to the target queue sub-valve to be changed to a second value so that the target queue sub-valve is opened. The device also includes: a second control unit, configured to control the target queue sub-valve corresponding to the target scheduling interface to be opened, while controlling the values of the bits corresponding to the non-target queue sub-valve to remain at the first value; The first determining unit includes: A first determining subunit is used to determine the target terminal device for receiving the target data queue when detecting that the sending time of the target data queue has arrived; The first acquisition subunit is used to acquire the MAC address of the target terminal device and determine the target scheduling interface according to the MAC address, wherein the scheduling interface corresponds to the MAC address one by one.
5. A vehicle, characterized in that: The vehicle includes an Ethernet switch and a data communication device, the Ethernet switch is provided with a plurality of scheduling interfaces, the plurality of scheduling interfaces are respectively connected to a plurality of system chips, an Ethernet physical layer and a plurality of terminal devices, and the data communication device executes a data communication method as described in any one of claims 1 to 3.
6. An electronic device, characterized in that: include: One or more processors, a memory and one or more programs, wherein the one or more programs are stored in the memory and are configured to be executed by the one or more processors, and the one or more programs include a data communication method for executing any one of claims 1 to 3.
Citation Information
Patent Citations
Temporal perception traffic shaper based on time queue
CN111786900A
Gate control list generation method, network equipment and computer readable storage medium
CN113163450A