Shared screen projection method and system, terminal and medium
By determining network configuration parameters and fixed communication ports in screen projection technology, multi-screen synchronous display is realized, solving the problems of high cost, complex operation and inefficiency in the existing technology, and improving operation efficiency and video playback quality.
Patent Information
- Application Number
- CN202411740448.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-29
- Publication Date
- 2025-03-04
AI Technical Summary
The existing screen projection technology is costly, complex in operation and inefficient in multi-screen display.
By determining network configuration parameters to establish a screen projection connection with the source device, a fixed communication port is determined, a video packet is received and played, and a network configuration parameters and a fixed communication port are monitored on the shared device to achieve synchronous playback.
The function of displaying multiple screens simultaneously reduces equipment costs and operation complexity, and improves operation efficiency and video playback quality.
Smart Images

Figure CN119562105A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of screen projection and playback technology, and in particular to a shared screen projection method, system, terminal and medium. Background Art
[0002] With the rapid development of Internet technology, screen projection technology has become an important tool in many occasions such as business meetings, education and training, and home entertainment. Although the current screen projection solution can meet the basic single-screen display needs, when faced with the need to send the same content to multiple screens at the same time, the limitations of existing technologies become apparent. Specifically, at this stage, in order to achieve multi-screen synchronous display, users often need to prepare multiple sets of independent screen projection devices or repeatedly perform the screen projection steps. This process not only increases the cost of hardware investment, but also reduces the convenience and efficiency of operation.
[0003] Therefore, the prior art still needs to be improved and enhanced. Summary of the invention
[0004] The technical problem to be solved by the present invention is to provide a shared screen projection method, system, terminal and medium in response to the above-mentioned defects of the prior art, aiming to solve the problems of high cost, complex operation and low efficiency of the existing screen projection technology when displaying multiple screens simultaneously.
[0005] In order to solve the above technical problems, the technical solution adopted by the present invention is as follows:
[0006] In a first aspect, the present invention provides a shared screen projection method, wherein the method comprises:
[0007] Determine network configuration parameters, establish a screen projection connection with the source device, and determine the fixed communication port;
[0008] Based on the fixed communication port, receiving the video data packet sent by the source device and playing it;
[0009] When receiving the video data packet sent by the source device, the network configuration parameters and the fixed communication port are monitored based on the preset shared device to obtain the video data packet and parse it to achieve synchronous playback.
[0010] In one implementation, determining network configuration parameters, establishing a screen projection connection with a source device, and determining a fixed communication port include:
[0011] Starting a wireless network connection, determining a fixed channel and a fixed IP address of the wireless network connection, and using the fixed channel and the fixed IP address as network configuration parameters;
[0012] Based on the network configuration parameters, a connection is established with the source device, and after the connection is completed, a protocol negotiation is performed with the source device to determine a fixed communication port.
[0013] In one implementation, receiving the video data packet sent by the source device based on the fixed communication port and playing the video data packet includes:
[0014] Based on the fixed communication port, receiving the video data packet sent by the source device;
[0015] Decoding the video data packet using a decoding module to obtain a video frame;
[0016] Based on the video frame, a display module is used for playing.
[0017] In one implementation, when receiving the video data packet sent by the source device, monitoring the network configuration parameters and the fixed communication port based on a preset shared device to obtain the video data packet includes:
[0018] Monitoring the network configuration parameters based on a preset shared device to obtain a first target communication data packet;
[0019] The first target communication data packet and the fixed communication port are monitored based on a preset shared device to obtain the video data packet.
[0020] In one implementation, the preset shared device monitors the network configuration parameter to obtain a first target communication data packet, including:
[0021] Based on a preset shared device, all communication data packets of the fixed channel are monitored to obtain communication data packets;
[0022] Based on the communication data packet, a preset shared device monitors the communication data packet whose IP address is the fixed IP address to obtain a first target communication data packet.
[0023] In one implementation, the preset shared device monitors the first target communication data packet and the fixed communication port to obtain the video data packet, including:
[0024] Based on the first target communication data packet, based on the preset shared device monitoring communication port being the first target communication data packet of the fixed communication port, a second target communication data packet is obtained;
[0025] If the transmission protocol type of the second target communication data packet is a preset type, then the second target communication data packet is the video data packet, wherein the transmission protocol type of the video data packet is set by the source device and is a preset type.
[0026] In one implementation, the parsing to achieve synchronous playback includes:
[0027] The upper layer application based on the shared device decodes the video data packet, and the player based on the upper layer application of the shared device synchronously plays the decoded video data.
[0028] In a second aspect, an embodiment of the present invention further provides a shared screen projection system, wherein the system includes:
[0029] The parameter determination, connection and port determination module is used to determine the network configuration parameters, establish a screen projection connection with the source device, and determine the fixed communication port;
[0030] A receiving and playing module, used for receiving the video data packet sent by the source device based on the fixed communication port, and playing it;
[0031] The monitoring and synchronous playback module is used to monitor the network configuration parameters and the fixed communication port based on the preset shared device when receiving the video data packet sent by the source device, obtain the video data packet, and parse it to achieve synchronous playback.
[0032] In the third aspect, an embodiment of the present invention also provides a terminal, wherein the terminal includes a memory, a processor, and a shared screen projection program stored in the memory and executable on the processor, and when the processor executes the shared screen projection program, the steps of the shared screen projection method described in any one of the above schemes are implemented.
[0033] In a fourth aspect, an embodiment of the present invention further provides a computer-readable storage medium, wherein a shared screen projection program is stored on the computer-readable storage medium, and when the shared screen projection program is executed by a processor, the steps of the shared screen projection method described in any one of the above schemes are implemented.
[0034] Beneficial effects: The present invention provides a shared screen projection method. Compared with the prior art, the present invention first determines the network configuration parameters, establishes a screen projection connection with the source device, determines a fixed communication port, ensures a stable connection between the source device and the target device, and also lays the foundation for subsequent one-to-many operations. By fixing the communication port, the problem of unstable or failed data transmission caused by dynamic changes in the port can be effectively avoided, thereby improving the reliability of the system and user experience. Then, based on the fixed communication port, the video data packet sent by the source device is received and played, realizing the basic screen projection function, ensuring that the target device can correctly receive the video stream sent by the source device and play it out in real time. The use of a fixed communication port ensures that the video data packet can be efficiently and accurately transmitted to the target device, reducing the possibility of delay and packet loss, and improving the quality of video playback. Finally, when receiving the video data packet sent by the source device, the network configuration parameters and the fixed communication port are monitored based on the preset shared device to obtain the video data packet, and the video data packet is parsed to achieve synchronous playback. This step is the key to achieving multi-functions in one projection. The shared device monitors the data packet on the fixed communication port under a specific network configuration, ensuring that the shared device can capture the correct video stream data. The parsed video data packet is passed to the playback application of the shared device, thereby achieving the effect of multiple shared devices and the target device playing the same video content synchronously, enhancing the application scenarios and user experience of the screen projection technology, especially when the same content needs to be displayed to multiple viewers, such as conference rooms, classrooms or family gatherings. Therefore, through the method of the present invention, there is no need to manually configure multiple devices or send screen projection requests to each device separately, which greatly simplifies the operation process; and multiple shared devices use the resources of the same screen projection source device, reducing the need for additional hardware, such as a dedicated receiver or adapter, thereby reducing the overall device cost; in terms of operational efficiency, the automated process reduces the time for manual intervention and configuration, speeds up the deployment of screen projection content, and reduces the probability of problems caused by misoperation, ensuring the smoothness of the screen projection process. When more display devices need to be added, it is only necessary to turn on the monitoring function of these devices without complicated settings or adjustments, making the expansion of the entire system easier and faster. In summary, the method proposed in the present invention realizes the screen projection function of one projection to multiple projections through the monitoring mechanism, which not only simplifies user operations, but also reduces equipment costs and improves operating efficiency. BRIEF DESCRIPTION OF THE DRAWINGS
[0035] Figure 1 A flowchart of a specific implementation of the shared screen projection method provided in an embodiment of the present invention.
[0036] Figure 2 A flowchart of a preferred embodiment of the shared screen projection method provided in an embodiment of the present invention.
[0037] Figure 3 It is a principle block diagram of the shared screen projection system provided by an embodiment of the present invention.
[0038] Figure 4 This is a block diagram of the internal structure principle of a terminal provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0039] In order to make the purpose, technical solution and effect of the present invention clearer and more specific, the present invention is further described in detail with reference to the accompanying drawings and examples. It should be understood that the specific embodiments described herein are only used to explain the present invention and are not used to limit the present invention.
[0040] With the rapid development of Internet technology, screen projection technology has become an important tool in many occasions such as business meetings, education and training, and home entertainment. Although the current screen projection solution can meet the basic single-screen display needs, when faced with the need to send the same content to multiple screens at the same time, the limitations of existing technologies become apparent. Specifically, at this stage, in order to achieve multi-screen synchronous display, users often need to prepare multiple sets of independent screen projection devices or repeatedly perform the screen projection steps. This process not only increases the cost of hardware investment, but also reduces the convenience and efficiency of operation.
[0041] In order to solve the above problems, this embodiment provides a shared screen projection method. When it is implemented, this embodiment first determines the network configuration parameters, establishes a screen projection connection with the source device, determines a fixed communication port, ensures a stable connection between the source device and the target device, and also lays the foundation for the subsequent one-to-many operations. By fixing the communication port, the problem of unstable or failed data transmission caused by dynamic changes in the port can be effectively avoided, improving the reliability of the system and user experience. Then, based on the fixed communication port, the video data packet sent by the source device is received and played, realizing the basic screen projection function, ensuring that the target device can correctly receive the video stream sent by the source device and play it in real time. The use of a fixed communication port ensures that the video data packet can be efficiently and accurately transmitted to the target device, reducing the possibility of delay and packet loss, and improving the quality of video playback. Finally, when receiving the video data packet sent by the source device, the network configuration parameters and the fixed communication port are monitored based on the preset shared device to obtain the video data packet, and the video data packet is parsed to achieve synchronous playback. This step is the key to achieving multi-functions in one projection. The shared device monitors the data packet on the fixed communication port under a specific network configuration, ensuring that the shared device can capture the correct video stream data. The parsed video data packet is passed to the playback application of the shared device, thereby achieving the effect of multiple shared devices and the target device playing the same video content synchronously, enhancing the application scenarios and user experience of the screen projection technology, especially when the same content needs to be displayed to multiple viewers, such as conference rooms, classrooms or family gatherings. Therefore, through the method of the present invention, there is no need to manually configure multiple devices or send screen projection requests to each device separately, which greatly simplifies the operation process; and multiple shared devices use the resources of the same screen projection source device, reducing the need for additional hardware, such as a dedicated receiver or adapter, thereby reducing the overall device cost; in terms of operational efficiency, the automated process reduces the time for manual intervention and configuration, speeds up the deployment of screen projection content, and reduces the probability of problems caused by misoperation, ensuring the smoothness of the screen projection process. When more display devices need to be added, it is only necessary to turn on the monitoring function of these devices without complicated settings or adjustments, making the expansion of the entire system easier and faster. In summary, the method proposed in the present invention realizes the screen projection function of one projection to multiple projections through the monitoring mechanism, which not only simplifies user operations, but also reduces equipment costs and improves operating efficiency.
[0042] For example, suppose a user plans to hold a small movie night at home. He hopes to project a movie on his mobile phone (device A) to the TV in the living room (device B) and two TVs in different bedrooms (device C and device D) at the same time, so that friends in different rooms can watch the same movie simultaneously. At this time, the user can adopt the one-cast-to-multiple-shared screen projection method proposed by the present invention. First, determine the network configuration parameters to ensure that all devices can access the same network environment. Then, the mobile phone (device A) establishes a screen projection connection with the TV in the living room (device B), and determines a fixed communication port for subsequent video data transmission. This process ensures the stability of the connection between the source device and the target device, and effectively avoids the problem of unstable or failed data transmission caused by dynamic changes in the port. Subsequently, based on the established fixed communication port, the mobile phone begins to send video data packets to the TV in the living room. The TV in the living room successfully receives these data packets and starts playing the movie. At the same time, based on the preset shared devices (device C and device D), the network configuration parameters and the fixed communication port are monitored to capture the video data packets sent to the living room TV. After parsing the received data packets, these shared devices pass them to their respective playback applications to achieve the function of playing the same movie synchronously with the living room TV. Through the above steps, users can not only enjoy the high-definition viewing experience on the big screen in the living room, but also let their friends in the bedroom watch it synchronously without repeating the screen projection operation, which greatly simplifies user operations, reduces equipment costs, and improves operating efficiency. In addition, this method is particularly suitable for situations where the same content needs to be displayed to multiple viewers, such as family gatherings, business meetings, or education and training, which significantly enhances the application scenarios and user experience of screen projection technology.
[0043] The shared screen projection method provided in this embodiment can be applied to smart terminals, such as Figure 1 As shown in , the specific steps include:
[0044] Step S100: determine network configuration parameters, establish a screen projection connection with the source device, and determine a fixed communication port.
[0045] In this embodiment, first, the target device determines the network configuration parameters to ensure the compatibility of the network environment between devices, avoid connection obstacles caused by differences in network settings, and also provide necessary security measures for subsequent data transmission, ensuring the security and integrity of information. Next, the target device will use these network configuration parameters to establish a stable screen projection connection with the source device. This step not only realizes the real-time sharing of the source device content to the target device, greatly improves the efficiency and quality of information exchange, but also provides users with a smooth and seamless visual experience. Finally, the two devices determine a suitable communication port through negotiation. This step optimizes the data transmission path, reduces delays, ensures the synchronization and clarity of video and audio during the screen projection process, and thus improves the overall user experience.
[0046] Specifically, the step S100 includes the following steps:
[0047] Step S101, starting a wireless network connection, determining a fixed channel and a fixed IP address of the wireless network connection, and using the fixed channel and the fixed IP address as network configuration parameters;
[0048] Step S102: Establish a connection with the source device, and after the connection is completed, perform protocol negotiation with the source device to determine a fixed communication port.
[0049] In one implementation, Figure 2As shown, first, the target device starts a wireless network connection, for example, starts a P2PGROUP (Peer-to-Peer Group), determines the fixed channel of the wireless network connection (for example, determines that the fixed channel of the P2P GROUP is 2.4GHz 6 channels) and a fixed IP address (for example, determines that the fixed IP address of the P2P GROUP is 192.168.49.50), and uses these fixed channels and IP addresses as network configuration parameters. This not only simplifies the connection process between devices and improves the connection speed, because there is no need to re-search available channels and allocate IP addresses every time a connection is made, but also enhances the stability of the connection and avoids the problem of connection interruption caused by frequent changes of channels or IP addresses. Then, the target device uses these pre-set network configuration parameters to establish a connection with the source device. In this way, it can be ensured that a communication link can be established quickly and efficiently between the two devices, laying a good foundation for the subsequent data transmission. After the connection is successfully established, the target device negotiates the protocol with the source device, such as RTSP (Real Time Streaming Protocol) negotiation, and determines the fixed communication port (for example, the fixed communication port is determined to be 20000). This process further optimizes the transmission efficiency of the media stream. By specifying a fixed communication port, it can not only speed up the connection establishment, but also effectively reduce the transmission delay or error caused by inconsistent port negotiation, ensuring the high-quality transmission of audio and video data, thereby providing users with a smoother and clearer screen projection experience. The entire process goes through a series of steps, from network configuration to connection establishment, and then to the establishment of communication ports, to ensure the efficiency, stability and security of screen projection operations between devices.
[0050] Step S200: Based on the fixed communication port, receive the video data packet sent by the source device and play it.
[0051] In this embodiment, first, the target device receives the video data packet sent by the source device based on the fixed communication port, ensuring that the video data can be accurately transmitted to the target device through the specified channel. Then, the target device decodes the video data packet using a decoding module to obtain a video frame, and converts the compressed video data into original image information to prepare for subsequent playback. Then, based on the video frame, the target device plays it using a display module, thereby achieving real-time or near real-time display of the video content on the target device. This process ensures that the video content can be efficiently and accurately transmitted from the source device and presented to the user.
[0052] Specifically, the step S200 includes the following steps:
[0053] Step S201: receiving a video data packet sent by the source device based on the fixed communication port;
[0054] Step S202: Decoding the video data packet using a decoding module to obtain a video frame;
[0055] Step S203: Play the video frame using a display module.
[0056] In one implementation, Figure 2 As shown, first, the target device receives the video data packet sent by the source device based on the fixed communication port, and the transmission protocol type of the video data packet includes but is not limited to UDP. This process takes advantage of the fixed communication port, avoids the connection delay or failure caused by the dynamic change of the port, simplifies the connection establishment process, and improves the efficiency and reliability of data transmission. The use of fixed communication ports not only ensures the continuity and stability of data transmission, but also reduces the time of network handshake and negotiation, so that the video data packet can reach the target device faster. Then, the target device parses and processes the received video data packet, decodes the video data packet using the data packet decoding module, and extracts the video frame and related metadata, which includes but is not limited to the timestamp. In order to ensure the smoothness of playback, the target device temporarily stores the decoded video frame in the cache. Then, the target device reads the decoded video frame from the cache and plays it through the display module. The display module ensures that the video frame is played in the correct timestamp order to keep the synchronization of audio and video. Through this series of steps, the target device can efficiently and stably receive and play the video data packet sent by the source device, providing users with a smooth and high-quality viewing experience. In summary, the design of receiving and playing video data packets through a fixed communication port not only optimizes the data transmission process, but also improves user satisfaction.
[0057] Step S300: When receiving the video data packet sent by the source device, the network configuration parameters and the fixed communication port are monitored based on the preset shared device to obtain the video data packet and parse it to achieve synchronous playback.
[0058] In this embodiment, first, when receiving the video data packet sent by the source device, the network configuration parameters and the fixed communication port are monitored based on the preset shared device. This process takes advantage of the fixed communication port and network configuration parameters to ensure that the shared device can quickly and accurately monitor the video data packet sent by the source device, avoiding connection delays or failures caused by inconsistent network configuration or dynamic port changes, thereby improving the efficiency and reliability of data transmission. Next, the shared device parses the received video data packet and plays it synchronously, realizing a true one-cast multi-function and improving the user experience.
[0059] Specifically, step S300 includes the following steps:
[0060] Step S301: monitoring the network configuration parameters based on a preset shared device to obtain a first target communication data packet;
[0061] Step S302: monitoring the first target communication data packet and the fixed communication port based on a preset shared device to obtain the video data packet;
[0062] Step S303: decoding the video data packet based on the upper layer application of the shared device, and synchronously playing the decoded video data based on the player of the upper layer application of the shared device;
[0063] In one implementation, Figure 2As shown, first, based on the preset shared device, the wireless network driven listening mode is started to listen to all communication data packets of the fixed channel, such as all communication data packets on the 2.4GHz6 channel, ensuring that the shared device can capture all communication data between the target device and the source device, and providing a comprehensive data basis for subsequent screening and processing. On this basis, the communication data packets with IP addresses as fixed IP addresses, such as IP addresses of 192.168.49.50, are further screened out based on the shared device, thereby obtaining the first target communication data packet. This step excludes data packets of irrelevant devices through the screening of IP addresses, ensures the accuracy and efficiency of subsequent processing, and reduces unnecessary data processing burden. Then, based on the first target communication data packet, based on the preset shared device listening to the first target communication data packet with the communication port as the fixed communication port, such as the first target communication data packet with the communication port of 20000, the second target communication data packet is obtained. By specifying the communication port, the scope of the data packet is further narrowed, ensuring that only those data packets used for screen projection video transmission are retained. This process not only improves the pertinence of data processing, but also effectively avoids interference data that may exist on other ports, ensuring the purity and integrity of video data. Then, based on the second target communication data packet, if the transmission protocol type of the second target communication data packet is a preset type, the second target communication data packet is the video data packet, wherein the transmission protocol type of the video data packet is set by the source device and is a preset type. The video data packet is finally determined through the screening of the transmission protocol, ensuring that only the video data packets that meet the requirements are selected, further improving the accuracy and efficiency of data processing. Finally, the upper-layer application based on the shared device decodes the video data packet, and the player based on the upper-layer application of the shared device synchronously plays the decoded video data, converting the video data packet that has been screened by multiple layers into visual video content, realizing the conversion from data packet to video image. Through the decoding and playback of the upper-layer application, the shared device can display the video content synchronously with the target device, achieving the effect of one projection to multiple. The entire process ensures efficient transmission and accurate playback of video data through multi-level screening and processing, providing users with a consistent and high-quality screen projection experience. This series of operations not only realizes the true meaning of one-projection-multi-function, that is, a single source device can transmit video content to multiple target devices at the same time, but also greatly improves the user experience. Users no longer need to set up screen projection for each target device separately, which simplifies the operation process, reduces waiting time, and makes screen projection more convenient and efficient.
[0064] In summary, this embodiment first determines the network configuration parameters, establishes a screen projection connection with the source device, determines a fixed communication port, ensures a stable connection between the source device and the target device, and also lays the foundation for the subsequent one-to-many operations. By fixing the communication port, the problem of unstable or failed data transmission caused by dynamic changes in the port can be effectively avoided, improving the reliability of the system and user experience. Then, based on the fixed communication port, the video data packet sent by the source device is received and played, realizing the basic screen projection function, ensuring that the target device can correctly receive the video stream sent by the source device and play it out in real time. The use of a fixed communication port ensures that the video data packet can be efficiently and accurately transmitted to the target device, reducing the possibility of delay and packet loss, and improving the quality of video playback. Finally, when receiving the video data packet sent by the source device, the network configuration parameters and the fixed communication port are monitored based on the preset shared device to obtain the video data packet, and the video data packet is parsed to achieve synchronous playback. This step is the key to achieving multi-functions in one projection. The shared device monitors the data packet on the fixed communication port under a specific network configuration, ensuring that the shared device can capture the correct video stream data. The parsed video data packet is passed to the playback application of the shared device, thereby achieving the effect of multiple shared devices and the target device playing the same video content synchronously, enhancing the application scenarios and user experience of the screen projection technology, especially when the same content needs to be displayed to multiple viewers, such as conference rooms, classrooms or family gatherings. Therefore, through the method of the present invention, there is no need to manually configure multiple devices or send screen projection requests to each device separately, which greatly simplifies the operation process; and multiple shared devices use the resources of the same screen projection source device, reducing the need for additional hardware, such as a dedicated receiver or adapter, thereby reducing the overall device cost; in terms of operational efficiency, the automated process reduces the time for manual intervention and configuration, speeds up the deployment of screen projection content, and reduces the probability of problems caused by misoperation, ensuring the smoothness of the screen projection process. When more display devices need to be added, it is only necessary to turn on the monitoring function of these devices without complicated settings or adjustments, making the expansion of the entire system easier and faster. In summary, the method proposed in the present invention realizes the screen projection function of one projection to multiple projections through the monitoring mechanism, which not only simplifies user operations, but also reduces equipment costs and improves operating efficiency.
[0065] like Figure 3As shown in , this embodiment also provides a shared screen projection system, which includes: a parameter determination, connection and port determination module 10, a receiving and playing module 20 and a monitoring and synchronous playback module 30. Specifically, the parameter determination, connection and port determination module 10 is used to determine the network configuration parameters, establish a screen projection connection with the source device, and determine a fixed communication port. The receiving and playing module 20 is used to receive the video data packet sent by the source device based on the fixed communication port, and play it. The monitoring and synchronous playback module 30 is used to monitor the network configuration parameters and the fixed communication port based on a preset shared device when receiving the video data packet sent by the source device, obtain the video data packet, and parse it to achieve synchronous playback.
[0066] In one implementation, the parameter determination, connection and port determination module 10 includes:
[0067] A network configuration parameter determination unit, used to start a wireless network connection, determine a fixed channel and a fixed IP address of the wireless network connection, and use the fixed channel and the fixed IP address as network configuration parameters;
[0068] The connection and port determination unit is used to establish a connection with the source device based on the network configuration parameters, and after the connection is completed, perform protocol negotiation with the source device to determine a fixed communication port.
[0069] In one implementation, the receiving and playing module 20 includes:
[0070] A receiving unit, configured to receive a video data packet sent by the source device based on the fixed communication port;
[0071] A decoding unit, used for decoding the video data packet using a decoding module to obtain a video frame;
[0072] The playing unit is used to play the video frame by using the display module.
[0073] In one implementation, the monitoring and synchronous playing module 30 includes:
[0074] A first target communication data packet acquisition unit, configured to monitor the network configuration parameters based on a preset shared device to obtain a first target communication data packet;
[0075] A video data packet acquisition unit, configured to monitor the first target communication data packet and the fixed communication port based on a preset shared device to obtain the video data packet;
[0076] The synchronous playing unit is used to decode the video data packet based on the upper layer application of the shared device, and synchronously play the decoded video data based on the player of the upper layer application of the shared device.
[0077] In one implementation, the first target communication data packet acquiring unit includes:
[0078] A communication data packet acquisition subunit, configured to monitor all communication data packets of the fixed channel based on a preset shared device to obtain communication data packets;
[0079] The first target communication data packet acquisition subunit is used to obtain the first target communication data packet based on the communication data packet and the communication data packet whose IP address is the fixed IP address monitored by a preset shared device.
[0080] In one implementation, the video data packet acquisition unit includes:
[0081] A second target communication data packet acquisition subunit is used to obtain a second target communication data packet based on the first target communication data packet and the first target communication data packet whose communication port is the fixed communication port monitored by the preset shared device;
[0082] The video data packet acquisition subunit is used to, if the transmission protocol type of the second target communication data packet is a preset type, then the second target communication data packet is the video data packet, wherein the transmission protocol type of the video data packet is set by the source device and is a preset type.
[0083] The working principles of each module in the shared screen projection system of this embodiment are the same as the principles of each step in the above method embodiment, and will not be repeated here.
[0084] Based on the above embodiment, the present invention further provides a terminal, the principle block diagram of the terminal can be as follows: Figure 4 The terminal may include one or more processors 100 ( Figure 4 Only one is shown), a memory 101 and a computer program 102 stored in the memory 101 and executable on one or more processors 100, for example, a shared screen projection program. When one or more processors 100 execute the computer program 102, the various steps in the shared screen projection method embodiment can be implemented. Alternatively, when one or more processors 100 execute the computer program 102, the functions of each module / unit in the shared screen projection method embodiment can be implemented, which is not limited here.
[0085] In one embodiment, the processor 100 may be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor may be a microprocessor or any conventional processor, etc.
[0086] In one embodiment, the memory 101 may be an internal storage unit of an electronic device, such as a hard disk or memory of the electronic device. The memory 101 may also be an external storage device of the electronic device, such as a plug-in hard disk, a smart media card (SMC), a secure digital (SD) card, a flash card, etc. equipped on the electronic device. Further, the memory 101 may also include both an internal storage unit of the electronic device and an external storage device. The memory 101 is used to store computer programs and other programs and data required by the terminal. The memory 101 may also be used to temporarily store data that has been output or is to be output.
[0087] Those skilled in the art will understand that Figure 4 The principle block diagram shown in the figure is only a block diagram of a partial structure related to the scheme of the present invention, and does not constitute a limitation on the terminal to which the scheme of the present invention is applied. The specific terminal may include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.
[0088] Those of ordinary skill in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to memory, storage, operating database or other media used in the embodiments provided by the present invention may include non-volatile and / or volatile memory. Non-volatile memory may include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM) or flash memory. Volatile memory may include random access memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in many forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double operational data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous link (Synchlink) DRAM (SLDRAM), memory bus (Rambus) direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM), etc.
[0089] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present invention.
Claims
1. A shared screen projection method, characterized in that: The method comprises: Determine network configuration parameters, establish a screen projection connection with the source device, and determine the fixed communication port; Based on the fixed communication port, receiving the video data packet sent by the source device and playing it; When receiving the video data packet sent by the source device, the network configuration parameters and the fixed communication port are monitored based on the preset shared device to obtain the video data packet and parse it to achieve synchronous playback.
2. The screen sharing method according to claim 1, characterized in that: The determining of network configuration parameters, establishing a screen projection connection with a source device, and determining a fixed communication port includes: Starting a wireless network connection, determining a fixed channel and a fixed IP address of the wireless network connection, and using the fixed channel and the fixed IP address as network configuration parameters; Based on the network configuration parameters, a connection is established with the source device, and after the connection is completed, a protocol negotiation is performed with the source device to determine a fixed communication port.
3. The screen sharing method according to claim 2, characterized in that: The receiving, based on the fixed communication port, a video data packet sent by the source device and playing the video data packet comprises: Based on the fixed communication port, receiving the video data packet sent by the source device; Decoding the video data packet using a decoding module to obtain a video frame; Based on the video frame, a display module is used for playing.
4. The screen sharing method according to claim 3, characterized in that: The preset shared device monitors the network configuration parameters and the fixed communication port to obtain the video data packet, including: Monitoring the network configuration parameters based on a preset shared device to obtain a first target communication data packet; The first target communication data packet and the fixed communication port are monitored based on a preset shared device to obtain the video data packet.
5. The screen sharing method according to claim 4, characterized in that: The preset shared device monitors the network configuration parameters to obtain a first target communication data packet, including: Based on a preset shared device, all communication data packets of the fixed channel are monitored to obtain communication data packets; Based on the communication data packet, a preset shared device monitors the communication data packet whose IP address is the fixed IP address to obtain a first target communication data packet.
6. The screen sharing method according to claim 5, characterized in that: The preset shared device monitors the first target communication data packet and the fixed communication port to obtain the video data packet, including: Based on the first target communication data packet, based on the preset shared device monitoring communication port being the first target communication data packet of the fixed communication port, a second target communication data packet is obtained; If the transmission protocol type of the second target communication data packet is a preset type, then the second target communication data packet is the video data packet, wherein the transmission protocol type of the video data packet is set by the source device and is a preset type.
7. The screen sharing method according to claim 6, characterized in that: The parsing to achieve synchronous playback includes: The upper layer application based on the shared device decodes the video data packet, and the player based on the upper layer application of the shared device synchronously plays the decoded video data.
8. A shared screen projection system, characterized in that: The system comprises: The parameter determination, connection and port determination module is used to determine the network configuration parameters, establish a screen projection connection with the source device, and determine the fixed communication port; A receiving and playing module, used for receiving the video data packet sent by the source device based on the fixed communication port, and playing it; The monitoring and synchronous playback module is used to monitor the network configuration parameters and the fixed communication port based on the preset shared device when receiving the video data packet sent by the source device, obtain the video data packet, and parse it to achieve synchronous playback.
9. A terminal, characterized in that: The terminal includes a memory, a processor, and a shared screen projection program stored in the memory and executable on the processor. When the processor executes the shared screen projection program, the steps of the shared screen projection method as described in any one of claims 1 to 7 are implemented.
10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a shared screen projection program, and when the shared screen projection program is executed by the processor, the steps of the shared screen projection method as described in any one of claims 1-7 are implemented.