Cross-segment wireless screen projection method, device, electronic device and storage medium

By establishing a communication connection between the reverse tunnel and the forwarding server in a cross-LAN environment, generating a screen projection connection identifier and determining the forwarding port, the stability and security issues of cross-LAN wireless screen mirroring are solved, and convenient and safe screen mirroring is achieved. process.

CN114126083BActive Publication Date: 2024-10-25SHENZHEN TCL DIGITAL TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202111414013.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-11-25
Publication Date
2024-10-25
Estimated Expiration
2041-11-25

AI Technical Summary

Technical Problem

The existing technology has stability and security issues when implementing wireless screencasting in a cross-LAN environment. Especially when the devices are in different LANs, the conventional method requires the devices to be in the same LAN to cast the screen, resulting in complex and unsafe operations. .

Method used

By establishing a communication connection between the reverse tunnel and the forwarding server, a projection connection identifier is generated, and the forwarding port is determined based on the identifier, and the forwarding server is controlled to send the information to be projected to the device being projected, thereby realizing wireless projection across network segments.

Benefits of technology

It simplifies the operation process of wireless screencasting, improves convenience, and enhances security, avoids the output of user information, and ensures the stability and security of screencasting across network segments.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114126083B_ABST
    Figure CN114126083B_ABST
Patent Text Reader

Abstract

The present application discloses a method, device, electronic device and storage medium for wireless screen projection across network segments, the method comprising: establishing a reverse tunnel; generating a screen projection connection identifier when establishing a communication connection between the projected device and the forwarding server based on the reverse tunnel; when receiving screen projection device information uploaded based on the screen projection connection identifier, determining the forwarding port corresponding to the projected device and the forwarding server according to the screen projection device information; and controlling the forwarding server to send the screen projection information to the projected device for display based on the forwarding port. This improves the security and convenience of wireless screen projection across network segments.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of network processing technology, and in particular to a method, device, electronic device and storage medium for wireless screen projection across network segments. Background Art

[0002] At present, conventional screen projection modes include same-screen mirroring mode and push mode, but both modes require that the device for screen projection and the device for display are in the same local area network, for example, the mobile phone and the TV need to be in the same local area network.

[0003] However, there are many scenarios where the projection device and the projected device are in different local area networks, such as conference rooms in public places. In order to achieve wireless projection in this situation, the main solution now is to open a hotspot to make the mobile phone and the projected device / TV in the same local area network. However, this method has many problems due to its implementation method, mainly including operational stability and security issues.

[0004] Therefore, there is an urgent need for a cross-segment wireless screen projection method that improves the security and convenience of wireless screen projection. Summary of the invention

[0005] The purpose of the embodiments of the present application is to provide a cross-segment wireless screen projection method, device, electronic device and storage medium, aiming to improve the security and convenience of wireless screen projection.

[0006] In a first aspect, to achieve the above-mentioned purpose, an embodiment of the present application provides a wireless screen projection method across network segments, including:

[0007] Establish a reverse tunnel;

[0008] When a communication connection is established between the screen projection device and the forwarding server based on the reverse tunnel, a screen projection connection identifier is generated;

[0009] When receiving the screen projection device information uploaded based on the screen projection connection identifier, determining the forwarding port corresponding to the projected screen device and the forwarding server according to the screen projection device information;

[0010] Control the forwarding server to send the screen information to be projected to the projected device for display based on the forwarding port.

[0011] In a second aspect, in order to solve the same technical problem, an embodiment of the present application provides a cross-segment wireless screen projection device, including:

[0012] A tunnel establishment module, used for establishing a reverse tunnel;

[0013] A communication connection module, used to generate a screen projection connection identifier when a communication connection is established between the screen projection device and the forwarding server based on the reverse tunnel;

[0014] A port determination module, for determining, when receiving the screen projection device information uploaded based on the screen projection connection identifier, a forwarding port corresponding to the projected screen device and the forwarding server according to the screen projection device information;

[0015] The information forwarding module is used to control the forwarding server to send the screen projection information to the screen projection device for display based on the forwarding port.

[0016] In the third aspect, in order to solve the same technical problem, an embodiment of the present application provides an electronic device, comprising a processor, a memory, and a computer program stored in the memory and configured to be executed by the processor, wherein the memory is coupled to the processor, and when the processor executes the computer program, the steps in the cross-network segment wireless screen projection method described in any one of the above items are implemented.

[0017] In the fourth aspect, in order to solve the same technical problem, an embodiment of the present application provides a computer-readable storage medium, which stores a computer program, wherein when the computer program is running, the device where the computer-readable storage medium is located is controlled to perform any step in the cross-network segment wireless screen projection method described above.

[0018] The embodiment of the present application provides a wireless screen projection method, device, electronic device and storage medium across network segments. When performing wireless screen projection across network segments, the method first establishes a corresponding reverse tunnel according to the current network status, then establishes a communication connection between a forwarding server and a screen projection device according to the established reverse tunnel, and then generates a corresponding screen projection connection identifier when the communication connection is established. Then, by detecting whether the screen projection connection identifier is recognized, and determining the screen projection device information of the screen projection device that identifies the screen projection link identifier when it is recognized, the corresponding forwarding port is determined according to the obtained screen projection device information, and finally, when the forwarding port is determined, the forwarding server is controlled to send the screen projection information to be projected sent by the screen projection device to the screen projection device for display according to the forwarding port. In the process of wireless screen projection across network segments, the establishment of reverse tunnels and the matching connection of forwarding ports are realized to reduce the operational complexity of wireless screen projection matching, improve the convenience of wireless screen projection, and avoid the output of user information in the process of wireless screen projection across network segments, thereby improving the security of wireless screen projection. BRIEF DESCRIPTION OF THE DRAWINGS

[0019] Figure 1 A schematic diagram of a wireless screen projection system provided in an embodiment of the present application;

[0020] Figure 2 This is a flow chart of the wireless screen projection method provided in the embodiment of the present application;

[0021] Figure 3 A flowchart of the steps of establishing a reverse tunnel provided by this application;

[0022] Figure 4 A flowchart of the steps of determining forwarding port information provided in an embodiment of the present application;

[0023] Figure 5 A schematic diagram of a flow chart of steps for determining a forwarding port provided in an embodiment of the present application;

[0024] Figure 6 This is a structural schematic diagram of a cross-segment wireless screen projection device provided in an embodiment of the present application;

[0025] Figure 7 is a structural schematic diagram of an electronic device provided in an embodiment of the present application;

[0026] Figure 8 This is another structural schematic diagram of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0027] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.

[0028] It should be understood that the various steps described in the method embodiments disclosed in the present application can be performed in different orders and / or in parallel. In addition, the method embodiments may include additional steps and / or omit the steps shown. The scope of the present application is not limited in this respect.

[0029] The term "including" and its variations used herein are open inclusions, i.e., "including but not limited to". The term "based on" means "based at least in part on". The term "one embodiment" means "at least one embodiment"; the term "another embodiment" means "at least one additional embodiment"; the term "some embodiments" means "at least some embodiments". The relevant definitions of other terms will be given in the following description.

[0030] Please refer to Figure 1 , Figure 1 A schematic framework diagram of a wireless screen projection system provided in an embodiment of the present application.

[0031] like Figure 1As shown, the wireless screen projection system 100 includes a projected screen device 101, a forwarding server 102, and a screen projection device 103, wherein the number of projected screen devices 101 and screen projection devices 103 is not limited, and the forwarding server 102 and the screen projection device 103 are in the same intranet / local area network, and the projected screen device 101 and the forwarding server 102 and the projected screen device 103 can be in different local area networks, or of course, in the same local area network. Since if the projected screen device 101 and the screen projection device 103 are in the same local area network, wireless screen projection can be achieved in accordance with the conventional wireless screen projection method. Therefore, it is set here that the projected screen device 101 and the screen projection device 103 are in different local area networks, as shown in FIG. Figure 1 As shown, the forwarding server 102 and the screen projection device 103 are in an intranet, and the screen projection device 101 is in a public network.

[0032] In one embodiment, the projected screen device 101 includes but is not limited to a television, a projector, etc., and the projected screen device 103 includes but is not limited to terminals such as computers, mobile phones, and tablets.

[0033] In actual applications, when the projected device 101 needs to be used for screen projection display, it is necessary to establish a wireless connection between the projection device 103 and the projected device 101, that is, it is necessary to enable the data that needs to be projected on the projection device 103 to be sent to the projected device 101. Since the two are in different local area networks, the forwarding server 102 will be used to establish data transmission between the two at this time, so that the data to be projected on the projected device 103 can be sent to the projected device 101.

[0034] In the actual wireless screen projection process, when it is determined that wireless screen projection is required, a communication connection is first established between the projected device 101 and the forwarding server 102. Since the projected device 101 is in the public network at this time, when a reverse tunnel is established, it is necessary to obtain a public network address, and then use the reverse tunnel based on the public network address to establish a communication connection between the projected device 101 and the forwarding server 102. After the communication connection is established, it means that data can be transmitted between the two. However, since the forwarding server 102 will be connected to several projected devices 101, it is also necessary to determine which port to use to complete the data transmission of the projected device, and then after the determination, data transmission is performed based on the determined port to complete the display of the screen information to be projected on the projection device 103 on the relevant display interface of the projected device 101.

[0035] Reference Figure 2 , Figure 2 is a flow chart of a wireless screen projection method provided in an embodiment of the present application, such as Figure 2 As shown, the wireless screen projection method provided in the embodiment of the present application includes steps 201 to 204.

[0036] Step S201: Establish a reverse tunnel.

[0037] The projected device is used to display the content displayed on the projection device, including but not limited to displaying pictures, videos and documents, and the projected device can be a TV or a professional display device. The forwarding server is a server in an intranet, which is used to realize the wireless projection connection between the projected device and the projection device, and the forwarding server and the projection device are in the same intranet.

[0038] In conventional wireless screen projection solutions, it is usually necessary to control the projection device and the projected device to be in the same local area network. For example, when using a TV to project the content of a mobile phone, it is necessary to ensure that the TV and the mobile phone are in the same local area network, so that wireless screen projection can be completed. However, in actual application, there are many situations in which the mobile phone and the TV are not in the same local area network, making it impossible to perform wireless screen projection.

[0039] In one embodiment, the projected screen device and the projection device are in different local area networks, so reasonable adjustment and control are required to achieve the connection between the projection device and the projected screen device in different local area networks, thereby completing the wireless projection operation.

[0040] In the actual wireless screen projection process, when completing the wireless screen projection, you first need to start the projected device that is currently displaying the content, then establish a wireless connection between the projected device and the projection device, and finally display the content that needs to be displayed on the projection device when the wireless screen projection connection is successful.

[0041] Therefore, in the process of wireless screen projection, a communication connection must first be established between the projected device and the projection device before the wireless screen projection can be completed. Specifically, in order to achieve wireless connection, a reverse tunnel is established, and a communication connection is established between the projected device and the forwarding server based on the established reverse tunnel.

[0042] Reference Figure 3 , Figure 3 A flowchart of the steps of establishing a reverse tunnel provided by the present application, wherein the steps include steps S301 to S303.

[0043] Step S301, obtaining the network status of the screen projection device and the intranet;

[0044] Step S302: when the network state is a connected state, obtaining an intranet address or a public network address to establish a reverse tunnel;

[0045] Step S303: When the network state is disconnected, obtain a public network address to establish a reverse tunnel.

[0046] Intranet, or local area network, refers to a group of computers connected by multiple computers in a certain area. It is usually within a radius of several thousand meters. Moreover, the local area network is a closed type, which can be composed of two computers in an office or thousands of computers in a company.

[0047] The public network, also known as the wide area network, is a long-distance network that connects local area networks or metropolitan area networks in different regions. It usually spans a large physical range, ranging from tens of kilometers to thousands of kilometers. It can connect multiple regions, cities and countries, or span several continents and provide long-distance communications, forming an international long-distance network, but the wide area network is not the same as the Internet.

[0048] When establishing a reverse tunnel, you can determine how to establish a reverse tunnel based on the current network status of the projected device. For example, if the projected device and the projection device that needs to be projected are in the same local area network, you can directly establish a wireless communication connection between the projection device and the projected device, and after completing the wireless connection, implement the projection in the conventional same-screen mirroring mode and / or push mode. However, if the projected device and the projection device are not in the same local area network, you cannot directly establish a wireless communication connection between the two.

[0049] It should be noted that, for the screen projection device, it is in the intranet. When the screen projection device is also in the intranet, it is determined that the screen projection device and the screen projection device are in the same local area network.

[0050] Specifically, when establishing a reverse tunnel, the network status of the projected device and the intranet is obtained, where the network status includes a connection status and a disconnection status. When the projected device and the intranet are in a connected state, it means that the projected device is in the same local area network as the projection device. Otherwise, it means that the projected device and the projection device are in different local area networks.

[0051] After obtaining the network status of the projected device and the intranet, it will determine how to establish a reverse tunnel based on the connection status, thereby achieving a wireless connection with the projection device. When the network status is determined to be connected, the projected device and the projection device are in the same intranet state. At this time, when establishing a reverse tunnel, an intranet address can be directly obtained to achieve the establishment of a reverse tunnel. When the network status is determined to be disconnected, the reverse tunnel can only be established using the public network. Specifically, by obtaining a public network address, a connection is first established between the projected device and the public network, and then the connection with the intranet is achieved through the public network.

[0052] In actual applications, the reverse tunnel connection between the projected device and the forwarding server can be established through an intranet address or through the public network address of the forwarding server, depending on the network conditions. In the case where the projected device can connect to the intranet address of the forwarding server through TCP, an intranet address can be selected for connection. That is, the public network address of the forwarding server is not necessary at this time, and when the projected device cannot connect to the intranet address of the forwarding server, a tunnel connection needs to be established through the public network address of the forwarding server.

[0053] Step S202: When a communication connection is established between the projected screen device and the forwarding server based on the reverse tunnel, a projection connection identifier is generated.

[0054] After the reverse tunnel is established, a communication connection is established between the projected device and the forwarding server through the established reverse tunnel, and subsequent operations are performed after the connection is completed to achieve wireless screen projection. Specifically, after determining that a communication connection is established between the projected device and the forwarding server, a corresponding screen projection connection identifier will be generated, so that the screen projection device can achieve connection with the projected device through the screen projection connection identifier.

[0055] Specifically, after the communication connection between the projected device and the forwarding server is completed, since there are many devices in the same intranet as the forwarding server, and they can all be used to realize screen projection, it is necessary to determine which screen projection device is wirelessly connected to the projected device to realize wireless screen projection. Therefore, a screen projection connection identifier will be generated at this time, and then by obtaining the relevant information of the device that identifies the screen projection connection identifier, it is determined which device is used to connect to the projected device.

[0056] In one embodiment, when generating a screen projection connection identifier, it includes: when it is determined that the projected screen device establishes a communication connection with the forwarding server, obtaining the first device identifier of the projected screen device, and generating a screen projection connection identifier based on the first device identifier.

[0057] Specifically, the generated screen projection connection identifier is obtained based on relevant information of the projected device, such as the device identifier of the projected device, such as the device ID or the location information of the device, where the location information may be the conference room number where the device is located.

[0058] In actual applications, after the projected device establishes a communication connection with the forwarding server, in order to realize the wireless projection connection, a corresponding projection connection logo can be displayed on the display screen of the projected device, where the projection connection logo can be a QR code, and the QR code contains relevant information of the projected device. The projection device then scans and identifies the QR code and uploads the relevant information of the projection device to the forwarding server, so that the forwarding server knows between which two devices a wireless projection connection needs to be established.

[0059] The generated projection connection identifier can be the QR code described above, or other identification information, such as a barcode. It contains relevant information of the projected device, such as the device information of the projected device (such as the device number) or the information of the environment where the projected device is located (such as the conference room number where the projected device is located, etc.). At the same time, the relevant information of the projection device can be uploaded to the forwarding server through the projection connection identifier.

[0060] Step S203: When the screen projection device information uploaded based on the screen projection connection identifier is received, the forwarding port corresponding to the projected device and the forwarding server is determined according to the screen projection device information.

[0061] After the projected device generates and displays the obtained projection connection identifier, the projection device can be used to identify the projection connection identifier. Specifically, when the projection device information uploaded by the projection device based on the identification of the projection connection identifier is received, the current corresponding forwarding port information will be determined according to the obtained projection device identifier, and then the wireless projection connection between the projected device and the projection device will be realized according to the determined forwarding port information.

[0062] In the forwarding server, the correspondence between different projected devices and different forwarding ports is recorded, so when it is necessary to determine which port to use to send the data uploaded by the projection device to the projected device, the data sending and projection operations can be completed accurately. In practice, the correspondence between the projected device and the forwarding port is not unique. Multiple projected devices may correspond to the same forwarding port. For example, the server projects a video uploaded by a mobile phone to multiple different TVs through a data transmission port. In the case where multiple ports correspond to the same projected device, while ensuring that the projection is normal and does not affect each other, it will be ensured that there will be no mutual influence during use.

[0063] For example, if data from three different forwarding ports can be sent to a TV for display, and the three different forwarding ports are port 1, port 2, and port 3, then when port 1 is connected to the TV and performing screen projection, port 2 and port 3 will be set to a prohibited access state, that is, other users will not be able to use port 2 and / or port 3 to perform wireless screen projection with the TV. Only when port 1 is disconnected from the TV will the connected port be re-determined for wireless screen projection.

[0064] When determining the forwarding port information, refer to Figure 4 , Figure 4 A flowchart of the steps of determining forwarding port information provided in an embodiment of the present application includes steps S401 to S402.

[0065] Step S401: when it is detected that the screen projection connection identifier is recognized, obtaining the first device identifier and the second device identifier corresponding to the screen projection device;

[0066] Step S402: Determine, based on the first device identifier and the second device identifier, the forwarding port through which the projected device receives the data sent by the projecting device.

[0067] When determining the forwarding port information, the user is required to use the projection device to identify the generated projection connection identifier. Therefore, when it is detected that the generated projection connection identifier is identified, the second device identifier corresponding to the projection device that identifies the projection connection identifier is obtained, and the first device identifier corresponding to the projected device is obtained. Then, the forwarding port of the projected device for receiving the data sent by the projection device is determined through the obtained first device identifier and second device identifier.

[0068] In actual applications, when the user uses the projection device to scan and identify the generated projection connection logo, the relevant device information of the projection device will be uploaded. At the same time, when it is detected that the projection connection logo is recognized, the relevant device information of the projected device is obtained. When obtaining the device information of the two devices, it is to associate the projected device with the projection device to avoid wireless projection connection errors.

[0069] For example, when a mobile phone is used to scan the QR code generated on the TV, the forwarding server will obtain the ID information of the mobile phone. At the same time, since the QR code is scanned by the mobile phone, the relevant information of the TV corresponding to the QR code will also be notified to the server, such as the TV ID, the conference room number where the TV is located, etc. By associating the mobile phone with the TV and determining the port currently sending data based on the relevant information of the TV, the projection file sent by the mobile phone will be sent to the TV for display based on the determined port.

[0070] Reference Figure 5 , Figure 5 A flow chart of the steps of determining a forwarding port provided in an embodiment of the present application, wherein the steps include steps S501 to S502.

[0071] Step S501: Obtain a port mapping table, and perform matching in the port mapping table according to the first device identifier;

[0072] Step S502: When there is a matching port identified by the first device in the port mapping table, determine that the matching port is the forwarding port of the projected device.

[0073] When determining the forwarding port between the projected screen device and the forwarding server, first obtain the pre-recorded and stored port mapping table, then query and match in the obtained port mapping table according to the obtained first device identifier, and when it is determined that there is a port that matches the first device identifier, determine that the matched port is the forwarding port between the projected screen device and the forwarding server.

[0074] The port mapping table records the correspondence between different projected devices and forwarding ports, and the port mapping table is pre-edited and stored in the forwarding server. When a query and match is required, the port mapping table will be obtained for search to determine whether there is a corresponding forwarding port for the device identifier that needs to be matched at this time, and to determine which forwarding port is the match.

[0075] In actual applications, the port mapping table is editable, that is, when the forwarding port corresponding to different screen projection devices needs to be updated, the port mapping table can be edited after the port mapping rule change is completed. For example, when the forwarding port corresponding to a screen projection device needs to be updated, the port change is first implemented using the relevant programming language, and in order for the forwarding server to accurately find the corresponding forwarding port, it is necessary to update the port mapping table stored in itself, specifically, change the forwarding port corresponding to the screen projection device to the current corresponding forwarding port.

[0076] In addition, when it is necessary to add or delete information contained in the port mapping table, the high port mapping table may also be re-edited and updated and stored.

[0077] Specifically, for the port mapping table, when it needs to be updated and edited, it includes: when a list editing instruction is received, obtaining and displaying the stored port mapping table; receiving input update information, and updating the port mapping table based on the update information, wherein the update includes new information, changed information and deleted information; when it is determined that the editing is completed, updating the port mapping table stored in the forwarding server, and sending the updated port mapping table to the projected device.

[0078] The processing of the port mapping table includes adding, deleting, and modifying, etc. Therefore, the corresponding list editing instruction will be received first, where the list editing instruction is an instruction for editing the port mapping table. At this time, the port mapping table will be controlled to be in an editable state, and then according to the received update information, by identifying the update information, the processing method of the port mapping table at this time is determined, including adding, modifying, and deleting, etc. After completing the editing of the port mapping table, the port mapping table contained in the forwarding server will be updated based on the updated port mapping table, and the updated port mapping table will also be sent to the relevant projected device for updating and storage.

[0079] In addition, when editing and updating the port mapping table, the port mapping table will be controlled to be in an unavailable state. That is, when establishing a wireless screen projection connection, the port mapping table cannot be used to determine the current corresponding forwarding port.

[0080] Step S204: Control the forwarding server to send the screen projection information to the projected device for display based on the forwarding port.

[0081] After determining the forwarding port for data forwarding, the forwarding server will be controlled to send the screen projection information uploaded by the projection device to the corresponding projection device according to the determined forwarding port for corresponding display, thereby completing the wireless screen projection.

[0082] In summary, the cross-segment wireless screen projection method provided by the embodiment of the present application includes, when performing cross-segment wireless screen projection, first establishing a corresponding reverse tunnel according to the current network status, then establishing a communication connection between the forwarding server and the screen projection device according to the established reverse tunnel, and then generating a corresponding screen projection connection identifier when the communication connection is established, and then detecting whether the screen projection connection identifier is recognized, and determining the screen projection device information of the screen projection device that identifies the screen projection link identifier when it is recognized, so as to determine the corresponding forwarding port according to the obtained screen projection device information, and finally, when the forwarding port is determined, controlling the forwarding server to send the screen projection information to be projected sent by the screen projection device to the screen projection device for display according to the forwarding port. In the process of wireless screen projection across network segments, the establishment of reverse tunnels and the matching connection of forwarding ports are achieved, so as to reduce the operational complexity of wireless screen projection matching and improve the convenience of wireless screen projection. At the same time, the output of user information in the process of wireless screen projection across network segments is avoided, thereby improving the security of wireless screen projection.

[0083] According to the method described in the above embodiment, this embodiment will be further described from the perspective of a wireless screen projection device across network segments. The wireless screen projection device across network segments can be implemented as an independent entity or integrated into an electronic device, such as a terminal. The terminal may include a mobile phone, a tablet computer, a somatosensory gaming device, a smart TV, and a commercial display screen.

[0084] See also Figure 6 , Figure 6 is a structural diagram of a wireless screen projection device across network segments provided in an embodiment of the present application, such as Figure 6 As shown, the cross-segment wireless screen projection device 600 provided in the embodiment of the present application includes:

[0085] Tunnel establishment module 601, used to establish a reverse tunnel;

[0086] The communication connection module 602 is used to generate a screen projection connection identifier when a communication connection is established between the screen projection device and the forwarding server based on the reverse tunnel;

[0087] The port determination module 603 is used to determine the forwarding port corresponding to the projected device and the forwarding server according to the projection device information when receiving the projection device information uploaded based on the projection connection identifier;

[0088] The information forwarding module 604 is used to control the forwarding server to send the screen projection information to the screen projection device for display based on the forwarding port.

[0089] During specific implementation, the above modules and / or units can be implemented as independent entities, or can be arbitrarily combined to be implemented as the same or several entities. The specific implementation of the above modules and / or units can refer to the previous method embodiments. The specific beneficial effects that can be achieved can also refer to the beneficial effects in the previous method embodiments, which will not be repeated here.

[0090] Also, see Figure 7 , Figure 7 is a schematic diagram of the structure of an electronic device provided in an embodiment of the present application, and the electronic device may be a mobile terminal such as a smart phone, a tablet computer, or the like. Figure 7 As shown, the electronic device 700 includes a processor 701 and a memory 702. The processor 701 is electrically connected to the memory 702.

[0091] The processor 701 is the control center of the electronic device 700. It uses various interfaces and lines to connect various parts of the entire electronic device. It executes various functions of the electronic device 700 and processes data by running or loading applications stored in the memory 702 and calling data stored in the memory 702, thereby monitoring the electronic device 700 as a whole.

[0092] In this embodiment, the processor 701 in the electronic device 700 loads instructions corresponding to the processes of one or more application programs into the memory 702 according to the following steps, and the processor 701 runs the application programs stored in the memory 702 to implement various functions:

[0093] Establish a reverse tunnel;

[0094] When a communication connection is established between the screen projection device and the forwarding server based on the reverse tunnel, a screen projection connection identifier is generated;

[0095] When receiving the screen projection device information uploaded based on the screen projection connection identifier, determining the forwarding port corresponding to the projected screen device and the forwarding server according to the screen projection device information;

[0096] Control the forwarding server to send the screen information to be projected to the projected device for display based on the forwarding port.

[0097] The electronic device 700 can implement the steps in any embodiment of the wireless screen projection method across network segments provided in the embodiments of the present application. Therefore, it can achieve the beneficial effects that can be achieved by any wireless screen projection method across network segments provided in the embodiments of the present application. Please see the previous embodiments for details and will not be repeated here.

[0098] See also Figure 8 , Figure 8is another structural schematic diagram of an electronic device provided in an embodiment of the present application, such as Figure 8 As shown, Figure 8 The specific structural block diagram of the electronic device provided in the embodiment of the present application is shown, and the electronic device can be used to implement the wireless screen projection method across network segments provided in the above embodiment. The electronic device 800 can be a mobile terminal such as a smart phone or a laptop computer.

[0099] The RF circuit 810 is used to receive and send electromagnetic waves, realize the mutual conversion between electromagnetic waves and electrical signals, and thus communicate with a communication network or other devices. The RF circuit 810 may include various existing circuit elements for performing these functions, such as antennas, radio frequency transceivers, digital signal processors, encryption / decryption chips, user identity module (SIM) cards, memories, etc. The RF circuit 810 can communicate with various networks such as the Internet, corporate intranets, wireless networks, or communicate with other devices through wireless networks. The above-mentioned wireless networks may include cellular telephone networks, wireless local area networks, or metropolitan area networks. The above-mentioned wireless networks can use various communication standards, protocols and technologies, including but not limited to Global System for Mobile Communication (GSM), Enhanced Data GSM Environment (EDGE), Wideband Code Division Multiple Access (WCDMA), Code Division Multiple Access (CDMA), Time Division Multiple Access (TDMA), Wireless Fidelity (Wi-Fi) (such as Institute of Electrical and Electronics Engineers standards IEEE 802.11a, IEEE 802.11b, IEEE802.11g and / or IEEE802.11n), Voice over Internet Protocol (VoIP), Worldwide Interoperability for Microwave Access (Wi-Max), other protocols for email, instant messaging and short messages, and any other suitable communication protocols, even those that have not yet been developed.

[0100] The memory 820 may be used to store software programs and modules, such as program instructions / modules corresponding to the wireless screen projection method across network segments in the above-mentioned embodiment. The processor 880 executes various functional applications and wireless screen projection across network segments by running the software programs and modules stored in the memory 820, that is, realizing the following functions:

[0101] Establish a reverse tunnel;

[0102] When a communication connection is established between the screen projection device and the forwarding server based on the reverse tunnel, a screen projection connection identifier is generated;

[0103] When receiving the screen projection device information uploaded based on the screen projection connection identifier, determining the forwarding port corresponding to the projected screen device and the forwarding server according to the screen projection device information;

[0104] Control the forwarding server to send the screen information to be projected to the projected device for display based on the forwarding port.

[0105] The memory 820 may include a high-speed random access memory, and may also include a non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some examples, the memory 820 may further include a memory remotely arranged relative to the processor 880, and these remote memories may be connected to the electronic device 800 via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.

[0106] The input unit 830 can be used to receive input digital or character information, and generate keyboard, mouse, joystick, optical or trackball signal input related to user settings and function control. Specifically, the input unit 830 may include a touch-sensitive surface 831 and other input devices 832. The touch-sensitive surface 831, also known as a touch display screen or touchpad, can collect user touch operations on or near it (such as operations performed by users using fingers, styluses, or any other suitable objects or accessories on or near the touch-sensitive surface 831), and drive corresponding connection devices according to a pre-set program. Optionally, the touch-sensitive surface 831 may include a touch detection device and a touch controller. Among them, the touch detection device detects the user's touch orientation, detects the signal brought by the touch operation, and transmits the signal to the touch controller; the touch controller receives the touch information from the touch detection device, converts it into touch point coordinates, and then sends it to the processor 880, and can receive and execute commands sent by the processor 880. In addition, the touch-sensitive surface 831 can be implemented in various types such as resistive, capacitive, infrared, and surface acoustic waves. In addition to the touch-sensitive surface 831, the input unit 830 may further include other input devices 832. Specifically, the other input devices 832 may include, but are not limited to, one or more of a physical keyboard, function keys (such as volume control keys, switch keys, etc.), a trackball, a mouse, a joystick, and the like.

[0107] The display unit 840 can be used to display information input by the user or information provided to the user and various graphical user interfaces of the electronic device 800, which can be composed of graphics, text, icons, videos and any combination thereof. The display unit 840 may include a display panel 841, and optionally, the display panel 841 may be configured in the form of LCD (Liquid Crystal Display), OLED (Organic Light-Emitting Diode), etc. Further, the touch-sensitive surface 831 may cover the display panel 841, and when the touch-sensitive surface 831 detects a touch operation on or near it, it is transmitted to the processor 880 to determine the type of the touch event, and then the processor 880 provides corresponding visual output on the display panel 841 according to the type of the touch event. Although in the figure, the touch-sensitive surface 831 and the display panel 841 are implemented as two independent components to implement input and output functions, in some embodiments, the touch-sensitive surface 831 can be integrated with the display panel 841 to implement input and output functions.

[0108] The electronic device 800 may also include at least one sensor 850, such as a light sensor, a motion sensor, and other sensors. Specifically, the light sensor may include an ambient light sensor and a proximity sensor, wherein the ambient light sensor may adjust the brightness of the display panel 841 according to the brightness of the ambient light, and the proximity sensor may generate an interrupt when the flip cover is closed or closed. As a type of motion sensor, the gravity acceleration sensor can detect the magnitude of acceleration in each direction (generally three axes), and can detect the magnitude and direction of gravity when stationary. It can be used for applications that identify the posture of the mobile phone (such as horizontal and vertical screen switching, related games, magnetometer posture calibration), vibration recognition related functions (such as pedometer, tapping), etc.; as for other sensors such as gyroscopes, barometers, hygrometers, thermometers, infrared sensors, etc. that can also be configured in the electronic device 800, they will not be repeated here.

[0109] The audio circuit 860, the speaker 861, and the microphone 862 can provide an audio interface between the user and the electronic device 800. The audio circuit 860 can transmit the electrical signal converted from the received audio data to the speaker 861, which is converted into a sound signal for output; on the other hand, the microphone 862 converts the collected sound signal into an electrical signal, which is received by the audio circuit 860 and converted into audio data, and then the audio data is output to the processor 880 for processing, and then sent to another terminal through the RF circuit 810, or the audio data is output to the memory 820 for further processing. The audio circuit 860 may also include an earplug jack to provide communication between an external headset and the electronic device 800.

[0110] The electronic device 800 can help the user receive requests, send information, etc. through the transmission module 870 (such as a Wi-Fi module), which provides the user with wireless broadband Internet access. Although the transmission module 870 is shown in the figure, it is understandable that it is not a necessary component of the electronic device 800 and can be omitted as needed without changing the essence of the invention.

[0111] The processor 880 is the control center of the electronic device 800. It uses various interfaces and lines to connect various parts of the entire mobile phone. By running or executing software programs and / or modules stored in the memory 820, and calling data stored in the memory 820, it executes various functions of the electronic device 800 and processes data, thereby monitoring the electronic device as a whole. Optionally, the processor 880 may include one or more processing cores; in some embodiments, the processor 880 may integrate an application processor and a modem processor, wherein the application processor mainly processes the operating system, user interface, and application programs, etc., and the modem processor mainly processes wireless communications. It can be understood that the above-mentioned modem processor may not be integrated into the processor 880.

[0112] The electronic device 800 also includes a power supply 890 (such as a battery) for supplying power to various components. In some embodiments, the power supply can be logically connected to the processor 880 through a power management system, so that the power management system can manage charging, discharging, and power consumption management. The power supply 890 can also include any components such as one or more DC or AC power supplies, recharging systems, power failure detection circuits, power converters or inverters, and power status indicators.

[0113] Although not shown, the electronic device 800 also includes a camera (such as a front camera, a rear camera), a Bluetooth module, etc., which will not be described in detail here. Specifically in this embodiment, the display unit of the electronic device is a touch screen display, and the mobile terminal also includes a memory, and one or more programs, wherein the one or more programs are stored in the memory and are configured to be executed by one or more processors or to establish a reverse tunnel;

[0114] When a communication connection is established between the screen projection device and the forwarding server based on the reverse tunnel, a screen projection connection identifier is generated;

[0115] When receiving the screen projection device information uploaded based on the screen projection connection identifier, determining the forwarding port corresponding to the projected screen device and the forwarding server according to the screen projection device information;

[0116] Control the forwarding server to send the screen information to be projected to the projected device for display based on the forwarding port.

[0117] In specific implementation, the above modules can be implemented as independent entities, or can be arbitrarily combined and implemented as the same or several entities. The specific implementation of the above modules can be found in the previous method embodiments, which will not be repeated here.

[0118] Those skilled in the art can understand that all or part of the steps in the various methods of the above embodiments can be completed by instructions, or by controlling related hardware through instructions, and the instructions can be stored in a computer-readable storage medium and loaded and executed by a processor. To this end, an embodiment of the present application provides a storage medium in which multiple instructions are stored, and the instructions can be loaded by a processor to execute the steps of any embodiment of the wireless screen projection method across network segments provided in the embodiment of the present application.

[0119] The storage medium may include: a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, etc.

[0120] Since the instructions stored in the storage medium can execute the steps in any embodiment of the wireless screen projection method across network segments provided in the embodiments of the present application, the beneficial effects that can be achieved by any wireless screen projection method across network segments provided in the embodiments of the present application can be achieved. Please see the previous embodiments for details and will not be repeated here.

[0121] The above is a detailed introduction to a cross-segment wireless screen projection method, device, electronic device and storage medium provided by the embodiments of the present application. Specific examples are used in this article to illustrate the principles and implementation methods of the present application. The description of the above embodiments is only used to help understand the method of the present application and its core idea; at the same time, for technicians in this field, according to the ideas of the present application, there will be changes in the specific implementation methods and application scopes. In summary, the content of this specification should not be understood as a limitation on the present application. Moreover, for ordinary technicians in this technical field, without departing from the principles of the present application, several improvements and modifications can be made, and these improvements and modifications are also regarded as the scope of protection of the present application.

Claims

1. A wireless screen projection method across network segments, characterized in that: include: Establish a reverse tunnel; When a communication connection is established between the screen projection device and the forwarding server based on the reverse tunnel, a screen projection connection identifier is generated; The forwarding server is used to realize the wireless screen projection connection between the screen projected device and the screen projection device, and the forwarding server and the screen projection device are in the same intranet; When receiving the screen projection device information uploaded based on the screen projection connection identifier, determining the forwarding port corresponding to the projected screen device and the forwarding server according to the screen projection device information; Control the forwarding server to send the screen information to be projected to the projected device for display based on the forwarding port; The establishing of the reverse tunnel comprises: Obtain the network status of the projected device and the intranet; When the network state is a connected state, an intranet address or a public network address is obtained to establish a reverse tunnel; when the network state is a connected state, the screen-projected device and the screen-projecting device are in the same local area network; When the network status is disconnected, a public network address is obtained to establish a reverse tunnel; when the network status is disconnected, the screen-projected device and the screen-projecting device are in different local area networks.

2. The method according to claim 1, characterized in that When a communication connection is established between the screen projection device and the forwarding server based on the reverse tunnel, a screen projection connection identifier is generated, including: Based on the reverse tunnel, a communication connection is established between the projected screen device and the forwarding server; When it is determined that the projected screen device establishes a communication connection with the forwarding server, the first device identifier of the projected screen device is obtained, and a screen projection connection identifier is generated based on the first device identifier.

3. The method according to claim 2, characterized in that When receiving the screen projection device information uploaded based on the screen projection connection identifier, determining the forwarding port corresponding to the projected screen device and the forwarding server according to the screen projection device information, including: When it is detected that the screen projection connection identifier is recognized, obtaining the first device identifier and the second device identifier corresponding to the screen projection device; According to the first device identifier and the second device identifier, determine the forwarding port through which the projected screen device receives the data sent by the projecting device.

4. The method according to claim 3, characterized in that: The determining, according to the first device identifier and the second device identifier, a forwarding port for the projected screen device to receive data sent by the projecting screen device includes: Obtain a port mapping table, and perform matching in the port mapping table according to the first device identifier; When there is a matching port identified by the first device in the port mapping table, it is determined that the matching port is the forwarding port between the projected screen device and the forwarding server.

5. The method according to claim 4, characterized in that After obtaining the port mapping table and matching the first device identifier in the port mapping table, the method further includes: When it is determined that there is no matching port identified by the first device in the port mapping list, a feedback result of a matching exception is generated and the feedback result is sent to the screen projection device.

6. The method according to claim 4 or 5, characterized in that: The method further comprises: When receiving a list editing instruction, obtaining and displaying the stored port mapping table; Receiving input update information, and updating the port mapping table based on the update information, wherein the update information includes at least any one of new information, modified information, and deleted information; When it is determined that the editing is completed, the port mapping table stored in the forwarding server is updated, and the updated port mapping table is sent to the projected screen device.

7. A wireless screen projection device across network segments, characterized in that: include: A tunnel establishment module, used for establishing a reverse tunnel; A communication connection module, used to generate a screen projection connection identifier when a communication connection is established between the projected screen device and the forwarding server based on the reverse tunnel; the forwarding server is used to realize a wireless screen projection connection between the projected screen device and the projection device, and the forwarding server and the projection device are in the same intranet; A port determination module, for determining, when receiving the screen projection device information uploaded based on the screen projection connection identifier, a forwarding port corresponding to the projected screen device and the forwarding server according to the screen projection device information; An information forwarding module, used to control the forwarding server to send the screen information to be projected to the projected device for display based on the forwarding port; The tunnel establishing module establishes a reverse tunnel, including: Obtain the network status of the projected device and the intranet; When the network state is a connected state, an intranet address or a public network address is obtained to establish a reverse tunnel; when the network state is a connected state, the screen-projected device and the screen-projecting device are in the same local area network; When the network status is disconnected, a public network address is obtained to establish a reverse tunnel; when the network status is disconnected, the screen-projected device and the screen-projecting device are in different local area networks.

8. An electronic device, characterized in that: It includes a processor, a memory, and a computer program stored in the memory and configured to be executed by the processor. The memory is coupled to the processor, and when the processor executes the computer program, the steps in the cross-network segment wireless screen projection method as described in any one of claims 1 to 6 are implemented.

9. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, wherein when the computer program is running, the device where the computer-readable storage medium is located is controlled to execute the steps in the cross-network segment wireless screen projection method as described in any one of claims 1 to 6.