CN116938895B - Media data packet acquisition method and device, electronic equipment and storage medium - Google Patents

Media data packet acquisition method and device, electronic equipment and storage medium Download PDF

Info

Publication number
CN116938895B
CN116938895B CN202311192750.9A CN202311192750A CN116938895B CN 116938895 B CN116938895 B CN 116938895B CN 202311192750 A CN202311192750 A CN 202311192750A CN 116938895 B CN116938895 B CN 116938895B
Authority
CN
China
Prior art keywords
packet
grabbing
capturing
target
request
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202311192750.9A
Other languages
Chinese (zh)
Other versions
CN116938895A (en
Inventor
姜涛
黄成浩
李游游
田铁红
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Yunli Intelligent Technology Co ltd
Original Assignee
Yunli Intelligent Technology Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Yunli Intelligent Technology Co ltd filed Critical Yunli Intelligent Technology Co ltd
Priority to CN202311192750.9A priority Critical patent/CN116938895B/en
Publication of CN116938895A publication Critical patent/CN116938895A/en
Application granted granted Critical
Publication of CN116938895B publication Critical patent/CN116938895B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L65/00Network arrangements, protocols or services for supporting real-time applications in data packet communication
    • H04L65/1066Session management
    • H04L65/1101Session protocols
    • H04L65/1104Session initiation protocol [SIP]
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L65/00Network arrangements, protocols or services for supporting real-time applications in data packet communication
    • H04L65/1066Session management
    • H04L65/1073Registration or de-registration
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/06Protocols specially adapted for file transfer, e.g. file transfer protocol [FTP]
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/10Protocols in which an application is distributed across nodes in the network
    • H04L67/1095Replication or mirroring of data, e.g. scheduling or transport for data synchronisation between network nodes
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/50Network services
    • H04L67/60Scheduling or organising the servicing of application requests, e.g. requests for application data transmissions using the analysis and optimisation of the required network resources

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Business, Economics & Management (AREA)
  • General Business, Economics & Management (AREA)
  • Multimedia (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

The invention provides a media data packet acquisition method, a device, electronic equipment and a storage medium, and belongs to the technical field of network information. The method comprises the following steps: receiving a packet capturing request input by a packet capturing user, and creating a packet capturing task based on the packet capturing request, wherein the packet capturing task comprises packet capturing information; calling a corresponding target server based on the packet grabbing task, and indicating the target server to start a real-time media data packet acquisition container according to the mirror image of the real-time media data packet acquisition container; and determining a target packet capturing port and the packet capturing quantity based on the packet capturing information, and calling a packet capturing tool in the real-time media data packet collecting container to capture the media data packet based on the target packet capturing port and the packet capturing quantity until the packet capturing is completed. According to the method, targeted packet capturing is carried out according to the determined target packet capturing port, so that the difficulty in targeted data analysis of a specific equipment platform or a specific channel is reduced.

Description

Media data packet acquisition method and device, electronic equipment and storage medium
Technical Field
The present invention relates to the field of network information technologies, and in particular, to a media data packet collection method, a device, an electronic device, and a storage medium.
Background
In streaming media services, video streaming is generally performed according to the national standard GB28181, and a dynamic port, usually a designated port range, is used when video streaming, and is randomly designated from idle ports when video streaming is performed, so that the ports are multiplexed within a limited port range.
In the process of video stream problem checking, received data such as signaling data or video stream data need to be analyzed. The traditional packet grabbing mode is to grab packets directly aiming at network ports, so that the grabbed data range is overlarge, signaling data of each equipment platform and video stream data of each channel in the grabbed data packets are mixed together, so that the data packets are too much and too messy, and when data analysis aiming at specific equipment platforms or specific channels is needed, the data packets which are too much and too messy can cause great difficulty to data analysis.
Disclosure of Invention
The invention provides a media data packet acquisition method, a device, electronic equipment and a storage medium, which are used for solving the defect that in the prior art, the data acquisition range is too large, and the difficulty is caused to the targeted data analysis of a specific equipment platform or a specific channel, realizing targeted packet grabbing according to a determined target packet grabbing port, and reducing the difficulty to the targeted data analysis of the specific equipment platform or the specific channel.
The invention provides a media data packet acquisition method, which comprises the following steps:
receiving a packet capturing request input by a packet capturing user, and creating a packet capturing task based on the packet capturing request, wherein the packet capturing task comprises packet capturing information;
calling a corresponding target server based on the packet grabbing task, and indicating the target server to start a real-time media data packet acquisition container according to the mirror image of the real-time media data packet acquisition container;
and determining a target packet capturing port and the packet capturing quantity based on the packet capturing information, and calling a packet capturing tool in the real-time media data packet collecting container to capture the media data packet based on the target packet capturing port and the packet capturing quantity until the packet capturing is completed.
According to the media data packet collecting method provided by the invention, the packet capturing request input by the packet capturing user is received, the packet capturing task is created based on the packet capturing request, the packet capturing task comprises packet capturing information, and the method comprises the following steps:
the packet grabbing request input by the packet grabbing user is received, the packet grabbing request is analyzed, when the packet grabbing request is an RTP stream packet grabbing request, the packet grabbing task is created based on the RTP stream packet grabbing request, and the RTP stream packet grabbing request comprises a target channel ID and the number of packets grabbed;
and determining a target server IP corresponding to the target channel ID and target open flow port information on a target server corresponding to the target server IP from a media information management module based on the target channel ID, wherein the packet capturing information comprises the target server IP, the target open flow port information and the packet capturing quantity.
According to the media data packet collecting method provided by the invention, before receiving a packet grabbing request input by a packet grabbing user, the method further comprises the following steps:
and receiving an open flow instruction, determining a corresponding server and an open flow port on the server based on a channel ID in the open flow instruction, and storing the mapping relation among the channel ID, a server IP of the server and open flow port information of the open flow port to the media information management module.
According to the media data packet collecting method provided by the invention, the packet capturing request input by the packet capturing user is received, the packet capturing task is created based on the packet capturing request, the packet capturing task comprises packet capturing information, and the method comprises the following steps:
the packet capturing request input by the packet capturing user is received, the packet capturing request is analyzed, when the packet capturing request is an SIP signaling packet capturing request, the packet capturing task is created based on the SIP signaling packet capturing request, and the SIP signaling packet capturing request comprises a target equipment platform ID and the packet capturing quantity;
and determining a target signaling port corresponding to the target equipment platform ID from a media information management module based on the target equipment platform ID, wherein the packet grabbing information comprises the target signaling port and the packet grabbing quantity.
According to the media data packet collecting method provided by the invention, before receiving a packet grabbing request input by a packet grabbing user, the method further comprises the following steps:
when each equipment platform is registered on line, equipment platform ID and signaling port information of each equipment platform are collected, and the mapping relation between the equipment platform ID and the signaling port information is stored in a media information management module.
The media data packet acquisition method provided by the invention further comprises the following steps:
storing the media data packets captured by the capture tool in a corresponding capture folder;
and after the data packets in the packet grabbing folder reach the packet grabbing quantity, updating the task state of the packet grabbing task.
The media data packet acquisition method provided by the invention further comprises the following steps:
when the task state of the packet capturing task is that the task is completed, storing the packet capturing folder into a file server and generating a file downloading address corresponding to the packet capturing folder; or when the task state of the packet capturing task is that the task is completed, storing the packet capturing folder into a corresponding target server and generating a file downloading address corresponding to the packet capturing folder.
The invention also provides a media data packet acquisition device, which comprises:
the interface module is used for receiving a packet capturing request input by a packet capturing user, creating a packet capturing task based on the packet capturing request, wherein the packet capturing task comprises packet capturing information;
the starting module is used for calling a corresponding target server based on the packet grabbing task and indicating the target server to start the real-time media data packet acquisition container according to the mirror image of the real-time media data packet acquisition container;
and the packet grabbing module is used for determining a target packet grabbing port and the number of packets grabbed based on the packet grabbing information, and calling a packet grabbing tool in the real-time media data packet acquisition container to grab the media data packets based on the target packet grabbing port and the number of packets grabbed.
The invention also provides an electronic device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, wherein the processor implements the media data packet acquisition method as described above when executing the program.
The present invention also provides a non-transitory computer readable storage medium having stored thereon a computer program which, when executed by a processor, implements a method of media data packet acquisition as described in any of the above.
The invention also provides a computer program product comprising a computer program which when executed by a processor implements a method of media data packet acquisition as described in any of the above.
According to the media data packet acquisition method, the device, the electronic equipment and the storage medium, the packet grabbing task is established through the packet grabbing request, the packet grabbing information capable of determining the target packet grabbing ports and the packet grabbing quantity is included in the established packet grabbing task, and then the corresponding target server is called according to the packet grabbing task, and the packet grabbing tool in the target server is called to grab the targeted media data packet according to the target packet grabbing ports and the packet grabbing quantity, so that targeted analysis can be performed according to the grabbed media data packet, and the difficulty of targeted data analysis on a specific equipment platform or a specific channel is reduced.
Drawings
In order to more clearly illustrate the invention or the technical solutions of the prior art, the following description will briefly explain the drawings used in the embodiments or the description of the prior art, and it is obvious that the drawings in the following description are some embodiments of the invention, and other drawings can be obtained according to the drawings without inventive effort for a person skilled in the art.
FIG. 1 is a schematic flow chart of a media data packet collecting method according to the present invention;
fig. 2 is a schematic structural diagram of a target server according to an embodiment of the present invention;
FIG. 3 is a second flowchart of a media data packet collecting method according to the present invention;
fig. 4 is a schematic structural diagram of a media data packet acquisition device provided by the present invention;
fig. 5 is a schematic structural diagram of an electronic device provided by the present invention.
Detailed Description
For the purpose of making the objects, technical solutions and advantages of the present invention more apparent, the technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings, and it is apparent that the described embodiments are some embodiments of the present invention, not all embodiments. All other embodiments, which can be made by those skilled in the art based on the embodiments of the invention without making any inventive effort, are intended to be within the scope of the invention.
The traditional packet capturing mode is to capture packets directly aiming at a network port, data of all equipment platforms and data of the channels are transmitted through the network port, so that the captured data range is overlarge due to the capture of the packets through the network port, signaling data of all the equipment platforms in the captured data packets and video stream data of all the channels are mixed together, and at the moment, if data analysis is only required to be carried out on a specific equipment platform or a specific channel, corresponding data is required to be acquired from the data packets with excessive and disordered contents, and the analysis can be carried out, so that great difficulty is brought to data analysis.
In view of the above problems, the present invention provides a media data packet collecting method, and fig. 1 is one of flow diagrams of the media data packet collecting method provided in the embodiment of the present invention, as shown in fig. 1, where the media data packet collecting method includes:
step 101: and receiving a packet grabbing request input by a packet grabbing user, and creating a packet grabbing task based on the packet grabbing request, wherein the packet grabbing task comprises packet grabbing information.
Specifically, when the application user applying the video stream finds that the video stream is abnormal in playing, the application user may perform abnormal feedback of the video stream abnormality, and after receiving the abnormal feedback message, the packet capturing user needs to perform corresponding data analysis to analyze and determine the reason of the abnormal playing of the video stream at the application user side, so that subsequent processing is facilitated.
Based on the abnormal feedback, the packet capturing user submits a packet capturing request, wherein the packet capturing request comprises the packet capturing quantity and the packet capturing object information which the packet capturing user wants to capture, and the packet capturing object is an object which needs to capture the packet, for example, the packet capturing object can be a specific equipment platform or a channel, the equipment platform can be a national standard platform which is registered to be online, and the channel can be a channel corresponding to video equipment managed by a certain equipment platform registered to be online.
After receiving a packet grabbing request submitted by a packet grabbing user, a packet grabbing task can be created according to the packet grabbing request, the packet grabbing task comprises packet grabbing information, and the packet grabbing information can comprise relevant information such as target packet grabbing ports, packet grabbing quantity and the like determined according to the packet grabbing request.
According to the method, the target packet capturing port can be automatically determined according to the packet capturing request, when video stream data is required to be captured, a packet capturing user is not required to inquire the target packet capturing port on the streaming media server, time of the packet capturing user is saved, and the packet capturing user is not required to inquire the target packet capturing port on the streaming media server, so that the packet capturing user is not required to log in the streaming media server, and safety of the streaming media server is ensured.
Step 102: and calling a corresponding target server based on the packet grabbing task, and indicating the target server to start the real-time media data packet acquisition container according to the mirror image of the real-time media data packet acquisition container.
Specifically, after the scheduled task is created, the target server for executing the scheduled task is called based on the scheduled task, and for example, the packet capturing information may further include target server information. Fig. 2 is a schematic structural diagram of a target server according to an embodiment of the present invention, as shown in fig. 2, after the target server is invoked, the target server is instructed to start a live media data packet collection container according to a live media data packet collection container image through a dock engine, and after the live media data packet collection container is started, a local network of the server is mapped onto a network of the live media data packet collection container based on a preset configuration.
It can be appreciated that in the above steps, the real-time media data packet collecting container is integrated on the target server, so that the packet grabbing user does not need to install a packet grabbing tool specially, and the time of the packet grabbing user is saved.
Step 103: and determining a target packet capturing port and the packet capturing quantity based on the packet capturing information, and calling a packet capturing tool in the real-time media data packet collecting container to capture the media data packet based on the target packet capturing port and the packet capturing quantity until the packet capturing is completed.
Specifically, since the packet capturing information includes the target packet capturing port and the packet capturing quantity determined according to the packet capturing request, the target packet capturing port and the packet capturing quantity can be determined according to the packet capturing information, and then the packet capturing tool in the real-time media data packet capturing container is called to capture the media data packet according to the target packet capturing port and the packet capturing quantity.
According to the media data packet acquisition method, the packet grabbing task is established through the packet grabbing request, the packet grabbing information capable of determining the target packet grabbing ports and the packet grabbing quantity is included in the established packet grabbing task, and then the corresponding target server is called according to the packet grabbing task and the packet grabbing tools in the target server are instructed to grab the targeted media data packets according to the target packet grabbing ports and the packet grabbing quantity, so that targeted analysis can be carried out according to the grabbed media data packets, and the difficulty of targeted data analysis on a specific equipment platform or a specific channel is reduced.
In one embodiment, the receiving a packet-grabbing request input by a packet-grabbing user creates a packet-grabbing task based on the packet-grabbing request, where the packet-grabbing task includes packet-grabbing information, and the method includes:
the packet grabbing request input by the packet grabbing user is received, the packet grabbing request is analyzed, when the packet grabbing request is an RTP stream packet grabbing request, the packet grabbing task is created based on the RTP stream packet grabbing request, and the RTP stream packet grabbing request comprises a target channel ID and the number of packets grabbed;
and determining a target server IP corresponding to the target channel ID and target open flow port information on a target server corresponding to the target server IP from a media information management module based on the target channel ID, wherein the packet capturing information comprises the target server IP, the target open flow port information and the packet capturing quantity.
Specifically, fig. 3 is a second flow chart of a media data packet collecting method according to an embodiment of the present invention, as shown in fig. 3, after receiving a packet capturing request input by a packet capturing user, the packet capturing request needs to be parsed to determine the type of the packet capturing request, that is, whether the packet capturing request is a SIP signaling packet capturing request or an RTP stream packet capturing request. When the packet grabbing request is an RTP stream packet grabbing request, creating a packet grabbing task based on the RTP stream packet grabbing request, wherein the RTP stream packet grabbing request comprises packet grabbing object information, namely a target channel ID, and the number of data packets needing grabbing, namely the number of grabbing packets. The channel is a channel for transmitting video streams corresponding to video equipment managed by the equipment platform, and the target channel is a channel which a packet capturing user wants to capture packets.
According to the target channel ID in the RTP stream packet capturing request, the target server IP corresponding to the target channel ID and the target open stream port information on the target server corresponding to the target server IP can be determined from the mapping relation stored by the media information management module. The packet grabbing information comprises the determined IP of the target server, the determined information of the target open stream port and the determined number of the packets in the RTP stream packet grabbing request.
After the packet capturing task is established and the packet capturing information is determined, the packet capturing information comprises the target server IP, and the corresponding target server can be called based on the packet capturing task to instruct the target server to start the real-time media data packet collecting container according to the mirror image of the real-time media data packet collecting container. The packet capturing information comprises the target open flow port information, the target open flow port information is determined to be a target packet capturing port according to the packet capturing information, a packet capturing tool in a real-time media data packet collecting container can be called according to the target packet capturing port to capture a video flow packet on the target packet capturing port, the video flow data packet is a media data packet, and when the captured video flow data packet meets the number of captured packets in the packet capturing information, the completion of packet capturing is determined.
Further, a time duration threshold may be preset at this time when the packet grabbing tool may not grab the data packet until the packet grabbing tool begins to grab the packet, for example, when the time duration threshold is reached from the time when the packet grabbing tool begins to grab the packet, the packet grabbing is directly determined to end.
In one embodiment, before receiving the packet capturing request input by the packet capturing user, the method further includes:
and receiving an open flow instruction, determining a corresponding server and an open flow port on the server based on a channel ID in the open flow instruction, and storing the mapping relation among the channel ID, a server IP of the server and open flow port information of the open flow port to the media information management module.
Specifically, before the packet is grabbed by the media stream data, an open stream instruction is received, wherein the open stream instruction includes two conditions, and in one condition, the open stream instruction is submitted by an application user, and a channel corresponding to the open stream instruction is in an open stream state when the packet is grabbed by the packet grabbing user; in another case, the packet-capturing user submits the packet-capturing instruction, that is, when the packet-capturing user needs to capture the packet, the channel needing to capture the packet is found to be in a non-open state, and at this time, the packet-capturing user needs to submit the packet-capturing instruction so that the channel needing to capture the packet is in an open state.
It will be appreciated that there may be one or more streaming servers. The streaming command generally includes a channel ID, after receiving the streaming command, in a case that there are multiple streaming servers, the channel ID in the streaming command needs to be matched with a corresponding server and an streaming port on the server for the channel based on a load condition of the server, and after the server and the streaming port are matched, a mapping relationship among the channel ID, a server IP of the matched server and streaming port information of the matched streaming port is stored in the media information management module.
Based on the media information management module, when a packet grabbing request input by a packet grabbing user is received and a packet grabbing task is created based on the packet grabbing request, the required information can be queried from the media information management module based on the packet grabbing object information in the packet grabbing request, namely, the object needing to grab a packet, such as a channel ID, and then the packet grabbing information can be determined according to the mapping relation stored in the packet grabbing request and the media information management module.
According to the media data packet acquisition method in the embodiment, after the streaming command is received, the mapping relation among the channel ID in the streaming command, the server ID of the matched server and the streaming port information is stored, so that after the RTP streaming packet grabbing request is subsequently received, the target packet grabbing port can be accurately positioned according to the packet grabbing object in the RTP streaming packet grabbing request, accurate packet grabbing can be performed in a targeted manner, and the workload of packet grabbing users is reduced.
In one embodiment, the receiving the packet-grabbing request input by the packet-grabbing user, creating a packet-grabbing task based on the packet-grabbing request, and determining packet-grabbing information based on the packet-grabbing request and the media information management module includes:
the packet capturing request input by the packet capturing user is received, the packet capturing request is analyzed, when the packet capturing request is an SIP signaling packet capturing request, the packet capturing task is created based on the SIP signaling packet capturing request, and the SIP signaling packet capturing request comprises a target equipment platform ID and the packet capturing quantity;
and determining a target signaling port corresponding to the target equipment platform ID from a media information management module based on the target equipment platform ID, wherein the packet grabbing information comprises the target signaling port and the packet grabbing quantity.
Specifically, fig. 3 is a second flow chart of a media data packet collecting method according to an embodiment of the present invention, as shown in fig. 3, after receiving a packet capturing request input by a packet capturing user, the packet capturing request needs to be parsed to determine the type of the packet capturing request, that is, whether the packet capturing request is a SIP signaling packet capturing request or an RTP stream packet capturing request. When the packet grabbing request is a SIP signaling packet grabbing request, creating a packet grabbing task based on the SIP signaling packet grabbing request, wherein the SIP signaling packet grabbing request comprises packet grabbing object information, namely a target equipment platform ID, and the number of data packets needing grabbing, namely the number of grabbing packets.
And determining a target signaling port corresponding to the target equipment platform ID from the mapping relation stored by the media information management module according to the SIP signaling packet grabbing request. The packet grabbing information comprises the target signaling port and the number of the grabs in the SIP signaling packet grabbing request.
Because the size of the signaling information is smaller than that of the video stream information, only one unified signaling receiving port is usually set to receive the signaling information sent by each device platform, and only one signaling server is set to grab the signaling packets.
Based on the above situation, in the case that the packet grabbing task is constructed based on the SIP signaling packet grabbing request, the corresponding target server, that is, the signaling server, may be directly invoked based on the packet grabbing task, and the signaling server may be instructed to start the live media data packet collection container according to the live media data packet collection container image. Because the packet capturing information comprises the target signaling port, the target signaling port is determined to be the target packet capturing port according to the packet capturing information, and a packet capturing tool in the real-time media data packet acquisition container can be called according to the target packet capturing port to capture the signaling data packet corresponding to the target signaling port, namely the media data packet, on the unified signaling receiving port. And when the grabbed signaling data packets meet the number of grabbed packets in the grabbed packet information, determining that the grabbed packets are completed.
Further, a time duration threshold may be preset at this time when the packet grabbing tool may not grab the data packet until the packet grabbing tool begins to grab the packet, for example, when the time duration threshold is reached from the time when the packet grabbing tool begins to grab the packet, the packet grabbing is directly determined to end.
In one embodiment, before receiving the packet capturing request input by the packet capturing user, the method further includes:
when each equipment platform is registered on line, equipment platform ID and signaling port information of each equipment platform are collected, and the mapping relation between the equipment platform ID and the signaling port information is stored in a media information management module.
Specifically, the device platform may be a national standard platform registered online, the device platform manages a plurality of video devices, for example, the video devices may be cameras, and video streams transmitted by the video devices are transmitted through corresponding channels.
The equipment platform registration online comprises equipment platform registration online and video equipment registration online managed by the equipment platforms, and equipment platform IDs and signaling port information of the equipment platforms are acquired when the equipment platforms are online, wherein the signaling port information is a port for sending signaling by the equipment platforms, and each equipment platform is respectively corresponding to one signaling port. And storing the mapping relation between each equipment platform and the corresponding signaling port information in a media information management module when the equipment platform is online.
Based on the media information management module, when a packet grabbing request input by a packet grabbing user is received and a packet grabbing task is created based on the packet grabbing request, the required information can be queried from the media information management module based on the packet grabbing object information in the packet grabbing request, such as an equipment platform ID, and further the packet grabbing information can be determined according to the packet grabbing request and the mapping relation stored in the media information management module.
According to the media data packet acquisition method in the embodiment, the mapping relation between the equipment platform ID and the information of the signaling port is stored when the equipment platform is registered online, so that after the SIP signaling packet grabbing request is received subsequently, the target packet grabbing port can be accurately positioned according to the packet grabbing object, accurate packet grabbing can be performed in a targeted mode, and the workload of a packet grabbing user is reduced.
In one embodiment, further comprising:
storing the media data packets captured by the capture tool in a corresponding capture folder;
and after the data packets in the packet grabbing folder reach the packet grabbing quantity, updating the task state of the packet grabbing task.
Specifically, the media data packets captured by the capturing tool may be stored in corresponding capturing files, for example, a corresponding capturing folder may be set up for each capturing task, and the media data packets captured under the capturing task are stored in the capturing folder corresponding to the capturing task.
In one embodiment, further comprising:
and when the task state of the packet capturing task is that the task is completed, storing the packet capturing folder into a file server and generating a file downloading address corresponding to the packet capturing folder.
Specifically, when the task state of the packet capturing task is that the task is completed, the packet capturing folder corresponding to the packet capturing task may be stored in the file server, and a file download address corresponding to the packet capturing folder is generated. The packet capturing user can download the media data packet captured under the corresponding packet capturing task through the file downloading address for data analysis.
According to the media data packet acquisition method, the generated media data packets are stored in the file server, so that unified management of the media data packets is provided.
In one embodiment, further comprising:
and when the task state of the packet capturing task is that the task is completed, storing the packet capturing folder into a corresponding target server and generating a file downloading address corresponding to the packet capturing folder.
Specifically, when the task state of the packet capturing task is that the task is completed, the packet capturing folder corresponding to the packet capturing task may be stored in the target server, and a file download address corresponding to the packet capturing folder may be generated. The packet capturing user can download the media data packet captured under the corresponding packet capturing task through the file downloading address for data analysis.
According to the media data packet acquisition method, the generated media data packet is stored in the target server, so that a flexible storage mode is provided for the media data packet.
The media data packet collecting device provided by the invention is described below, and the media data packet collecting device described below and the media data packet collecting method described above can be referred to correspondingly.
Fig. 4 is a schematic structural diagram of a media data packet collecting device according to an embodiment of the present invention, as shown in fig. 4, the media data packet collecting device 400 includes: an interface module 401, a starting module 402 and a packet grabbing module 403;
the interface module 401 is configured to receive a packet capturing request input by a packet capturing user, and create a packet capturing task based on the packet capturing request, where the packet capturing task includes packet capturing information;
the starting module 402 is configured to invoke a corresponding target server based on the packet capturing task, and instruct the target server to start the live media data packet collection container according to the live media data packet collection container image;
and the packet grabbing module 403 is configured to determine a target packet grabbing port and the number of packets grabbed based on the packet grabbing information, and call a packet grabbing tool in the real-time media data packet collection container to grab a media data packet based on the target packet grabbing port and the number of packets grabbed.
According to the media data packet acquisition device, the packet grabbing task is established through the packet grabbing request, the packet grabbing information capable of determining the target packet grabbing ports and the packet grabbing quantity is included in the established packet grabbing task, and then the corresponding target server is called according to the packet grabbing task and the packet grabbing tools in the target server are instructed to grab the targeted media data packets according to the target packet grabbing ports and the packet grabbing quantity, so that targeted analysis can be carried out according to the grabbed media data packets, and the difficulty of targeted data analysis on a specific equipment platform or a specific channel is reduced.
In one embodiment, the interface module 401 is specifically configured to:
the packet grabbing request input by the packet grabbing user is received, the packet grabbing request is analyzed, when the packet grabbing request is an RTP stream packet grabbing request, the packet grabbing task is created based on the RTP stream packet grabbing request, and the RTP stream packet grabbing request comprises a target channel ID and the number of packets grabbed;
and determining a target server IP corresponding to the target channel ID and target open flow port information on a target server corresponding to the target server IP from a media information management module based on the target channel ID, wherein the packet capturing information comprises the target server IP, the target open flow port information and the packet capturing quantity.
In one embodiment, the media data packet acquisition device further includes a mapping module, where the mapping module is specifically configured to:
and receiving an open flow instruction, determining a corresponding server and an open flow port on the server based on a channel ID in the open flow instruction, and storing the mapping relation among the channel ID, a server IP of the server and open flow port information of the open flow port to the media information management module.
In one embodiment, the interface module 401 is specifically configured to:
the packet capturing request input by the packet capturing user is received, the packet capturing request is analyzed, when the packet capturing request is an SIP signaling packet capturing request, the packet capturing task is created based on the SIP signaling packet capturing request, and the SIP signaling packet capturing request comprises a target equipment platform ID and the packet capturing quantity;
and determining a target signaling port corresponding to the target equipment platform ID from a media information management module based on the target equipment platform ID, wherein the packet grabbing information comprises the target signaling port and the packet grabbing quantity.
In one embodiment, the media data packet acquisition device further includes a mapping module, where the mapping module is specifically configured to:
when each equipment platform is registered on line, equipment platform ID and signaling port information of each equipment platform are collected, and the mapping relation between the equipment platform ID and the signaling port information is stored in a media information management module.
In one embodiment, the media data packet collecting device further includes an updating module, where the updating module is specifically configured to:
storing the media data packets captured by the capture tool in a corresponding capture folder;
and after the data packets in the packet grabbing folder reach the packet grabbing quantity, updating the task state of the packet grabbing task.
In one embodiment, the media data packet collecting device further includes a storage module, where the storage module is specifically configured to:
and when the task state of the packet capturing task is that the task is completed, storing the packet capturing folder into a file server and generating a file downloading address corresponding to the packet capturing folder.
In one embodiment, the storage module is specifically further configured to:
and when the task state of the packet capturing task is that the task is completed, storing the packet capturing folder into a corresponding target server and generating a file downloading address corresponding to the packet capturing folder.
Fig. 5 illustrates a physical schematic diagram of an electronic device, as shown in fig. 5, which may include: processor 510, communication interface (Communications Interface) 520, memory 530, and communication bus 540, wherein processor 510, communication interface 520, memory 530 complete communication with each other through communication bus 540. Processor 510 may invoke logic instructions in memory 530 to perform a media data packet collection method comprising:
receiving a packet capturing request input by a packet capturing user, and creating a packet capturing task based on the packet capturing request, wherein the packet capturing task comprises packet capturing information;
calling a corresponding target server based on the packet grabbing task, and indicating the target server to start a real-time media data packet acquisition container according to the mirror image of the real-time media data packet acquisition container;
and determining a target packet capturing port and the packet capturing quantity based on the packet capturing information, and calling a packet capturing tool in the real-time media data packet collecting container to capture the media data packet based on the target packet capturing port and the packet capturing quantity until the packet capturing is completed.
Further, the logic instructions in the memory 530 described above may be implemented in the form of software functional units and may be stored in a computer-readable storage medium when sold or used as a stand-alone product. Based on this understanding, the technical solution of the present invention may be embodied essentially or in a part contributing to the prior art or in a part of the technical solution, in the form of a software product stored in a storage medium, comprising several instructions for causing a computer device (which may be a personal computer, a server, a network device, etc.) to perform all or part of the steps of the method according to the embodiments of the present invention. And the aforementioned storage medium includes: a U-disk, a removable hard disk, a Read-Only Memory (ROM), a random access Memory (RAM, random Access Memory), a magnetic disk, or an optical disk, or other various media capable of storing program codes.
In another aspect, the present invention also provides a computer program product, the computer program product including a computer program, the computer program being storable on a non-transitory computer readable storage medium, the computer program, when executed by a processor, being capable of executing the media data packet collection method provided by the above methods, the method comprising:
receiving a packet capturing request input by a packet capturing user, and creating a packet capturing task based on the packet capturing request, wherein the packet capturing task comprises packet capturing information;
calling a corresponding target server based on the packet grabbing task, and indicating the target server to start a real-time media data packet acquisition container according to the mirror image of the real-time media data packet acquisition container;
and determining a target packet capturing port and the packet capturing quantity based on the packet capturing information, and calling a packet capturing tool in the real-time media data packet collecting container to capture the media data packet based on the target packet capturing port and the packet capturing quantity until the packet capturing is completed.
In yet another aspect, the present invention also provides a non-transitory computer readable storage medium having stored thereon a computer program which, when executed by a processor, is implemented to perform a method of media data packet acquisition provided by the above methods, the method comprising:
receiving a packet capturing request input by a packet capturing user, and creating a packet capturing task based on the packet capturing request, wherein the packet capturing task comprises packet capturing information;
calling a corresponding target server based on the packet grabbing task, and indicating the target server to start a real-time media data packet acquisition container according to the mirror image of the real-time media data packet acquisition container;
and determining a target packet capturing port and the packet capturing quantity based on the packet capturing information, and calling a packet capturing tool in the real-time media data packet collecting container to capture the media data packet based on the target packet capturing port and the packet capturing quantity until the packet capturing is completed.
The apparatus embodiments described above are merely illustrative, wherein the elements illustrated as separate elements may or may not be physically separate, and the elements shown as elements may or may not be physical elements, may be located in one place, or may be distributed over a plurality of network elements. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of this embodiment. Those of ordinary skill in the art will understand and implement the present invention without undue burden.
From the above description of the embodiments, it will be apparent to those skilled in the art that the embodiments may be implemented by means of software plus necessary general hardware platforms, or of course may be implemented by means of hardware. Based on this understanding, the foregoing technical solution may be embodied essentially or in a part contributing to the prior art in the form of a software product, which may be stored in a computer readable storage medium, such as ROM/RAM, a magnetic disk, an optical disk, etc., including several instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) to execute the method described in the respective embodiments or some parts of the embodiments.
Finally, it should be noted that: the above embodiments are only for illustrating the technical solution of the present invention, and are not limiting; although the invention has been described in detail with reference to the foregoing embodiments, it will be understood by those of ordinary skill in the art that: the technical scheme described in the foregoing embodiments can be modified or some technical features thereof can be replaced by equivalents; such modifications and substitutions do not depart from the spirit and scope of the technical solutions of the embodiments of the present invention.

Claims (9)

1. A method for collecting media data packets, comprising:
receiving a packet grabbing request input by a packet grabbing user, and creating a packet grabbing task based on the packet grabbing request, wherein the packet grabbing task comprises packet grabbing information, the packet grabbing request comprises packet grabbing quantity and packet grabbing object information, the packet grabbing information comprises a target packet grabbing port and packet grabbing quantity, and the packet grabbing information is determined according to the mapping relation stored in the packet grabbing request and the media information management module;
calling a corresponding target server based on the packet grabbing task, and indicating the target server to start a real-time media data packet acquisition container according to the mirror image of the real-time media data packet acquisition container;
determining a target packet capturing port and the number of the captured packets based on the packet capturing information, and calling a packet capturing tool in the real-time media data packet collecting container to capture the media data packets based on the target packet capturing port and the number of the captured packets until the capturing of the media data packets is completed;
the method comprises the steps of receiving a packet grabbing request input by a packet grabbing user, creating a packet grabbing task based on the packet grabbing request, wherein the packet grabbing task comprises packet grabbing information and comprises the following steps:
the packet grabbing request input by the packet grabbing user is received, the packet grabbing request is analyzed, when the packet grabbing request is an RTP stream packet grabbing request, the packet grabbing task is created based on the RTP stream packet grabbing request, and the RTP stream packet grabbing request comprises a target channel ID and the number of packets grabbed;
and determining a target server IP corresponding to the target channel ID and target open flow port information on a target server corresponding to the target server IP from a media information management module based on the target channel ID, wherein the packet capturing information comprises the target server IP, the target open flow port information and the packet capturing quantity, and determining the target open flow port information as the target packet capturing port.
2. The method for collecting media data packets according to claim 1, further comprising, before receiving a packet capture request input by a packet capture user:
and receiving an open flow instruction, determining a corresponding server and an open flow port on the server based on a channel ID in the open flow instruction, and storing the mapping relation among the channel ID, a server IP of the server and open flow port information of the open flow port to the media information management module.
3. The method according to claim 1, wherein the receiving a packet-grabbing request input by a packet-grabbing user creates a packet-grabbing task based on the packet-grabbing request, the packet-grabbing task including packet-grabbing information, and further comprising:
the packet capturing request input by the packet capturing user is received, the packet capturing request is analyzed, when the packet capturing request is an SIP signaling packet capturing request, the packet capturing task is created based on the SIP signaling packet capturing request, and the SIP signaling packet capturing request comprises a target equipment platform ID and the packet capturing quantity;
and determining a target signaling port corresponding to the target equipment platform ID from a media information management module based on the target equipment platform ID, wherein the packet grabbing information comprises the target signaling port and the packet grabbing quantity.
4. The method for collecting media data packets according to claim 3, further comprising, before receiving a packet capture request input by a packet capture user:
when each equipment platform is registered on line, equipment platform ID and signaling port information of each equipment platform are collected, and the mapping relation between the equipment platform ID and the signaling port information is stored in a media information management module.
5. The method of media data packet acquisition according to any one of claims 1 to 4, further comprising:
storing the media data packets captured by the capture tool in a corresponding capture folder;
and after the data packets in the packet grabbing folder reach the packet grabbing quantity, updating the task state of the packet grabbing task.
6. The method of media data packet acquisition according to claim 5, further comprising:
when the task state of the packet capturing task is that the task is completed, storing the packet capturing folder into a file server and generating a file downloading address corresponding to the packet capturing folder; or when the task state of the packet capturing task is that the task is completed, storing the packet capturing folder into a corresponding target server and generating a file downloading address corresponding to the packet capturing folder.
7. A media data packet acquisition device, comprising:
the system comprises an interface module, a media information management module and a packet capturing module, wherein the interface module is used for receiving a packet capturing request input by a packet capturing user, creating a packet capturing task based on the packet capturing request, the packet capturing task comprises packet capturing information, the packet capturing request comprises packet capturing quantity and packet capturing object information, the packet capturing information comprises a target packet capturing port and packet capturing quantity, and the packet capturing information is determined according to the mapping relation stored in the packet capturing request and the media information management module;
the starting module is used for calling a corresponding target server based on the packet grabbing task and indicating the target server to start the real-time media data packet acquisition container according to the mirror image of the real-time media data packet acquisition container;
the packet grabbing module is used for determining a target packet grabbing port and the number of packets grabbed based on the packet grabbing information, and calling a packet grabbing tool in the real-time media data packet acquisition container to grab the media data packets based on the target packet grabbing port and the number of packets grabbed;
the interface module is specifically configured to:
the packet grabbing request input by the packet grabbing user is received, the packet grabbing request is analyzed, when the packet grabbing request is an RTP stream packet grabbing request, the packet grabbing task is created based on the RTP stream packet grabbing request, and the RTP stream packet grabbing request comprises a target channel ID and the number of packets grabbed;
and determining a target server IP corresponding to the target channel ID and target open flow port information on a target server corresponding to the target server IP from a media information management module based on the target channel ID, wherein the packet capturing information comprises the target server IP, the target open flow port information and the packet capturing quantity, and determining the target open flow port information as the target packet capturing port.
8. An electronic device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, wherein the processor implements the media data packet collection method of any one of claims 1 to 6 when the program is executed by the processor.
9. A non-transitory computer readable storage medium having stored thereon a computer program, which when executed by a processor implements the media data packet collection method according to any of claims 1 to 6.
CN202311192750.9A 2023-09-15 2023-09-15 Media data packet acquisition method and device, electronic equipment and storage medium Active CN116938895B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202311192750.9A CN116938895B (en) 2023-09-15 2023-09-15 Media data packet acquisition method and device, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202311192750.9A CN116938895B (en) 2023-09-15 2023-09-15 Media data packet acquisition method and device, electronic equipment and storage medium

Publications (2)

Publication Number Publication Date
CN116938895A CN116938895A (en) 2023-10-24
CN116938895B true CN116938895B (en) 2023-12-29

Family

ID=88375722

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202311192750.9A Active CN116938895B (en) 2023-09-15 2023-09-15 Media data packet acquisition method and device, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN116938895B (en)

Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102137092A (en) * 2010-12-10 2011-07-27 华为技术有限公司 Method and system for supporting conference system media packet capturing in multimedia subsystem
CN106961363A (en) * 2017-03-29 2017-07-18 云络动力(北京)科技有限公司 A kind of method and system for capturing virtual switch User space data plane data message
CN112398699A (en) * 2020-12-01 2021-02-23 杭州迪普科技股份有限公司 Network traffic packet capturing method, device and equipment
CN112491828A (en) * 2020-11-13 2021-03-12 北京金山云网络技术有限公司 Message analysis method, device, server and storage medium
CN114285764A (en) * 2021-12-30 2022-04-05 北京天融信网络安全技术有限公司 Packet capturing method and device and storage medium
CN115914253A (en) * 2021-09-29 2023-04-04 中兴通讯股份有限公司 Network data packet capturing method, client and server
WO2023093367A1 (en) * 2021-11-23 2023-06-01 中兴通讯股份有限公司 Data packet capturing method and apparatus, electronic device, and storage medium
CN116668801A (en) * 2023-05-31 2023-08-29 武汉烽火众智智慧之星科技有限公司 Network condition monitoring method and system based on video platform

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102137092A (en) * 2010-12-10 2011-07-27 华为技术有限公司 Method and system for supporting conference system media packet capturing in multimedia subsystem
CN106961363A (en) * 2017-03-29 2017-07-18 云络动力(北京)科技有限公司 A kind of method and system for capturing virtual switch User space data plane data message
CN112491828A (en) * 2020-11-13 2021-03-12 北京金山云网络技术有限公司 Message analysis method, device, server and storage medium
CN112398699A (en) * 2020-12-01 2021-02-23 杭州迪普科技股份有限公司 Network traffic packet capturing method, device and equipment
CN115914253A (en) * 2021-09-29 2023-04-04 中兴通讯股份有限公司 Network data packet capturing method, client and server
WO2023093367A1 (en) * 2021-11-23 2023-06-01 中兴通讯股份有限公司 Data packet capturing method and apparatus, electronic device, and storage medium
CN114285764A (en) * 2021-12-30 2022-04-05 北京天融信网络安全技术有限公司 Packet capturing method and device and storage medium
CN116668801A (en) * 2023-05-31 2023-08-29 武汉烽火众智智慧之星科技有限公司 Network condition monitoring method and system based on video platform

Also Published As

Publication number Publication date
CN116938895A (en) 2023-10-24

Similar Documents

Publication Publication Date Title
US9531782B2 (en) Dynamic management of collaboration sessions using real-time text analytics
US9967165B2 (en) Methods, systems, and computer readable media for packet monitoring in a virtual environment
CN108737467B (en) Server log viewing method, device and system
US20100095370A1 (en) Selective packet capturing method and apparatus using kernel probe
CN105915367B (en) online debugging method, terminal and server
CN108055311B (en) HTTP asynchronous request method, device, server, terminal and storage medium
CN108833565A (en) A kind of method, apparatus of monitoring server, server and storage medium
WO2016177144A1 (en) Network element monitoring method and device
CN107493486B (en) Method, system and terminal equipment for video playing termination
RU2538939C2 (en) Method, system, server, device, computer programme and computer software product for data transfer in computer network
CN115664989A (en) Monitoring system and method of cloud desktop
CN116938895B (en) Media data packet acquisition method and device, electronic equipment and storage medium
CN112436950B (en) Method for discovering equipment in local area network based on UDP broadcast
CN107592554A (en) Live video retransmission method and device
CN109194706B (en) Network resource dial testing method and terminal
CN107846609B (en) Real-time transmission method, device and system for control room data
CN102457494B (en) Method and device for improving monitoring success rate based on session initiation protocol (SIP) signaling
CN113596325B (en) Method and device for capturing images, electronic equipment and storage medium
CN110943978A (en) Security policy configuration method and device, electronic equipment and medium
CN1744514A (en) Method and device for obtaining information of operation and failure state for network equipment
CN113055493B (en) Data packet processing method, device, system, scheduling device and storage medium
CN113162922A (en) Client data acquisition method and device, storage medium and electronic equipment
CN110943895A (en) Network shutdown and Linux system-based network data processing method and device
CN114363204A (en) Request monitoring method, network device and storage medium
CN114401103A (en) SMB remote transmission file detection method and device

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant