Vehicle video stream task unloading method and device

By segmenting the vehicle video streaming task into subtasks and using the improved task offload decision model, the problems of low processing efficiency and high transmission delay of the vehicle video streaming task are solved, and efficient video stream processing and secure computing offloading are achieved.

CN120540797APending Publication Date: 2025-08-26CHINA TELECOM CORP LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510561213.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-04-29
Publication Date
2025-08-26

AI Technical Summary

Technical Problem

In the prior art, vehicle video streaming task processing relies on local computing or cloud server computing, resulting in limited computing power, low task processing efficiency, high transmission delay and difficult to achieve privacy protection.

Method used

By segmenting the video stream processing task into multiple subtasks and using a task offload decision model built on a soft actor-critician network improved by long and short-term memory networks, the offload strategy for each subtask, including local processing or offloading to edge computing node processing.

Benefits of technology

It improves the response speed and computing efficiency of the autonomous driving system in complex dynamic environments, improves the quality of video processing, and ensures the stability and safety of the system.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120540797A_ABST
    Figure CN120540797A_ABST
Patent Text Reader

Abstract

The invention discloses a vehicle video stream task unloading method and device. Comprising the following steps: acquiring task parameter information of video stream processing tasks respectively generated by a plurality of vehicles and environment parameter information corresponding to the plurality of vehicles; for each video stream processing task, segmenting the video stream processing task into a plurality of sub-tasks, determining the sub-task data volume of each sub-task according to the task data volume, and sequentially forming a task sequence by the plurality of sub-tasks and the sub-task data volumes corresponding to the plurality of sub-tasks; analyzing the task sequence corresponding to the video stream processing task and the environment parameter information by using a task unloading decision model to obtain a sub-task unloading strategy corresponding to each sub-task; and unloading the subtasks according to the subtask unloading strategy corresponding to each subtask. According to the method and the device, the technical problems of relatively low task processing efficiency and relatively high transmission delay caused by the fact that the unloading proportion of the video stream processing task cannot be reasonably set when the vehicle video stream task is processed in related technologies are solved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of edge computing technology, and more specifically, to a method and device for offloading vehicle video stream tasks. Background Art

[0002] With the rapid development of autonomous driving technology, real-time video stream analysis has become a crucial component for ensuring driving safety and accurate decision-making. Leveraging technologies such as computer vision and deep learning, real-time video stream analysis can rapidly identify and track targets and detect anomalies in ever-changing traffic scenarios, providing vehicles with timely and accurate environmental perception data.

[0003] Currently, processing real-time video streams primarily relies on local vehicle computing or cloud server computing. As the number of vehicles and the variety of onboard applications within the connected vehicle network increases, the amount of task data generated by vehicles is exploding. Consequently, analyzing real-time video streams locally on the vehicle results in long computation times and an inability to process large amounts of data due to the vehicle's limited local computing power. Furthermore, cloud server computing requires uploading the computed tasks to a cloud server for processing and then transmitting the results back to the vehicle. However, this approach suffers from high bandwidth usage, high transmission latency, and difficulties in protecting privacy.

[0004] To address the above-mentioned problems, no effective solutions have been proposed so far. Summary of the Invention

[0005] The embodiments of the present application provide a method and device for unloading vehicle video stream tasks, so as to at least solve the technical problem that when the relevant technology processes vehicle video stream tasks, the offloading ratio of the video stream processing tasks cannot be reasonably set, resulting in low task processing efficiency and high transmission delay.

[0006] According to one aspect of an embodiment of the present application, a vehicle video stream task offloading method is provided, including: obtaining task parameter information of video stream processing tasks generated by multiple vehicles and environmental parameter information corresponding to the multiple vehicles, wherein the task parameter information at least includes: the task data volume of the video stream processing task; for each video stream processing task, dividing the video stream processing task into multiple subtasks, and determining the subtask data volume of each subtask based on the task data volume, and sequentially forming a task sequence by the multiple subtasks and the subtask data volumes corresponding to the multiple subtasks; using a pre-trained task offloading decision model to analyze the task sequence and environmental parameter information corresponding to the video stream processing task, and obtaining a subtask offloading strategy corresponding to each subtask in the video stream processing task, wherein the task offloading decision model is constructed based on a soft actor-critic network improved based on a long short-term memory network, and the subtask offloading strategy includes one of the following: local vehicle processing of the subtask, processing of the subtask to an edge computing node; for each subtask, offloading the subtask according to the subtask offloading strategy corresponding to the subtask.

[0007] Optionally, the training process of the task offloading decision model includes: constructing an online value function network and a policy network, and initializing the network weight parameters of the online value function network and the policy network, wherein the online value function network is used to solve the task offloading strategy of the video stream processing task, and the policy network includes multiple task offloading strategies, and the task offloading strategy includes the subtask offloading strategy of each subtask; the network weight parameters of the initialized online value function network are used as the network parameters of the target value function network; setting an experience pool, and determining the capacity of the experience pool; iteratively solving the task offloading strategy and network weight parameters of the video stream processing task through the following steps until the preset iterative convergence conditions are met, and the obtained target value function network is used as the task offloading decision model: Step 1: Initialize the Internet of Vehicles environment state, wherein the Internet of Vehicles environment state includes at least: the task sequence corresponding to each video stream processing task, the local computing power information and environmental parameter information corresponding to each vehicle; Step 2: Normalize the current Internet of Vehicles environment state, and input the normalized current Internet of Vehicles environment state into the policy network to obtain the corresponding task offloading strategy concept. The method comprises the following steps: first, inputting the normalized current Internet of Vehicles environment state and the target task offloading strategy into the online value function network, and calculating the predicted Q value corresponding to the target task offloading strategy; second, executing the target task offloading strategy, obtaining the corresponding reward and the new state of the Internet of Vehicles environment, and normalizing the new state of the Internet of Vehicles environment; third, taking the normalized current Internet of Vehicles environment state, the target task offloading strategy, the reward and the new state of the Internet of Vehicles environment as a sample, and storing the sample in the experience pool; fourth, inputting multiple samples randomly sampled from the experience pool into the neural network containing the long short-term memory network, calculating the probability of each sample being sampled, the mean square error loss function and the loss function weight, and determining the target Q value corresponding to the target task offloading strategy based on the obtained calculation results; fourth, updating the network weight parameters of the online value function network and the policy network by the gradient descent method based on the predicted Q value and the target Q value corresponding to the target task offloading strategy; fifth, updating the network weight parameters of the target value function network by the sampling soft update mechanism based on the network weight parameters of the online value function network.

[0008] Optionally, storing the sample in the experience pool includes: determining a preset capacity upper limit of the experience pool, and comparing the size relationship between the capacity of the experience pool and the preset capacity upper limit; if the capacity of the experience pool is less than the preset capacity upper limit, storing the sample in the experience pool; if the capacity of the experience pool is greater than or equal to the preset capacity upper limit, based on the first-in-first-out principle, using the sample to replace the earliest sample stored in the experience pool.

[0009] Optionally, the normalized current Internet of Vehicles environment state and the target task offloading strategy are input into the online value function network to calculate the predicted Q value corresponding to the target task offloading strategy, including: calculating the total offloading overhead corresponding to the target task offloading strategy based on the target task offloading strategy, the task sequence corresponding to each video stream processing task, and the on-board parameter information and environmental parameter information corresponding to each vehicle, wherein the total offloading overhead includes: the time overhead and energy overhead of each video stream processing task, the time overhead includes: transmission delay, calculation delay, and video quality evaluation delay, and the energy overhead includes: transmission overhead and calculation overhead; based on the total offloading overhead corresponding to the target task offloading strategy, determine the predicted Q value corresponding to the target task offloading strategy, wherein the total offloading overhead is inversely proportional to the predicted Q value.

[0010] Optionally, the environmental parameter information includes at least: the roadside unit location information corresponding to the vehicle, and the network transmission parameters, wherein based on the task offloading strategy, the task sequence corresponding to each video stream processing task, and the on-board parameter information and environmental parameter information corresponding to each vehicle, the total unloading overhead corresponding to the task offloading strategy is calculated, including: for each subtask in each video stream processing task, the subtask data volume of the subtask and all upstream subtasks corresponding to the subtask are determined according to the task sequence corresponding to the video stream processing task, and the subtask unloading strategy corresponding to the subtask is determined according to the task offloading strategy; in the case where the subtask offloading strategy is to locally process the subtask, the first computing overhead and the first computing delay of the local processing subtask are calculated according to the subtask data volume; the maximum time overhead among the first target time overheads corresponding to all upstream subtasks corresponding to the subtask is determined; the first computing overhead is used as the first target energy overhead of the subtask, and the sum of the first computing delay and the maximum time overhead is used as the first target time overhead of the subtask; in the case where the subtask offloading strategy is to offload the subtask to the edge computing node, the second computing overhead, the second computing delay and the video overhead of the edge computing node processing the subtask are calculated according to the subtask data volume. video quality evaluation delay; calculate the transmission delay and transmission overhead of transmitting the subtask from the vehicle to the edge computing node based on the subtask data volume and environmental parameter information; determine the maximum time overhead among the first target time overheads corresponding to all upstream subtasks corresponding to the subtask; take the sum of the second computing overhead and the transmission overhead as the first target energy overhead of the subtask, and take the sum of the second computing delay, video quality evaluation delay, transmission delay and the maximum time overhead as the first target time overhead of the subtask; for each video stream processing task, take the sum of the first target computing overhead of each subtask corresponding to the video stream processing task as the second target computing overhead of the video stream processing task, take the sum of the first target transmission overhead of each subtask corresponding to the video stream processing task as the second target transmission overhead of the video stream processing task, take the first target time overhead of the most downstream subtask corresponding to the video stream processing task as the second target time overhead of the video stream processing task, and take the second target transmission overhead and the second target computing overhead as the second target energy overhead of the video stream processing task; perform weighted summation of the second target time overhead and the second target energy overhead of all video stream processing tasks to obtain the total unloading overhead corresponding to the target task offloading strategy.

[0011] Optionally, the edge computing capability includes at least: the amount of available edge computing resources, wherein the expression of the video quality evaluation delay is:

[0012]

[0013] Where m i,lrepresents the amount of subtask data of the lth subtask within the i-th video stream processing task, and i∈[1,k], l∈[1,L], k represents the total number of video stream processing tasks generated by multiple vehicles, L represents the number of subtasks obtained by splitting the video stream processing task, and f MEC Indicates the amount of computing resources available on the edge computing node within the edge node computing capability information. A represents the video quality evaluation delay of the lth subtask within the i-th video stream processing task, i,l Represents a fitting function for scoring the target detection accuracy of the task processing quality of the lth subtask within the i-th video stream processing task offloaded to the edge computing node.

[0014] Optionally, dividing the video stream processing task into multiple subtasks includes: dividing the video stream processing task into multiple subtasks according to preset dimensions, wherein the preset dimensions include at least one of the following: time continuity, content continuity, and semantic continuity.

[0015] According to another aspect of an embodiment of the present application, a vehicle video stream task offloading device is also provided, including: an acquisition module, configured to acquire task parameter information of video stream processing tasks respectively generated by multiple vehicles and environmental parameter information corresponding to the multiple vehicles, wherein the task parameter information includes at least the task data volume of the video stream processing task; a division module, configured to divide the video stream processing task into multiple subtasks for each video stream processing task, and determine the subtask data volume of each subtask based on the task data volume, wherein a task sequence is sequentially composed of the multiple subtasks and the subtask data volumes corresponding to the multiple subtasks; a decision module, configured to analyze the task sequence and environmental parameter information corresponding to the video stream processing task using a pre-trained task offloading decision model, and obtain a subtask offloading strategy corresponding to each subtask in the video stream processing task, wherein the task offloading decision model is constructed based on a soft actor-critic network improved based on a long short-term memory network, and the subtask offloading strategy includes one of the following: processing the subtask locally by the vehicle, processing the subtask to an edge computing node; and an offloading module, configured to offload the subtask according to the subtask offloading strategy corresponding to the subtask.

[0016] According to another aspect of an embodiment of the present application, a computer program product is further provided, which includes: a computer program, wherein when the computer program is executed by a processor, the above-mentioned vehicle video stream task offloading method is implemented.

[0017] According to another aspect of an embodiment of the present application, an electronic device is also provided, which includes: a memory and a processor, wherein a computer program is stored in the memory, and the processor is configured to execute the above-mentioned vehicle video stream task offloading method through the computer program.

[0018] In an embodiment of the present application, by obtaining the task parameter information of the video stream processing task and the environmental parameter information corresponding to the vehicle; the video stream processing task is flexibly divided into multiple subtasks, and the subtask data volume of each subtask is determined according to the total task data volume; then, the task sequence corresponding to the video stream processing task and the environmental parameter information are analyzed to obtain the optimal unloading strategy corresponding to each subtask in the video stream processing task, including vehicle local processing and edge computing node processing. Through intelligent decision-making, the technical effect of intelligent allocation of computing resources and optimized processing of task sequences for video stream processing tasks generated by multiple vehicles is achieved, achieving the purpose of improving the response speed, computing efficiency and video processing quality of the autonomous driving system in a complex dynamic environment, thereby improving the stability and safety of the entire system. This solves the technical problem that when the related technology processes vehicle video stream tasks, it is unable to reasonably set the unloading ratio of the video stream processing task, resulting in low task processing efficiency and high transmission delay. BRIEF DESCRIPTION OF THE DRAWINGS

[0019] The drawings described herein are used to provide a further understanding of the present application and constitute a part of the present application. The illustrative embodiments of the present application and their descriptions are used to explain the present application and do not constitute an improper limitation on the present application. In the drawings:

[0020] Figure 1 is a schematic structural diagram of an optional vehicle networking system according to an embodiment of the present application;

[0021] Figure 2 This is a schematic diagram of an optional scenario of a vehicle networking system according to an embodiment of the present application;

[0022] Figure 3 This is a flowchart of an optional vehicle video stream task offloading method according to an embodiment of the present application;

[0023] Figure 4 is a schematic diagram of the principle of an optional task offloading decision model according to an embodiment of the present application;

[0024] Figure 5 is a structural diagram of an optional vehicle video stream task offloading device according to an embodiment of the present application;

[0025] Figure 6 It is a schematic structural diagram of an optional electronic device according to an embodiment of the present application. DETAILED DESCRIPTION

[0026] In order to enable those skilled in the art to better understand the present invention, the following will clearly and completely describe the technical solutions in the embodiments of the present invention in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments in the present invention, all other embodiments obtained by ordinary technicians in this field without making creative efforts should fall within the scope of protection of this application.

[0027] It should be noted that the terms "first", "second", etc. in the specification, claims, and drawings of the present application 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 interchangeable where appropriate, so that the embodiments of the present application described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any variations thereof 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.

[0028] In order to better understand the embodiments of the present application, some nouns or terms that appear in the description of the embodiments of the present application are first translated and explained as follows:

[0029] On-Board Unit (OBU): A communication device installed on a vehicle to enable communication between the vehicle and road infrastructure, other vehicles or service systems.

[0030] Road Side Unit (RSU): Communication equipment installed on the roadside to enable communication between vehicles and infrastructure.

[0031] The Long Short-Term Memory (LSTM) network is a specialized recurrent neural network designed to address the vanishing and exploding gradient problems encountered by traditional recurrent neural networks when processing long sequences of data. By introducing memory cells and a gating mechanism, LSTM effectively captures and retains long-term dependencies. Specifically, the core components of an LSTM network include a forget gate, an input gate, a memory cell, and an output gate. The forget gate determines which information should be forgotten from the memory cell. It outputs a value between 0 and 1, representing the proportion of information to be retained, using a sigmoid activation function. The input gate determines which information will be stored in the memory cell. It generates candidate values ​​using sigmoid and Tanh activation functions. The memory cell selectively memorizes or forgets information through the interaction between the forget gate and the input gate. The output gate determines the next hidden state and controls the output of the memory cell using sigmoid and Tanh activation functions.

[0032] The Soft Actor-Critic (SAC) algorithm is a state-of-the-art reinforcement learning algorithm and a variant of the actor-critic algorithm. It addresses the stability and exploration issues of traditional algorithms by incorporating the concept of maximum entropy reinforcement learning. The key steps of the algorithm are as follows:

[0033] (1) Initialization:

[0034] (1) Initialize two groups of Q networks Used to calculate Q value;

[0035] (2) Initialize the strategy network π φ Sum value function network V ψ ;

[0036] (3) Create the target value function network V ψ′ , and set its parameter to V ψ′ The initial value of .

[0037] (2) Each round repeats the following steps:

[0038] (1) Sampling action:

[0039] According to the policy network π φ Sampling action a~π φ (a|s), and perform the action, recorded as (s,ar,s′,done) into the experience pool;

[0040] (2) Update Q network:

[0041] Update the Q value using the TD target: y = r + γ(1-done)Vψ′ (s′); and minimize the following loss function:

[0042] (3) Update the value function network:

[0043] Value function V ψ The goal is to approximate the following value: Minimize the value function loss:

[0044] (4) Update the strategy network:

[0045] The goal of the policy network is to maximize the reward and entropy, and therefore minimize the following loss function:

[0046] (5) Update the target value function network:

[0047] Update using the soft update rule: ψ′←τψ+(1-τ)ψ′.

[0048] Example 1

[0049] According to an embodiment of the present application, a vehicle networking system is first provided, such as Figure 1 As shown, the system includes: multiple roadside units 11 (a~n) and edge service nodes 11 (a~n) corresponding to the roadside units, and multiple vehicles (131, 132,..., 13n) under the coverage of each roadside unit, among which the edge service nodes are mainly MEC servers.

[0050] Figure 2 This is a more specific scenario diagram of the Internet of Vehicles system, such as Figure 2 As shown in the figure, in the connected vehicle system, a roadside unit and a MEC server are deployed at fixed intervals. The roadside unit and the MEC server have a one-to-one correspondence. The roadside unit provides communication services to users, and the MEC server provides computing services to users. The communication coverage of the roadside unit is a circular coverage area. However, to account for the overlapping coverage areas of adjacent roadside units, the embodiment of the present application uses an inscribed square with a side length of L to approximate the communication coverage area of ​​the roadside unit. In this scenario, multiple roadside units and multiple MEC servers work together to provide services to vehicles in the entire system.

[0051] Based on the above-mentioned Internet of Vehicles system, an embodiment of the present application also provides a vehicle video stream task offloading method. It should be noted that the steps shown in the flowchart of the accompanying drawings can be executed in a computer system such as a set of computer executable instructions, and although the logical order is shown in the flowchart, in some cases, the steps shown or described can be executed in an order different from that shown here.

[0052] Figure 3 FIG. 1 is a flow chart of a vehicle video stream task offloading method provided in accordance with an embodiment of the present application, such as Figure 3 As shown, the method includes the following steps:

[0053] Step S302 , obtaining task parameter information of video stream processing tasks respectively generated by a plurality of vehicles and environmental parameter information respectively corresponding to the plurality of vehicles, wherein the task parameter information at least includes: task data volume of the video stream processing task.

[0054] Step S304: for each video stream processing task, divide the video stream processing task into multiple subtasks, and determine the subtask data volume of each subtask based on the task data volume, and form a task sequence by the multiple subtasks and the subtask data volumes corresponding to the multiple subtasks.

[0055] In step S306, the pre-trained task offloading decision model is used to analyze the task sequence and environmental parameter information corresponding to the video stream processing task, and a subtask offloading strategy is derived for each subtask within the video stream processing task. The task offloading decision model is constructed based on a soft actor-critic network modified from a long short-term memory network. The subtask offloading strategy includes one of the following: processing the subtask locally on the vehicle or offloading the subtask to an edge computing node for processing.

[0056] Step S308 : For each subtask, uninstall the subtask according to the subtask uninstallation policy corresponding to the subtask.

[0057] The following describes the various steps of the vehicle video stream task offloading method in conjunction with a specific implementation process.

[0058] In the relevant video stream task offloading scheme, the video stream task is ideally processed locally or in the cloud, which leads to high data transmission delay, uneven distribution of computing resources, and difficulty in meeting the requirements of low latency and high reliability. To this end, the embodiment of the present application is that the MEC server determines whether the video stream processing task generated by each vehicle can be split. If it cannot be split, the task is directly offloaded through binary offloading. If it can be split, the video stream processing task is split into multiple subtasks, and the subtask data volume of each subtask is determined based on the task data volume. The task sequence is composed of multiple subtasks and the subtask data volumes corresponding to the multiple subtasks, and the edge computing task offloading decision algorithm based on deep reinforcement learning is used to determine the task offloading strategy corresponding to each vehicle.

[0059] As an optional implementation, the MEC server can divide the video stream processing task generated by each vehicle into multiple subtasks based on temporal continuity. For example, the video stream processing task can be divided into multiple subtasks at a fixed time interval (such as every second), where each subtask includes a certain number of consecutive video frames.

[0060] As another optional implementation, the MEC server can also divide the video stream processing task generated by each vehicle into multiple subtasks based on content continuity. For example, when the content of the video stream changes significantly (such as scene switching), the video stream can be segmented so that the content in each video segment is visually consistent, while there are obvious differences between different video segments. Alternatively, the video stream processing task generated by each vehicle is divided into multiple subtasks based on semantic continuity. For example, a video stream is divided into multiple video segments with the same subject or plot, so that the video frames in each video segment have a high degree of semantic similarity, while there are obvious semantic differences between different video segments.

[0061] In addition to the several implementation schemes listed above, based on the basic concept of the present invention, those skilled in the art can also implement the segmentation of video stream tasks through other technical solutions. For example, those skilled in the art may make changes to the above implementation schemes, which should also be within the scope of protection of the present invention.

[0062] As an optional implementation, in the technical solution provided in the above step S306, the structure diagram of the task offloading decision model is as follows: Figure 4 As shown, the task offloading decision model training process may include:

[0063] Step S1: construct an online value function network and a policy network, and initialize the network weight parameters of the online value function network and the policy network. The online value function network is used to solve the task offloading strategy of the video stream processing task. The policy network includes multiple task offloading strategies, and the task offloading strategy includes subtask offloading strategies of each subtask.

[0064] Step S2: Using the network weight parameters of the initialized value function network as the network parameters of the target value function network.

[0065] Step S3: Set up an experience pool and determine the capacity of the experience pool.

[0066] Step S4, iteratively solve the task offloading strategy and network weight parameters of the video stream processing task through the following steps until the preset iterative convergence conditions are met, and use the obtained target value function network as the task offloading decision model:

[0067] Step 1: Initialize the vehicle networking environment state. The vehicle networking environment state includes at least: the task sequence corresponding to each video stream processing task, the local computing power information corresponding to each vehicle, and the environment parameter information;

[0068] Step 2: Normalize the current state of the Internet of Vehicles environment (), input the normalized current Internet of Vehicles environment state into the policy network, obtain the corresponding task offloading strategy probability distribution, and sample a target task offloading strategy from the task offloading strategy probability distribution; input the normalized current Internet of Vehicles environment state and the target task offloading strategy into the online value function network to obtain the predicted Q value corresponding to the target task offloading strategy; execute the target task offloading strategy, obtain the corresponding reward and the new state of the Internet of Vehicles environment, and normalize the new state of the Internet of Vehicles environment; take the normalized current Internet of Vehicles environment state, the target task offloading strategy, the reward and the new state of the Internet of Vehicles environment as a sample, and store the sample in the experience pool; input multiple samples randomly sampled from the experience pool into the neural network containing the long short-term memory network, calculate the probability of each sample being sampled, the mean square error loss function and the loss function weight, and determine the target Q value corresponding to the target task offloading strategy based on the obtained calculation results; based on the predicted Q value and the target Q value corresponding to the target task offloading strategy, update the network weight parameters of the online value function network and the policy network by the gradient descent method;

[0069] Step 3: Based on the network weight parameters of the online value function network, the sampling soft update mechanism updates the network weight parameters of the target value function network.

[0070] It should be noted that the above-mentioned normalization of the current state of the Internet of Vehicles environment and the new state of the Internet of Vehicles environment is mainly to ensure that the environmental state is within a preset state space, so as to facilitate better convergence of the subsequent neural network including the long short-term memory network.

[0071] The experience pool can be a SumTree structure, and the samples in the experience pool are leaf nodes in the SumTree. When storing samples in the experience pool, the preset upper capacity limit of the experience pool can be determined first, and the capacity of the experience pool can be compared with the preset upper capacity limit. If the capacity of the experience pool is less than the preset upper capacity limit, the sample is stored in the experience pool. If the capacity of the experience pool is greater than or equal to the preset upper capacity limit, the sample is replaced with the oldest sample in the experience pool based on the first-in-first-out principle.

[0072] In the technical solution provided in the second step above, when calculating the predicted Q value corresponding to the target task offloading strategy, it can be done in the following way: based on the target task offloading strategy, the task sequence corresponding to each video stream processing task, and the vehicle parameter information and environmental parameter information corresponding to each vehicle, calculate the total offloading overhead corresponding to the target task offloading strategy, wherein the total offloading overhead includes: the time overhead and energy overhead of each video stream processing task, the time overhead includes: transmission delay, calculation delay, and video quality evaluation delay, and the energy overhead includes: transmission overhead and calculation overhead; based on the total offloading overhead corresponding to the target task offloading strategy, determine the predicted Q value corresponding to the target task offloading strategy, wherein the total offloading overhead is inversely proportional to the predicted Q value.

[0073] Among them, the local computing capacity information includes at least: the amount of computing resources available to the vehicle, and the environmental parameter information includes at least: the roadside unit location information and network transmission parameters corresponding to the vehicle.

[0074] Therefore, for each subtask in each video stream processing task, the subtask data volume of the subtask and all upstream subtasks corresponding to the subtask are determined according to the task sequence corresponding to the video stream processing task, and the subtask unloading strategy corresponding to the subtask is determined according to the task unloading strategy.

[0075] When the subtask offloading strategy is to locally process the subtask, the first computing overhead and the first computing delay of the local processing subtask are calculated based on the subtask data volume; the maximum time overhead among the first target time overheads corresponding to all upstream subtasks corresponding to the subtask is determined; the first computing overhead is used as the first target energy overhead of the subtask, and the sum of the first computing delay and the maximum time overhead is used as the first target time overhead of the subtask.

[0076] In the case where the subtask offloading strategy is to offload the subtask to the edge computing node, the second computing overhead, second computing delay and video quality evaluation delay of the edge computing node processing the subtask are calculated based on the subtask data volume; the transmission delay and transmission overhead of transmitting the subtask from the vehicle to the edge computing node are calculated based on the subtask data volume and environmental parameter information; the maximum time overhead among the first target time overheads corresponding to all upstream subtasks corresponding to the subtask is determined; the sum of the second computing overhead and the transmission overhead is used as the first target energy overhead of the subtask, and the sum of the second computing delay, video quality evaluation delay, transmission delay and maximum time overhead is used as the first target time overhead of the subtask;

[0077] The sum of the first target computing overhead of each subtask corresponding to the video stream processing task is used as the second target computing overhead of the video stream processing task, the sum of the first target transmission overhead of each subtask corresponding to the video stream processing task is used as the second target transmission overhead of the video stream processing task, the first target time overhead of the most downstream subtask corresponding to the video stream processing task is used as the second target time overhead of the video stream processing task, and the second target transmission overhead and the second target computing overhead are used as the second target energy overhead of the video stream processing task;

[0078] A weighted sum is taken of the second target time overhead and the second target energy overhead of all video stream processing tasks to obtain the total offloading overhead corresponding to the target task offloading strategy.

[0079] The following is an optional implementation method for calculating the system overhead of the Internet of Vehicles:

[0080] The task data volume of the video stream processing task generated by k vehicles within the coverage area of ​​a roadside unit can be expressed as: M = {M1, M2, ..., M k}, and the task data volume of the i-th task is M i It can be represented by the sum of the subtask data: Among them, m i,l Indicates the subtask data volume of the lth subtask in the i-th video stream processing task.

[0081] When the subtask is calculated by the vehicle's onboard unit, the expressions for the first computational latency and first computational cost of the subtask can be written as:

[0082]

[0083]

[0084] Where s represents the number of CPU cycles required to calculate each unit bit of data, and f local Indicates the amount of computing resources available to the vehicle (also known as computing power), P local Indicates the power consumed by the on-board unit to calculate unit bit of data.

[0085] When the subtask is calculated by the MEC server, the expressions of the first calculation delay and the first calculation cost of the subtask can be written as:

[0086]

[0087]

[0088] Among them, f MEC Indicates the available computing resources (computing power) of the MEC server, P MECIndicates the power consumed by the MEC server to calculate unit bit of data.

[0089] In the Internet of Vehicles system, when a vehicle generates a task processing request, the vehicle task is uploaded to the roadside unit in the current area and calculated by the MEC server in the current area. After the calculation is completed, it is returned to the vehicle.

[0090] During mission data transmission, considering that signals may be blocked by tunnels or buildings during actual transmission, a signal blockage indicator is added to distinguish the signal transmission capacity. Also, assuming that the vehicle communicates with the roadside unit in the current area via C-V2X technology, the wireless communication rate can be expressed as:

[0091]

[0092] Where q=[q x ,q y ,0] T Represents the vehicle's position information, p=[p x ,p y ,H] T represents the location information of the roadside unit, H represents the height of the MEC server, B represents the channel bandwidth between the vehicle and the MEC server, and p k represents the vehicle's transmission power, h k P represents the channel gain per unit distance between the vehicle and the MEC server for the video stream processing task. loss represents the transmission loss power, σ 2 represents the noise power, d k Indicates a sign of signal obstruction. When d k When it is 1, it means that the signal is blocked. On the contrary, when d k When it is 0, it means there is no signal obstruction.

[0093] When a subtask is calculated by the MEC server, the data transmission of the subtask needs to go through two stages: upload and return. In the upload stage, the subtask is uploaded to the MEC server in the current area for calculation. The transmission delay and the expression of transmission delay can be written as:

[0094]

[0095]

[0096] Among them, P k Indicates the power consumed per bit of data uploaded by the subtask.

[0097] In addition, in order to evaluate the quality of the processed video stream and take into account the autonomous learning ability of the system decision algorithm, the embodiment of the present application also introduces a video quality scoring mechanism. Taking into account the processing methods for different subtasks, the corresponding quality scores are different. To this end, the embodiment of the present application proposes to use a fitting function to evaluate the quality of the video clip corresponding to the subtask, where the function describes the relationship between the accuracy of the task detection model and the resolution of the video clip contained in the subtask.

[0098] During the scoring process, the detected task results can be compared with the objects detected in the highest resolution frame of the video clip contained in the subtask, and the F1 score can be used to calculate the accuracy of the video clip corresponding to the subtask. Therefore, after the subtask quality is evaluated, the expression for the additional video quality evaluation delay can be written as:

[0099]

[0100] Where m i,l represents the amount of subtask data of the lth subtask within the i-th video stream processing task, and i∈[1,k], l∈[1,L], k represents the total number of video stream processing tasks generated by multiple vehicles, L represents the number of subtasks obtained by splitting the video stream processing task, and f MEC Indicates the amount of computing resources available on the edge computing node within the edge node computing capability information. A represents the video quality evaluation delay of the lth subtask within the i-th video stream processing task, i,l represents the fitting function for scoring the target detection accuracy of the task processing quality of the lth subtask in the i-th video stream processing task offloaded to the edge computing node, where A is the target detection accuracy score. i,l It can be infinite, in which case there is no additional energy consumption.

[0101] The first target time cost of the subtask is T i,L The total computation and transmission delay T of the current subtask i,l and the largest first target time cost A among all upstream sub-vehicle tasks i,prel =max(A i,pre1 ,…,A i,prel-1 ). Specifically, the calculation formula for the total computation and transmission delay of the subtask is:

[0102]

[0103] Therefore, the first target time cost of the subtask is:

[0104] T i,L =T i,l +A i,prel

[0105] Among them, a i,l Represents the subtask offloading decision of the subtask, when a i,l = 1, the sub-vehicle task is processed locally. When a i,l = 0, the sub-vehicle task is offloaded to the MEC server, A i,prel It is the maximum value of the sum of the total computation and transmission delays from the first subtask to the previous subtask of the current subtask in the entire video stream processing task.

[0106] When the most downstream subtask (the last subtask after sequential division) in the video stream processing task completes the offloading decision, it indicates that all subtasks in the video stream processing task have completed the offloading decision. Therefore, the second target time cost of the video stream processing task can be expressed as:

[0107] T i =T i,L | cur=L

[0108] Among them, T i represents the second target time cost of the i-th video stream processing task, T i,L Indicates the first target time overhead of the most downstream subtask of the video stream processing task. The two values ​​are equal.

[0109] At this time, the second target energy cost of the video stream processing task is composed of the first target transmission cost and the first target calculation cost of each subtask, and its calculation formula is:

[0110]

[0111] Finally, the total offloading cost of the Internet of Vehicles system is the weighted sum of the second objective computation cost and the second objective energy cost of all vehicle tasks. The overall system goal is to optimize the variable offloading decision a i,l , so that the total unloading overhead of the entire system is minimized. The specific formula can be written as:

[0112]

[0113] And it has the following constraints:

[0114] (1) It represents the weight parameter factor of time cost and energy cost;

[0115] (2)a i,l ∈{0,1}, which represents the subtask offloading decision of the sub-vehicle task;

[0116] (3)T i ≤T i,max: Indicates that the total delay of each vehicle task must not be greater than its maximum tolerable delay;

[0117] (4) Indicates that the total computing resources required for the video stream processing task cannot exceed the maximum computing resources of the MEC server.

[0118] Furthermore, the task offloading decision model obtained through the above training can obtain the subtask offloading strategy corresponding to each subtask in each video stream processing task, and offload the subtasks according to the subtask offloading strategy corresponding to each subtask, ensuring that the total overhead of the Internet of Vehicles system is minimized.

[0119] In actual application, the task parameter information of the video stream processing tasks generated by multiple vehicles and the environmental parameter information corresponding to the multiple vehicles are obtained; for each video stream processing task, the video stream processing task is divided into multiple subtasks, and the subtask data volume of each subtask is determined according to the task data volume, and a task sequence is composed of multiple subtasks and the subtask data volumes corresponding to the multiple subtasks in sequence; the task offloading decision model is used to analyze the task sequence and environmental parameter information corresponding to the video stream processing task, and the subtask offloading strategy corresponding to each subtask in the video stream processing task is obtained, including: local processing of subtasks by the vehicle, processing of subtasks to the edge computing node; and offloading of subtasks according to the subtask offloading strategy corresponding to each subtask.

[0120] In the embodiment of the present application, by creatively combining vehicle video streaming tasks with the edge computing technology of the Internet of Vehicles, the advantages of edge computing are fully utilized to more efficiently process real-time video streaming data, significantly reduce data transmission delays, improve the utilization of computing resources, and meet the strict requirements of autonomous driving and Internet of Vehicles applications. At the same time, a task offloading decision model based on a deep reinforcement learning algorithm (combined with a soft actor-critic algorithm and a long short-term memory network) is adopted to determine the optimal subtask offloading strategy corresponding to each subtask based on historical data and the current environment, thereby realizing the intelligence and adaptability of offloading decisions. Among them, the long short-term memory network can capture dynamic environmental changes, enabling the decision-making strategy to have long-term learning capabilities, thereby better responding to changes in usage scenarios; and the soft actor-critic algorithm can be combined with an entropy regulation mechanism to encourage algorithm exploration, avoid the strategy from falling into a local optimal solution, and improve the global optimization ability of the decision. In addition, when deciding on the task offloading strategy, the embodiment of the present application also considers the impact of the calculation process on video quality, ensuring that the offloading decision takes into account both computing efficiency and video processing quality, avoiding the reduction in autonomous driving decision accuracy caused by reduced frame rate or resolution, thereby improving the reliability and safety of the system.

[0121] Example 2

[0122] According to an embodiment of the present application, a vehicle video stream task unloading device for implementing the vehicle video stream task unloading method in embodiment 1 is also provided. Figure 5 As shown, the vehicle video stream task offloading device at least includes: an acquisition module 52, a division module 54, a decision module 56 and an offloading module 58, wherein:

[0123] An acquisition module 52 is configured to acquire task parameter information of video stream processing tasks respectively generated by a plurality of vehicles and environmental parameter information respectively corresponding to the plurality of vehicles, wherein the task parameter information includes at least: a task data volume of the video stream processing task;

[0124] a division module 54 for dividing each video stream processing task into a plurality of subtasks, and determining a subtask data volume of each subtask based on the task data volume, and sequentially forming a task sequence by the plurality of subtasks and the subtask data volumes corresponding to the plurality of subtasks;

[0125] A decision module 56 is configured to analyze the task sequence and environmental parameter information corresponding to the video stream processing task using a pre-trained task offloading decision model to obtain a subtask offloading strategy corresponding to each subtask within the video stream processing task. The task offloading decision model is constructed based on a soft actor-critic network improved from a long short-term memory network. The subtask offloading strategy includes one of the following: processing the subtask locally on the vehicle or transferring the subtask to an edge computing node for processing.

[0126] The unloading module 58 is configured to unload each subtask according to a subtask unloading policy corresponding to the subtask.

[0127] The following describes the functions of each module of the vehicle video stream task offloading device in conjunction with a specific implementation process.

[0128] As an optional embodiment, the division module 54 can divide the video stream processing task generated by each vehicle into multiple subtasks based on temporal continuity. For example, the video stream processing task can be divided into multiple subtasks at fixed time intervals (e.g., every second), where each subtask includes a certain number of consecutive video frames.

[0129] As another optional implementation, the segmentation module 54 can also divide the video stream processing task generated by each vehicle into multiple subtasks based on content continuity. For example, when the content of the video stream changes significantly (such as a scene switch), the video stream can be segmented so that the content within each video segment is visually consistent, while there are obvious differences between different video segments. Alternatively, the video stream processing task generated by each vehicle can be segmented into multiple subtasks based on semantic continuity. For example, a video stream can be segmented into multiple video segments with the same subject or plot, so that the video frames within each video segment have high semantic similarity, while there are obvious semantic differences between different video segments.

[0130] In addition to the several implementation schemes listed above, based on the basic concept of the present invention, those skilled in the art can also implement the segmentation of video stream tasks through other technical solutions. For example, those skilled in the art may make changes to the above implementation schemes, which should also be within the scope of protection of the present invention.

[0131] As an optional implementation, the task offloading decision model can be trained in the following way:

[0132] Step S1: construct an online value function network and a policy network, and initialize the network weight parameters of the online value function network and the policy network. The online value function network is used to solve the task offloading strategy of the video stream processing task. The policy network includes multiple task offloading strategies, and the task offloading strategy includes subtask offloading strategies of each subtask.

[0133] Step S2, using the network weight parameters of the initialized online value function network as the network parameters of the target value function network;

[0134] Step S3: setting up an experience pool and determining the capacity of the experience pool;

[0135] Step S4, iteratively solve the task offloading strategy and network weight parameters of the video stream processing task through the following steps until the preset iterative convergence conditions are met, and use the obtained target value function network as the task offloading decision model:

[0136] Step 1: Initialize the vehicle networking environment state, where the vehicle networking environment state includes at least: the task sequence corresponding to each video stream processing task, the local computing capacity information corresponding to each vehicle, and the environment parameter information;

[0137] Step 2: Normalize the current state of the Internet of Vehicles environment, input the normalized current state of the Internet of Vehicles environment into the policy network, obtain the corresponding task offloading strategy probability distribution, and sample a target task offloading strategy from the task offloading strategy probability distribution; input the normalized current state of the Internet of Vehicles environment and the target task offloading strategy into the online value function network, calculate the predicted Q value corresponding to the target task offloading strategy; execute the target task offloading strategy, obtain the corresponding reward and the new state of the Internet of Vehicles environment, and normalize the new state of the Internet of Vehicles environment; take the normalized current state of the Internet of Vehicles environment, the target task offloading strategy, the reward and the new state of the Internet of Vehicles environment as a sample, and store the sample in the experience pool; input multiple samples randomly sampled from the experience pool into the neural network containing the long short-term memory network, calculate the probability of each sample being sampled, the mean square error loss function and the loss function weight, and determine the target Q value corresponding to the target task offloading strategy based on the obtained calculation results; based on the predicted Q value and the target Q value corresponding to the target task offloading strategy, update the network weight parameters of the online value function network and the policy network by the gradient descent method;

[0138] Step 3: Based on the network weight parameters of the online value function network, the sampling soft update mechanism updates the network weight parameters of the target value function network.

[0139] The experience pool can be a SumTree structure, and the samples in the experience pool are leaf nodes in the SumTree. When storing samples in the experience pool, the preset upper capacity limit of the experience pool can be determined first, and the capacity of the experience pool can be compared with the preset upper capacity limit. If the capacity of the experience pool is less than the preset upper capacity limit, the sample is stored in the experience pool. If the capacity of the experience pool is greater than or equal to the preset upper capacity limit, the sample is replaced with the oldest sample in the experience pool based on the first-in-first-out principle.

[0140] In the technical solution provided in the second step above, when calculating the predicted Q value corresponding to the target task offloading strategy, it can be done in the following way: based on the target task offloading strategy, the task sequence corresponding to each video stream processing task, and the vehicle parameter information and environmental parameter information corresponding to each vehicle, calculate the total offloading overhead corresponding to the target task offloading strategy, wherein the total offloading overhead includes: the time overhead and energy overhead of each video stream processing task, the time overhead includes: transmission delay, calculation delay, and video quality evaluation delay, and the energy overhead includes: transmission overhead and calculation overhead; based on the total offloading overhead corresponding to the target task offloading strategy, determine the predicted Q value corresponding to the target task offloading strategy, wherein the total offloading overhead is inversely proportional to the predicted Q value.

[0141] Among them, the local computing capacity information includes at least: the amount of computing resources available to the vehicle, and the environmental parameter information includes at least: the roadside unit location information and network transmission parameters corresponding to the vehicle.

[0142] Therefore, for each subtask in each video stream processing task, the subtask data volume of the subtask and all upstream subtasks corresponding to the subtask are determined according to the task sequence corresponding to the video stream processing task, and the subtask unloading strategy corresponding to the subtask is determined according to the task unloading strategy.

[0143] When the subtask offloading strategy is to locally process the subtask, the first computing overhead and the first computing delay of the local processing subtask are calculated based on the subtask data volume; the maximum time overhead among the first target time overheads corresponding to all upstream subtasks corresponding to the subtask is determined; the first computing overhead is used as the first target energy overhead of the subtask, and the sum of the first computing delay and the maximum time overhead is used as the first target time overhead of the subtask.

[0144] In the case where the subtask offloading strategy is to offload the subtask to the edge computing node, the second computing overhead, second computing delay and video quality evaluation delay of the edge computing node processing the subtask are calculated based on the subtask data volume; the transmission delay and transmission overhead of transmitting the subtask from the vehicle to the edge computing node are calculated based on the subtask data volume and environmental parameter information; the maximum time overhead among the first target time overheads corresponding to all upstream subtasks corresponding to the subtask is determined; the sum of the second computing overhead and the transmission overhead is used as the first target energy overhead of the subtask, and the sum of the second computing delay, video quality evaluation delay, transmission delay and maximum time overhead is used as the first target time overhead of the subtask;

[0145] The sum of the first target computing overhead of each subtask corresponding to the video stream processing task is used as the second target computing overhead of the video stream processing task, the sum of the first target transmission overhead of each subtask corresponding to the video stream processing task is used as the second target transmission overhead of the video stream processing task, the first target time overhead of the most downstream subtask corresponding to the video stream processing task is used as the second target time overhead of the video stream processing task, and the second target transmission overhead and the second target computing overhead are used as the second target energy overhead of the video stream processing task;

[0146] A weighted sum is taken of the second target time overhead and the second target energy overhead of all video stream processing tasks to obtain the total offloading overhead corresponding to the target task offloading strategy.

[0147] It should be noted that the modules in the vehicle video stream task unloading device in the embodiment of the present application correspond one-to-one to the implementation steps of the vehicle video stream task unloading method in Example 1. Since a detailed description has been given in Example 1, some details not reflected in this embodiment can be referred to Example 1 and will not be elaborated here.

[0148] Example 3

[0149] According to an embodiment of the present application, a computer program product is also provided, which includes a computer program, wherein when the computer program is executed by a processor, the vehicle video stream task offloading method in Example 1 is implemented.

[0150] According to an embodiment of the present application, a non-volatile storage medium is also provided, which includes a stored computer program, wherein the device where the non-volatile storage medium is located executes the vehicle video stream task unloading method in Example 1 by running the computer program.

[0151] According to an embodiment of the present application, a processor is also provided, which is used to run a computer program, wherein the vehicle video stream task offloading method in Example 1 is executed when the computer program is running.

[0152] According to an embodiment of the present application, an electronic device is also provided, which includes: a memory and a processor, wherein a computer program is stored in the memory, and the processor is configured to execute the vehicle video stream task unloading method in Example 1 through the computer program.

[0153] Specifically, the computer program executes the following steps when it is running: obtaining task parameter information of video stream processing tasks generated by multiple vehicles and environmental parameter information corresponding to the multiple vehicles, wherein the task parameter information includes at least: the task data volume of the video stream processing task; for each video stream processing task, dividing the video stream processing task into multiple subtasks, and determining the subtask data volume of each subtask based on the task data volume, and sequentially forming a task sequence by the multiple subtasks and the subtask data volumes corresponding to the multiple subtasks; using a pre-trained task offloading decision model to analyze the task sequence and environmental parameter information corresponding to the video stream processing task, and obtaining a subtask offloading strategy corresponding to each subtask in the video stream processing task, wherein the task offloading decision model is constructed based on a soft actor-critic network improved based on a long short-term memory network, and the subtask offloading strategy includes one of the following: processing the subtask locally on the vehicle, processing the subtask to an edge computing node; for each subtask, offloading the subtask according to the subtask offloading strategy corresponding to the subtask.

[0154] As an optional implementation, the electronic device may be in the form of a mobile terminal, a computer terminal or a similar computing device. Figure 6 The hardware structure block diagram of an electronic device for implementing a vehicle video stream task offloading method is shown. Figure 6 As shown, the electronic device 60 may include one or more (illustrated by 602a, 602b, ..., 602n in the figure) processors 602 (the processor 602 may include but is not limited to a processing device such as a microprocessor MCU or a programmable logic device FPGA), a memory 604 for storing data, and a transmission device 606 for communication functions. In addition, it may also include: a display, an input / output interface (I / O interface), a universal serial bus (USB) port (which may be included as one of the ports of the BUS bus), a network interface, a power supply and / or a camera. It will be understood by those skilled in the art that Figure 6 The structure shown is only for illustration and does not limit the structure of the above electronic device. Figure 6 More or fewer components than shown, or with Figure 6 Different configurations shown.

[0155] It should be noted that the one or more processors 602 and / or other data processing circuits described above may generally be referred to herein as "data processing circuitry". The data processing circuitry may be embodied in whole or in part as software, hardware, firmware, or any other combination thereof. In addition, the data processing circuitry may be a single independent processing module, or may be incorporated in whole or in part into any of the other components of the electronic device 60. As described in the embodiments of the present application, the data processing circuitry serves as a processor control (e.g., selection of a variable resistor terminal path connected to an interface).

[0156] The memory 604 can be used to store software programs and modules of application software, such as the program instructions / data storage device corresponding to the vehicle video stream task offloading method in the embodiment of the present application. The processor 602 executes various functional applications and data processing by running the software programs and modules stored in the memory 604, that is, implementing the vulnerability detection method of the above-mentioned application. The memory 604 may include a high-speed random access memory and may also include a non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some examples, the memory 604 may further include a memory remotely located relative to the processor 602, and these remote memories may be connected to the electronic device 60 via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.

[0157] The transmission device 606 is used to receive or send data via a network. Specific examples of the aforementioned network may include a wireless network provided by the communications provider of the electronic device 60. In one embodiment, the transmission device 606 includes a network interface controller (NIC), which can be connected to other network devices via a base station to enable communication with the Internet. In another embodiment, the transmission device 606 may be a radio frequency (RF) module, which is used to communicate with the Internet wirelessly.

[0158] The display may be, for example, a touch screen liquid crystal display (LCD) that enables a user to interact with a user interface of the electronic device 60 .

[0159] The serial numbers of the above embodiments are for description only and do not represent the advantages or disadvantages of the embodiments.

[0160] In the above embodiments of the present application, the description of each embodiment has its own focus. For parts that are not described in detail in a certain embodiment, please refer to the relevant description of other embodiments.

[0161] 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 exemplary. For example, the division of units can be a logical function division. In actual implementation, there may be other division methods, such as 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.

[0162] Units described as separate components may or may not be physically separate, and components shown as units may or may not be physical units, that is, they may be located in one place or distributed across multiple units. Some or all of the units may be selected to achieve the purpose of the present embodiment according to actual needs.

[0163] In addition, the functional units in the various embodiments of the present application may be integrated into a single processing unit, or each unit may exist physically separately, or two or more units may be integrated into a single unit. The aforementioned integrated units may be implemented in the form of hardware or software functional units.

[0164] 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 application is essentially 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, and the computer software product is stored in a storage medium, including a number of instructions for enabling a computer device (which can be a personal computer, server or network device, etc.) to execute all or part of the steps of the various embodiments of the present application. The aforementioned storage medium includes: U disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), mobile hard disk, magnetic disk or optical disk and other media that can store program code.

[0165] The above is only a preferred embodiment of the present application. It should be pointed out that for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the principles of the present application. These improvements and modifications should also be regarded as the scope of protection of the present application.

Claims

1. A vehicle video stream task offloading method, characterized in that: include: Acquire task parameter information of video stream processing tasks respectively generated by a plurality of vehicles and environmental parameter information respectively corresponding to the plurality of vehicles, wherein the task parameter information includes at least: a task data volume of the video stream processing task; For each of the video stream processing tasks, the video stream processing task is divided into a plurality of subtasks, and the subtask data volume of each of the subtasks is determined according to the task data volume, and a task sequence is sequentially formed by the plurality of subtasks and the subtask data volumes corresponding to the plurality of subtasks; A pre-trained task offloading decision model is used to analyze the task sequence corresponding to the video stream processing task and the environmental parameter information to obtain a subtask offloading strategy corresponding to each subtask within the video stream processing task. The task offloading decision model is constructed based on a soft actor-critic network improved by a long short-term memory network. The subtask offloading strategy includes one of the following: processing the subtask locally in the vehicle or transferring the subtask to an edge computing node for processing; For each of the subtasks, the subtask is uninstalled according to the subtask uninstallation policy corresponding to the subtask.

2. The method according to claim 1, characterized in that The training process of the task offloading decision model includes: Constructing an online value function network and a policy network, and initializing network weight parameters of the online value function network and the policy network, wherein the online value function network is used to solve the task offloading strategy of the video stream processing task, the policy network includes multiple task offloading strategies, and the task offloading strategy includes subtask offloading strategies of each subtask; Using the initialized network weight parameters of the online value function network as the network parameters of the target value function network; Set up an experience pool and determine its capacity; The task offloading strategy and network weight parameters of the video stream processing task are iteratively solved through the following steps until the preset iterative convergence conditions are met, and the obtained target value function network is used as the task offloading decision model: Step 1: Initializing the vehicle networking environment state, wherein the vehicle networking environment state includes at least: a task sequence corresponding to each video stream processing task, local computing capability information corresponding to each vehicle, and environmental parameter information; Step 2: Normalize the current state of the Internet of Vehicles environment, input the normalized current state of the Internet of Vehicles environment into the policy network, obtain the corresponding task offloading strategy probability distribution, and sample a target task offloading strategy from the task offloading strategy probability distribution; input the normalized current state of the Internet of Vehicles environment and the target task offloading strategy into the online value function network, calculate the predicted Q value corresponding to the target task offloading strategy; execute the target task offloading strategy, obtain the corresponding reward and the new state of the Internet of Vehicles environment, and normalize the new state of the Internet of Vehicles environment; normalize The current state of the Internet of Vehicles environment, the target task offloading strategy, the reward, and the new state of the Internet of Vehicles environment are taken as a sample, and the sample is stored in the experience pool; a plurality of samples randomly sampled from the experience pool are input into a neural network including a long short-term memory network, the probability of each sample being sampled, the mean square error loss function, and the loss function weight are calculated, and the target Q value corresponding to the target task offloading strategy is determined based on the obtained calculation results; based on the predicted Q value and the target Q value corresponding to the target task offloading strategy, the network weight parameters of the online value function network and the policy network are updated by the gradient descent method; Step 3: Based on the network weight parameters of the online value function network, the sampling soft update mechanism updates the network weight parameters of the target value function network.

3. The method according to claim 2, characterized in that Storing the sample in the experience pool includes: Determining a preset capacity upper limit of the experience pool, and comparing the capacity of the experience pool with the preset capacity upper limit; If the capacity of the experience pool is less than the preset capacity upper limit, storing the sample in the experience pool; If the capacity of the experience pool is greater than or equal to the preset capacity upper limit, based on the first-in-first-out principle, the sample is used to replace the earliest sample stored in the experience pool.

4. The method according to claim 2, characterized in that Inputting the normalized current Internet of Vehicles environment state and the target task offloading strategy into the online value function network, and calculating the predicted Q value corresponding to the target task offloading strategy, including: Based on the target task offloading strategy, the task sequence corresponding to each of the video stream processing tasks, and the vehicle parameter information and environmental parameter information corresponding to each of the vehicles, the total offloading overhead corresponding to the target task offloading strategy is calculated, wherein the total offloading overhead includes: the time overhead and energy overhead of each of the video stream processing tasks, the time overhead includes: transmission delay, calculation delay, and video quality evaluation delay, and the energy overhead includes: transmission overhead and calculation overhead; The predicted Q value corresponding to the target task offloading strategy is determined according to the total offloading cost corresponding to the target task offloading strategy, wherein the total offloading cost is in inverse proportion to the predicted Q value.

5. The method according to claim 4, characterized in that The environmental parameter information includes at least: the roadside unit location information corresponding to the vehicle and network transmission parameters. The total offloading overhead corresponding to the task offloading strategy is calculated based on the task offloading strategy, the task sequence corresponding to each of the video stream processing tasks, and the vehicle parameter information and environmental parameter information corresponding to each of the vehicles, including: For each subtask in each of the video stream processing tasks, determine the subtask data volume of the subtask and all upstream subtasks corresponding to the subtask according to the task sequence corresponding to the video stream processing task, and determine the subtask offloading strategy corresponding to the subtask according to the task offloading strategy; In the case where the subtask offloading strategy is to locally process the subtask, a first computing overhead and a first computing delay for locally processing the subtask are calculated based on the subtask data volume; a maximum time overhead among the first target time overheads corresponding to all upstream subtasks corresponding to the subtask is determined; the first computing overhead is used as the first target energy overhead of the subtask, and the sum of the first computing delay and the maximum time overhead is used as the first target time overhead of the subtask; In the case where the subtask offloading strategy is to offload the subtask to the edge computing node, the second computing overhead, the second computing delay and the video quality evaluation delay of the edge computing node in processing the subtask are calculated based on the subtask data volume; the transmission delay and the transmission overhead of transmitting the subtask from the vehicle to the edge computing node are calculated based on the subtask data volume and the environmental parameter information; the maximum time overhead among the first target time overheads corresponding to all upstream subtasks corresponding to the subtask is determined; the sum of the second computing overhead and the transmission overhead is used as the first target energy overhead of the subtask, and the sum of the second computing delay, the video quality evaluation delay, the transmission delay and the maximum time overhead is used as the first target time overhead of the subtask; For each video stream processing task, the sum of the first target computing overhead of each subtask corresponding to the video stream processing task is used as the second target computing overhead of the video stream processing task, the sum of the first target transmission overhead of each subtask corresponding to the video stream processing task is used as the second target transmission overhead of the video stream processing task, the first target time overhead of the most downstream subtask corresponding to the video stream processing task is used as the second target time overhead of the video stream processing task, and the second target transmission overhead and the second target computing overhead are used as the second target energy overhead of the video stream processing task; A weighted sum is taken of the second target time overhead and the second target energy overhead of all the video stream processing tasks to obtain a total offloading overhead corresponding to the target task offloading strategy.

6. The method according to claim 5, characterized in that The edge computing capability includes at least the amount of available edge computing resources, wherein the expression of the video quality evaluation delay is: Where m i,l represents the amount of subtask data of the lth subtask within the i-th video stream processing task, and i∈[1,k], l∈[1,L], k represents the total number of video stream processing tasks generated by the multiple vehicles, L represents the number of subtasks obtained by splitting the video stream processing task, and f MEC Indicates the amount of computing resources available at the edge computing node in the edge node computing capability information. A represents the video quality evaluation delay of the lth subtask in the i-th video stream processing task, i,l Represents a fitting function for scoring target detection accuracy for the task processing quality of the subtask offloaded to the edge computing node in the i-th video stream processing task.

7. The method according to claim 1, characterized in that The video stream processing task is divided into multiple subtasks, including: The video stream processing task is divided into a plurality of subtasks according to a preset dimension, wherein the preset dimension includes at least one of the following: time continuity, content continuity, and semantic continuity.

8. A vehicle video stream task offloading device, characterized in that: include: An acquisition module is used to obtain task parameter information of video stream processing tasks respectively generated by multiple vehicles and environmental parameter information corresponding to the multiple vehicles, wherein the task parameter information at least includes: the task data volume of the video stream processing task; a partitioning module, configured to divide each of the video stream processing tasks into a plurality of subtasks, and determine a subtask data volume of each subtask according to the task data volume, and sequentially form a task sequence by the plurality of subtasks and the subtask data volumes corresponding to the plurality of subtasks; A decision module is configured to analyze the task sequence corresponding to the video stream processing task and the environmental parameter information using a pre-trained task offloading decision model to obtain a subtask offloading strategy corresponding to each subtask within the video stream processing task, wherein the task offloading decision model is constructed based on a soft actor-critic network improved from a long short-term memory network, and the subtask offloading strategy includes one of the following: processing the subtask locally on the vehicle or transferring the subtask to an edge computing node for processing; The unloading module is configured to unload each of the subtasks according to a subtask unloading strategy corresponding to the subtask.

9. A computer program product, characterized in that include: A computer program, wherein when the computer program is executed by a processor, it implements the vehicle video stream task offloading method according to any one of claims 1 to 7.

10. An electronic device, characterized in that: include: A memory and a processor, wherein the memory stores a computer program, and the processor is configured to execute the vehicle video stream task offloading method according to any one of claims 1 to 7 through the computer program.