CN-122019349-A - Data stream monitoring method, device, electronic equipment, storage medium and computer program product
Abstract
The application provides a data stream monitoring method, a device, an electronic device, a storage medium and a computer program product, and relates to the technical field of computer network and virtualization, wherein the method comprises the steps of determining Virtio control information based on interaction negotiation between a virtual machine and a data processor after loading and starting of virtual machine side Virtio equipment; the Virtio data path acceleration drive transmits monitoring information to the monitoring process based on the capability of the monitoring process, wherein the monitoring information is used for detecting the front-end information and the back-end information of Virtio under different capabilities of the monitoring process, the Virtio data path acceleration drive transmits Virtio the front-end information and the back-end information to the monitoring process in the interaction process of the virtual machine and the data processor, and the monitoring process determines Virtio the detection result of the front-end information and the back-end information based on the monitoring information.
Inventors
- ZHOU YIMING
- TAO YUNXIANG
Assignees
- 中移(苏州)软件技术有限公司
- 中国移动通信集团有限公司
Dates
- Publication Date
- 20260512
- Application Date
- 20260127
Claims (10)
- 1. A method of data stream monitoring, comprising: after the virtual machine side virtio equipment is loaded and started, determining virtio a control message based on interaction negotiation between the virtual machine and the data processor; The Virtio data path acceleration drive transmits monitoring information to the monitoring process based on the capability of the monitoring process, wherein the monitoring information is used for detecting Virtio front-end and back-end information under different capabilities of the monitoring process; during the interaction process of the virtual machine and the data processor, a Virtio data path acceleration driver transmits Virtio front-end and back-end messages to the monitoring process; And the monitoring process determines the detection result of the virtio front-end and back-end messages based on the monitoring message.
- 2. The data flow monitoring method of claim 1, wherein the monitoring message comprises the virtio control message and virtio data plane message structure, and wherein the virtio control message is used to characterize one or more of a message type, a message length, a data processor port identification for the message, a message number, and a message content.
- 3. The method of claim 1, wherein the Virtio data path acceleration driver delivers Virtio front-end and back-end messages to a monitoring process, comprising: the Virtio datapath acceleration driver delivers Virtio dataplane messages and Virtio device side messages to the monitoring process.
- 4. The method of claim 3, wherein the monitoring process determines a detection result of the virtio front-end and back-end messages based on the monitoring message, comprising: The monitoring process analyzes the virtio control message and determines the mapping information corresponding to the virtio data plane message in the memory; The monitoring process determines a corresponding first virtio data plane message in a memory based on the mapping information, and determines the detection result based on comparison between the first virtio data plane message and the virtio data plane message.
- 5. The method of claim 3, wherein the monitoring process determines a detection result of the virtio front-end and back-end messages based on the monitoring message, comprising: And the monitoring process carries out consistency detection on the virtio data plane message based on virtio data plane message structure, and determines the detection result.
- 6. The data stream monitoring method according to any one of claims 1 to 5, further comprising any one of the following: The monitoring process reads a first virtio front-end and back-end message in a memory in real time, and determines the detection result based on the comparison of the first virtio front-end and back-end message and the virtio front-end and back-end message; the monitoring process and the Virtio data path acceleration driving negotiation dynamically acquire a second Virtio front-end and back-end message, and determine the detection result based on the comparison of the second Virtio front-end and back-end message and the Virtio front-end and back-end message.
- 7. A data stream monitoring apparatus, comprising: the negotiation unit is used for determining virtio a control message based on interaction negotiation between the virtual machine and the data processor after the virtual machine side virtio equipment is loaded and started; the transmission unit is used for transmitting monitoring messages to the monitoring process based on the capability of the monitoring process by the Virtio data path acceleration drive, wherein the monitoring messages are used for detecting Virtio front-end and back-end messages under different capabilities of the monitoring process; The transmission unit is used for transmitting Virtio front-end and back-end messages to the monitoring process by a Virtio data path acceleration drive in the interaction process of the virtual machine and the data processor; And the detection unit is used for determining the detection result of the virtio front-end and back-end messages based on the monitoring message by the monitoring process.
- 8. An electronic device comprising a memory and a processor, the memory storing a computer program executable on the processor, the processor implementing the steps of the method of any one of claims 1 to 6 when the computer program is executed.
- 9. A computer readable storage medium, on which a computer program is stored, characterized in that the computer program, when being executed by a processor, implements the steps of the method of any of claims 1 to 6.
- 10. A computer program product comprising a computer program, characterized in that the computer program, when being executed by a processor, realizes the steps in the method of any one of claims 1 to 6.
Description
Data stream monitoring method, device, electronic equipment, storage medium and computer program product Technical Field The present application relates to the field of computer networks and virtualization technologies, and in particular, to a data flow monitoring method, a data flow monitoring device, an electronic device, a storage medium, and a computer program product. Background The virtio protocol is an Input/Output (I/O) paravirtualized communication mechanism widely applied in a virtualized environment, and by providing a standardized interface and a data transmission structure (such as virtio-ring), efficient data exchange between a virtual machine and a back-end device is realized. This technique has significant advantages in terms of improving system performance, compatibility, and cross-platform capability, and is an integral part of current cloud computing and virtualization architectures. In the related art, a vhost + vDPA technical architecture is adopted to realize data path unloading of virtio, and virtio-ring data interaction is performed by utilizing direct memory access (Direct Memory Access, DMA) shared memory, so that the purposes of zero copy and high-performance transmission are achieved. However, in the actual running process, the front end and the back end of virtio rely on the cooperative operation and interrupt response to the shared memory, once the data transmission abnormality or the state inconsistency occurs, the problem source is difficult to quickly locate, and the problem source can be recovered only by renegotiating the virtio protocol, so that the service is interrupted and the stability of the system is affected. In addition, in order to realize problem diagnosis, the related technology often depends on a large number of log recording and monitoring means, and the method not only increases the system overhead and reduces the operation efficiency, but also is difficult to adapt to different hardware implementations due to the lack of uniform data structure support, and has poor universality and flexibility. Disclosure of Invention The embodiment of the application provides a data stream monitoring method, a data stream monitoring device, electronic equipment, a storage medium and a computer program product. The technical scheme of the application is realized as follows: The embodiment of the application provides a data stream monitoring method, which comprises the following steps: after the virtual machine side virtio equipment is loaded and started, determining virtio a control message based on interaction negotiation between the virtual machine and the data processor; The Virtio data path acceleration drive transmits monitoring information to the monitoring process based on the capability of the monitoring process, wherein the monitoring information is used for detecting Virtio front-end and back-end information under different capabilities of the monitoring process; during the interaction process of the virtual machine and the data processor, a Virtio data path acceleration driver transmits Virtio front-end and back-end messages to the monitoring process; And the monitoring process determines the detection result of the virtio front-end and back-end messages based on the monitoring message. In the scheme, the monitoring message comprises the virtio control message and a virtio data plane message structure, and the virtio control message is used for representing one or more of a message type, a message length, a data processor port identification corresponding to the message, a message number and a message content. In the above solution, the Virtio data path acceleration driver transmits Virtio front-end and back-end messages to the monitoring process, including: the Virtio datapath acceleration driver delivers Virtio dataplane messages and Virtio device side messages to the monitoring process. In the above solution, the monitoring process determines, based on the monitoring message, a detection result of the virtio front-end and back-end messages, including: The monitoring process analyzes the virtio control message and determines the mapping information corresponding to the virtio data plane message in the memory; The monitoring process determines a corresponding first virtio data plane message in a memory based on the mapping information, and determines the detection result based on comparison between the first virtio data plane message and the virtio data plane message. In the above solution, the monitoring process determines, based on the monitoring message, a detection result of the virtio front-end and back-end messages, including: and the monitoring process carries out consistency detection on the virtio data plane message based on the virtio data plane message structure, and determines the detection result. In the above scheme, the method further comprises any one of the following steps: The monitoring process reads a first virtio front-end and back-end messa