Abstract:
A method and an apparatus for processing a data packet based on parallel protocol stack instances and the method includes determining a distribution policy of a data packet according to distribution policy information of a network adapter, determining a first protocol stack instance according to the distribution policy of the data packet, and creating a target socket in the first protocol stack instance such that when the data packet is distributed to the first protocol stack instance, the first protocol stack instance performs protocol processing on the data packet using the target socket. Hence, a case in which a protocol stack instance that is specified for the target socket by an application conflicts with a protocol stack instance specified by a network adapter is avoided, and a technical problem that protocol processing cannot be performed on the data packet is resolved.
Abstract:
A data processing apparatus and a data processing method are provided. The apparatus includes M protocol stacks and at least one distribution service module, and the M protocol stacks separately run on different logic cores of a processor and are configured to independently perform protocol processing on a data packet to be processed. The distribution service module receives an input data packet from a network interface and sends the data packet to one of the M protocol stacks for protocol processing, and receives data packets processed by the M protocol stacks and sends the data packets outwards through the network interface. The present disclosure implements a function of parallel protocol processing by multiple processes in user space of an operating system in a multi-core environment by using a parallel processing feature of a multi-core system, thereby reducing resource consumption caused by data packet copying.
Abstract:
A method and an apparatus for processing a data packet based on parallel protocol stack instances and the method includes determining a distribution policy of a data packet according to distribution policy information of a network adapter, determining a first protocol stack instance according to the distribution policy of the data packet, and creating a target socket in the first protocol stack instance such that when the data packet is distributed to the first protocol stack instance, the first protocol stack instance performs protocol processing on the data packet using the target socket. Hence, a case in which a protocol stack instance that is specified for the target socket by an application conflicts with a protocol stack instance specified by a network adapter is avoided, and a technical problem that protocol processing cannot be performed on the data packet is resolved.
Abstract:
A method and computing device for selecting a protocol stack for performing protocol processing on data is presented. The computing device is configured with a hypervisor for managing a first virtual machine. According to the method, when a socket creation instruction sent by the first virtual machine is received, a protocol stack instance is selected from the protocol stack instances provided by the computing device. Then, a socket is created in the selected protocol stack instance according to the socket creation instruction; and a creation result is transmitted to the first virtual machine. Therefore, in a virtualized environment, multiple virtual machines disposed in a same computing device can share a network protocol processing capability, and protocol stacks of the virtual machines achieve load balance.
Abstract:
This application provides a method for determining an automatic parking strategy. The method includes: determining, a target parking action corresponding to a current parking stage performing the target parking action; obtaining feedback information, where the feedback information is used to indicate whether a result of performing the target parking action reaches a predetermined objective, and the predetermined objective is a predetermined position of the vehicle relative to a target parking spot, and/or the predetermined objective is a status of the vehicle in the parking process; and updating the automatic parking strategy based on the feedback information. In the foregoing method, the entire parking process is divided into several parking stages, and a control strategy is obtained by using a different method at each stage. This can increase a success rate of automatic parking in a complex parking scenario.
Abstract:
A method includes photographing a first picture, the first picture including a signal light at a first intersection; and detecting a signal light status in the first picture by using a first detection model. The first detection model is a detection model corresponding to the first intersection. The first detection model is obtained by a server through training based on signal light pictures corresponding to the first intersection and signal light statuses in the signal light pictures. The signal light statuses in the signal light pictures are obtained through detection by using a general model. The general model is obtained through training based on pictures in a first set and a signal light status in each picture in the first set. The first set includes signal light pictures of a plurality of intersections.
Abstract:
A method for mapping between a virtual central processing unit (CPU) and a physical CPU. The method includes obtaining, by a virtual machine manager, a set of to-be-mapped first virtual CPUs in a current time period and a first physical CPU that has fewest to-be-run tasks, obtaining, by the virtual machine manager, a first characteristic value of each first virtual CPU in the set of first virtual CPUs and a second characteristic value of the first physical CPU, obtaining, by the virtual machine manager from all the first characteristic values, a target characteristic value that matches the second characteristic value, and mapping a target virtual CPU corresponding to the target characteristic value to the first physical CPU for running. By means of the foregoing technical solutions, resource contention and a decrease in overall system performance are avoided when mapping a virtual CPU to a physical CPU.
Abstract:
A method for mapping between a virtual central processing unit (CPU) and a physical CPU. The method includes obtaining, by a virtual machine manager, a set of to-be-mapped first virtual CPUs in a current time period and a first physical CPU that has fewest to-be-run tasks, obtaining, by the virtual machine manager, a first characteristic value of each first virtual CPU in the set of first virtual CPUs and a second characteristic value of the first physical CPU, obtaining, by the virtual machine manager from all the first characteristic values, a target characteristic value that matches the second characteristic value, and mapping a target virtual CPU corresponding to the target characteristic value to the first physical CPU for running. By means of the foregoing technical solutions, resource contention and a decrease in overall system performance are avoided when mapping a virtual CPU to a physical CPU.
Abstract:
This application provides a parameter calibration method and apparatus that may be applied to vehicles such as an intelligent vehicle, a new energy vehicle, a connected vehicle, and an intelligent driving vehicle. The method includes: obtaining evaluation results of parameter combinations of a plurality of devices, where the evaluation results of the parameter combinations of the plurality of devices are obtained by respectively performing calibration tests by the plurality of devices in a first time period based on the parameter combinations of the plurality of devices; and obtaining at least one adjusted parameter combination based on the evaluation results of the parameter combinations of the plurality of devices.
Abstract:
This application provides a method for determining an automatic parking strategy. The method includes: determining, a target parking action corresponding to a current parking stage performing the target parking action; obtaining feedback information, where the feedback information is used to indicate whether a result of performing the target parking action reaches a predetermined objective, and the predetermined objective is a predetermined position of the vehicle relative to a target parking spot, and/or the predetermined objective is a status of the vehicle in the parking process; and updating the automatic parking strategy based on the feedback information. In the foregoing method, the entire parking process is divided into several parking stages, and a control strategy is obtained by using a different method at each stage. This can increase a success rate of automatic parking in a complex parking scenario.