CN110795008B - Picture transmission method and device and computer readable storage medium - Google Patents
Picture transmission method and device and computer readable storage medium Download PDFInfo
- Publication number
- CN110795008B CN110795008B CN201910936051.8A CN201910936051A CN110795008B CN 110795008 B CN110795008 B CN 110795008B CN 201910936051 A CN201910936051 A CN 201910936051A CN 110795008 B CN110795008 B CN 110795008B
- Authority
- CN
- China
- Prior art keywords
- picture
- transmitted
- original
- terminal
- resolution
- 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
Links
Images
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N1/00—Scanning, transmission or reproduction of documents or the like, e.g. facsimile transmission; Details thereof
- H04N1/32—Circuits or arrangements for control or supervision between transmitter and receiver or between image input and image output device, e.g. between a still-image camera and its memory or between a still-image camera and a printer device
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F3/00—Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
- G06F3/01—Input arrangements or combined input and output arrangements for interaction between user and computer
- G06F3/048—Interaction techniques based on graphical user interfaces [GUI]
- G06F3/0484—Interaction techniques based on graphical user interfaces [GUI] for the control of specific functions or operations, e.g. selecting or manipulating an object, an image or a displayed text element, setting a parameter value or selecting a range
- G06F3/04842—Selection of displayed objects or displayed text elements
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F3/00—Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
- G06F3/14—Digital output to display device ; Cooperation and interconnection of the display device with other functional units
- G06F3/1454—Digital output to display device ; Cooperation and interconnection of the display device with other functional units involving copying of the display data of a local workstation or window to a remote workstation or window so that an actual copy of the data is displayed simultaneously on two or more displays, e.g. teledisplay
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T7/00—Image analysis
- G06T7/0002—Inspection of images, e.g. flaw detection
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N19/00—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
- H04N19/42—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals characterised by implementation details or hardware specially adapted for video compression or decompression, e.g. dedicated software implementation
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T2207/00—Indexing scheme for image analysis or image enhancement
- G06T2207/30—Subject of image; Context of image processing
- G06T2207/30168—Image quality inspection
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Human Computer Interaction (AREA)
- Multimedia (AREA)
- Signal Processing (AREA)
- Quality & Reliability (AREA)
- Computer Vision & Pattern Recognition (AREA)
- Two-Way Televisions, Distribution Of Moving Picture Or The Like (AREA)
Abstract
The invention provides a picture transmission method, a picture transmission device and a computer readable storage medium, wherein the method comprises the following steps: receiving an original picture selection instruction triggered by a user through the first shared whiteboard client; responding to the selection instruction, and acquiring the original picture; analyzing the original picture to obtain quality parameters of the original picture; compressing the original picture according to the quality parameters of the original picture to obtain a compressed picture to be transmitted; the picture to be transmitted is sent to the video networking server through the first shared whiteboard client, so that the video networking server can send the picture to be transmitted to the second shared whiteboard client, when the shared whiteboard client is used for picture transmission, the picture to be transmitted can be analyzed by using the method, the picture to be transmitted is compressed according to the quality parameters obtained by analysis, the bandwidth occupied by the picture to be transmitted is reduced, the picture transmission smoothness is improved, and the user experience is improved.
Description
Technical Field
The present invention relates to the field of data transmission technologies, and in particular, to a method and an apparatus for transmitting pictures and a computer-readable storage medium.
Background
With the development of video networking, remote communication between people becomes more and more convenient, wherein as one of communication modes, the shared whiteboard client is used more and more frequently, the shared whiteboard client is also called as an electronic shared whiteboard, users at two terminals can instantly share the content on the shared whiteboard client through the shared whiteboard client, the shared whiteboard client is an online demonstration interactive system and runs on the terminals, and is suitable for scenes such as training, recruitment or meeting of various large, medium and small enterprises and groups, and the shared whiteboard client provides real-time information interaction for the scene terminals, for example, characters input by the shared whiteboard client in real time, pictures stored by the shared terminal or pictures shot in real time, or documents stored by the shared terminal.
Along with the function of taking pictures of the existing terminal is more and more powerful, the quality of pictures stored in the terminal is higher and higher, picture sharing is carried out on a shared white board client operated by a plurality of terminals through a video network, when the pictures with higher sharing quality are shared, the smoothness of interaction between the terminals can be reduced, the phenomena of blocking and the like are caused, and the user experience is greatly influenced.
Disclosure of Invention
In view of the above problems, embodiments of the present invention are proposed to provide a picture transmission method, apparatus and computer-readable storage medium that overcome or at least partially solve the above problems.
In order to solve the above problems, an embodiment of the present invention discloses a picture transmission method, which is applied to a first terminal in a picture transmission system, wherein the first terminal is provided with a first shared whiteboard client, the picture transmission system is also provided with a video network server and a second terminal, the second terminal is provided with a second shared whiteboard client, and the video network server is in communication connection with the first terminal and the second terminal, and the method includes:
receiving an original picture selection instruction triggered by a user through the first shared whiteboard client;
responding to the selection instruction, and acquiring the original picture;
analyzing the original picture to obtain quality parameters of the original picture;
compressing the original picture according to the quality parameters of the original picture to obtain a compressed picture to be transmitted;
and sending the picture to be transmitted to a video network server through the first shared whiteboard client so that the video network server can send the picture to be transmitted to a second shared whiteboard client.
Optionally, the analyzing the original picture to obtain the quality parameter of the original picture includes:
analyzing the original picture to obtain the resolution of the original picture;
compressing the original picture according to the quality parameters of the original picture to obtain a compressed picture to be transmitted, including:
comparing the resolution of the original picture with the resolution of the first terminal;
under the condition that the resolution of the original picture is larger than the resolution of the first terminal, circularly compressing the original picture according to a preset resolution scaling ratio to obtain a compressed intermediate picture, wherein the resolution of the intermediate picture is smaller than the resolution of the first terminal;
and compressing the intermediate picture to obtain a compressed picture to be transmitted.
Optionally, after comparing the resolution of the original picture with the resolution of the first terminal itself, the method further includes:
taking the original picture as an intermediate picture under the condition that the resolution of the original picture is smaller than the resolution of the first terminal;
and compressing the intermediate picture to obtain a compressed picture to be transmitted.
Optionally, the quality parameter further includes a sampling rate, and compressing the intermediate picture to obtain a compressed picture to be transmitted includes:
acquiring a memory value occupied by the intermediate picture;
judging whether the memory value occupied by the intermediate picture is greater than a first preset threshold value or not;
under the condition that the memory value occupied by the intermediate picture is larger than a first preset threshold value, circularly compressing the intermediate picture according to a preset sampling rate scaling ratio to obtain a compressed target picture, wherein the memory value occupied by the target picture is smaller than the first preset threshold value;
sending the picture to be transmitted to a video network server through the first shared whiteboard client so that the video network server can send the picture to be transmitted to a second shared whiteboard client, comprising:
and sending the picture to be transmitted to a video networking server through the first shared whiteboard client by taking the target picture as the picture to be transmitted, so that the video networking server can send the picture to be transmitted to a second shared whiteboard client.
Optionally, the quality parameter further includes a bit depth or a transparency, the format of the original picture is JPEG format, and the method further includes:
acquiring a memory value occupied by the target picture;
judging whether the memory value occupied by the target picture is larger than a second preset threshold value or not;
under the condition that the memory value occupied by the target picture is larger than a second preset threshold value, circularly compressing the target picture according to a preset bit depth scaling ratio or a preset transparency scaling ratio to obtain a compressed final picture, wherein the memory value occupied by the final picture is smaller than the second preset threshold value;
sending the picture to be transmitted to a video network server through the first shared whiteboard client so that the video network server can send the picture to be transmitted to a second shared whiteboard client, and the method further comprises the following steps:
and taking the final picture as the picture to be transmitted, and sending the picture to be transmitted to a video networking server through the first shared whiteboard client so that the video networking server can send the picture to be transmitted to a second shared whiteboard client.
Optionally, the method further comprises:
checking the format of the original picture, and judging whether the original picture is a correct picture;
and under the condition that the original picture is a correct picture, analyzing the original picture to obtain the quality parameters of the original picture.
And returning an error prompt to the first shared whiteboard client under the condition that the original picture is an error picture.
The embodiment of the invention also discloses a picture transmission device, which is applied to a first terminal in a picture transmission system, wherein the first terminal is provided with a first shared whiteboard client, the picture transmission system is also provided with a video networking server and a second terminal, the second terminal is provided with a second shared whiteboard client, the video networking server is in communication connection with the first terminal and the second terminal, and the picture transmission device comprises:
the receiving module is used for receiving an original picture selection instruction triggered by a user through the first shared whiteboard client;
the response module is used for responding to the selection instruction and acquiring the original picture;
the first analysis module is used for analyzing the original picture to obtain the quality parameter of the original picture;
the compression module is used for compressing the original picture according to the quality parameters of the original picture to obtain a compressed picture to be transmitted;
and the sending module is used for sending the picture to be transmitted to a video network server through the first shared whiteboard client so that the video network server can send the picture to be transmitted to a second shared whiteboard client.
Optionally, the quality parameter includes a resolution, and the first parsing module includes:
the first analysis submodule is used for analyzing the original picture to obtain the resolution of the original picture;
the compression module comprises;
the first comparison sub-module is used for comparing the resolution of the original picture with the resolution of the first terminal;
the first cyclic compression sub-module is used for cyclically compressing the original picture according to a preset resolution scaling ratio under the condition that the resolution of the original picture is larger than the resolution of the first terminal, so as to obtain a compressed intermediate picture, wherein the resolution of the intermediate picture is smaller than the resolution of the first terminal;
and the first compression submodule is used for compressing the intermediate picture to obtain a compressed picture to be transmitted.
Optionally, the first parsing module further includes:
and the first definition sub-module is used for taking the original picture as an intermediate picture under the condition that the resolution of the original picture is smaller than the resolution of the first terminal.
Optionally, the quality parameter further includes a sampling rate, and the first compression sub-module includes;
the first obtaining submodule is used for obtaining a memory value occupied by the intermediate picture;
the first judgment submodule is used for judging whether the memory value occupied by the intermediate picture is greater than a first preset threshold value or not;
the second cyclic compression sub-module is used for performing cyclic compression on the intermediate picture according to a preset sampling rate scaling ratio under the condition that the memory value occupied by the intermediate picture is larger than a first preset threshold value to obtain a compressed target picture, wherein the memory value occupied by the target picture is smaller than the first preset threshold value;
the sending module comprises:
and the first sending sub-module is used for sending the picture to be transmitted to a video networking server through the first shared whiteboard client by taking the target picture as the picture to be transmitted, so that the video networking server can send the picture to be transmitted to a second shared whiteboard client.
Optionally, the quality parameter further includes a bit depth or a transparency, the format of the original picture is JPEG format, and the apparatus further includes:
the second obtaining submodule is used for obtaining a memory value occupied by the target picture;
the second judgment submodule is used for judging whether the memory value occupied by the target picture is greater than a second preset threshold value or not;
a third cyclic compression sub-module, configured to, when the memory value occupied by the target picture is greater than a second preset threshold, perform cyclic compression on the target picture according to a preset bit depth scaling or transparency scaling to obtain a compressed final picture, where the memory value occupied by the final picture is smaller than the second preset threshold;
the sending module further comprises:
and the second sending submodule is used for sending the picture to be transmitted to a video network server through the first shared whiteboard client by taking the final picture as the picture to be transmitted, so that the video network server can send the picture to be transmitted to a second shared whiteboard client.
Optionally, the apparatus further comprises:
the verification module is used for verifying the format of the original picture and judging whether the original picture is a correct picture;
and the second analysis module is used for analyzing the original picture to obtain the quality parameter of the original picture under the condition that the original picture is a correct picture.
And the error returning module is used for returning an error prompt to the first shared whiteboard client under the condition that the original picture is the error picture.
The embodiment of the invention also discloses a picture transmission device, which comprises:
one or more processors; and
one or more computer-readable media having instructions stored thereon, which when executed by the one or more processors, cause the apparatus to perform a picture transfer method as in any one of the embodiments of the invention.
The embodiment of the invention also discloses a computer readable storage medium, and a stored computer program enables a processor to execute the picture transmission method.
The embodiment of the invention has the following advantages:
in the picture transmission method provided by the embodiment of the invention, the first shared whiteboard client receives an original picture selection instruction triggered by a user, then responds to the selection instruction, obtains an original picture from the first terminal, analyzes the original picture to obtain quality parameters of the original picture, compresses the original picture according to the quality parameters of the original picture to obtain a compressed picture to be transmitted, and then sends the picture to be transmitted to the video network server through the first shared whiteboard client, so that the video network server can send the picture to be transmitted to the second shared whiteboard client. By using the picture transmission method provided by the embodiment of the invention, the quality of the picture to be transmitted can be analyzed, and the picture to be transmitted is compressed according to the quality parameters obtained by analysis, so that the picture is transmitted after being compressed, the bandwidth occupied by the picture to be transmitted is reduced, the smoothness of picture transmission among the shared whiteboard clients is improved, and the user experience is improved.
Drawings
FIG. 1 is a schematic networking diagram of a video network of the present invention;
FIG. 2 is a schematic diagram of a hardware architecture of a node server according to the present invention;
fig. 3 is a schematic diagram of a hardware structure of an access switch of the present invention;
fig. 4 is a schematic diagram of a hardware structure of an ethernet protocol conversion gateway according to the present invention;
fig. 5 is a schematic application environment diagram of a picture transmission method according to an embodiment of the present invention;
FIG. 6 is a flowchart illustrating steps of a method for transmitting pictures according to an embodiment of the present invention;
fig. 7 is a block diagram of a picture transmission apparatus according to an embodiment of the present invention.
Detailed Description
In order to make the aforementioned objects, features and advantages of the present invention comprehensible, embodiments accompanied with figures are described in further detail below.
The video networking is an important milestone for network development, is a real-time network, can realize high-definition video real-time transmission, and pushes a plurality of internet applications to high-definition video, and high-definition faces each other.
The video networking adopts a real-time high-definition video exchange technology, can integrate required services such as dozens of services of video, voice, pictures, characters, communication, data and the like on a system platform on a network platform, such as high-definition video conference, video monitoring, intelligent monitoring analysis, emergency command, digital broadcast television, delayed television, network teaching, live broadcast, VOD on demand, television mail, Personal Video Recorder (PVR), intranet (self-office) channels, intelligent video broadcast control, information distribution and the like, and realizes high-definition quality video broadcast through a television or a computer.
To better understand the embodiments of the present invention, the following description refers to the internet of view:
some of the technologies applied in the video networking are as follows:
network Technology (Network Technology)
Network technology innovation in video networking has improved the traditional Ethernet (Ethernet) to face the potentially huge first video traffic on the network. Unlike pure network Packet Switching (Packet Switching) or network Circuit Switching (Circuit Switching), the Packet Switching is adopted by the technology of the video networking to meet the Streaming requirement. The video networking technology has the advantages of flexibility, simplicity and low price of packet switching, and simultaneously has the quality and safety guarantee of circuit switching, thereby realizing the seamless connection of the whole network switching type virtual circuit and the data format.
Switching Technology (Switching Technology)
The video network adopts two advantages of asynchronism and packet switching of the Ethernet, eliminates the defects of the Ethernet on the premise of full compatibility, has end-to-end seamless connection of the whole network, is directly communicated with a user terminal, and directly bears an IP data packet. The user data does not require any format conversion across the entire network. The video networking is a higher-level form of the Ethernet, is a real-time exchange platform, can realize the real-time transmission of the whole-network large-scale high-definition video which cannot be realized by the existing Internet, and pushes a plurality of network video applications to high-definition and unification.
Server Technology (Server Technology)
The server technology on the video network and the unified video platform is different from the traditional server, the streaming media transmission of the video network and the unified video platform is established on the basis of connection orientation, the picture transmission capability of the video network is irrelevant to flow and communication time, and a single network layer can contain signaling and data transmission. For voice and video services, the complexity of video networking and unified video platform streaming media processing is much simpler than that of picture transmission, and the efficiency is greatly improved by more than one hundred times compared with that of a traditional server.
Storage Technology (Storage Technology)
The super-high speed storage technology of the unified video platform adopts the most advanced real-time operating system in order to adapt to the media content with super-large capacity and super-large flow, the program information in the server instruction is mapped to the specific hard disk space, the media content is not passed through the server any more, and is directly sent to the user terminal instantly, and the general waiting time of the user is less than 0.2 second. The optimized sector distribution greatly reduces the mechanical motion of the magnetic head track seeking of the hard disk, the resource consumption only accounts for 20% of that of the IP internet of the same grade, but concurrent flow which is 3 times larger than that of the traditional hard disk array is generated, and the comprehensive efficiency is improved by more than 10 times.
Network Security Technology (Network Security Technology)
The structural design of the video network completely eliminates the network security problem troubling the internet structurally by the modes of independent service permission control each time, complete isolation of equipment and user data and the like, generally does not need antivirus programs and firewalls, avoids the attack of hackers and viruses, and provides a structural carefree security network for users.
Service Innovation Technology (Service Innovation Technology)
The unified video platform integrates services and transmission, and is not only automatically connected once whether a single user, a private network user or a network aggregate. The user terminal, the set-top box or the PC are directly connected to the unified video platform to obtain various multimedia video services in various forms. The unified video platform adopts a menu type configuration table mode to replace the traditional complex application programming, can realize complex application by using very few codes, and realizes infinite new service innovation.
Networking of the video network is as follows:
the video network is a centralized control network structure, and the network can be a tree network, a star network, a ring network and the like, but on the basis of the centralized control node, the whole network is controlled by the centralized control node in the network.
As shown in fig. 1, the video network is divided into an access network and a metropolitan network.
The devices of the access network part can be mainly classified into 3 types: node server, access switch, terminal (including various set-top boxes, coding boards, memories, etc.). The node server is connected to an access switch, which may be connected to a plurality of terminals and may be connected to an ethernet network.
The node server is a node which plays a centralized control function in the access network and can control the access switch and the terminal. The node server can be directly connected with the access switch or directly connected with the terminal.
Similarly, devices of the metropolitan network portion may also be classified into 3 types: a metropolitan area server, a node switch and a node server. The metro server is connected to a node switch, which may be connected to a plurality of node servers.
The node server is a node server of the access network part, namely the node server belongs to both the access network part and the metropolitan area network part.
The metropolitan area server is a node which plays a centralized control function in the metropolitan area network and can control a node switch and a node server. The metropolitan area server can be directly connected with the node switch or directly connected with the node server.
Therefore, the whole video network is a network structure with layered centralized control, and the network controlled by the node server and the metropolitan area server can be in various structures such as tree, star and ring.
The access network part can form a unified video platform (the part in the dotted circle), and a plurality of unified video platforms can form a video network; each unified video platform may be interconnected via metropolitan area and wide area video networking.
Video networking device classification
1.1 devices in the video network of the embodiment of the present invention can be mainly classified into 3 types: server, exchanger (including Ethernet protocol conversion gateway), terminal (including various set-top boxes, code board, memory, etc.). The video network as a whole can be divided into a metropolitan area network (or national network, global network, etc.) and an access network.
1.2 wherein the devices of the access network part can be mainly classified into 3 types: node server, access exchanger (including Ethernet protocol conversion gateway), terminal (including various set-top boxes, coding board, memory, etc.).
The specific hardware structure of each access network device is as follows:
a node server:
as shown in fig. 2, the system mainly includes a network interface module 201, a switching engine module 202, a CPU module 203, and a disk array module 204;
the network interface module 201, the CPU module 203, and the disk array module 204 all enter the switching engine module 202; the switching engine module 202 performs an operation of looking up the address table 205 on the incoming packet, thereby obtaining the direction information of the packet; and stores the packet in a queue of the corresponding packet buffer 206 based on the packet's steering information; if the queue of the packet buffer 206 is nearly full, it is discarded; the switching engine module 202 polls all packet buffer queues for forwarding if the following conditions are met: 1) the port send buffer is not full; 2) the queue packet counter is greater than zero. The disk array module 204 mainly implements control over the hard disk, including initialization, read-write, and other operations on the hard disk; the CPU module 203 is mainly responsible for protocol processing with an access switch and a terminal (not shown in the figure), configuring an address table 205 (including a downlink protocol packet address table, an uplink protocol packet address table, and a data packet address table), and configuring the disk array module 204.
The access switch:
as shown in fig. 3, the network interface module mainly includes a network interface module (a downlink network interface module 301 and an uplink network interface module 302), a switching engine module 303 and a CPU module 304;
wherein, the packet (uplink data) coming from the downlink network interface module 301 enters the packet detection module 305; the packet detection module 305 detects whether the Destination Address (DA), the Source Address (SA), the packet type, and the packet length of the packet meet the requirements, and if so, allocates a corresponding stream identifier (stream-id) and enters the switching engine module 303, otherwise, discards the stream identifier; the packet (downstream data) coming from the upstream network interface module 302 enters the switching engine module 303; the incoming data packet of the CPU module 304 enters the switching engine module 303; the switching engine module 303 performs an operation of looking up the address table 306 on the incoming packet, thereby obtaining the direction information of the packet; if the packet entering the switching engine module 303 is from the downstream network interface to the upstream network interface, the packet is stored in the queue of the corresponding packet buffer 307 in association with the stream-id; if the queue of the packet buffer 307 is nearly full, it is discarded; if the packet entering the switching engine module 303 is not from the downlink network interface to the uplink network interface, the data packet is stored in the queue of the corresponding packet buffer 307 according to the guiding information of the packet; if the queue of the packet buffer 307 is nearly full, it is discarded.
The switching engine module 303 polls all packet buffer queues and may include two cases:
if the queue is from the downlink network interface to the uplink network interface, the following conditions are met for forwarding: 1) the port send buffer is not full; 2) the queued packet counter is greater than zero; 3) obtaining a token generated by a code rate control module;
if the queue is not from the downlink network interface to the uplink network interface, the following conditions are met for forwarding: 1) the port send buffer is not full; 2) the queue packet counter is greater than zero.
The rate control module 308 is configured by the CPU module 304, and generates tokens for packet buffer queues from all downstream network interfaces to upstream network interfaces at programmable intervals to control the rate of upstream forwarding.
The CPU module 304 is mainly responsible for protocol processing with the node server, configuration of the address table 306, and configuration of the code rate control module 308.
Ethernet protocol conversion gateway:
As shown in fig. 4, the apparatus mainly includes a network interface module (a downlink network interface module 401 and an uplink network interface module 402), a switching engine module 403, a CPU module 404, a packet detection module 405, a rate control module 408, an address table 406, a packet buffer 407, a MAC adding module 409, and a MAC deleting module 410.
Wherein, the data packet coming from the downlink network interface module 401 enters the packet detection module 405; the packet detection module 405 detects whether the ethernet MAC DA, the ethernet MAC SA, the ethernet length or frame type, the video network destination address DA, the video network source address SA, the video network packet type, and the packet length of the packet meet the requirements, and if so, allocates a corresponding stream identifier (stream-id); then, the MAC deletion module 410 subtracts MAC DA, MAC SA, length or frame type (2byte) and enters the corresponding receiving buffer, otherwise, discards it;
the downlink network interface module 401 detects the sending buffer of the port, and if there is a packet, obtains the ethernet MAC DA of the corresponding terminal according to the destination address DA of the packet, adds the ethernet MAC DA of the terminal, the MAC SA of the ethernet protocol gateway, and the ethernet length or frame type, and sends the packet.
The other modules in the ethernet protocol gateway function similarly to the access switch.
A terminal:
the system mainly comprises a network interface module, a service processing module and a CPU module; for example, the set-top box mainly comprises a network interface module, a video and audio coding and decoding engine module and a CPU module; the coding board mainly comprises a network interface module, a video and audio coding engine module and a CPU module; the memory mainly comprises a network interface module, a CPU module and a disk array module.
1.3 devices of the metropolitan area network part can be mainly classified into 2 types: node server, node exchanger, metropolitan area server. The node switch mainly comprises a network interface module, a switching engine module and a CPU module; the metropolitan area server mainly comprises a network interface module, a switching engine module and a CPU module.
2. Video networking packet definition
2.1 Access network packet definition
The data packet of the access network mainly comprises the following parts: destination Address (DA), Source Address (SA), reserved bytes, payload (pdu), CRC.
As shown in the following table, the data packet of the access network mainly includes the following parts:
DA | SA | Reserved | Payload | CRC |
wherein:
the Destination Address (DA) is composed of 8 bytes (byte), the first byte represents the type of the data packet (such as various protocol packets, multicast data packets, unicast data packets, etc.), there are 256 possibilities at most, the second byte to the sixth byte are metropolitan area network addresses, and the seventh byte and the eighth byte are access network addresses;
the Source Address (SA) is also composed of 8 bytes (byte), defined as the same as the Destination Address (DA);
the reserved byte consists of 2 bytes;
the payload part has different lengths according to different types of datagrams, and is 64 bytes if the datagram is various types of protocol packets, and is 32+1024 or 1056 bytes if the datagram is a unicast packet, of course, the length is not limited to the above 2 types;
the CRC consists of 4 bytes and is calculated in accordance with the standard ethernet CRC algorithm.
2.2 metropolitan area network packet definition
The topology of a metropolitan area network is a graph and there may be 2, or even more than 2, connections between two devices, i.e., there may be more than 2 connections between a node switch and a node server, a node switch and a node switch, and a node switch and a node server. However, the metro network address of the metro network device is unique, and in order to accurately describe the connection relationship between the metro network devices, parameters are introduced in the embodiment of the present invention: a label to uniquely describe a metropolitan area network device.
In this specification, the definition of the Label is similar to that of the Label of MPLS (Multi-Protocol Label Switch), and assuming that there are two connections between the device a and the device B, there are 2 labels for the packet from the device a to the device B, and 2 labels for the packet from the device B to the device a. The label is classified into an incoming label and an outgoing label, and assuming that the label (incoming label) of the packet entering the device a is 0x0000, the label (outgoing label) of the packet leaving the device a may become 0x 0001. The network access process of the metro network is a network access process under centralized control, that is, address allocation and label allocation of the metro network are both dominated by the metro server, and the node switch and the node server are both passively executed, which is different from label allocation of MPLS, and label allocation of MPLS is a result of mutual negotiation between the switch and the server.
As shown in the following table, the data packet of the metro network mainly includes the following parts:
DA | SA | Reserved | label (R) | Payload | CRC |
Namely Destination Address (DA), Source Address (SA), Reserved byte (Reserved), tag, payload (pdu), CRC. The format of the tag may be defined by reference to the following: the tag is 32 bits with the upper 16 bits reserved and only the lower 16 bits used, and its position is between the reserved bytes and payload of the packet.
With the development of video networking, remote communication between people becomes more and more convenient, when meeting, training, recruitment and other scenes are carried out, picture sharing is frequently carried out on a shared whiteboard client operated by a plurality of terminals through the video networking, picture sharing on the shared whiteboard client is a process of sending a picture of one terminal to a server through the shared whiteboard client and then sending the picture to a shared whiteboard client on another terminal by the server, and the process relates to the transmission of the picture, wherein the source of the picture can comprise a plurality of aspects, such as picture taken by a user, a webpage picture, a picture generated by social software and the like, wherein high-quality pictures are not lacked, for example, the quality of the picture taken by the user is high, so that the picture with high quality exists in the terminal, when a plurality of parties share the picture with high quality, the local memory overflows, and meanwhile, the shared picture with high quality occupies larger bandwidth, therefore, the fluency of interaction between terminals is reduced, the phenomena of blocking and the like are caused, and the user experience is greatly influenced.
Fig. 5 is a schematic view of an application environment of the image transmission method according to the embodiment of the present invention, as shown in fig. 5, in an image transmission system of a video network, a video network server may be in communication connection with a plurality of terminals, a first shared whiteboard client is installed on a first terminal, and a second shared whiteboard client is installed on a second terminal. In this embodiment, the terminal may be an intelligent device (such as a smart phone), a computer, or a tablet computer, and this embodiment does not specifically limit the terminal.
The picture transmission method provided by the embodiment of the invention can be applied to a video network, and particularly can be applied to a first terminal in a picture transmission system, wherein the first terminal is provided with a first shared white board client, the picture transmission system is also provided with a video network server and a second terminal, the second terminal is provided with a second shared white board client, and the video network server is in communication connection with the first terminal and the second terminal.
Referring to fig. 6, fig. 6 is a flowchart illustrating steps of a method for transmitting a picture according to an embodiment of the present invention, where the method specifically includes the following steps:
step S601, receiving an original picture selection instruction triggered by a user through the first shared whiteboard client.
The first shared whiteboard client and the second whiteboard client referred in this embodiment both correspond to the video network server in this embodiment, and provide the same local service for the client, where the user targeted by the second shared whiteboard client is different from the user targeted by the first shared whiteboard client.
In this embodiment, a user local to a first shared whiteboard client wants to send a picture to a second shared whiteboard client through the first shared whiteboard client, and may click and select a local original picture of a first terminal to generate a selection instruction, where the first shared whiteboard client may receive the selection instruction triggered by the user.
In this embodiment, the local original picture of the first terminal may be pre-stored in the local memory of the first terminal, or may be temporarily shot by calling the camera device after the first shared whiteboard client is opened.
Step S602, in response to the selection instruction, acquiring the original picture.
In this embodiment, after receiving a selection instruction triggered by a user, the first shared whiteboard client may respond to the instruction, so as to obtain a local original picture of the first terminal.
Step S603, analyzing the original picture to obtain a quality parameter of the original picture.
In this embodiment, the first shared whiteboard client may analyze the original picture by calling a pre-stored system function, and directly obtain the quality parameter of the original picture.
Step S604, compressing the original picture according to the quality parameters of the original picture to obtain a compressed picture to be transmitted.
In this embodiment, the picture quality includes one or more of resolution, sampling rate, bit depth, and transparency, and compressing the picture is compression of the picture quality, so that the picture to be transmitted after compression is obtained by compressing according to the picture quality parameters.
Step S605, sending the picture to be transmitted to a video network server through the first shared whiteboard client, so that the video network server can send the picture to be transmitted to a second shared whiteboard client.
In this embodiment, the first terminal may send the compressed picture to be transmitted to the video networking server through the first shared whiteboard client, after receiving the picture to be transmitted, the video networking server sends the picture to be transmitted to the second shared whiteboard client, and after receiving the picture to be transmitted, the second shared whiteboard client may display the picture to be transmitted on the second shared whiteboard client, so that a local user of the second terminal can view the picture, and at this time, the picture viewed by the local user of the second terminal is the compressed picture.
In this embodiment, an original picture selection instruction triggered by a user is received by a first sharing whiteboard client, then the selection instruction is responded, an original picture is obtained from a first terminal, the original picture is analyzed to obtain quality parameters of the original picture, the original picture is compressed according to the quality parameters of the original picture to obtain a compressed picture to be transmitted, and the compressed picture to be transmitted is sent to a video network server by the first sharing whiteboard client, so that the video network server can send the picture to be transmitted to a second sharing whiteboard client. By using the picture transmission method provided by the embodiment of the invention, the quality of the picture to be transmitted can be analyzed, and the picture to be transmitted is compressed according to the quality parameters obtained by analysis, so that the picture is transmitted after being compressed, the bandwidth occupied by the picture to be transmitted is reduced, the smoothness of picture transmission among the shared whiteboard clients is improved, and the user experience is improved.
In addition, considering that the terminal often displays a local video or a GIF moving picture together when displaying a picture to be selected to the user, the user may select the video or the GIF moving picture when clicking to select an original picture, thereby affecting the compression of the original picture.
Based on the above consideration, in order to ensure that the original picture clicked and selected by the user is in the correct picture format, after the original picture is obtained in response to the selection instruction, the following steps may be further performed:
step S701, checking the format of the original picture, and judging whether the original picture is a correct picture;
step S702A, when the original picture is a correct picture, analyzing the original picture to obtain a quality parameter of the original picture.
Step S702B, when the original picture is an error picture, an error prompt is returned to the first shared whiteboard client.
In this embodiment, the correct picture refers to a picture in a correct format, such as JPG, JPEG, PNG, and the like, the incorrect picture refers to a non-picture format such as a video format or a moving picture format, and the original picture is checked, so that it can be determined whether the original picture selected by the user through clicking is the correct picture, if the original picture is the correct picture, the first shared whiteboard client may parse the original picture selected by the user, otherwise, an error prompt is returned to the first shared client, for example, an error prompt may be returned to the client: "this picture is incorrect, cannot be used for compression, please reselect" and the picture cannot be added to the resolution queue, i.e., cannot be resolved.
By executing the steps S701, S702A, and S702B, the original picture selected by the user can be verified, the correct picture can be used for parsing, an error prompt is sent to the user for the error picture, and a verification function before picture parsing is realized, so that picture compression and transmission are better realized.
In the case that the quality parameter includes a resolution, an embodiment of the present invention further provides another picture transmission method, which may specifically include the following steps:
step S801, receiving an original picture selection instruction triggered by a user through the first shared whiteboard client.
Step S802, responding to the selection instruction, and acquiring the original picture.
Step S803, parsing the original picture to obtain the resolution of the original picture.
Step S804, comparing the resolution of the original picture with the resolution of the first terminal itself.
Step S805, performing cyclic compression on the original picture according to a preset resolution scaling ratio under the condition that the resolution of the original picture is greater than the resolution of the first terminal itself, to obtain a compressed intermediate picture. The resolution of the intermediate picture is smaller than the resolution of the first terminal;
in this embodiment, the original picture may be parsed by calling a function carried by the system, so as to obtain the resolution of the original picture, for example, the resolution of the original picture obtained by parsing is 1920 × 1080. The resolution of the first terminal itself may be directly obtained locally, for example, the resolution of the first terminal itself obtained locally is 1280 × 720. The resolution 1280 x 720 of the first terminal itself is compared with the resolution 1920 x 1080 of the original picture. Through comparison, the resolution of the first terminal is found to be smaller than that of the original picture, so that the original picture needs to be compressed.
In this embodiment, the original picture is cyclically compressed according to the preset resolution scaling ratio, and when the resolution of the compressed picture is smaller than the resolution of the first terminal, a cycle can be skipped to obtain an intermediate picture. For example, the preset resolution scaling is Scale (0.5f ), which means that the original pictures are reduced to 0.5 times in width and height, i.e. the original pictures with the resolution 1920 × 1080 are reduced to pictures with the resolution 960 × 540, and the resolution 960 × 540 is smaller than the resolution 1280 × 720, so that the loop can be skipped by only one time of loop compression, and the resolution of the intermediate pictures is 960 × 540.
In another embodiment of the present application, since the resolution of the first terminal itself may also be smaller than the resolution of the original picture, which indicates that the resolution of the original picture is satisfactory, and at this time, it is not necessary to compress the resolution of the original picture, therefore, in the case that the resolution of the original picture is smaller than the resolution of the first terminal itself, the original picture may be directly used as the intermediate picture.
And step S806, compressing the intermediate picture to obtain a compressed picture to be transmitted.
In the application, the requirement of smooth transmission of the picture may not be met after the original picture is subjected to resolution compression, but if the resolution is compressed all the time, the picture definition can be greatly reduced, so that the intermediate picture can be compressed in other modes, and the picture to be transmitted after being compressed is obtained.
In an embodiment of the present application, the quality parameter further includes a sampling rate, and compressing the intermediate picture to obtain a compressed picture to be transmitted may further include the following sub-steps:
and a substep S806-1, obtaining the memory value occupied by the intermediate picture.
In this embodiment, the memory value of the intermediate picture may be obtained by calling a system function length method, for example, the memory value of the obtained intermediate picture is 2.4M.
In the substep S806-2, it is determined whether the memory value occupied by the intermediate picture is greater than a first preset threshold.
In this embodiment, different terminal memories are different, and the first preset threshold may be set according to the actual condition of the terminal, for example, the first preset threshold may be set to 1M.
And a substep S806-3, performing cyclic compression on the intermediate picture according to a preset sampling rate scaling ratio under the condition that the memory value occupied by the intermediate picture is greater than a first preset threshold value, so as to obtain a compressed target picture, wherein the memory value occupied by the target picture is smaller than the first preset threshold value.
In this embodiment, for example, when the terminal runs the Android system, the Android officer provides a sampling rate compression method, and sets a sampling rate inSampleSize (the sampling rate can only be 2 to the N power). And circularly compressing the intermediate picture according to a preset sampling rate scaling ratio (only the power of N of 2), and jumping out of circulation to obtain a target picture when a memory value occupied by the compressed picture is smaller than a first preset threshold value. For example, if the preset sampling rate scaling is 2, the sampling rate of the intermediate picture is reduced to 0.5 times, the sampling rate is reduced to 0.5 times, and the memory is also reduced to 0.5 times.
For example, the intermediate picture occupies a memory value of 2.4M, which is greater than the first preset threshold 1M, so that the intermediate picture with a memory value of 2.4M is scaled down once according to the preset sampling rate scaling 2 to obtain the intermediate picture with a memory value of 1.2M, the memory value occupied by the intermediate picture is 1.2M, which is still greater than the first preset threshold 1M, and therefore the intermediate picture needs to be compressed again, that is, the loop compression is performed twice, and a loop can be skipped to obtain the intermediate picture with a memory value of 0.6M.
By executing the substeps 806-1 to 806-3, the compressed intermediate picture can be compressed at a sampling rate, so that the memory consumed by the picture to be transmitted is further reduced, the picture meets the requirements of stream transmission, and the user experience is improved.
Step S807, sending the picture to be transmitted to a video network server through the first shared whiteboard client by using the target picture as the picture to be transmitted, so that the video network server can send the picture to be transmitted to a second shared whiteboard client.
In this embodiment, resolution compression and sampling rate compression are performed on the original picture, so that the picture can be compressed as much as possible under the condition that the image definition is ensured, and the picture transmission fluency is further improved.
Considering that the original picture format may be a JPEG format, the quality parameter further includes a bit depth or a transparency, and after the target picture is obtained, the target picture may be further compressed, specifically performing the following steps:
step S901, obtaining a memory value occupied by the target picture.
This step is the same as substep S806-1 and will not be described in detail herein.
Step S902, determining whether the memory value occupied by the target picture is greater than a second preset threshold.
In this embodiment, different terminal memories are different, and the second preset threshold may be set according to the actual condition of the terminal, for example, the second preset threshold may be set to 0.5M, and it should be noted that the second preset threshold is smaller than the first preset threshold.
Step S903, performing cyclic compression on the target picture according to a preset bit depth scaling or transparency scaling when the memory value occupied by the target picture is greater than a second preset threshold, to obtain a compressed final picture, where the memory value occupied by the final picture is smaller than the second preset threshold.
In this embodiment, if the preset bit depth scaling or transparency scaling is 2, it means that the bit depth or transparency of the intermediate picture is reduced to 0.5 times, the bit depth or transparency is reduced to 0.5 times, and the memory is also reduced to 0.5 times.
For example, the target picture occupies a memory value of 0.6M, which is greater than the second preset threshold value of 0.5M, so that the target picture with the memory value of 0.6M is scaled down once according to a preset bit depth scaling or transparency scaling, assuming that the scaling is 2, to obtain a final picture with the memory value of 0.3M, and the memory value occupied by the final picture is 0.3M, so that the loop can jump out of the loop only by performing loop compression once to obtain the final picture with the memory value of 0.3M.
Step S904, using the final picture as the picture to be transmitted, sending the picture to be transmitted to a video network server through the first shared whiteboard client, so that the video network server can send the picture to be transmitted to a second shared whiteboard client.
By executing the steps S901 to S904, bit depth or transparency compression can be performed on the compressed target picture in JPEG format, so as to further reduce the memory consumed by the picture to be transmitted, enable the picture to meet the requirements of stream transmission, and improve the user experience.
It should be noted that, for simplicity of description, the method embodiments are described as a series of acts or combination of acts, but those skilled in the art will recognize that the present invention is not limited by the illustrated order of acts, as some steps may occur in other orders or concurrently in accordance with the embodiments of the present invention. Further, those skilled in the art will appreciate that the embodiments described in the specification are presently preferred and that no particular act is required to implement the invention.
Based on the same technical concept, please refer to fig. 7, fig. 7 shows a picture transmission apparatus according to an embodiment of the present invention, where the apparatus is applied to a first terminal in a picture transmission system, the first terminal is installed with a first shared whiteboard client, the picture transmission system is also deployed with a video networking server and a second terminal, the second terminal is installed with a second shared whiteboard client, and the video networking server is in communication connection with the first terminal and the second terminal, and the apparatus includes:
a receiving module 100, configured to receive, by the first shared whiteboard client, an original picture selection instruction triggered by a user;
a response module 200, configured to respond to the selection instruction and obtain the original picture;
a first analyzing module 300, configured to analyze the original picture to obtain a quality parameter of the original picture;
the compression module 400 is configured to compress the original picture according to the quality parameter of the original picture to obtain a compressed picture to be transmitted;
the sending module 500 is configured to send the picture to be transmitted to a video network server through the first shared whiteboard client, so that the video network server can send the picture to be transmitted to a second shared whiteboard client.
Optionally, the quality parameter includes a resolution, and the first parsing module includes:
the first analysis submodule is used for analyzing the original picture to obtain the resolution of the original picture;
the compression module comprises;
the first comparison sub-module is used for comparing the resolution of the original picture with the resolution of the first terminal;
the first cyclic compression sub-module is used for cyclically compressing the original picture according to a preset resolution scaling ratio under the condition that the resolution of the original picture is larger than the resolution of the first terminal, so as to obtain a compressed intermediate picture, wherein the resolution of the intermediate picture is smaller than the resolution of the first terminal;
and the first compression submodule is used for compressing the intermediate picture to obtain a compressed picture to be transmitted.
Optionally, the first parsing module further includes:
and the first definition sub-module is used for taking the original picture as an intermediate picture under the condition that the resolution of the original picture is smaller than the resolution of the first terminal.
Optionally, the quality parameter further includes a sampling rate, and the first compression sub-module includes;
the first obtaining submodule is used for obtaining a memory value occupied by the intermediate picture;
the first judgment submodule is used for judging whether the memory value occupied by the intermediate picture is greater than a first preset threshold value or not;
the second cyclic compression sub-module is used for performing cyclic compression on the intermediate picture according to a preset sampling rate scaling ratio under the condition that the memory value occupied by the intermediate picture is larger than a first preset threshold value to obtain a compressed target picture, wherein the memory value occupied by the target picture is smaller than the first preset threshold value;
the sending module comprises:
and the first sending sub-module is used for sending the picture to be transmitted to a video networking server through the first shared whiteboard client by taking the target picture as the picture to be transmitted, so that the video networking server can send the picture to be transmitted to a second shared whiteboard client.
Optionally, the quality parameter further includes a bit depth or a transparency, the format of the original picture is JPEG format, and the apparatus further includes:
the second obtaining submodule is used for obtaining a memory value occupied by the target picture;
the second judgment submodule is used for judging whether the memory value occupied by the target picture is greater than a second preset threshold value or not;
a third cyclic compression sub-module, configured to, when the memory value occupied by the target picture is greater than a second preset threshold, perform cyclic compression on the target picture according to a preset bit depth scaling or transparency scaling to obtain a compressed final picture, where the memory value occupied by the final picture is smaller than the second preset threshold;
the sending module further comprises:
and the second sending submodule is used for sending the picture to be transmitted to a video network server through the first shared whiteboard client by taking the final picture as the picture to be transmitted, so that the video network server can send the picture to be transmitted to a second shared whiteboard client.
Optionally, the apparatus further comprises:
the verification module is used for verifying the format of the original picture and judging whether the original picture is a correct picture;
and the second analysis module is used for analyzing the original picture to obtain the quality parameter of the original picture under the condition that the original picture is a correct picture.
And the error returning module is used for returning an error prompt to the first shared whiteboard client under the condition that the original picture is the error picture.
An embodiment of the present invention further provides an image transmission device, including:
one or more processors; and
one or more computer-readable media having instructions stored thereon, which when executed by the one or more processors, cause the apparatus to perform a method of picture transfer as in any one of the embodiments of the invention.
Embodiments of the present invention further provide a computer-readable storage medium, where a stored computer program causes a processor to execute the picture transmission method according to the embodiments of the present invention.
For the embodiment of the picture transmission apparatus, since it is basically similar to the embodiment of the picture transmission method, the description is relatively simple, and for relevant points, refer to the partial description of the embodiment of the picture transmission method.
The embodiments in the present specification are described in a progressive manner, each embodiment focuses on differences from other embodiments, and the same and similar parts among the embodiments are referred to each other.
As will be appreciated by one skilled in the art, embodiments of the present invention may be provided as a method, apparatus, or computer program product. Accordingly, embodiments of the present invention may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, embodiments of the present invention may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
Embodiments of the present invention are described with reference to flowchart illustrations and/or block diagrams of methods, terminal devices (systems), and computer program products according to embodiments of the invention. It will be understood that each flow and/or block of the flow diagrams and/or block diagrams, and combinations of flows and/or blocks in the flow diagrams and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable picture transmission terminal device to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable picture transmission terminal device, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable picture transmission terminal to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable image transmission terminal device to cause a series of operational steps to be performed on the computer or other programmable terminal device to produce a computer implemented process such that the instructions which execute on the computer or other programmable terminal device provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
While preferred embodiments of the present invention have been described, additional variations and modifications of these embodiments may occur to those skilled in the art once they learn of the basic inventive concepts. Therefore, it is intended that the appended claims be interpreted as including preferred embodiments and all such alterations and modifications as fall within the scope of the embodiments of the invention.
Finally, it should also be noted that, herein, relational terms such as first and second, and the like may be used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Also, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or terminal that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or terminal. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other like elements in a process, method, article, or terminal that comprises the element.
The above detailed descriptions of a picture transmission method, a picture transmission device and a computer readable storage medium provided by the present invention, and the specific examples are applied herein to explain the principle and the implementation of the present invention, and the descriptions of the above examples are only used to help understand the method and the core idea of the present invention; meanwhile, for a person skilled in the art, according to the idea of the present invention, there may be variations in the specific embodiments and the application scope, and in summary, the content of the present specification should not be construed as a limitation to the present invention.
Claims (10)
1. A picture transmission method is characterized in that the method is applied to a first terminal in a picture transmission system, a first shared white board client is installed on the first terminal, a video networking server and a second terminal are also deployed in the picture transmission system, a second shared white board client is installed on the second terminal, the video networking server is in communication connection with the first terminal and the second terminal, and the method comprises the following steps:
in the process of picture sharing between a first terminal and a second terminal through a shared whiteboard client, receiving an original picture selection instruction triggered by a user through the first shared whiteboard client;
responding to the selection instruction, and acquiring the original picture;
analyzing the original picture to obtain quality parameters of the original picture;
the first shared whiteboard client compresses the original picture according to the quality parameter of the original picture by calling a prestored system function to obtain a compressed picture to be transmitted;
sending the picture to be transmitted to a video network server through the first shared whiteboard client so that the video network server can send the picture to be transmitted to a second shared whiteboard client;
the quality parameters include resolution, and the analyzing the original picture to obtain the quality parameters of the original picture includes:
analyzing the original picture to obtain the resolution of the original picture;
compressing the original picture according to the quality parameters of the original picture to obtain a compressed picture to be transmitted, including:
comparing the resolution of the original picture with the resolution of the first terminal;
under the condition that the resolution of the original picture is larger than the resolution of the first terminal, circularly compressing the original picture according to a preset resolution scaling ratio to obtain a compressed intermediate picture, wherein the resolution of the intermediate picture is smaller than the resolution of the first terminal;
compressing the intermediate picture to obtain a compressed picture to be transmitted;
the quality parameter further includes a sampling rate, and compressing the intermediate picture to obtain a compressed picture to be transmitted includes:
acquiring a memory value occupied by the intermediate picture;
judging whether the memory value occupied by the intermediate picture is greater than a first preset threshold value or not;
under the condition that the memory value occupied by the intermediate picture is larger than a first preset threshold value, circularly compressing the intermediate picture according to a preset sampling rate scaling ratio to obtain a compressed target picture, wherein the memory value occupied by the target picture is smaller than the first preset threshold value;
sending the picture to be transmitted to a video network server through the first shared whiteboard client so that the video network server can send the picture to be transmitted to a second shared whiteboard client, comprising:
and sending the picture to be transmitted to a video networking server through the first shared whiteboard client by taking the target picture as the picture to be transmitted, so that the video networking server can send the picture to be transmitted to a second shared whiteboard client.
2. The method according to claim 1, wherein after comparing the resolution of the original picture with the resolution of the first terminal itself, the method further comprises:
taking the original picture as an intermediate picture under the condition that the resolution of the original picture is smaller than the resolution of the first terminal;
and compressing the intermediate picture to obtain a compressed picture to be transmitted.
3. The method of claim 2, wherein the quality parameter further comprises a bit depth or a transparency, wherein the format of the original picture is a JPEG format, and wherein the method further comprises:
acquiring a memory value occupied by the target picture;
judging whether the memory value occupied by the target picture is larger than a second preset threshold value or not;
under the condition that the memory value occupied by the target picture is larger than a second preset threshold value, circularly compressing the target picture according to a preset bit depth scaling ratio or a preset transparency scaling ratio to obtain a compressed final picture, wherein the memory value occupied by the final picture is smaller than the second preset threshold value;
sending the picture to be transmitted to a video network server through the first shared whiteboard client so that the video network server can send the picture to be transmitted to a second shared whiteboard client, and the method further comprises the following steps:
and taking the final picture as the picture to be transmitted, and sending the picture to be transmitted to a video networking server through the first shared whiteboard client so that the video networking server can send the picture to be transmitted to a second shared whiteboard client.
4. The method of claim 1, further comprising:
checking the format of the original picture, and judging whether the original picture is a correct picture;
under the condition that the original picture is a correct picture, analyzing the original picture to obtain quality parameters of the original picture;
and returning an error prompt to the first shared whiteboard client under the condition that the original picture is an error picture.
5. The utility model provides a picture transmission device which characterized in that is applied to the first terminal in the picture transmission system, install first shared blank client on the first terminal, video networking server and second terminal have still been arranged in the picture transmission system, install second shared blank client on the second terminal, video networking server and first terminal and second terminal communication connection, the device includes:
the system comprises a receiving module, a processing module and a processing module, wherein the receiving module is used for receiving an original picture selection instruction triggered by a user through a first sharing whiteboard client in the process of picture sharing between a first terminal and a second terminal through the sharing whiteboard client;
the response module is used for responding to the selection instruction and acquiring the original picture;
the first analysis module is used for analyzing the original picture by calling a prestored system function by the first shared whiteboard client to obtain the quality parameter of the original picture;
the compression module is used for compressing the original picture according to the quality parameters of the original picture to obtain a compressed picture to be transmitted;
the sending module is used for sending the picture to be transmitted to a video network server through the first shared whiteboard client so that the video network server can send the picture to be transmitted to a second shared whiteboard client;
the quality parameter comprises a resolution, and the first parsing module comprises:
the first analysis submodule is used for analyzing the original picture to obtain the resolution of the original picture;
the compression module comprises;
the first comparison sub-module is used for comparing the resolution of the original picture with the resolution of the first terminal;
the first cyclic compression sub-module is used for cyclically compressing the original picture according to a preset resolution scaling ratio under the condition that the resolution of the original picture is larger than the resolution of the first terminal, so as to obtain a compressed intermediate picture, wherein the resolution of the intermediate picture is smaller than the resolution of the first terminal;
the first compression submodule is used for compressing the intermediate picture to obtain a compressed picture to be transmitted;
the quality parameter further comprises a sampling rate, and the first compression submodule comprises;
the first obtaining submodule is used for obtaining a memory value occupied by the intermediate picture;
the first judgment submodule is used for judging whether the memory value occupied by the intermediate picture is greater than a first preset threshold value or not;
the second cyclic compression sub-module is used for performing cyclic compression on the intermediate picture according to a preset sampling rate scaling ratio under the condition that the memory value occupied by the intermediate picture is larger than a first preset threshold value to obtain a compressed target picture, wherein the memory value occupied by the target picture is smaller than the first preset threshold value;
the sending module comprises:
and the first sending sub-module is used for sending the picture to be transmitted to a video networking server through the first shared whiteboard client by taking the target picture as the picture to be transmitted, so that the video networking server can send the picture to be transmitted to a second shared whiteboard client.
6. The apparatus of claim 5, wherein the first parsing module further comprises:
and the first definition sub-module is used for taking the original picture as an intermediate picture under the condition that the resolution of the original picture is smaller than the resolution of the first terminal.
7. The apparatus of claim 6, wherein the quality parameter further comprises a bit depth or a transparency, wherein the format of the original picture is a JPEG format, and wherein the apparatus further comprises:
the second obtaining submodule is used for obtaining a memory value occupied by the target picture;
the second judgment submodule is used for judging whether the memory value occupied by the target picture is greater than a second preset threshold value or not;
a third cyclic compression sub-module, configured to, when the memory value occupied by the target picture is greater than a second preset threshold, perform cyclic compression on the target picture according to a preset bit depth scaling or transparency scaling to obtain a compressed final picture, where the memory value occupied by the final picture is smaller than the second preset threshold;
the sending module further comprises:
and the second sending submodule is used for sending the picture to be transmitted to a video network server through the first shared whiteboard client by taking the final picture as the picture to be transmitted, so that the video network server can send the picture to be transmitted to a second shared whiteboard client.
8. The apparatus of claim 5, further comprising:
the verification module is used for verifying the format of the original picture and judging whether the original picture is a correct picture;
the second analysis module is used for analyzing the original picture under the condition that the original picture is a correct picture to obtain the quality parameter of the original picture;
and the error returning module is used for returning an error prompt to the first shared whiteboard client under the condition that the original picture is the error picture.
9. A picture transmission device, comprising:
one or more processors; and
one or more computer-readable instructions stored thereon that, when executed by the one or more processors, cause the apparatus to perform the picture transfer method of any of claims 1-4.
10. A computer-readable storage medium storing a computer program for causing a processor to execute the picture transmission method according to any one of claims 1 to 4.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201910936051.8A CN110795008B (en) | 2019-09-29 | 2019-09-29 | Picture transmission method and device and computer readable storage medium |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201910936051.8A CN110795008B (en) | 2019-09-29 | 2019-09-29 | Picture transmission method and device and computer readable storage medium |
Publications (2)
Publication Number | Publication Date |
---|---|
CN110795008A CN110795008A (en) | 2020-02-14 |
CN110795008B true CN110795008B (en) | 2021-11-16 |
Family
ID=69440042
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201910936051.8A Active CN110795008B (en) | 2019-09-29 | 2019-09-29 | Picture transmission method and device and computer readable storage medium |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN110795008B (en) |
Families Citing this family (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN111372240B (en) * | 2020-03-05 | 2023-04-14 | 江苏苏宁物流有限公司 | Picture uploading method and device, computer equipment and storage medium |
Citations (12)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102123259A (en) * | 2010-12-28 | 2011-07-13 | 四川长虹电器股份有限公司 | Method for displaying extra-large-resolution pictures on television |
CN102508851A (en) * | 2011-09-27 | 2012-06-20 | 深圳市五巨科技有限公司 | Image upload processing method and image upload processing system |
CN103457910A (en) * | 2012-05-29 | 2013-12-18 | 腾讯科技(深圳)有限公司 | Method and terminal for uploading files |
CN104581025A (en) * | 2013-10-24 | 2015-04-29 | 西安群丰电子信息科技有限公司 | Image monitoring system and method |
CN104639501A (en) * | 2013-11-07 | 2015-05-20 | 华为技术有限公司 | Data stream transmission method, equipment and system |
CN106357982A (en) * | 2016-11-11 | 2017-01-25 | 北京佳艺徕经贸有限责任公司 | Image service device and method |
CN106547624A (en) * | 2016-11-04 | 2017-03-29 | 武汉斗鱼网络科技有限公司 | Picture loading method and device based on Android |
CN106681745A (en) * | 2015-11-09 | 2017-05-17 | 五八同城信息技术有限公司 | Picture loading method and terminal |
CN108921784A (en) * | 2018-06-13 | 2018-11-30 | 四川斐讯信息技术有限公司 | A kind of picture compression method and system based on mobile terminal |
CN108965744A (en) * | 2017-11-22 | 2018-12-07 | 北京视联动力国际信息技术有限公司 | A kind of method of video image processing and device based on view networking |
CN109246435A (en) * | 2017-07-10 | 2019-01-18 | 中兴通讯股份有限公司 | A kind of USB device redirects data transmission method, data transmission device, local device and remote server |
CN109544879A (en) * | 2018-10-29 | 2019-03-29 | 视联动力信息技术股份有限公司 | A kind of processing method and system of alert data |
-
2019
- 2019-09-29 CN CN201910936051.8A patent/CN110795008B/en active Active
Patent Citations (12)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102123259A (en) * | 2010-12-28 | 2011-07-13 | 四川长虹电器股份有限公司 | Method for displaying extra-large-resolution pictures on television |
CN102508851A (en) * | 2011-09-27 | 2012-06-20 | 深圳市五巨科技有限公司 | Image upload processing method and image upload processing system |
CN103457910A (en) * | 2012-05-29 | 2013-12-18 | 腾讯科技(深圳)有限公司 | Method and terminal for uploading files |
CN104581025A (en) * | 2013-10-24 | 2015-04-29 | 西安群丰电子信息科技有限公司 | Image monitoring system and method |
CN104639501A (en) * | 2013-11-07 | 2015-05-20 | 华为技术有限公司 | Data stream transmission method, equipment and system |
CN106681745A (en) * | 2015-11-09 | 2017-05-17 | 五八同城信息技术有限公司 | Picture loading method and terminal |
CN106547624A (en) * | 2016-11-04 | 2017-03-29 | 武汉斗鱼网络科技有限公司 | Picture loading method and device based on Android |
CN106357982A (en) * | 2016-11-11 | 2017-01-25 | 北京佳艺徕经贸有限责任公司 | Image service device and method |
CN109246435A (en) * | 2017-07-10 | 2019-01-18 | 中兴通讯股份有限公司 | A kind of USB device redirects data transmission method, data transmission device, local device and remote server |
CN108965744A (en) * | 2017-11-22 | 2018-12-07 | 北京视联动力国际信息技术有限公司 | A kind of method of video image processing and device based on view networking |
CN108921784A (en) * | 2018-06-13 | 2018-11-30 | 四川斐讯信息技术有限公司 | A kind of picture compression method and system based on mobile terminal |
CN109544879A (en) * | 2018-10-29 | 2019-03-29 | 视联动力信息技术股份有限公司 | A kind of processing method and system of alert data |
Also Published As
Publication number | Publication date |
---|---|
CN110795008A (en) | 2020-02-14 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN109167960B (en) | Method and system for processing video stream data | |
CN108965224B (en) | Video-on-demand method and device | |
CN110049271B (en) | Video networking conference information display method and device | |
CN109309806B (en) | Video conference management method and system | |
CN110475102B (en) | Monitoring data processing method and system based on video network | |
CN109819214B (en) | Video split-screen method and device | |
CN110489042B (en) | Method and system for simulating dragging based on video network | |
CN110769310B (en) | Video processing method and device based on video network | |
CN110572607A (en) | Video conference method, system and device and storage medium | |
CN110049273B (en) | Video networking-based conference recording method and transfer server | |
CN108965930B (en) | Video data processing method and device | |
CN108966018B (en) | Video broadcasting method, device, electronic equipment and storage medium based on view networking | |
CN110149305B (en) | Video network-based multi-party audio and video playing method and transfer server | |
CN110113558B (en) | Data processing method, device, system and computer readable storage medium | |
CN109802952B (en) | Monitoring data synchronization method and device | |
CN109302384B (en) | Data processing method and system | |
CN110769179B (en) | Audio and video data stream processing method and system | |
CN110830763A (en) | Monitoring video inspection method and device | |
CN108989850B (en) | Video playing control method and control system | |
CN110769297A (en) | Audio and video data processing method and system | |
CN111212255B (en) | Monitoring resource obtaining method and device and computer readable storage medium | |
CN110677617A (en) | Data processing method and device | |
CN110392275B (en) | Sharing method and device for manuscript demonstration and video networking soft terminal | |
CN110086773B (en) | Audio and video data processing method and system | |
CN109963107B (en) | Audio and video data display method and system |
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 |