Screen projection method, device, equipment and storage medium based on WIFI

By obtaining the WIFI hotspot set and triangular positioning method to calculate the distance between devices, combined with the UDP protocol, the problems of multi-device screen projection and accurate selection in the existing screen projection method are solved, and efficient WIFI screen projection is achieved.

CN114666893BActive Publication Date: 2024-12-24PINGAN INT SMART CITY TECH CO LTD
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202210246449.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-03-14
Publication Date
2024-12-24
Estimated Expiration
2042-03-14

AI Technical Summary

Technical Problem

The existing screen projection method cannot achieve multi-device screen projection and precise selection of screen projection equipment, resulting in low screen projection efficiency and high trial and error probability.

Method used

Using WIFI-based screen projection method, by obtaining the WIFI hotspot set on the terminal and the device to be projected, using the triangular positioning method to calculate the relative distance, sort the device, selecting the appropriate WIFI hotspot for connection, and sending data through the UDP protocol, realizing multiple data The device is projected at the same time.

Benefits of technology

It realizes fast and accurate equipment selection, improves screen projection efficiency, reduces the chance of trial and error, and supports convenient screen projection of multiple devices.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114666893B_ABST
    Figure CN114666893B_ABST
Patent Text Reader

Abstract

The present invention relates to the field of communication technology, and discloses a screen projection method, device, equipment and storage medium based on WIFI, the method comprising: obtaining a common WIFI hotspot set between a terminal and a first device to be projected; using a triangulation method according to the common WIFI hotspot set, determining the relative distance between the terminal and the first device to be projected; sorting the first device to be projected to obtain a sequence of devices to be projected; selecting a second device to be projected from the sequence of devices to be projected, and connecting the second device to be projected and the terminal to the same WIFI hotspot in the common WIFI hotspot set; sending the data to be projected on the terminal to the second device to be projected through the UDP protocol. This method calculates the relative distance between the terminal and the device to be projected through the triangulation method, and through the relative distance, helps the user quickly and accurately select the device to be projected, and at the same time uses the UDP protocol to realize a convenient function of projecting multiple devices at the same time, thereby improving the efficiency of projecting and effectively reducing the probability of trial and error.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of communication technology, and in particular to a WIFI-based screen projection method, device, equipment and storage medium. Background Art

[0002] The screen projection function is now a standard feature of indoor TVs and large-screen devices. Almost all mobile phone apps also support the projection of videos, audios, and files to TVs for playback. The screen projection solutions are based on the TV device and the mobile phone being in the same local area network, searching for all devices, selecting, pairing, connecting, and projecting. In order to solve the technical problems of the existing screen projection methods that cannot project screens on multiple devices and accurately select the devices to be projected, a WIFI-based screen projection method is urgently needed to solve the above problems. Summary of the invention

[0003] The main purpose of the present invention is to solve the technical problems that the existing screen projection methods are unable to project screens on multiple devices and accurately select the devices to be projected.

[0004] A first aspect of the present invention provides a WIFI-based screen projection method, which includes: obtaining a common WIFI hotspot set between a terminal and at least one first device to be projected; based on the common WIFI hotspot set, using a triangulation method to determine the relative distance between the terminal and at least one first device to be projected; sorting at least one first device to be projected based on the relative distance to obtain a sequence of devices to be projected; selecting at least one second device to be projected from the sequence of devices to be projected, and connecting at least one second device to be projected and the terminal to the same WIFI hotspot in the common WIFI hotspot set; sending the data to be projected on the terminal to at least one second device to be projected through the UDP protocol.

[0005] Optionally, in a first implementation method of the first aspect of the present invention, obtaining a set of WIFI hotspots shared by the terminal and at least one first device to be projected includes: receiving a first WIFI hotspot set on the terminal whose signal strength meets the projection condition; receiving a second WIFI hotspot set on the first device to be projected whose signal strength meets the projection condition; taking the intersection of the first WIFI hotspot set and the second WIFI hotspot set to obtain the shared WIFI hotspot set.

[0006] Optionally, in a second implementation method of the first aspect of the present invention, the relative distance between the terminal and at least one of the first devices to be projected is determined based on the shared WIFI hotspot set using a triangulation positioning method, including: arbitrarily selecting three shared WIFI hotspots from the shared WIFI hotspot set; obtaining a first positioning of the terminal and the shared WIFI hotspot based on the three shared WIFI hotspots; obtaining a second positioning of at least one first device to be projected and the shared WIFI based on the three shared WIFI hotspots; and obtaining the relative distance between the terminal and at least one first device to be projected by calculating and processing the first positioning and the second positioning.

[0007] Optionally, in a third implementation manner of the first aspect of the present invention, obtaining the first positioning of the terminal and the shared WIFI hotspot based on the three shared WIFI hotspots includes: respectively obtaining RSSI values ​​corresponding to the three shared WIFI hotspots; based on the sizes of the RSSI values, determining the relative distances between the terminal and the three shared WIFI hotspots; and obtaining the first positioning generated based on the three shared WIFI hotspots through the relative distances of the three shared WIFI hotspots.

[0008] Optionally, in a fourth implementation method of the first aspect of the present invention, the relative distance between the terminal and at least one first device to be projected is obtained by calculating and processing the first positioning and the second positioning, including: constructing a coordinate system based on the three shared WIFI hotspots; calculating the coordinate points of the first positioning and the second positioning in the coordinate system; and based on the coordinate points, calculating the relative distance between the terminal and at least one first device to be projected.

[0009] Optionally, in a fifth implementation method of the first aspect of the present invention, selecting at least one second device to be projected from the sequence of devices to be projected, and connecting at least one second device to be projected and the terminal to the same WIFI hotspot in the shared WIFI hotspot set, includes: selecting a designated WIFI hotspot based on the RSSI values ​​of the terminal and at least one second device to be projected; at least one second device to be projected obtains a designated broadcast address and a designated WIFI hotspot on the public network through any WIFI hotspot; and connecting at least one second device to be projected and the terminal to the designated WIFI hotspot.

[0010] Optionally, in a sixth implementation method of the first aspect of the present invention, the sending of the data to be projected on the terminal to at least one of the second devices to be projected through the UDP protocol includes: processing the data selected by the terminal to be projected into the broadcast data based on the UDP protocol; sending the broadcast data to the designated broadcast address, so that at least one of the second devices to be projected can log in to the designated broadcast address to download the broadcast data, and perform projection based on the downloaded broadcast data.

[0011] The second aspect of the present invention provides a WIFI-based screen projection device, including: a hotspot set acquisition module, used to acquire a common WIFI hotspot set between a terminal and at least one first device to be projected; a distance measurement module, used to measure the relative distance between the terminal and at least one first device to be projected based on the common WIFI hotspot set and using a triangulation positioning method; a device sorting module, used to sort at least one first device to be projected based on the relative distance to obtain a sequence of devices to be projected; a device selection module, used to select at least one second device to be projected from the sequence of devices to be projected, and connect at least one second device to be projected and the terminal to the same WIFI hotspot in the common WIFI hotspot set; a screen projection module, used to send the data to be projected on the terminal to at least one second device to be projected through the UDP protocol.

[0012] Optionally, in a first implementation method of the second aspect of the present invention, the hotspot set acquisition module is specifically used to: receive a first WIFI hotspot set on the terminal whose signal strength meets the screen projection condition; receive a second WIFI hotspot set on the first device to be projected whose signal strength meets the screen projection condition; and obtain the shared WIFI hotspot set based on the intersection of the first WIFI hotspot set and the second WIFI hotspot set.

[0013] Optionally, in a second implementation method of the second aspect of the present invention, the distance measurement module is specifically used for: a shared WIFI selection unit, used to arbitrarily select three shared WIFI hotspots from the shared WIFI hotspot set; a first positioning acquisition unit, used to obtain a first positioning of the terminal and the shared WIFI hotspot based on the three shared WIFI hotspots; a second positioning acquisition unit, used to obtain a second positioning of at least one first device to be projected and the shared WIFI based on the three shared WIFI hotspots; a relative distance calculation unit, used to obtain the relative distance between the terminal and at least one first device to be projected by calculating and processing the first positioning and the second positioning.

[0014] Optionally, in a third implementation method of the second aspect of the present invention, the first positioning acquisition unit is specifically used to: obtain RSSI values ​​corresponding to three shared WIFI hotspots respectively; determine the relative distance between the terminal and the three shared WIFI hotspots based on the size of the RSSI values; and obtain a first positioning generated based on the three shared WIFI hotspots through the relative distance of the three shared WIFI hotspots.

[0015] Optionally, in a fourth implementation method of the second aspect of the present invention, the relative distance calculation unit is specifically used to: construct a coordinate system based on the three shared WIFI hotspots; calculate the coordinate points of the first positioning and the second positioning in the coordinate system; and based on the coordinate points, calculate the relative distance between the terminal and at least one first device to be projected.

[0016] Optionally, in a fifth implementation method of the second aspect of the present invention, the device selection module is specifically used to: select a designated WIFI hotspot based on the RSSI values ​​of the terminal and at least one of the second devices to be projected; at least one of the second devices to be projected obtains a designated broadcast address and a designated WIFI hotspot on the public network through any WIFI hotspot; and connects at least one of the second devices to be projected and the terminal to the designated WIFI hotspot.

[0017] Optionally, in a sixth implementation method of the second aspect of the present invention, the screen projection module is specifically used to: process the data selected by the terminal to be projected into the broadcast data based on the UDP protocol; send the broadcast data to the designated broadcast address, so that at least one of the second devices to be projected can log in to the designated broadcast address to download the broadcast data, and perform screen projection based on the downloaded broadcast data.

[0018] The third aspect of the present invention provides a WIFI-based screen projection device, comprising: a memory and at least one processor, the memory storing instructions, the memory and the at least one processor being interconnected through a line; the at least one processor calls the instructions in the memory so that the WIFI-based screen projection device performs the steps of the above-mentioned WIFI-based screen projection method.

[0019] A fourth aspect of the present invention provides a computer-readable storage medium, which stores instructions. When the computer-readable storage medium is run on a computer, the computer executes the steps of the above-mentioned WIFI-based screen projection method.

[0020] In the technical solution of the present invention, a set of common WIFI hotspots between the terminal and at least one first device to be projected is obtained; based on the common WIFI hotspot set, the relative distance between the terminal and at least one of the first devices to be projected is determined by using the triangulation method; at least one of the first devices to be projected is sorted based on the relative distance to obtain a sequence of devices to be projected; at least one second device to be projected is selected from the sequence of devices to be projected, and at least one of the second devices to be projected and the terminal are connected to the same WIFI hotspot in the common WIFI hotspot set; the data to be projected on the terminal is sent to at least one of the second devices to be projected via the UDP protocol. This method calculates the relative distance between the terminal and the device to be projected via the triangulation method, and helps users quickly and accurately select the device to be projected based on the relative distance. At the same time, the UDP protocol is used to implement a convenient function of projecting multiple devices at the same time, thereby improving the efficiency of projection and effectively reducing the chance of trial and error. BRIEF DESCRIPTION OF THE DRAWINGS

[0021] Figure 1 This is a schematic diagram of a first embodiment of a screen projection method based on WIFI in an embodiment of the present invention;

[0022] Figure 2 This is a schematic diagram of a second embodiment of a screen projection method based on WIFI in an embodiment of the present invention;

[0023] Figure 3 Schematic diagram of a third embodiment of a screen projection method based on WIFI in an embodiment of the present invention;

[0024] Figure 4 This is a schematic diagram of a fourth embodiment of a screen projection method based on WIFI in an embodiment of the present invention;

[0025] Figure 5 This is a schematic diagram of an embodiment of a WIFI-based screen projection device in an embodiment of the present invention;

[0026] Figure 6 This is a schematic diagram of another embodiment of a WIFI-based screen projection device in an embodiment of the present invention;

[0027] Figure 7 This is a schematic diagram of an embodiment of a WIFI-based screen projection device in an embodiment of the present invention. DETAILED DESCRIPTION

[0028] In the technical solution of the present invention, a set of common WIFI hotspots between the terminal and at least one first device to be projected is obtained; based on the common WIFI hotspot set, the relative distance between the terminal and at least one of the first devices to be projected is determined by using the triangulation method; at least one of the first devices to be projected is sorted based on the relative distance to obtain a sequence of devices to be projected; at least one second device to be projected is selected from the sequence of devices to be projected, and at least one of the second devices to be projected and the terminal are connected to the same WIFI hotspot in the common WIFI hotspot set; the data to be projected on the terminal is sent to at least one of the second devices to be projected via the UDP protocol. This method calculates the relative distance between the terminal and the device to be projected via the triangulation method, and helps users quickly and accurately select the device to be projected based on the relative distance. At the same time, the UDP protocol is used to implement a convenient function of projecting multiple devices at the same time, thereby improving the efficiency of projection and effectively reducing the chance of trial and error.

[0029] The terms "first", "second", "third", "fourth", etc. (if any) in the specification and claims of the present invention and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchanged where appropriate, so that the embodiments described herein can be implemented in an order other than that illustrated or described herein. In addition, the terms "including" or "having" and any variations thereof are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units that are clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.

[0030] For ease of understanding, the specific process of the embodiment of the present invention is described below. Figure 1 , the first embodiment of the screen projection method based on WIFI in the embodiment of the present invention includes:

[0031] 101, obtaining a set of WIFI hotspots shared by the terminal and at least one first device to be projected;

[0032] In this embodiment, the WIFI hotspots searched on the terminal and the device to be projected are collected, and the WIFI names and RSSI values ​​of the corresponding WIFI are recorded respectively. The terminal is saved as the first WIFI hotspot set, and the device to be projected is saved as the second WIFI hotspot set. Then, the saved first WIFI hotspot set and the second WIFI hotspot set are intersected, that is, the WIFI hotspots that exist between the two and whose RSSI values ​​are sufficient to support projection are taken.

[0033] 102, determining a relative distance between the terminal and at least one first device to be projected using a triangulation method according to the shared WIFI hotspot set;

[0034] In this embodiment, a common WIFI hotspot set is used, and three WIFI hotspots are randomly selected from them. The relative positions of the terminal and the device to be projected relative to the selected three WIFI hotspots are calculated respectively, and then a coordinate system is constructed according to the different relative positions of each device to be projected and the terminal. The relative distances between the terminal and each device to be projected are calculated in turn, and at least one relative distance corresponding to the terminal and at least one device to be projected is obtained.

[0035] Specifically, the triangulation positioning method uses three WIFI hotspots to detect the target's position at different locations, and then uses the principles of triangulation geometry to determine the target's position and distance.

[0036] 103, sorting at least one first device to be projected based on the relative distance to obtain a sequence of devices to be projected;

[0037] In this embodiment, after the above triangulation positioning method, the relative distance between the large screen and the mobile phone is already known. After comparison, the corresponding distance sorting will be generated. Of course, the distance unit here is not a unit such as meters or centimeters. It is a new unit generated by calculating the relative distance based on the RSSI value. The calculated relative distance is sorted from small to large in order of distance to obtain the sequence of devices to be projected.

[0038] 104, selecting at least one second device to be projected from the sequence of devices to be projected, and connecting the at least one second device to be projected and the terminal to the same WIFI hotspot in the shared WIFI hotspot set;

[0039] In this step, the device to be projected is determined by obtaining the device selected by the user from the list of devices to be projected on the terminal, and based on the RSSI values ​​of the shared WIFI hotspots among the devices, the WIFI hotspot with the largest average RSSI value is selected to access the selected device to be projected and the terminal, thereby achieving interconnection within the same local area network.

[0040] In this step, the selected WIFI hotspot can be selected based on the terminal RSSI value, or based on the main device to which the user wishes to project the screen. Similarly, it can be selected based on the average RSSI value between at least one device. This embodiment is for illustration only and does not limit the method of selecting a WIFI hotspot.

[0041] 105. Send the data to be projected on the terminal to at least one second device to be projected through the UDP protocol.

[0042] In this step, UDP is the abbreviation of User Datagram Protocol, and its Chinese name is User Datagram Protocol. It is a connectionless transport layer protocol in the OSI (Open System Interconnection) reference model, providing transaction-oriented simple unreliable information transmission services. IETF RFC 768 is the official specification of UDP. The protocol number of UDP in IP packets is 17.

[0043] The UDP protocol is used to process data packets like the TCP protocol. In the OSI model, both are located in the transport layer, which is the upper layer of the IP protocol. UDP has the disadvantages of not providing packet grouping, assembly, and inability to sort data packets. That is to say, after the message is sent, it is impossible to know whether it has arrived safely and completely. UDP is used to support network applications that need to transmit data between computers. Many client / server network applications, including network video conferencing systems, need to use the UDP protocol. The UDP protocol has been used for many years since its inception. Although its original glory has been overshadowed by some similar protocols, UDP is still a very practical and feasible network transport layer protocol even today.

[0044] Many applications only support UDP, such as multimedia data streams, do not generate any additional data, and do not retransmit packets even if they are known to be damaged. When transmission performance rather than transmission integrity is emphasized, such as audio and multimedia applications, UDP is the best choice.

[0045] Specifically, there are two screen projection methods. It is necessary to determine whether the number of devices selected by the user to be projected is greater than one. If so, through the broadcast group network, the terminal sends broadcast data at the specified broadcast group network address, and the selected device to be projected connects to the broadcast group network, obtains the broadcast data sent by the terminal, parses it, and projects the screen. If not, point-to-point screen projection is achieved by connecting to a shared WIFI.

[0046] Specifically, the sending of the broadcast group network address allows the device to be projected to obtain the broadcast group network address based on a preset broadcast group network address, or after the user selects the desired device to be projected, the second device to be projected obtains the broadcast group network address determined by the terminal through any WIFI that can connect to the Internet, and after determining the shared WIFI, connects to the determined shared WIFI and logs in to the broadcast group network address to receive the broadcast data sent by the terminal.

[0047] In this embodiment, a set of common WIFI hotspots between the terminal and at least one first device to be projected is obtained; based on the common WIFI hotspot set, the relative distance between the terminal and at least one of the first devices to be projected is determined by using the triangulation method; at least one of the first devices to be projected is sorted based on the relative distance to obtain a sequence of devices to be projected; at least one second device to be projected is selected from the sequence of devices to be projected, and at least one of the second devices to be projected and the terminal are connected to the same WIFI hotspot in the common WIFI hotspot set; the data to be projected on the terminal is sent to at least one of the second devices to be projected via the UDP protocol. This method calculates the relative distance between the terminal and the device to be projected via the triangulation method, and helps users quickly and accurately select the device to be projected based on the relative distance. At the same time, the UDP protocol is used to implement a convenient function of projecting multiple devices at the same time, thereby improving the efficiency of projection and effectively reducing the chance of trial and error.

[0048] See also Figure 2 , the second embodiment of the screen projection method based on WIFI in the embodiment of the present invention includes:

[0049] 201, receiving a first WIFI hotspot set whose signal strength on the terminal meets the screen projection condition;

[0050] In this embodiment, after measurement, WIFI signals whose RSSI values ​​do not meet the standards in the first WIFI hotspot set and the second WIFI hotspot set can be screened out according to a preset RSSI value, and then the WIFI signals common to the first WIFI hotspot set and the second WIFI hotspot set are queried, and the common WIFI hotspot set is obtained by counting them.

[0051] 202, receiving a second WIFI hotspot set on the first screen projection device whose signal strength meets the screen projection condition;

[0052] Specifically, RSSI (Received Signal Strength Indicator) is an indicator of the strength of the received signal, and its implementation is performed after the reverse channel baseband receiving filter. In order to obtain the characteristics of the reverse signal, the following processing is performed in the specific implementation of RSSI: the baseband IQ power is integrated within 104us to obtain the instantaneous value of RSSI; then the 8192 RSSI instantaneous values ​​are averaged within about 1 second to obtain the average value of RSSI, that is, RSSI (average) = sum (RSSI (instantaneous)) / 8192, and the maximum value of the RSSI instantaneous value within 1 second and the ratio of the RSSI instantaneous value greater than a certain threshold (the number of RSSI instantaneous values ​​greater than a certain threshold / 8192) are given at the same time. Since RSSI is obtained by integrating power in the digital domain and then inferring it to the antenna port, the inconsistency of the reverse channel signal transmission characteristics will affect the accuracy of RSSI. Looking at the average value of RSSI under no-load is the most important means to judge interference. For a new start, there are few users, and the RSSI level under no-load is generally less than -105dBm. When there are services, the RSSI average value will not exceed -95dBm when there is at least one service. The reception quality FER can also be used to determine whether there is interference. By finding out whether there is interference caused by cross-area coverage, it can also be determined from Ec / Io and the received power of the mobile phone. For external interference, the spectrum analyzer can be used to further find out whether there is an interference source.

[0053] 203, taking an intersection based on the first WIFI hotspot set and the second WIFI hotspot set to obtain a shared WIFI hotspot set;

[0054] In this embodiment, by taking the intersection of the two sets obtained in step 201 and step 202, that is, the repeated parts of the two sets, a shared WIFI hotspot set can be generated according to the intersection.

[0055] 204, determining a relative distance between the terminal and at least one first device to be projected using a triangulation method according to the shared WIFI hotspot set;

[0056] 205, sorting at least one first device to be projected based on the relative distance to obtain a sequence of devices to be projected;

[0057] 206, selecting at least one second device to be projected from the sequence of devices to be projected, and connecting the at least one second device to be projected and the terminal to the same WIFI hotspot in the shared WIFI hotspot set;

[0058] 207, sending the data to be projected on the terminal to at least one second device to be projected through the UDP protocol.

[0059] Based on the previous embodiment, this embodiment describes in detail the process of receiving the first WIFI hotspot set whose signal strength on the terminal meets the projection condition; receiving the second WIFI hotspot set whose signal strength on the first device to be projected meets the projection condition; and obtaining the shared WIFI hotspot set based on the intersection of the first WIFI hotspot set and the second WIFI hotspot set. Compared with the traditional method, this embodiment refines the method of obtaining the first WIFI hotspot set and the second WIFI hotspot set, and describes the process of obtaining the shared WIFI hotspot set by taking the intersection of the two hotspot sets, and clarifies the method of obtaining and processing positioning information in WIFI positioning.

[0060] See also Figure 3 , a third embodiment of the screen projection method based on WIFI in the embodiment of the present invention includes:

[0061] 301, obtaining a set of WIFI hotspots shared by the terminal and at least one first device to be projected;

[0062] 302, randomly selecting three shared WIFI hotspots from the shared WIFI hotspot set;

[0063] In this embodiment, if the number of WIFIs that can be selected is less than three, the first device to be projected is directly sorted based on the RSSI value corresponding to any WIFI hotspot in the shared WIFI hotspot set. Then, by determining the RSSI value of the terminal, the RSSI value of the device to be projected is sorted according to the degree of proximity to the RSSI value of the terminal.

[0064] 303, respectively obtain RSSI values ​​corresponding to three shared WIFI hotspots;

[0065] In this embodiment, there are three strategies for RSSI value selection, namely majority voting strategy, mean strategy and median strategy. The RSSI value selection mode can be flexibly adjusted and selected according to factors such as different application scenarios and hardware processing capabilities.

[0066] Among them, the majority voting strategy randomly selects one from at least one RSSI value measured. Compare this RSSI value with the remaining RSSI values. Get the number of RSSI values ​​that are within the allowable range. If the number exceeds half of all the measured values, then the measured value is considered to be available, otherwise it is unavailable. The majority voting strategy has a high accuracy rate, but the amount of calculation is relatively large, which will consume a lot of node resources and is not suitable for use in wireless sensor networks with limited resources.

[0067] Among them, the mean strategy is to calculate the average of all RSSI values ​​measured and use the average as the measurement result. Since the RSSI value is greatly affected by the environment, there may be erroneous values ​​in the measured value. When these erroneous values ​​deviate greatly from the correct value, the credibility of the mean will be reduced, which will lead to erroneous results.

[0068] Among them, the median strategy largely avoids the influence of error values ​​that deviate greatly from the correct value on the measurement accuracy. The median strategy uses the median of the measured value as the measurement result, so that even if there is an error value that deviates greatly from the correct value, it can still obtain a relatively accurate measurement result.

[0069] 304, determining the relative distances between the terminal and three shared WIFI hotspots based on the RSSI values;

[0070] In this embodiment, a common WIFI hotspot set is used, and three WIFI hotspots are randomly selected from them. The relative positions of the terminal and the device to be projected relative to the selected three WIFI hotspots are calculated respectively, and then a coordinate system is constructed according to the different relative positions of each device to be projected and the terminal. The relative distances between the terminal and each device to be projected are calculated in turn, and at least one relative distance corresponding to the terminal and at least one device to be projected is obtained.

[0071] 305, obtaining a first positioning based on the three shared WIFI hotspots according to the relative distances of the three shared WIFI hotspots;

[0072] Specifically, since each projection device is placed in a different position indoors and at different distances from the router, the RSSI of the WIFI signals they receive is different. Using the triangulation method and the differential algorithm, the current device location is accurately located, and the relative distance from the phone is indirectly calculated (not the absolute position), and the device distance position is displayed while searching for the device.

[0073] 306, obtaining a second location of at least one first screen projection device and the shared WIFI based on the three shared WIFI hotspots;

[0074] In this embodiment, the second positioning acquisition method is basically the same as the first positioning acquisition method, but in the step of information processing after acquisition, because there is at least one device to be projected, it is necessary to aggregate at least one second positioning based on three shared WIFIs.

[0075] 307, constructing a coordinate system based on three shared WIFI hotspots;

[0076] In this embodiment, the specific method of constructing the coordinate system is to arbitrarily select a WIFI hotspot as the origin of the coordinate system, and express the first positioning and the second positioning obtained by calculation in the coordinate system. By connecting the first positioning and several second positionings, the relative distance between the terminal based on the RSSI value and at least one first device to be projected is obtained.

[0077] 308, calculating the coordinate points of the first positioning and the second positioning in the coordinate system;

[0078] Specifically, there is only one first position, that is, the position of the terminal in the coordinate system. There are several second positions, and the number of second positions depends on the number of devices to be projected. By connecting the first position and several second positions respectively, several groups of line segments are obtained, and the several groups of line segments are the relative distances.

[0079] 309, calculating a relative distance between the terminal and at least one first device to be projected based on the coordinate points;

[0080] In this embodiment, by obtaining the coordinate points of the terminal and at least one device to be projected, because the method of constructing the coordinate system is based on the RSSI value, the relative distance obtained has a certain error in accuracy. If the distance is similar, the error range of the relative distance can be adjusted by setting a different method of collecting RSSI values.

[0081] 310, sorting at least one first device to be projected based on the relative distance to obtain a sequence of devices to be projected;

[0082] 311, selecting at least one second device to be projected from the sequence of devices to be projected, and connecting the at least one second device to be projected and the terminal to the same WIFI hotspot in the shared WIFI hotspot set;

[0083] 312, sending the data to be projected on the terminal to at least one second device to be projected through the UDP protocol.

[0084] Based on the previous embodiment, this embodiment describes in detail the process of arbitrarily selecting three shared WIFI hotspots in the shared WIFI hotspot set; obtaining the first positioning of the terminal and the shared WIFI hotspot based on the three shared WIFI hotspots; obtaining the second positioning of at least one first device to be projected and the shared WIFI based on the three shared WIFI hotspots; and obtaining the relative distance between the terminal and at least one first device to be projected by calculating and processing the first positioning and the second positioning. Compared with the traditional method, this embodiment refines the acquisition and calculation methods of the first positioning and the second positioning, thereby clarifying the calculation method of the relative distance between the terminal and the device to be projected, and the process of relative positioning based on WIFI can be achieved without taking high-precision positioning values.

[0085] See also Figure 4 , the fourth embodiment of the screen projection method based on WIFI in the embodiment of the present invention includes:

[0086] 401, obtaining a set of WIFI hotspots shared by the terminal and at least one first device to be projected;

[0087] 402, using a triangulation method to determine a relative distance between the terminal and at least one first device to be projected, based on a set of shared WIFI hotspots;

[0088] 403, sorting at least one first device to be projected based on the relative distance to obtain a sequence of devices to be projected;

[0089] 404, selecting a designated WIFI hotspot based on the RSSI values ​​of the terminal and at least one second device to be projected;

[0090] In this embodiment, before connecting to the designated WIFI hotspot, the device to be projected should access the public network through other means, obtain the instructions sent by the terminal in the public network, and obtain the designated WIFI hotspot and related configurations that need to be connected.

[0091] 405, at least one second screen projection device obtains a designated broadcast address and a designated WIFI hotspot on the public network through any WIFI hotspot;

[0092] Specifically, the method of connecting to the public network is not limited to any WIFI hotspot. The public network can also be accessed based on a wired connection, or the terminal can be connected through Bluetooth, NFC, etc. to obtain the designated broadcast address and designated WIFI hotspot confirmed by the terminal.

[0093] 406, connecting at least one second screen projection device and the terminal to the designated WIFI hotspot;

[0094] On the other hand, if some of the devices to be projected are relatively old, they can only remember less WIFI hotspot information. Therefore, we can also make marks. When the device is needed for screen projection, by confirming the mark, when selecting the designated WIFI hotspot, the WIFI hotspot that the device can access is used as the basis to adjust the designated WIFI hotspots accessed by the terminal and other devices to achieve fast screen projection.

[0095] 407, processing the data selected by the terminal to be projected into broadcast data based on the UDP protocol;

[0096] In this embodiment, UDP is a connectionless protocol. Before transmitting data, the source and the terminal do not establish a connection. When it wants to transmit, it simply grabs the data from the application and throws it on the network as quickly as possible. At the sending end, the speed at which UDP transmits data is only limited by the speed at which the application generates data, the computer's capabilities, and the transmission bandwidth; at the receiving end, UDP puts each message segment in a queue, and the application reads a message segment from the queue each time. Since no connection is established for transmitting data, there is no need to maintain the connection state, including the sending and receiving state, so a server can transmit the same message to at least one client at the same time.

[0097] 408, sending the broadcast data to the designated broadcast address, so that at least one second device to be projected can log in to the designated broadcast address to download the broadcast data, and project the screen based on the downloaded broadcast data.

[0098] In this embodiment, the terminal and at least one device to be projected build a broadcast group network through the UDP protocol, and then the terminal broadcasts the broadcast data through a preset group network address. The device to be projected is connected to the broadcast group network in a specific way, receives the broadcast data sent by the terminal, parses it and displays it on the screen.

[0099] Specifically, the specific method of connection may be that, in the step of selecting at least one second device to be projected from the sequence of devices to be projected, and connecting the at least one second device to be projected and the terminal to the same WIFI hotspot in the shared WIFI hotspot set, when the user selects the device to be projected to be projected, the broadcast address required to connect in the subsequent projection steps is obtained from the networks to which the terminal and the device to be projected are currently connected, and the device to be projected then switches to the corresponding specific WIFI in the shared WIFI set.

[0100] Based on the previous embodiment, this embodiment describes in detail the process of selecting a designated WIFI hotspot based on the RSSI values ​​of the terminal and the at least one second device to be projected; the at least one second device to be projected obtains a designated broadcast address and a designated WIFI hotspot on the public network through any WIFI hotspot; and connecting the at least one device to be projected and the terminal to the designated WIFI hotspot. After the user selects at least one device to be projected, the designated broadcast or connection address is sent to the device to be projected, completing the selection and confirmation of subsequent WIFI hotspots and link addresses.

[0101] The above describes the screen projection method based on WIFI in the embodiment of the present invention. The following describes the screen projection device based on WIFI in the embodiment of the present invention. Figure 5 In one embodiment of the present invention, a screen projection device based on WIFI includes:

[0102] A hotspot set acquisition module 501 is used to acquire a common WIFI hotspot set between the terminal and at least one first device to be projected;

[0103] A distance measurement module 502 is used to measure the relative distance between the terminal and at least one of the first devices to be projected using a triangulation method according to the shared WIFI hotspot set;

[0104] A device sorting module 503 is used to sort at least one of the first devices to be projected based on the relative distance to obtain a sequence of devices to be projected;

[0105] A device selection module 504 is used to select at least one second device to be projected from the sequence of devices to be projected, and connect at least one second device to be projected and the terminal to the same WIFI hotspot in the shared WIFI hotspot set;

[0106] The screen projection module 505 is used to send the data to be projected on the terminal to at least one of the second screen projection devices through the UDP protocol.

[0107] In an embodiment of the present invention, a WIFI-based screen projection device runs the above-mentioned WIFI-based screen projection method, including obtaining a common WIFI hotspot set between a terminal and at least one first device to be projected; using a triangulation method based on the common WIFI hotspot set, determining the relative distance between the terminal and at least one of the first devices to be projected; sorting at least one of the first devices to be projected based on the relative distance to obtain a sequence of devices to be projected; selecting at least one second device to be projected from the sequence of devices to be projected, and connecting at least one of the second devices to be projected and the terminal to the same WIFI hotspot in the common WIFI hotspot set; and sending the data to be projected on the terminal to at least one of the second devices to be projected via the UDP protocol. This method calculates the relative distance between the terminal and the device to be projected via the triangulation method, and helps users quickly and accurately select the device to be projected based on the relative distance. At the same time, the UDP protocol is used to implement a convenient function of projecting multiple devices at the same time, thereby improving the efficiency of projecting and effectively reducing the chance of trial and error.

[0108] See also Figure 6 , the second embodiment of the screen projection device based on WIFI in the embodiment of the present invention includes:

[0109] A hotspot set acquisition module 501 is used to acquire a common WIFI hotspot set between the terminal and at least one first device to be projected;

[0110] A distance measurement module 502 is used to measure the relative distance between the terminal and at least one of the first devices to be projected using a triangulation method according to the shared WIFI hotspot set;

[0111] A device sorting module 503 is used to sort at least one of the first devices to be projected based on the relative distance to obtain a sequence of devices to be projected;

[0112] A device selection module 504 is used to select at least one second device to be projected from the sequence of devices to be projected, and connect at least one second device to be projected and the terminal to the same WIFI hotspot in the shared WIFI hotspot set;

[0113] The screen projection module 505 is used to send the data to be projected on the terminal to at least one of the second screen projection devices through the UDP protocol.

[0114] In this embodiment, the hotspot set acquisition module 501 is specifically used for:

[0115] Receive a first WIFI hotspot set whose signal strength on the terminal meets the screen projection condition; receive a second WIFI hotspot set whose signal strength on the first device to be projected meets the screen projection condition; and obtain the shared WIFI hotspot set based on the intersection of the first WIFI hotspot set and the second WIFI hotspot set.

[0116] In this embodiment, the distance measuring module 502 is specifically used for:

[0117] A shared WIFI selection unit 5021 is used to arbitrarily select three shared WIFI hotspots from the shared WIFI hotspot set; a first positioning acquisition unit 5022 is used to obtain a first positioning of the terminal and the shared WIFI hotspot based on the three shared WIFI hotspots; a second positioning acquisition unit 5023 is used to obtain a second positioning of at least one first device to be projected and the shared WIFI based on the three shared WIFI hotspots; a relative distance calculation unit 5024 is used to obtain a relative distance between the terminal and at least one first device to be projected by calculating and processing the first positioning and the second positioning.

[0118] In this embodiment, the first positioning acquisition unit 5022 is specifically used to:

[0119] The RSSI values ​​corresponding to the three shared WIFI hotspots are obtained respectively; based on the size of the RSSI value, the relative distance between the terminal and the three shared WIFI hotspots is determined; and through the relative distance of the three shared WIFI hotspots, a first positioning based on the three shared WIFI hotspots is obtained.

[0120] In this embodiment, the relative distance calculation unit 5024 is specifically used for:

[0121] Based on the three shared WIFI hotspots, a coordinate system is constructed; the coordinate points of the first positioning and the second positioning in the coordinate system are calculated; based on the coordinate points, the relative distance between the terminal and at least one first device to be projected is calculated.

[0122] In this embodiment, the device selection module 504 is specifically used for:

[0123] A designated WIFI hotspot is selected based on the RSSI values ​​of the terminal and at least one of the second devices to be projected; at least one of the second devices to be projected obtains a designated broadcast address and a designated WIFI hotspot on the public network through any WIFI hotspot; and at least one of the second devices to be projected and the terminal are connected to the designated WIFI hotspot.

[0124] In this embodiment, the screen projection module 505 is specifically used for:

[0125] Based on the UDP protocol, the data selected by the terminal to be projected is processed into the broadcast data; the broadcast data is sent to the designated broadcast address, so that at least one of the second devices to be projected can log in to the designated broadcast address to download the broadcast data, and project the screen based on the downloaded broadcast data.

[0126] Based on the previous embodiment, this embodiment describes in detail the specific functions of each module and the unit composition of some modules. Through the above modules and the specific functions of the original modules, the operation of the WIFI-based screen projection device is improved, the reliability during operation is improved, the actual logic between each step is clarified, and the practicability of the device is improved.

[0127] above Figure 5 and Figure 6 The WIFI-based screen projection device in the embodiment of the present invention is described in detail from the perspective of modular functional entities. The WIFI-based screen projection device in the embodiment of the present invention is described in detail from the perspective of hardware processing.

[0128] Figure 7It is a structural diagram of a WIFI-based screen projection device provided in an embodiment of the present invention. The WIFI-based screen projection device 700 may have relatively large differences due to different configurations or performances, and may include one or more processors (central processing units, CPU) 710 (for example, one or more processors) and a memory 720, and one or more storage media 730 (for example, one or more mass storage devices) storing application programs 733 or data 732. Among them, the memory 720 and the storage medium 730 can be short-term storage or persistent storage. The program stored in the storage medium 730 may include one or more modules (not shown in the figure), and each module may include a series of instruction operations in the WIFI-based screen projection device 700. Furthermore, the processor 710 can be configured to communicate with the storage medium 730, and execute a series of instruction operations in the storage medium 730 on the WIFI-based screen projection device 700 to implement the steps of the above-mentioned WIFI-based screen projection method.

[0129] The WIFI-based screen projection device 700 may also include one or more power supplies 740, one or more wired or wireless network interfaces 750, one or more input and output interfaces 760, and / or one or more operating systems 731, such as Windows Serve, Mac OS X, Unix, Linux, FreeBSD, etc. It will be appreciated by those skilled in the art that Figure 7 The structure of the WIFI-based screen projection device shown does not constitute a limitation on the WIFI-based screen projection device provided in the present application, and may include more or fewer components than shown in the figure, or a combination of certain components, or a different arrangement of components.

[0130] The present invention also provides a computer-readable storage medium, which may be a non-volatile computer-readable storage medium or a volatile computer-readable storage medium. Instructions are stored in the computer-readable storage medium. When the instructions are executed on a computer, the computer executes the steps of the WIFI-based screen projection method.

[0131] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working process of the above-described system, device, or unit can refer to the corresponding process in the aforementioned method embodiment and will not be repeated here.

[0132] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention is essentially or the part that contributes to the prior art or all or part of the technical solution can be embodied in the form of a software product. The computer software product is stored in a storage medium, including a number of instructions to enable a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM), random access memory (RAM), disk or optical disk and other media that can store program codes.

[0133] As described above, the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit the same. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that the technical solutions described in the aforementioned embodiments may still be modified, or some of the technical features thereof may be replaced by equivalents. 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 screen projection method based on WIFI, characterized in that: The WIFI-based screen projection method includes: Obtain a set of WIFI hotspots shared by the terminal and at least one first device to be projected; According to the shared WIFI hotspot set, using a triangulation method, a relative distance between the terminal and at least one of the first devices to be projected is determined; Sorting at least one of the first devices to be projected based on the relative distance to obtain a sequence of devices to be projected; Select at least one second device to be projected from the sequence of devices to be projected, and connect at least one of the second devices to be projected and the terminal to the same WIFI hotspot in the shared WIFI hotspot set; Sending the data to be projected on the terminal to at least one of the second devices to be projected via the UDP protocol; The method of determining the relative distance between the terminal and at least one of the first devices to be projected using a triangulation positioning method according to the shared WIFI hotspot set includes: arbitrarily selecting three shared WIFI hotspots from the shared WIFI hotspot set; obtaining a first positioning of the terminal and the shared WIFI hotspot based on the three shared WIFI hotspots; obtaining a second positioning of at least one first device to be projected and the shared WIFI based on the three shared WIFI hotspots; and obtaining a relative distance between the terminal and at least one first device to be projected by calculating and processing the first positioning and the second positioning. The method of obtaining the first positioning of the terminal and the shared WIFI hotspot based on the three shared WIFI hotspots includes: obtaining RSSI values ​​corresponding to the three shared WIFI hotspots respectively; determining the relative distance between the terminal and the three shared WIFI hotspots based on the RSSI values; and obtaining the first positioning based on the three shared WIFI hotspots through the relative distances of the three shared WIFI hotspots. The method of obtaining the relative distance between the terminal and at least one first device to be projected by calculating and processing the first positioning and the second positioning includes: constructing a coordinate system based on the three shared WIFI hotspots; calculating the coordinate points of the first positioning and the second positioning in the coordinate system; and calculating the relative distance between the terminal and at least one first device to be projected based on the coordinate points.

2. The WIFI-based screen projection method according to claim 1, characterized in that: The acquiring terminal and at least one first device to be projected have a common WIFI hotspot set including: Receive a first WIFI hotspot set whose signal strength on the terminal meets the screen projection condition; Receive a second WIFI hotspot set on the first device to be projected with a signal strength that satisfies a projection condition; The shared WIFI hotspot set is obtained by taking an intersection based on the first WIFI hotspot set and the second WIFI hotspot set.

3. The WIFI-based screen projection method according to claim 1, characterized in that: The WIFI hotspot includes an RSSI value, and selecting at least one second device to be projected from the sequence of devices to be projected, and connecting at least one second device to be projected and the terminal to the same WIFI hotspot in the shared WIFI hotspot set includes: Select a designated WIFI hotspot based on the RSSI values ​​of the terminal and at least one of the second devices to be projected; At least one of the second screen projection devices obtains a designated broadcast address and a designated WIFI hotspot on the public network through any WIFI hotspot; Connect at least one of the second screen projection devices and the terminal to the designated WIFI hotspot.

4. The WIFI-based screen projection method according to claim 3, characterized in that: The sending the data to be projected on the terminal to at least one of the second devices to be projected through the UDP protocol includes: Based on the UDP protocol, the data selected by the terminal to be projected is processed into broadcast data; The broadcast data is sent to the designated broadcast address, so that at least one of the second devices to be projected can log in to the designated broadcast address to download the broadcast data, and project the screen based on the downloaded broadcast data.

5. A WIFI-based screen projection device, characterized in that: The WIFI-based screen projection device includes: A hotspot set acquisition module, used to acquire a common WIFI hotspot set between the terminal and at least one first device to be projected; A distance measurement module, used to measure the relative distance between the terminal and at least one of the first devices to be projected using a triangulation method according to the shared WIFI hotspot set; A device sorting module, used for sorting at least one of the first devices to be projected based on the relative distance to obtain a sequence of devices to be projected; A device selection module, used to select at least one second device to be projected from the sequence of devices to be projected, and connect at least one of the second devices to be projected and the terminal to the same WIFI hotspot in the shared WIFI hotspot set; A screen projection module, used for sending the data to be projected on the terminal to at least one of the second screen projection devices through the UDP protocol; The distance measurement module is specifically used for: a shared WIFI selection unit, which is used to arbitrarily select three shared WIFI hotspots from the shared WIFI hotspot set; a first positioning acquisition unit, which is used to obtain a first positioning of the terminal and the shared WIFI hotspot based on the three shared WIFI hotspots; a second positioning acquisition unit, which is used to obtain a second positioning of at least one first device to be projected and the shared WIFI based on the three shared WIFI hotspots; a relative distance calculation unit, which is used to obtain a relative distance between the terminal and at least one first device to be projected by calculating and processing the first positioning and the second positioning; The first positioning acquisition unit is specifically used to: respectively obtain RSSI values ​​corresponding to three shared WIFI hotspots; based on the size of the RSSI value, determine the relative distance between the terminal and the three shared WIFI hotspots; and obtain a first positioning generated based on the three shared WIFI hotspots through the relative distance of the three shared WIFI hotspots; The relative distance calculation unit is specifically used to: construct a coordinate system based on the three shared WIFI hotspots; calculate the coordinate points of the first positioning and the second positioning in the coordinate system; and calculate the relative distance between the terminal and at least one first device to be projected based on the coordinate points.

6. A WIFI-based screen projection device, characterized in that: The WIFI-based screen projection device includes: a memory and at least one processor, the memory stores instructions, and the memory and the at least one processor are interconnected through a line; The at least one processor calls the instructions in the memory so that the WIFI-based screen projection device performs each step of the WIFI-based screen projection method as described in any one of claims 1-4.

7. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by the processor, each step of the WIFI-based screen projection method as described in any one of claims 1 to 4 is implemented.

Citation Information

Patent Citations

  • Control method and device based on positioning module, storage medium and mobile terminal

    CN108064024A

  • Screen projection implementation method, mobile terminal and computer readable storage medium

    CN109922205A

  • Vehicle-mounted screen projection method, device, equipment and storage medium

    CN113271544A