Method, device and electronic equipment for dynamic management of vehicle-mounted Ethernet threshold queues

By dynamically adjusting the cache space partitioning and setting a threshold backpressure bounce mechanism, the problem of scarce vehicle Ethernet cache resources was solved, the cache utilization rate and protection of high-priority data frames were improved, the packet loss rate was reduced, and the adaptability of data frame traffic was enhanced.

CN117938770BActive Publication Date: 2026-06-30CHINA FAW CO LTD +1
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202311752633.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-12-19
Publication Date
2026-06-30
Estimated Expiration
2043-12-19

AI Technical Summary

Technical Problem

When transmitting large amounts of data, vehicle Ethernet suffers from a shortage of cache resources, resulting in a high packet loss rate, especially for high-priority data frames. Existing queue manager designs struggle to effectively improve cache space utilization efficiency.

Method used

By dynamically adjusting cache space partitioning and setting threshold backpressure bounce mechanisms, the data frames' occupation of cache space is adjusted according to cache capacity requirements, prioritizing the protection of high-priority data frames and reducing packet loss rate.

Benefits of technology

It improves the utilization of cache space, reduces the packet loss rate of high-priority data frames, enhances the adaptability to changes in data frame volume, and reduces the impact of data volume fluctuations under extreme conditions.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117938770B_ABST
    Figure CN117938770B_ABST
Patent Text Reader

Abstract

This application discloses a method, device, electronic device, storage medium, and vehicle for dynamic management of vehicular Ethernet threshold queues. The method includes: acquiring cache capacity requirement information; the cache capacity requirement information includes the cache capacity requirements of low, medium, and / or high priority data frames; adjusting cache space partitions according to the cache capacity requirements; setting expansion levels according to the cache space partitions; and adjusting the cache space occupancy of data frames according to the cache capacity requirement information and the expansion levels. Through the above scheme, dynamic management of Ethernet threshold queues fully utilizes the cache space, enhances the ability to cope with changes in data frame volume, and dynamically adjusts each partition in the shared area through backpressure and bounce mechanisms, ensuring that the cache space always adapts to the increase in data frames.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of automotive Ethernet, and more particularly to a method for dynamic management of automotive Ethernet threshold queues, a device for dynamic management of automotive Ethernet threshold queues, electronic devices, storage media, and vehicles. Background Technology

[0002] The most common Ethernet technology primarily uses four pairs of unshielded twisted-pair cables, while automotive Ethernet technology can achieve speeds of 100 Mbits or even 1 Gbits with just a single pair of unshielded twisted-pair cables. It also effectively meets the automotive industry's requirements for low power consumption, low electromagnetic radiation, high reliability, and real-time synchronization. However, during large-volume data transmissions, buffer resources become scarce, leading to a relatively high packet loss rate for some data.

[0003] Ultimately, the limited cache space and the fragmented nature of queue buffering, where each queue operates independently, make it difficult to handle situations where data frames in a particular queue exceed normal levels. A well-designed queue manager can effectively improve cache space utilization, reduce frame drop rates, and ensure that high-priority data is dropped as much as possible.

[0004] Therefore, a dynamic management scheme for vehicular Ethernet threshold queues is proposed. This scheme dynamically adjusts the priority thresholds of each priority queue in the shared cache area based on the real-time data volume through a threshold bounce-back mechanism. This improves cache utilization while reducing the packet loss rate of high-priority data when cache resources are scarce. The core idea of ​​this scheme is to dynamically change the maximum threshold of each priority queue based on the actual usage of the shared cache area space to improve cache utilization efficiency and minimize the frame loss rate of high-priority data frames when the queue cache is strained. Summary of the Invention

[0005] The purpose of this invention is to provide an in-vehicle screen sharing control method, an in-vehicle screen sharing control device, an electronic device, a storage medium, and a vehicle, thereby solving at least one of the aforementioned technical problems.

[0006] This invention provides the following solution:

[0007] According to one aspect of the present invention, a method for dynamic management of in-vehicle Ethernet threshold queues is provided, the method comprising:

[0008] Get cache capacity requirement information;

[0009] The cache capacity requirement information includes the cache capacity requirements of low, medium, and / or high priority data frames.

[0010] Adjust the cache space partitioning according to the cache capacity requirements;

[0011] in,

[0012] Set the expansion level according to the cache space partition;

[0013] Based on the cache capacity requirement information and the expansion level, adjust the data frame's cache space usage.

[0014] Furthermore, adjusting the data frame's cache space usage includes:

[0015] Set a threshold back pressure mechanism according to the expansion level;

[0016] The threshold backpressure mechanism includes expanding the competition for the allocation ratio of cache space partitions based on the increasing demand for cache capacity from low, medium, and / or high priority data frames;

[0017] Specifically, the cache space partitions are expanded from high to low priority according to the priority of cached data frames.

[0018] Furthermore, the adjustment of the data frame's cache space usage also includes:

[0019] A threshold rebound mechanism is set according to the expansion level;

[0020] The threshold bounce mechanism includes shrinking and restoring the allocation ratio of cache space partition contention based on the decrease in cache capacity demand from low, medium, and / or high priority data frames;

[0021] Specifically, the cache space partitions are shrunk from high to low priority according to the priority of cached data frames.

[0022] Furthermore, setting the expansion level based on the cache space partition includes:

[0023] The cache space is divided into a shared area and a reserved area. The shared area includes a basic allocation area, a medium alert area, a high alert area, and a restricted area.

[0024] Adjusting the data frame's cache space usage includes adjusting the allocation ratio between the basic request area, medium alert area, high alert area, and restricted area.

[0025] Furthermore, it also includes:

[0026] Obtain permission for data frames to use the shared area;

[0027] The data frame's access rights to the shared area include setting access rights for the basic application area, medium alert area, high alert area, and restricted area based on the priority of low, medium, and high priority data frames;

[0028] in,

[0029] If the total space occupied in the shared area is lower than the minimum threshold for the lowest priority virtual queue, then any data frame of any priority is allowed to occupy any partition of the shared area.

[0030] If the total space occupied in the shared area is higher than the maximum virtual queue threshold for low priority but lower than the maximum virtual queue threshold for medium priority, then the low priority data frame is restricted to occupying only in the low alert zone.

[0031] If the current total space occupied in the shared area is higher than the maximum virtual queue threshold for medium priority but lower than the maximum virtual queue threshold for high priority, then the medium priority data frame restriction will only be applied to the low and medium alert areas.

[0032] If the total space occupied in the shared area is higher than the maximum virtual queue threshold for high priority but lower than the maximum virtual queue threshold, then the high priority data frame is restricted to occupying only in the low, medium and high alert areas.

[0033] If the total space occupied by the shared area exceeds the maximum virtual queue threshold, then low, medium, and high priority data frames will be suspended from occupying any partition of the shared area.

[0034] Furthermore, it also includes:

[0035] Set the scan cycle;

[0036] Based on the scan cycle, determine whether the corresponding cache capacity requirement increases or decreases;

[0037] Set and adjust the step size;

[0038] Based on the adjustment step and the scan cycle, the corresponding cache capacity requirement increases or decreases, and the step of the basic application area, medium alert area, high alert area and restricted area space is adjusted.

[0039] According to a second aspect of the present invention, an in-vehicle Ethernet threshold queue dynamic management device is provided, the in-vehicle Ethernet threshold queue dynamic management device comprising:

[0040] The capacity requirement module is used to obtain cache capacity requirement information, which includes the cache capacity requirement of low, medium and / or high priority data frames.

[0041] The space partitioning module is used to adjust the cache space partitioning according to the cache capacity requirements.

[0042] The expansion level module is used to set the expansion level according to the cache space partition;

[0043] The space adjustment module is used to adjust the data frame's occupation of cache space according to the cache capacity requirement information and the expansion level.

[0044] According to three aspects of the present invention, an electronic device is provided, comprising: a processor, a communication interface, a memory, and a communication bus, wherein the processor, the communication interface, and the memory communicate with each other through the communication bus;

[0045] The memory stores a computer program, which, when executed by the processor, causes the processor to perform the steps of the vehicle Ethernet threshold queue dynamic management method.

[0046] According to four aspects of the present invention, a computer-readable storage medium is provided, comprising: storing a computer program executable by an electronic device, wherein when the computer program is run on the electronic device, the electronic device performs the steps of the in-vehicle Ethernet threshold queue dynamic management method.

[0047] According to five aspects of the present invention, a vehicle is provided, comprising:

[0048] An electronic device for implementing the steps of causing the processor;

[0049] A processor that runs a program, and when the program runs, it executes steps caused by data output from an electronic device.

[0050] A storage medium for storing a program that, when run, performs steps on data output from an electronic device that cause the processor to execute.

[0051] The above solution achieves the following beneficial technical effects:

[0052] This application enhances the ability to cope with changes in data frame volume by dynamically managing Ethernet threshold queues, making full use of buffer space.

[0053] This application addresses the buffer capacity requirements of low, medium, and / or high priority data frames by setting expansion levels, thereby prioritizing the protection of high priority data frames and reducing the loss of discarded data.

[0054] This application uses a backpressure mechanism and a bounce mechanism to dynamically adjust each partition in the shared area, so that the cache space is always adaptively adjusted to accommodate the increase of data frames.

[0055] This application sets the scan cycle and expansion step to prioritize the maintenance of the overall data frame data volume fluctuation by dynamically adjusting the cache space, thereby reducing the impact of extreme data frame data volume fluctuation scenarios. Attached Figure Description

[0056] Figure 1 This is a flowchart of a dynamic management method for Ethernet threshold queues provided by one or more embodiments of the present invention.

[0057] Figure 2 This is a structural diagram of a dynamic management device for Ethernet threshold queues provided in one or more embodiments of the present invention.

[0058] Figure 3 This is a schematic diagram of a cache module management diagram according to a specific embodiment of the present invention.

[0059] Figure 4 This is a schematic diagram of cache space partitioning according to a specific embodiment of the present invention.

[0060] Figure 5 This is a schematic diagram of a threshold backpressure mechanism according to a specific embodiment of the present invention.

[0061] Figure 6 This is a schematic diagram of a threshold bounce mechanism according to a specific embodiment of the present invention.

[0062] Figure 7 This is a schematic diagram of a data frame entering the queue under a dynamic threshold according to a specific embodiment of the present invention.

[0063] Figure 8 This is a block diagram of an electronic device structure for a vehicle-mounted screen-sharing control method provided in one or more embodiments of the present invention. Detailed Implementation

[0064] The technical solution of the present invention will now be clearly and completely described with reference to the accompanying drawings. Obviously, the described embodiments are only some, not all, of the embodiments of the present invention. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0065] Figure 1 This is a flowchart of a dynamic management method for Ethernet threshold queues provided by one or more embodiments of the present invention.

[0066] like Figure 1 The illustrated method for dynamic management of in-vehicle Ethernet threshold queues includes:

[0067] Step S1: Obtain cache capacity requirement information, which includes the cache capacity requirements of low, medium, and / or high priority data frames.

[0068] Step S2: Adjust the cache space partition according to the cache capacity requirements;

[0069] Step S3: Set the expansion level according to the cache space partition;

[0070] Step S4: Adjust the data frame's usage of cache space based on cache capacity requirements and expansion level.

[0071] Specifically, cache capacity requirement information includes the different cache capacity requirements of low, medium, and / or high priority data frames. Based on the preset data value, when data must be discarded, high-priority data frames are prioritized for retention, while low-priority data is forced to be discarded. Therefore, when adjusting cache space partitions according to cache capacity requirements, it is necessary to consider both whether the data volume of each priority data frame increases and the priority of each data frame. Cache space resources are tilted towards higher priority frames through threshold backpressure and threshold bounce mechanisms. Cache space partitions are shared cache spaces reserved for data frames of different priority levels. Space changes between partitions of the shared cache space are adjusted by the expansion level to cope with a surge in the data volume of a certain level of data frames. Based on cache capacity requirement information and expansion level, the cache space occupancy of data frames is adjusted; that is, while considering capacity demand fluctuations, the cache space occupancy of data frames is adjusted in conjunction with the priority level of the data frames. For example, if there is a surge in low-priority data frames, all partitions in the shared space will be opened to low-priority data frames. For example, if both low-priority and high-priority data frames surge and exceed the reserved shared public partition, then when the two compete, cache space resources will be adjusted to favor high-priority data frames.

[0072] One possibility is that resources might be allocated to non-high-priority data frames during a certain period to address the current vehicle situation. For example, during autonomous driving, radar data frames have higher priority than screen displays. However, if radar malfunctions exceed a preset proportion, although the system retains redundancy and can still operate autonomously, the screen display needs to promptly alert the user to switch back to manual driving to ensure reliability. During this period, low-priority screen data frames might be temporarily cached and allocated to other resources.

[0073] In this embodiment, adjusting the data frame's usage of buffer space includes:

[0074] Set a threshold back pressure mechanism according to the expansion level;

[0075] The threshold backpressure mechanism includes expanding the competition for the allocation ratio of cache space partitions based on the increasing demand for cache capacity from low, medium, and / or high priority data frames;

[0076] Specifically, the cache space partitions are expanded from high to low priority according to the priority of cached data frames.

[0077] Specifically, the threshold backpressure mechanism refers to lowering the threshold value of lower-priority queues when cache space is tight. For example, a backpressure mechanism check is performed every time a data frame enters the queue manager. When the total number of data frames in the shared area is below the maximum threshold for low-priority, no backpressure operation is performed; when the total number of data frames in the shared area is between the maximum thresholds for low and medium priorities, the backpressure intensity of the low-priority queue increases; when the total number of data frames in the shared area is between the maximum thresholds for medium and high priorities, the backpressure intensity of both medium and low-priority queues increases; when the total number of data frames in the shared area exceeds the maximum threshold for high priority, the backpressure intensity of all high, medium, and low-priority queues increases. The stronger the backpressure intensity, the stronger the space restriction on data frames allocated to the corresponding priority level, thereby adjusting cache space resources in a direction that favors high-priority data frames.

[0078] In this embodiment, adjusting the data frame's usage of buffer space further includes:

[0079] A threshold rebound mechanism is set according to the expansion level;

[0080] The threshold bounce mechanism includes shrinking and restoring the allocation ratio of cache space partition contention based on the decrease in cache capacity demand from low, medium, and / or high priority data frames;

[0081] Specifically, the cache space partitions are shrunk from high to low priority according to the priority of cached data frames.

[0082] Specifically, the threshold bounce mechanism refers to raising the threshold value of lower-priority queues when there is sufficient buffer space. Since both high-priority and low-priority data frames can be stored in the partition of the shared space allocated to low-priority data, raising the threshold value of the lower-priority queues prioritizes releasing the pressure on the buffer space of low-priority data frames.

[0083] When the queue manager's data frame traffic is not very high, lower priority queue thresholds can increase the packet loss rate of low-priority data frames, while some buffer space used only by high-priority data frames remains idle. Therefore, the threshold bounce mechanism aims to increase the buffer space for lower-priority data frames as much as possible without increasing the packet loss rate of high-priority data frames, thereby improving the overall buffer utilization efficiency and reducing the packet loss rate of low-priority data frames.

[0084] The threshold bounce mechanism is essentially the reverse of the threshold backpressure mechanism. The expansion level corresponds to the priority level of the data frame.

[0085] In this embodiment, setting the expansion level based on cache space partitioning includes:

[0086] The cache space is divided into a shared area and a reserved area. The shared area includes a basic allocation area, a medium alert area, a high alert area, and a restricted area.

[0087] Adjusting the data frame's cache space usage includes adjusting the allocation ratio between the basic request area, medium alert area, high alert area, and restricted area.

[0088] Specifically, the cache space is partitioned into a shared area and a reserved area. The shared area includes a basic allocation area, a medium alert area, a high alert area, and a restricted area. The reserved area allocates cache space for each priority data frame queue and does not require dynamic adjustment. The basic allocation area, medium alert area, high alert area, and restricted area provide dynamically adjusted cache space for the data frame queue based on the data frame priority. For example, threshold bounce mechanisms and threshold backpressure mechanisms continuously adjust the allocation ratio between the basic allocation area, medium alert area, high alert area, and restricted area according to the expansion level and the current cache capacity requirement.

[0089] In this embodiment, it also includes:

[0090] Obtain permission for data frames to use the shared area;

[0091] The access rights of data frames to the shared area include setting access rights to the basic request area, medium alert area, high alert area, and restricted area based on the priority of low, medium, and high priority data frames;

[0092] in,

[0093] If the total space occupied in the shared area is lower than the minimum threshold for the lowest priority virtual queue, then any priority data frame is allowed to occupy any partition of the shared area.

[0094] If the total space occupied in the shared area is higher than the maximum virtual queue threshold for low priority but lower than the maximum virtual queue threshold for medium priority, then the low priority data frame limit is only used in the low alert area.

[0095] If the current total space occupied in the shared area is higher than the maximum virtual queue threshold for medium priority but lower than the maximum virtual queue threshold for high priority, then the medium priority data frame restriction will only be applied to the low and medium alert areas.

[0096] If the total space occupied in the shared area is higher than the maximum virtual queue threshold for high priority, but lower than the maximum virtual queue threshold, then the high priority data frame restriction will only apply to the low, medium, and high alert areas.

[0097] If the total space occupied in the shared area exceeds the maximum virtual queue threshold, then low, medium, and high priority data frames will be suspended from occupying any partition of the shared area.

[0098] Specifically, the basic request area, medium alert area, high alert area, and restricted area are all shared partitions, but their uses are different. Based on the threshold bounce mechanism and threshold pressure mechanism, and according to the expansion level and current cache capacity requirements, the allocation ratio among the basic request area, medium alert area, high alert area, and restricted area is continuously adjusted, while adhering to the usage permissions of the basic request area, medium alert area, high alert area, and restricted area.

[0099] In this embodiment,

[0100] Also includes:

[0101] Set the scan cycle;

[0102] Based on the scan cycle, determine whether the corresponding cache capacity requirement increases or decreases;

[0103] Set and adjust the step size;

[0104] Adjust the step size and scan cycle to adjust the step size of the basic allocation area, medium alert area, high alert area, and restricted area based on the increase or decrease in the corresponding cache capacity requirements.

[0105] Specifically, the increase or decrease in cache capacity demand is known after processing a round of data frames. Each adjustment to the basic request area, medium alert area, high alert area, and restricted area affects the entire cache space's ability to handle all low, medium, and / or high priority data frames. It is necessary to mitigate the impact of sudden changes in cache capacity demand by setting the scan cycle and adjusting the step size, thereby improving the overall utilization of the cache space. Since the devices in a vehicle system are relatively fixed, and the scenarios they deal with are also relatively fixed, an increase in data frames is relatively predictable. By setting the scan cycle and adjusting the step size, the shared area of ​​the cache space for data frames of different priorities can be occupied relatively promptly and smoothly.

[0106] In addition, based on the threshold backpressure mechanism, after one "backpressure" is executed, the cache capacity requirements of data frames of different priorities are scanned. If there is no need to continue "backpressure" after the original "backpressure" is executed, the bounce mechanism is considered to adjust the cache space changed by "backpressure" and restore it to the initial allocation ratio.

[0107] Figure 2 This is a structural diagram of a dynamic management device for Ethernet threshold queues provided in one or more embodiments of the present invention.

[0108] like Figure 2 The vehicle-mounted Ethernet threshold queue dynamic management device shown includes: a capacity requirement module, a space partitioning module, a capacity expansion level module, and a space adjustment module;

[0109] The capacity requirement module is used to obtain cache capacity requirement information, which includes the cache capacity requirements of low, medium and / or high priority data frames.

[0110] The space partitioning module is used to adjust the cache space partitioning according to cache capacity requirements;

[0111] The expansion level module is used to set the expansion level based on the cache space partition;

[0112] The space adjustment module is used to adjust the space occupied by data frames in the cache based on the cache capacity requirement information and expansion level.

[0113] It is worth noting that although this system only discloses the capacity requirement module, space partitioning module, expansion level module, and space adjustment module, the meaning of this invention is that, based on the above-mentioned basic functional modules, those skilled in the art can arbitrarily add one or more functional modules in combination with existing technology to form an infinite number of embodiments or technical solutions. In other words, this system is open rather than closed. The fact that this embodiment only discloses a few basic functional modules does not mean that the scope of protection of the claims of this invention is limited to the above-disclosed basic functional modules.

[0114] The above solution achieves the following beneficial technical effects:

[0115] This application enhances the ability to cope with changes in data frame volume by dynamically managing Ethernet threshold queues, making full use of buffer space.

[0116] This application addresses the buffer capacity requirements of low, medium, and / or high priority data frames by setting expansion levels, thereby prioritizing the protection of high priority data frames and reducing the loss of discarded data.

[0117] This application uses a backpressure mechanism and a bounce mechanism to dynamically adjust each partition in the shared area, so that the cache space is always adaptively adjusted to accommodate the increase of data frames.

[0118] This application sets the scan cycle and expansion step to prioritize the maintenance of the overall data frame data volume fluctuation by dynamically adjusting the cache space, thereby reducing the impact of extreme data frame data volume fluctuation scenarios.

[0119] Figure 3 This is a schematic diagram of a cache module management diagram according to a specific embodiment of the present invention.

[0120] Figure 4 This is a schematic diagram of cache space partitioning according to a specific embodiment of the present invention.

[0121] Figure 5 This is a schematic diagram of a threshold backpressure mechanism according to a specific embodiment of the present invention.

[0122] Figure 6 This is a schematic diagram of a threshold bounce mechanism according to a specific embodiment of the present invention.

[0123] Figure 7 This is a schematic diagram of a data frame entering the queue under a dynamic threshold according to a specific embodiment of the present invention.

[0124] In one specific embodiment, the method of estimating cache capacity requirements and setting the capacity of the queue management space is disclosed. According to the cache setting rules, the cache capacity is the product of bandwidth and latency, expressed by the formula: Q = BW × D; where Q is the cache capacity, BW is the link bandwidth, and D is the latency.

[0125] For example, the maximum bandwidth of a 10 Gigabit automotive Ethernet is 10 Gbps, the queue buffer period is 1088 μS, and the buffer capacity can be set to store all data frames enqueued under the maximum system bandwidth for two periods. Therefore, according to the formula, the capacity of the queue management space is set to 20 Mbits.

[0126] In another specific embodiment, a method for storing data frames is disclosed.

[0127] Before a data frame enters the queue, the buffer block is divided into equal-sized buffer units, each storing the data of one data frame. When a data frame enters the queue, the queue manager retrieves a buffer unit to store the data frame information. When a data frame leaves the queue, the queue manager retrieves the data frame information from the buffer unit and passes it to the next lower level, then reclaims any empty buffer units. This method of storing data frames in fixed-size buffer units simplifies buffer space management, prevents buffer fragmentation, and speeds up the process of data frames entering and leaving the queue manager.

[0128] Cache blocks belonging to the same queue are linked together using a linked list according to the order in which data entered the queue for management. For example... Figure 3 As shown, a two-dimensional pointer array is added to the queue buffer register. Different rows of the pointer array identify different priorities of data frames, and different columns represent different HM (modem) addresses of the data frames. Each element in the two-dimensional pointer array contains a management node of a linked list. This management node stores the start address, end address, and number of data frames currently stored in this linked list.

[0129] Before a data frame enters the buffer, the queue manager (used for dynamic management of threshold queues) first initializes the queue management register, allocating an empty linked list for each queue. When a data frame enters the queue manager, the queue manager first determines the priority and destination HM number of the arriving data frame, then links the data buffer block to the tail of the designated linked list and modifies the tail pointer of this linked list and the number of buffer blocks in the queue management register. When the dequeue scheduler instructs the queue manager to dequeue a data frame, the queue manager first finds the head and tail pointers of the linked list containing the data frame to be dequeued, retrieves the corresponding number of buffer blocks from the list, then modifies the head and tail pointers of this linked list and the number of buffer blocks in the queue management register, and finally reclaims the buffer blocks of these dequeued data frames.

[0130] In another specific embodiment, the design of a queue management method based on dynamic thresholds is disclosed.

[0131] First, the design of the queue cache partitioning method.

[0132] like Figure 4 As shown, the entire buffer space is divided into two main parts: a shared area and individual queue-specific areas. Before any data frame is enqueued, the queue manager distributes the buffer space equally among each queue. Each queue's buffer space within its assigned area is independent, ensuring each queue has a minimum buffer space. When a data frame enters the queue manager, it is initially stored in the queue's assigned area buffer. Only when the assigned area buffer space for that queue is full will the data frame be stored in the shared area. The shared area buffer space is available to each queue and is divided into four smaller parts: a basic request area, a medium alert area, a high alert area, and a restricted area. When the total number of shared area data frames is below the low-priority maximum threshold, all priority data frames can enter the buffer and be stored in the basic allocation area; when the total number of shared area data frames is between the low-priority maximum threshold and the medium-priority maximum threshold, low-priority data frames will be stored in the medium alert area; when the total number of shared area data frames is between the medium-priority maximum threshold and the high-priority maximum threshold, only high-priority data frames can enter the shared area buffer space and be stored in the high alert area; when the total number of shared area data frames exceeds the priority maximum threshold, high, medium, and low-priority data frames cannot enter the shared area buffer space.

[0133] Compared to using a separate buffer for some data frames and a shared buffer strategy for others, this approach of dividing data into different buffer space thresholds for different priorities can provide more buffer space for higher priority data frames, thus effectively reducing the packet loss rate of higher priority data frames.

[0134] Secondly, a threshold backpressure mechanism should be set up.

[0135] Allocating different buffer space thresholds to data frames of different priorities can effectively reduce the packet loss rate of higher-priority data frames. However, if the maximum threshold allocation ratio for lower-priority data frames is low, the packet loss rate for lower-priority data frames will be high; conversely, if the maximum threshold allocation ratio for lower-priority data frames is high, the packet loss rate for higher-priority data frames will still be high. To enable the queue manager to adapt to changes in the rate of real-time business flows and minimize the packet loss rate of higher-priority data frames, the maximum buffer threshold for lower-priority queues should be increased when buffer resources are plentiful, and decreased when buffer resources are scarce.

[0136] like Figure 5 As shown, the threshold backpressure mechanism refers to lowering the threshold value of lower-priority queues when buffer space is tight. A backpressure mechanism check is performed every time a data frame enters the queue manager. When the total number of shared area data frames is below the maximum threshold for low-priority queues, no backpressure operation is performed; when the total number of shared area data frames is between the maximum thresholds for low-priority and medium-priority queues, the backpressure intensity of low-priority queues increases; when the total number of shared area data frames is between the maximum thresholds for medium-priority and high-priority queues, the backpressure intensity of medium- and low-priority queues increases; when the total number of shared area data frames exceeds the maximum threshold for high-priority queues, the backpressure intensity of high-, medium-, and low-priority queues all increase. The step value `step_add` for changing the maximum threshold of the queue remains the same after each increase in backpressure intensity. After the queue backpressure intensity changes, the queue manager updates the queue backpressure status and backpressure duration in the queue management system. If the backpressure intensity of the queue does not increase during the subsequent backpressure duration, a bounce operation is performed. If the backpressure intensity continues to increase during this backpressure duration, the backpressure state is updated and the backpressure time is counted from zero.

[0137] The threshold backpressure mechanism enables queue management to allocate more buffer space to high-priority data frames when shared area space is limited. This minimizes packet loss of high-priority data frames when queue manager data traffic is high.

[0138] Secondly, a threshold rebound mechanism should be set up.

[0139] Threshold bounce mechanism refers to raising the threshold value of lower-priority queues when there is sufficient buffer space. In the threshold backpressure mechanism, the packet loss rate of high-priority data frames is reduced by lowering the threshold of low-priority queues. However, when the data frame traffic of the queue manager is not so high, the lower threshold of low-priority queues will increase the packet loss rate of low-priority data frames, while some buffer space used only by high-priority data frames will be idle. Therefore, the queue manager also needs to implement the threshold bounce mechanism: after the queue threshold is backpressured, the threshold value is bounced back after a period of time. The bounce mechanism maximizes the buffer space of lower-priority data frames without increasing the packet loss rate of high-priority data frames, thereby improving the overall buffer utilization efficiency and reducing the packet loss rate of low-priority data frames.

[0140] like Figure 6 As shown, after the queue manager completes a backpressure operation, a timer starts counting down. If the queue manager is still in a backpressure state after the backpressure time expires, it begins a bounce operation. The backpressure intensity of each priority queue decreases, and the maximum threshold of each priority queue increases by the `step_add` value. Finally, the queue manager updates the backpressure state and bounce time, and the current threshold bounce operation ends.

[0141] Next, the process of setting up the data frame to enter the queue manager is implemented.

[0142] like Figure 7 As shown, the operation steps are as follows:

[0143] Step 1: Before all data frames enter the queue manager, the queue manager initializes the buffer space, sets the buffer space size of each queue and sets the maximum threshold for each priority in the queue management shared area;

[0144] Step 2: When a data frame arrives at the queue manager, first determine whether to perform a threshold bounce-back operation. If so, perform the bounce-back operation, update the backpressure status and bounce-back time, and then proceed to Step 3. Otherwise, proceed directly to Step 3.

[0145] Step 3: Determine whether the buffer space of the queue corresponding to the arriving cached data is full; if not, the data frame enters the buffer space of its corresponding queue and then proceeds to Step 5; otherwise, proceed to Step 4.

[0146] Step 4: Determine whether the total number of data in the cache shared area exceeds the maximum threshold of the priority queue for this data frame; if it does, discard the data frame and then proceed to Step 5; otherwise, the data enters the cache shared area and then proceeds to Step 5.

[0147] Step 5: Determine if there are any more data frames arriving in the buffer; if so, proceed to step 2; otherwise, the data enters the queue manager and the process ends.

[0148] Finally, configure the data frame out queue manager process.

[0149] When a data frame needs to be dequeued from the queue manager, the dequeue scheduler first reads the queue management object register, checks the actual queue lengths in the buffer, and determines the number of data frames to dequeue from each queue based on channel conditions. When the dequeue scheduling time arrives, the dequeue scheduler retrieves several data frames from the corresponding queues according to the dequeue scheduling plan, and then modifies the queue length values ​​in the queue management object register. Finally, the queue manager reclaims and clears the buffer blocks containing the dequeued data frames, and links these buffer blocks to the buffer free list.

[0150] Figure 8 This is a block diagram of an electronic device structure for a vehicle-mounted screen-sharing control method provided in one or more embodiments of the present invention.

[0151] like Figure 8 As shown, this application provides an electronic device, including: a processor, a communication interface, a memory, and a communication bus, wherein the processor, the communication interface, and the memory communicate with each other through the communication bus;

[0152] The memory stores a computer program that, when executed by the processor, causes the processor to perform the steps of a dynamic management method for an in-vehicle Ethernet threshold queue.

[0153] This application also provides a computer-readable storage medium storing a computer program executable by an electronic device, which, when run on the electronic device, causes the electronic device to perform the steps of a dynamic management method for an in-vehicle Ethernet threshold queue.

[0154] This application also provides a vehicle, including:

[0155] Electronic devices for implementing a method for dynamic management of vehicle-mounted Ethernet threshold queues;

[0156] The processor runs a program, and when the program runs, it executes the steps of the vehicle-mounted Ethernet threshold queue dynamic management method based on the data output from the electronic device.

[0157] Storage medium for storing programs that, when running, execute steps of the onboard Ethernet threshold queue dynamic management method on data output from electronic devices.

[0158] The communication bus mentioned in the above electronic devices can be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus, etc. This communication bus can be divided into address bus, data bus, control bus, etc. For ease of illustration, only one thick line is used to represent it in the diagram, but this does not mean that there is only one bus or one type of bus.

[0159] The electronic device comprises a hardware layer, an operating system layer running on top of the hardware layer, and an application layer running on the operating system. The hardware layer includes hardware such as a central processing unit (CPU), a memory management unit (MMU), and memory. The operating system can be any one or more computer operating systems that control the electronic device through processes, such as Linux, Unix, Android, iOS, or Windows. Furthermore, in this embodiment of the invention, the electronic device can be a smartphone, tablet computer, or other handheld device, or a desktop computer, portable computer, or other electronic device; there is no particular limitation in this embodiment.

[0160] In this embodiment of the invention, the executing entity for electronic device control can be an electronic device itself, or a functional module within an electronic device capable of calling and executing a program. The electronic device can obtain the firmware corresponding to the storage medium. This firmware is provided by the supplier, and different storage media may have the same or different firmware; no limitation is made here. After obtaining the firmware corresponding to the storage medium, the electronic device can write this firmware into the storage medium; specifically, it burns the firmware corresponding to the storage medium into the storage medium. The process of burning the firmware into the storage medium can be implemented using existing technology, and will not be elaborated upon in this embodiment of the invention.

[0161] Electronic devices can also obtain reset commands corresponding to the storage media. The reset commands corresponding to the storage media are provided by the supplier. The reset commands corresponding to different storage media can be the same or different, and no restrictions are imposed here.

[0162] At this time, the storage medium of the electronic device is a storage medium on which the corresponding firmware has been written. The electronic device can respond to the reset command corresponding to the storage medium on which the corresponding firmware has been written, thereby resetting the storage medium on which the corresponding firmware has been written according to the reset command. The process of resetting the storage medium according to the reset command can be implemented by existing technology and will not be described in detail in this embodiment of the invention.

[0163] For ease of description, the above devices are described separately by function as various units and modules. Of course, in implementing this application, the functions of each unit and module can be implemented in one or more software and / or hardware.

[0164] It will be understood by those skilled in the art that, unless otherwise defined, all terms used herein (including technical and scientific terms) have the same meaning as commonly understood by one of ordinary skill in the art to which this invention pertains. It should also be understood that terms such as those defined in general dictionaries should be understood to have the meaning consistent with their meaning in the context of the prior art, and should not be interpreted in an idealized or overly formal sense unless specifically defined.

[0165] For the sake of simplicity, the method embodiments are described as a series of actions. However, those skilled in the art should understand that the embodiments of the present invention are not limited to the described order of actions, because according to the embodiments of the present invention, some steps can be performed in other orders or simultaneously. Furthermore, those skilled in the art should also understand that the embodiments described in the specification are preferred embodiments, and the actions involved are not necessarily essential to the embodiments of the present invention.

[0166] As can be seen from the above description of the embodiments, those skilled in the art can clearly understand that this application can be implemented by means of software plus necessary general-purpose hardware platforms. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product can be stored in a storage medium, such as ROM / RAM, magnetic disk, optical disk, etc., and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute the methods described in various embodiments or some parts of the embodiments of this application.

[0167] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, and not to limit them; although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some or all of the technical features; and these modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of the present invention.

Claims

1. A method for dynamic management of vehicle-mounted Ethernet threshold queues, characterized in that, The in-vehicle Ethernet threshold queue dynamic management method includes: Get cache capacity requirement information; The cache capacity requirement information includes the cache capacity requirements of low, medium, and / or high priority data frames. Adjust the cache space partitioning according to the cache capacity requirements; in, Set the expansion level according to the cache space partition; Based on the cache capacity requirement information and the expansion level, adjust the data frame's cache space usage, specifically including setting a threshold backpressure mechanism according to the expansion level; The threshold backpressure mechanism includes expanding the competition for the allocation ratio of cache space partitions based on the increasing demand for cache capacity from low, medium, and / or high priority data frames; Specifically, the cache space partitions are expanded from high to low priority according to the priority of the cached data frames; This also includes setting a threshold rebound mechanism based on the capacity expansion level; The threshold bounce mechanism includes shrinking and restoring the allocation ratio of cache space partition contention based on the decrease in cache capacity demand from low, medium, and / or high priority data frames; Specifically, the cache space partitions are shrunk from high to low priority according to the priority of cached data frames.

2. The method for dynamic management of vehicle-mounted Ethernet threshold queues according to claim 1, characterized in that, The step of setting the expansion level according to the cache space partition includes: The cache space is divided into a shared area and a reserved area. The shared area includes a basic allocation area, a medium alert area, a high alert area, and a restricted area. Adjusting the data frame's cache space usage includes adjusting the allocation ratio between the basic request area, medium alert area, high alert area, and restricted area.

3. The method for dynamic management of vehicle-mounted Ethernet threshold queues according to claim 1, characterized in that, Also includes: Obtain permission for data frames to use the shared area; The data frame's access rights to the shared area include setting access rights for the basic application area, medium alert area, high alert area, and restricted area based on the priority of low, medium, and high priority data frames; in, If the total space occupied in the shared area is lower than the minimum threshold for the lowest priority virtual queue, then any data frame of any priority is allowed to occupy any partition of the shared area. If the total space occupied in the shared area is higher than the maximum virtual queue threshold for low priority but lower than the maximum virtual queue threshold for medium priority, then the low priority data frame is restricted to occupying only in the low alert zone. If the current total space occupied in the shared area is higher than the maximum virtual queue threshold for medium priority but lower than the maximum virtual queue threshold for high priority, then the medium priority data frame restriction will only be applied to the low and medium alert areas. If the total space occupied in the shared area is higher than the maximum virtual queue threshold for high priority but lower than the maximum virtual queue threshold, then the high priority data frame is restricted to occupying only in the low, medium and high alert areas. If the total space occupied by the shared area exceeds the maximum virtual queue threshold, then low, medium, and high priority data frames will be suspended from occupying any partition of the shared area.

4. The method for dynamic management of vehicle-mounted Ethernet threshold queues according to claim 1, characterized in that, Also includes: Set the scan cycle; Based on the scan cycle, determine whether the corresponding cache capacity requirement increases or decreases; Set and adjust the step size; Based on the adjustment step and the scan cycle, the corresponding cache capacity requirement increases or decreases, and the step of the basic application area, medium alert area, high alert area and restricted area space is adjusted.

5. A vehicle-mounted Ethernet threshold queue dynamic management device, characterized in that, The in-vehicle Ethernet threshold queue dynamic management device includes: The capacity requirement module is used to obtain cache capacity requirement information, which includes the cache capacity requirement of low, medium and / or high priority data frames. The space partitioning module is used to adjust the cache space partitioning according to the cache capacity requirements. The expansion level module is used to set the expansion level according to the cache space partition; The space adjustment module is used to adjust the data frame's occupation of the cache space according to the cache capacity requirement information and the expansion level. Specifically, it includes setting a threshold backpressure mechanism according to the expansion level. The threshold backpressure mechanism includes expanding the competition for the allocation ratio of cache space partitions based on the increasing demand for cache capacity from low, medium, and / or high priority data frames; Specifically, the cache space partitions are expanded from high to low priority according to the priority of the cached data frames; This also includes setting a threshold rebound mechanism based on the capacity expansion level; The threshold bounce mechanism includes shrinking and restoring the allocation ratio of cache space partition contention based on the decrease in cache capacity demand from low, medium, and / or high priority data frames; Specifically, the cache space partitions are shrunk from high to low priority according to the priority of cached data frames.

6. An electronic device, characterized in that, include: The processor, communication interface, memory, and communication bus are connected, with the processor, communication interface, and memory communicating with each other via the communication bus. The memory stores a computer program that, when executed by the processor, causes the processor to perform the steps of the vehicle Ethernet threshold queue dynamic management method according to any one of claims 1 to 4.

7. A computer-readable storage medium, characterized in that, include: It stores a computer program executable by an electronic device, which, when run on the electronic device, causes the electronic device to perform the steps of the in-vehicle Ethernet threshold queue dynamic management method according to any one of claims 1 to 4.

8. A vehicle, characterized in that, include: An electronic device for implementing the steps of the vehicle-mounted Ethernet threshold queue dynamic management method according to any one of claims 1 to 4; A processor that runs a program, and when the program runs, it executes the steps of the in-vehicle Ethernet threshold queue dynamic management method according to any one of claims 1 to 4 from data output by the electronic device. A storage medium for storing a program that, when running, performs the steps of the in-vehicle Ethernet threshold queue dynamic management method according to any one of claims 1 to 4 on data output from an electronic device.

Citation Information

Patent Citations

  • Cache management method based on dynamic virtual threshold

    CN111400206A

  • Reloading processing method and system in queue management, medium, equipment and application

    CN114401235A