Data processing method and device for virtualization equipment

By marking the status of the virtual function data queue in the cloud environment and filtering and processing it, the delay problem in the data processing of virtual function in the cloud environment is solved, and efficient data processing and overall efficiency improvement are achieved.

CN119690588APending Publication Date: 2025-03-25JD DIGITS HAIYI INFORMATION TECHNOLOGY CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411814425.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-10
Publication Date
2025-03-25

AI Technical Summary

Technical Problem

In a cloud environment, when network cards process data of virtual functions, they usually use polling, which results in the fact that when most disk virtual functions have no traffic, a few virtual functions with traffic must wait, resulting in unnecessary delays.

Method used

By marking the data queue status of the virtual function in the traffic status table and performing targeted processing based on the status, the target virtual functions with data pending are selected to avoid undifferentiated polling.

Benefits of technology

It realizes that every processing hits traffic, avoids losses and delays caused by indiscriminate polling, improves processing efficiency, and achieves overall efficiency improvement in multi-traffic state scenarios.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119690588A_ABST
    Figure CN119690588A_ABST
Patent Text Reader

Abstract

The invention discloses a data processing method and device for virtualization equipment. The method comprises the following steps: in response to data to be processed in a data queue corresponding to a virtual function, marking a state corresponding to an identifier of the virtual function in a flow state table as data to be processed; polling the state corresponding to the identifier of the virtual function in the flow state table, screening out the identifier of a target virtual function of which the state is that the data is to be processed, and processing the data in the data queue corresponding to the target virtual function. According to the method, the flow is hit by processing the virtual functions each time, so that loss and delay caused by indifference polling when few virtual functions have the flow are avoided, and the processing efficiency is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of cloud storage technology, and in particular to a data processing method and device for a virtualized device. Background Art

[0002] In cloud environments, virtualized devices such as network cards and disks that support virtualization often enable virtual functions (VFs) to provide virtual machines and containers with network and storage access capabilities close to hardware performance. For this scenario, the network card can offload the network and storage protocol parsing processing from the cloud host processor to the network card, saving cloud host resources while increasing processing speed and reducing latency.

[0003] At present, when network cards in cloud environments process data of virtual functions such as disks, polling is usually used. When most disk virtual functions have no traffic, a few disk virtual functions have traffic but must wait for the disk virtual functions with no traffic to be polled, resulting in unnecessary delays. Summary of the invention

[0004] In view of this, an embodiment of the present invention provides a data processing method and apparatus for a virtualized device, aiming to improve the efficiency of reading virtual function data and reduce unnecessary delays.

[0005] To achieve the above object, according to a first aspect of an embodiment of the present invention, a data processing method for a virtualized device is provided, comprising:

[0006] In response to the data queue corresponding to the virtual function having data to be processed, marking the state corresponding to the identifier of the virtual function in the traffic state table as having data to be processed;

[0007] Poll the status corresponding to the identifier of the virtual function in the traffic status table, filter out the identifier of the target virtual function whose status is that there is data to be processed, thereby determining the data queue corresponding to the target virtual function and processing the data in the data queue corresponding to the target virtual function.

[0008] Further, the data queue includes a data sending queue and a data receiving queue;

[0009] In response to there being data to be processed in the data queue corresponding to the virtual function, marking a state corresponding to the identifier of the virtual function in the traffic state table as having data to be processed, including:

[0010] In response to the data sending queue or the data receiving queue corresponding to the virtual function receiving data to be processed, the status of the data sending queue or the data receiving queue corresponding to the identifier of the virtual function in the traffic status table is marked as having data to be processed.

[0011] Furthermore, it also includes:

[0012] In response to there being no data to be processed in the data queue corresponding to the virtual function, the state corresponding to the identifier of the virtual function in the traffic state table is marked as no data to be processed.

[0013] Furthermore, it also includes:

[0014] Counting the number of virtual functions of the target virtual function in the traffic status table whose status is that there is data to be processed at the most recent statistical time point or statistical period, and in response to the number of virtual functions being greater than a quantity threshold, polling data queues corresponding to each virtual function, and processing data in the data queues corresponding to each virtual function;

[0015] and / or,

[0016] According to statistics of the most recent statistical point in time or statistical period, the total amount of data to be processed in the data queue corresponding to the target virtual function with the status of having data to be processed in the traffic status table, in response to the total amount of data being greater than the data amount threshold, the data queue corresponding to the virtual function is polled, and the data in the data queue corresponding to each virtual function is processed.

[0017] Furthermore, it also includes:

[0018] In response to the number of functions being less than or equal to the number threshold, and / or the total data volume being less than or equal to the data volume threshold, poll the status corresponding to the identifier of the virtual function in the traffic status table, filter out the identifier of the target virtual function whose status is that there is data to be processed, and process the data in the data queue corresponding to the target virtual function.

[0019] According to a second aspect of an embodiment of the present invention, there is provided a data processing apparatus for a virtualized device, comprising:

[0020] A data identification module, configured to mark a state corresponding to the identifier of the virtual function in the flow state table as having data to be processed in response to the data queue corresponding to the virtual function having data to be processed;

[0021] The data processing module is used to poll the status corresponding to the identifier of the virtual function in the traffic status table, filter out the identifier of the target virtual function whose status is that there is data to be processed, and process the data in the data queue corresponding to the target virtual function.

[0022] According to a third aspect of an embodiment of the present invention, there is provided a network card, comprising a programmable gate array and a system on chip;

[0023] The programmable gate array is used for marking the state corresponding to the identifier of the virtual function in the flow state table as having data to be processed in response to the data queue corresponding to the virtual function having data to be processed;

[0024] The on-chip system is used to poll the status corresponding to the identifier of the virtual function in the traffic status table, filter out the identifier of the target virtual function whose status is that there is data to be processed, and process the data in the data queue corresponding to the target virtual function.

[0025] Furthermore, it also includes a memory or a register shared by the programmable gate array and the system on chip, and the flow state table is stored in the memory or the register.

[0026] According to a fourth aspect of an embodiment of the present invention, there is provided an electronic processing device, comprising:

[0027] one or more processors; and,

[0028] a memory communicatively connected to the at least one processor; wherein,

[0029] The memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor, so that the one or more processors implement the method provided in the first aspect of the embodiment of the present invention.

[0030] According to a fifth aspect of an embodiment of the present invention, a computer-readable medium is provided, on which a computer program is stored, and when the program is executed by a processor, the method provided by the first aspect of the embodiment of the present invention is implemented.

[0031] According to a sixth aspect of an embodiment of the present invention, there is provided a computer program product, including a computer program, wherein when the computer program is executed by a processor, the method provided in the first aspect of the embodiment of the present invention is implemented.

[0032] An embodiment of the invention has the following advantages or beneficial effects:

[0033] Based on the technical solution of marking the status of the traffic of each virtual function and performing targeted processing according to the marked status, it is achieved that each processing of the virtual function hits the traffic, avoiding the loss and delay caused by indiscriminate polling when a few virtual functions have traffic, and improving processing efficiency.

[0034] Based on the monitoring of the traffic status of each virtual function, dynamic switching between the two scheduling methods of indiscriminate polling and screening first and then targeted processing is realized, which gives full play to the advantages of the two scheduling methods, realizes flexible adaptation of scheduling methods in different application scenarios, and improves the overall efficiency in multiple traffic status scenarios. BRIEF DESCRIPTION OF THE DRAWINGS

[0035] The accompanying drawings are used to better understand the present invention and do not constitute an improper limitation of the present invention.

[0036] Figure 1 is a schematic diagram of the main flow of a data processing method for a virtualized device according to an embodiment of the present invention;

[0037] Figure 2 is a flow chart of a data processing method for a virtualized device according to an embodiment of the present invention;

[0038] Figure 3 is a schematic diagram of a process of a data processing method for a virtualized device according to yet another embodiment of the present invention;

[0039] Figure 4 is a flow chart of a data processing method for a virtualized device according to another embodiment of the present invention;

[0040] Figure 5 is a schematic diagram of main modules of a data processing apparatus of a virtualization device according to an embodiment of the present invention;

[0041] Figure 6 is a schematic diagram of main modules of a network card according to an embodiment of the present invention;

[0042] Figure 7 is a schematic diagram of a data processing flow of a virtualization device of a network card according to an embodiment of the present invention;

[0043] Figure 8 is an exemplary system architecture diagram to which embodiments of the present invention may be applied;

[0044] Fig. 9 It is a schematic diagram of the structure of a computer system of a terminal device or a server suitable for implementing an embodiment of the present invention. DETAILED DESCRIPTION

[0045] The following is a description of exemplary embodiments of the present invention in conjunction with the accompanying drawings, including various details of the embodiments of the present invention to facilitate understanding, which should be considered as merely exemplary. Therefore, it should be recognized by those of ordinary skill in the art that various changes and modifications may be made to the embodiments described herein without departing from the scope and spirit of the present invention. Similarly, for clarity and conciseness, the description of well-known functions and structures is omitted in the following description.

[0046] It should be noted that the acquisition, storage and application of user personal information involved in the embodiments of the present invention are in compliance with the provisions of relevant laws and regulations and do not violate public order and good morals.

[0047] Figure 1FIG. 1 is a schematic diagram of the main process of a data processing method for a virtualized device according to an embodiment of the present invention. Figure 1 As shown, the data processing method of the virtualized device in this embodiment includes the following steps S100 to S200.

[0048] Step S100: In response to the fact that there is data to be processed in the data queue corresponding to the virtual function, the state corresponding to the identifier of the virtual function in the traffic state table is marked as having data to be processed.

[0049] It can be understood that in an embodiment of the present invention, the data queue corresponding to the virtual function can be a data queue shared by sending and receiving, or a data sending queue used solely for sending and / or a data receiving queue used solely for receiving and sending, for example, a data sending queue and a data receiving queue in a smart network card. In addition, in an embodiment of the present invention, the number of data queues corresponding to the virtual function is one or more, and the number of data sending queues and data receiving queues can also be one or more. Therefore, further, in an embodiment of the present invention, step S100 includes: in response to the data sending queue or the data receiving queue corresponding to the virtual function receiving data to be processed, marking the status of the data sending queue or the data receiving queue corresponding to the identifier of the virtual function in the traffic status table as having data to be processed.

[0050] It can be understood that the data transmission queue of the virtual function can be stored in the memory, and the head pointer and tail pointer in the memory can identify the head and tail addresses of the queue data. Therefore, whether there is data to be processed in the data queue corresponding to the virtual function can be judged by the head pointer and the tail pointer. In an embodiment of the present invention, responding to the presence of data to be processed in the data queue corresponding to the virtual function includes updating the tail pointer after writing data in the data queue of the virtual function; or responding to the difference between the head pointer and the tail pointer of the data queue of the virtual function being greater than a preset threshold (for example, the maximum length of each data frame); or responding to the difference between the head pointer and the tail pointer of the data of the virtual function being greater than a preset threshold, and sending an interrupt signal.

[0051] It can be understood that the flow status table in the embodiment of the present invention can be stored in a memory such as a register, a cache memory, or a memory. Therefore, in the embodiment of the present invention, before marking the state corresponding to the identifier of the virtual function in the flow status table as having data to be processed, a memory address corresponding to the identifier of the virtual function is pre-allocated to each virtual function, and a state word of the state corresponding to the identifier of the virtual function is stored in the storage unit corresponding to the memory address. Polling the state corresponding to the identifier of the virtual function in the flow status table specifically includes polling each memory address, reading the data of the storage unit, and if the data is data to be processed, the identifier of the corresponding virtual function is filtered out and recorded as the identifier of the target virtual function. Further, the identifier of the target virtual function can be added to the processing list. Based on the recorded identifier of the target virtual function or the processing list, only the data in the data queue corresponding to the target virtual function is processed.

[0052] Step S200, poll the status corresponding to the identifier of the virtual function in the traffic status table, filter out the identifier of the target virtual function whose status is that there is data to be processed, thereby determining the data queue corresponding to the target virtual function and processing the data in the data queue corresponding to the target virtual function.

[0053] It can be understood that the status corresponding to the identifier of the target virtual function in the traffic status table does not necessarily need to be updated after the data processing is completed. It may not be updated or may be updated immediately as needed.

[0054] In another embodiment of the present invention, specifically, Figure 2 As shown, before step S100 is executed, it also includes: step S110, detecting whether the state of the data queue of each virtual function has data to be processed; after step S100 is executed, it also includes: step S120, judging whether the data queues of all virtual functions have been checked, if so, executing step S200, otherwise continuing to execute step S110. In this embodiment, there are 1024 virtual function modules, which are identified as VF1, VF2, ... and VF1024. In step S100, it is detected that there is data to be processed in the data queue corresponding to the virtual function VF2, and the state corresponding to the virtual function VF2 in the flow state table is marked as state word 1. After writing, the flow state table is shown in Table 1, where state word 0 indicates that there is no data to be processed or the state is unknown, and state word 1 indicates that there is data to be processed.

[0055]

[0056] In this embodiment, step S200 specifically polls the states corresponding to the identifiers VF1, VF2, ... and VF1024 of the virtual functions in the flow status table, filters out the identifier of the target virtual function with a state word of 1, and in the case shown in Table 1, filters out "VF2" as the identifier of the target virtual function, and performs data processing operations on the data queue of the target virtual function corresponding to "VF2", for example, reading data and performing data decoding, forwarding or storage. In addition, the identifiers of one or more target virtual functions can also be added to the processing list. For example, if the states corresponding to "VF1" and "VF2" are state word 1, "VF1" and "VF2" are added to the processing list, and then the data in the data queue corresponding to the identifier of the target virtual function in the processing list is processed. After the processing is completed, the state corresponding to the identifier of the virtual function in the flow status table is updated to no data to be processed, that is, state word 0, so that the identifier of the target virtual function with a state of having data to be processed can be accurately filtered out during each round of polling.

[0057] Furthermore, updating the state corresponding to the identifier of the virtual function in the flow state table is not only triggered by the completion of data processing in the target virtual function data queue, but can also be achieved by responding to operations on the data queue of the virtual function by other computer programs or computer components as needed, and can be achieved by detecting that there is no data to be processed in the data queue corresponding to the virtual function. Figure 3 As shown, in another embodiment of the present invention, in addition to steps S110, S100, S120 and S200 in the above embodiments, the data processing method of the virtualized device further includes:

[0058] Step S310 , detecting whether the state of the data queue of each virtual function is that there is no data to be processed.

[0059] Step S300, in response to the fact that there is no data to be processed in the data queue corresponding to the virtual function, the state corresponding to the identifier of the virtual function in the flow state table is marked as no data to be processed. Specifically, for example, the state corresponding to "VF2" in the flow state table shown in Table 1 is changed from state word 1 to state word 0.

[0060] Step S320, determine whether the data queues of all virtual functions have been checked, if yes, execute step 200, if not, continue to execute step S310. The embodiment of the present invention marks the state of the data queue of each virtual function through the flow state table, and performs targeted processing according to the marked state, and by achieving that each processing of the virtual function hits the flow, the loss and delay caused by indiscriminate polling when a few virtual functions have flow is avoided, thereby improving the processing efficiency.

[0061] It is understandable that when there is data to be processed in the data queues of most virtual functions, an indiscriminate polling method can still be used. Figure 4 As shown, it includes steps S100 and S200, and also includes:

[0062] Step S400, counting the number of functions of the target virtual function whose status is that there is data to be processed in the traffic status table at the most recent statistical point in time or statistical period, and / or the total amount of data to be processed in the data queue corresponding to the target virtual function whose status is that there is data to be processed in the traffic status table.

[0063] Specifically, for example, the number of virtual functions whose status word is 1 is counted every second, or the number of virtual functions whose status word is 1 is counted within one second, or the total data volume of virtual functions whose status word is 1 is counted every second, or the total data volume of virtual functions whose status word is 1 is counted within one second.

[0064] Step S500: In response to the number of functions being greater than a number threshold, and / or in response to the total data volume being greater than a data volume threshold, polling the data queues corresponding to the virtual functions, and processing the data in the data queues corresponding to the virtual functions. Specifically, the number threshold is 10, and the total data volume threshold is 100 MB.

[0065] It can be understood that in an embodiment of the present invention, when there is a traffic state scenario with a large number of virtual functions with data to be processed, there is no need to identify the traffic state of the virtual functions, so the indiscriminate polling scheduling method is switched to adapt to the scenario, reducing redundant processing steps and improving efficiency.

[0066] It is understandable that when there are only a few virtual functions in the data queues with data to be processed, the scheduling method of first screening and then processing in the embodiment of the present invention can be switched to mark the status of the data queues of each virtual function through the flow status table. Therefore, in the data processing method of the virtualization device in these embodiments of the present invention, Figure 4 As shown, it also includes: S600, in response to the function quantity being less than or equal to the quantity threshold, and / or the total data volume being less than or equal to the data volume threshold, polling the status corresponding to the identifier of the virtual function in the traffic status table, filtering out the identifier of the target virtual function with a status of having data to be processed, and processing the data in the data queue corresponding to the target virtual function.

[0067] It can be understood that in this embodiment, based on the monitoring of the traffic status of each virtual function, dynamic switching between the two scheduling methods of indiscriminate polling and screening before processing is realized, so as to give full play to the advantages of the two scheduling methods in a targeted manner, realize flexible adaptation of scheduling methods in different application scenarios, and improve the overall efficiency in multiple traffic status scenarios.

[0068] It is foreseeable that these embodiments of the present invention may further include step S300, and further, may further include steps S110, S120, step S310 and step S330.

[0069] According to another aspect of the embodiment of the present invention, Figure 5 As shown, a data processing device 200 of a virtualized device is provided, comprising:

[0070] A data identification module, configured to mark a state corresponding to the identifier of the virtual function in the flow state table as having data to be processed in response to the data queue corresponding to the virtual function having data to be processed;

[0071] The data processing module is used to poll the status corresponding to the identifier of the virtual function in the traffic status table, filter out the identifier of the target virtual function whose status is that there is data to be processed, and process the data in the data queue corresponding to the target virtual function.

[0072] According to another aspect of the embodiment of the present invention, Figure 6 As shown, a network card 300 is provided.

[0073] The network card 300 in the embodiment of the present invention is an intelligent network card, including a field programmable gate array FPGA (Field Programmable Gate Arra6) and a system on chip SOC (System on Chip). The field programmable gate array FPGA is responsible for parsing and processing the protocol to achieve acceleration; the system on chip SOC is responsible for processing business calculations such as the open source virtual switch (OVS, Open vSwitch) and the storage performance open source library (SPDK, Storage Performance Development Kit). The network card in the embodiment of the present invention also includes a memory or register shared by the field programmable gate array FPGA and the system on chip SOC, and the flow state table is stored in the memory or the register.

[0074] In response to the data queue corresponding to the virtual function having data to be processed, the programmable gate array FPGA marks the state corresponding to the identifier of the virtual function in the flow state table as having data to be processed. The data queue includes a data sending queue and a data receiving queue, which may be one or more. Figure 6In the figure, only VF1 queue, VF2 queue, ... and VFn (n is the number of data queues) queues are used to represent the data queues, and the types and numbers of the data queues are not limited.

[0075] Specifically, Figure 6 As shown, FPGA continuously monitors the data queues corresponding to all virtual functions VF1, VF2, ... VFn. Whenever data to be processed is written to the data queue of a certain virtual function (such as VF2), FPGA updates the flow status table in the memory through DMA. For example, when it is detected that there is data to be processed in the data queue corresponding to the virtual function VF2, the storage unit in the memory is accessed through DMA and the preset VF2 state address, and the VF2 queue state in the storage unit storing the VF2 queue state is marked as state word 1. The marked flow status table is shown in the solid line part in Table 2, where state word 0 indicates that there is no data to be processed or the state is unknown, and state word 1 indicates that there is data to be processed.

[0076]

[0077] The system on chip SOC polls the status corresponding to the identifier of the virtual function in the flow status table, filters out the identifier of the target virtual function whose status is that there is data to be processed, and processes the data in the data queue corresponding to the target virtual function.

[0078] Specifically, the queue status in the traffic status table is polled from the start address to the end address of the traffic status table, that is, the storage units corresponding to the status addresses (VF1 status address, VF2 status address, ... and VFn status address) corresponding to VF1, VF2, ... and VFn status address) as the identifiers of the virtual functions are polled, and the identifier of the target virtual function whose status is status word 1 stored in the storage unit is filtered out, that is, in the case shown in Table 2, the identifier "VF2" corresponding to the "VF2 status address" is filtered out as the identifier of the target virtual function, and a data processing operation is performed on the data queue of the target virtual function corresponding to "VF2". After the data processing is completed, the system on chip SOC modifies the status of the storage unit corresponding to "VF2" in the memory to status word 0.

[0079] Further, in an embodiment of the present invention, the network card stores a configuration file of the FPGA, and the default working mode of the configuration file FPGA for data processing is preset to mode 1. Figure 7 As shown, the FPGA of the network card reads the configuration file first when working. If the default working mode of the network card is mode 1, the SPDK program running on the system on chip SOC polls the data queues corresponding to each virtual function and processes the data in the data queues corresponding to each virtual function.

[0080] Specifically, for example, there are 1024 virtual functions in total, and each polling round processes the data queues of 1024 virtual functions. If only one virtual function has traffic, then there will be only one hit on the traffic and 1023 misses in the 1024 virtual function data queues. If the polling of each virtual function takes about 20ns, then when only one of the 1024 virtual functions has traffic, the interval between the two processings is about 20us, and the single virtual function with traffic has an IO delay problem.

[0081] In this case, the SPDK program running on the system on chip SOC records the number of virtual function identifiers with data to be processed and the total amount of data per second. When the number of virtual function identifiers with data to be processed is less than the preset threshold or the total amount of data is less than the preset threshold ( Figure 4 The switching condition 1 shown in the figure) switches the network card working mode to mode 2.

[0082] When the network card works in mode 2, the programmable gate array FPGA detects that there are data read and write requests in the data queue corresponding to the virtual function, and marks the status corresponding to the identifier of the virtual function in the traffic status table as data to be processed through direct memory access DMA, registers, interrupts, etc.

[0083] When the network card works in mode 2, the system on chip SOC polls the status corresponding to the identifier of the virtual function in the flow status table, filters out the identifier of the target virtual function whose status is that there is data to be processed, and processes the data in the data queue corresponding to the target virtual function. For example, there are 1024 virtual functions in total, and the flow status table requires 1024 storage units of the memory to store the status corresponding to the identifier of the virtual function. The system on chip SOC polls the address of the 1024 memory units storing the flow status table. If the data on the address is 1, the identifier of the corresponding target virtual function is filtered out, and the data queue of the corresponding virtual function has data to be processed.

[0084] The network card has changed from indiscriminately polling virtual functions to first screening out virtual functions with data to be processed and marking them, and then processing the data queue of the target virtual function in a targeted manner, thereby effectively avoiding time loss caused by byes.

[0085] In the embodiment of the present invention, when the identifier of the virtual function with data to be processed is greater than a preset threshold or the total amount of data is greater than a preset threshold ( Figure 4 As shown in the switching condition 2), the network card working mode is switched to mode 1 again, and the marking of the flow data table on the FPGA side is turned off to avoid the problem that most virtual functions have traffic and the read and write performance is reduced when the traffic is large.

[0086] In the embodiments of the present invention, by implementing dynamic switching between the two scheduling modes, the advantages of the two scheduling modes are fully utilized in a targeted manner, flexible adaptation of the scheduling modes in different application scenarios is achieved, and overall efficiency is improved in multiple traffic state scenarios.

[0087] Figure 8 An exemplary system architecture 800 is shown to which the data processing method for a virtualized device or the data processing apparatus for a virtualized device according to the embodiment of the present invention can be applied.

[0088] like Figure 8 As shown, the system architecture 800 may include terminal devices 801, 802, 803, a network 804 and a server 805. The network 804 is used to provide a medium for communication links between the terminal devices 801, 802, 803 and the server 805. The network 804 may include various connection types, such as wired, wireless communication links or optical fiber cables, etc.

[0089] Users can use terminal devices 801, 802, and 803 to interact with server 805 through network 804 to receive or send messages, etc. Various communication client applications can be installed on terminal devices 801, 802, and 803, such as shopping applications, web browser applications, search applications, instant messaging tools, email clients, social platform software, etc. (only examples).

[0090] The terminal devices 801 , 802 , and 803 may be various electronic devices having a display screen and supporting web browsing, including but not limited to smart phones, tablet computers, laptop computers, desktop computers, and the like.

[0091] The server 805 may be a server that provides various services, such as a backend storage server (only an example) that provides support for shopping websites browsed by users using the terminal devices 801, 802, and 803. The backend storage server may write and read data such as received product information query requests, and feed back the processing results to the terminal device.

[0092] It should be noted that the data processing method of the virtualized device provided in the embodiment of the present invention is generally executed by the server 805 , and accordingly, the data processing device of the virtualized device is generally arranged in the server 805 .

[0093] It should be understood that Figure 8 The number of terminal devices, networks and servers in the embodiment is only for illustration. Any number of terminal devices, networks and servers may be provided according to implementation requirements.

[0094] Reference below Fig. 9, which shows a schematic diagram of the structure of a computer system 900 of a terminal device suitable for implementing an embodiment of the present invention. Figure 6 The terminal device shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present invention.

[0095] like Fig. 9 As shown, the computer system 900 includes a central processing unit (CPU) 901, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 902 or a program loaded from a storage portion 908 to a random access memory (RAM) 903. In the RAM 903, various programs and data required for the operation of the system 900 are also stored. The CPU 901, the ROM 902, and the RAM 903 are connected to each other via a bus 904. An input / output (I / O) interface 906 is also connected to the bus 904.

[0096] The following components are connected to the I / O interface 905: an input section 906 including a keyboard, a mouse, etc.; an output section 906 including a cathode ray tube (CRT), a liquid crystal display (LCD), etc., and a speaker, etc.; a storage section 908 including a hard disk, etc.; and a communication section 909 including a network interface card such as a LAN card, a modem, etc. The communication section 909 performs communication processing via a network such as the Internet. A drive 910 is also connected to the I / O interface 905 as needed. A removable medium 911, such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, etc., is installed on the drive 910 as needed, so that a computer program read therefrom is installed into the storage section 908 as needed.

[0097] In particular, according to the embodiments disclosed in the present invention, the process described above with reference to the flowchart can be implemented as a computer software program. For example, the embodiments disclosed in the present invention include a computer program product, which includes a computer program carried on a computer-readable medium, and the computer program contains program code for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from the network through the communication part 909, and / or installed from the removable medium 911. When the computer program is executed by the central processing unit (CPU) 901, the above-mentioned functions defined in the system of the present invention are executed.

[0098] It should be noted that the computer-readable medium shown in the present invention may be a computer-readable signal medium or a computer-readable storage medium or any combination of the above two. The computer-readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In the present invention, a computer-readable storage medium may be any tangible medium containing or storing a program that can be used by or in combination with an instruction execution system, device or device. In the present invention, a computer-readable signal medium may include a data signal propagated in a baseband or as part of a carrier wave, which carries a computer-readable program code. This propagated data signal may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. Computer-readable signal media may also be any computer-readable medium other than computer-readable storage media, which may send, propagate or transmit a program for use by or in conjunction with an instruction execution system, apparatus or device. The program code contained on the computer-readable medium may be transmitted using any appropriate medium, including but not limited to: wireless, wire, optical cable, RF, etc., or any suitable combination of the above.

[0099] The flow chart and block diagram in the accompanying drawings illustrate the possible architecture, function and operation of the system, method and computer program product according to various embodiments of the present invention. In this regard, each box in the flow chart or block diagram can represent a module, a program segment, or a part of a code, and the above-mentioned module, program segment, or a part of a code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the box can also occur in a different order from the order marked in the accompanying drawings. For example, two boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram or flow chart, and the combination of the boxes in the block diagram or flow chart can be implemented with a dedicated hardware-based system that performs a specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.

[0100] The modules involved in the embodiments of the present invention may be implemented by software or hardware. The modules described may also be set in a processor, for example, it may be described as: a processor includes a data identification module and a data processing module. The names of these modules do not constitute a limitation on the modules themselves in some cases, for example, the data identification module may also be described as a "module for identification according to preset conditions".

[0101] As another aspect, the present invention further provides a computer-readable medium, which may be included in the device described in the above embodiment; or may exist independently without being assembled into the device. The above computer-readable medium carries one or more programs, and when the above one or more programs are executed by a device, the device includes:

[0102] In response to the data queue corresponding to the virtual function having data to be processed, marking the state corresponding to the identifier of the virtual function in the traffic state table as having data to be processed;

[0103] Poll the status corresponding to the identifier of the virtual function in the traffic status table, filter out the identifier of the target virtual function whose status is that there is data to be processed, thereby determining the data queue corresponding to the target virtual function and processing the data in the data queue corresponding to the target virtual function.

[0104] According to the technical solution of the embodiment of the present invention, the present invention has the following advantages or beneficial effects:

[0105] Based on the technical solution of marking the status of the traffic of each virtual function and performing targeted processing according to the marked status, it is achieved that each processing of the virtual function hits the traffic, thereby avoiding the loss and delay caused by indiscriminate polling when there is traffic for a few virtual functions, and improving processing efficiency.

[0106] By counting the number of functions and the total amount of data of the target virtual functions that have data to be processed, the data processing method can be selected in a targeted manner. This can not only avoid the loss and delay caused by indiscriminate polling when there is traffic in a few virtual functions and improve processing efficiency, but also ensure that the read and write performance is not reduced when there is traffic or large traffic in most virtual functions.

[0107] Based on the monitoring of the traffic status of each virtual function, dynamic switching between the two scheduling methods of indiscriminate polling and screening first and then targeted processing is realized, which gives full play to the advantages of the two scheduling methods, realizes flexible adaptation of scheduling methods in different application scenarios, and improves the overall efficiency in multiple traffic status scenarios.

[0108] The specific implementation methods described herein do not constitute limitations on the scope of protection of the present invention. It should be understood by those skilled in the art that various modifications, combinations, sub-combinations and substitutions may occur depending on design requirements and other factors. Any modifications, equivalent substitutions and improvements made within the spirit and principles of the present invention shall be included in the scope of protection of the present invention.

Claims

1. A data processing method for a virtualized device, characterized in that: include: In response to the data queue corresponding to the virtual function having data to be processed, marking the state corresponding to the identifier of the virtual function in the flow state table as having data to be processed; Poll the status corresponding to the identifier of the virtual function in the traffic status table, filter out the identifier of the target virtual function whose status is that there is data to be processed, thereby determining the data queue corresponding to the target virtual function and processing the data in the data queue corresponding to the target virtual function.

2. The method according to claim 1, characterized in that The data queue includes a data sending queue and a data receiving queue; In response to there being data to be processed in the data queue corresponding to the virtual function, marking a state corresponding to the identifier of the virtual function in the traffic state table as having data to be processed, including: In response to the data sending queue or the data receiving queue corresponding to the virtual function receiving data to be processed, the status of the data sending queue or the data receiving queue corresponding to the identifier of the virtual function in the traffic status table is marked as having data to be processed.

3. The method according to claim 1, characterized in that Also includes: In response to there being no data to be processed in the data queue corresponding to the virtual function, the state corresponding to the identifier of the virtual function in the traffic state table is marked as no data to be processed.

4. The method according to claim 1, characterized in that Also includes: Counting the number of virtual functions of the target virtual function in the traffic status table whose status is that there is data to be processed at the most recent statistical time point or statistical period, and in response to the number of virtual functions being greater than a quantity threshold, polling data queues corresponding to each virtual function, and processing data in the data queues corresponding to each virtual function; and / or, According to statistics of the most recent statistical point in time or statistical period, the total amount of data to be processed in the data queue corresponding to the target virtual function with the status of having data to be processed in the traffic status table, in response to the total amount of data being greater than the data amount threshold, the data queue corresponding to the virtual function is polled, and the data in the data queue corresponding to each virtual function is processed.

5. The method according to claim 4, characterized in that Also includes: In response to the number of functions being less than or equal to the number threshold, and / or the total data volume being less than or equal to the data volume threshold, poll the status corresponding to the identifier of the virtual function in the traffic status table, filter out the identifier of the target virtual function whose status is that there is data to be processed, and process the data in the data queue corresponding to the target virtual function.

6. A data processing device for a virtualized device, characterized in that: include: A data identification module, configured to mark a state corresponding to the identifier of the virtual function in the flow state table as having data to be processed in response to the data queue corresponding to the virtual function having data to be processed; The data processing module is used to poll the status corresponding to the identifier of the virtual function in the traffic status table, filter out the identifier of the target virtual function whose status is that there is data to be processed, and process the data in the data queue corresponding to the target virtual function.

7. A network card, characterized in that: including programmable gate arrays and systems on chips; The programmable gate array is used for marking the state corresponding to the identifier of the virtual function in the flow state table as having data to be processed in response to the data queue corresponding to the virtual function having data to be processed; The on-chip system is used to poll the status corresponding to the identifier of the virtual function in the traffic status table, filter out the identifier of the target virtual function whose status is that there is data to be processed, and process the data in the data queue corresponding to the target virtual function.

8. The network card according to claim 7, characterized in that: It also includes a memory or a register shared by the programmable gate array and the system on chip, and the flow state table is stored in the memory or the register.

9. An electronic processing device, characterized in that: include: one or more processors; as well as, a memory communicatively connected to the at least one processor; wherein, The memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to perform the method according to any one of claims 1 to 5.

10. A computer readable medium having a computer program stored thereon, characterized in that: When the program is executed by a processor, the method according to any one of claims 1 to 5 is implemented.

11. A computer program product, comprising a computer program, characterized in that When the computer program is executed by a processor, the method according to any one of claims 1 to 5 is implemented.