Projection screen connection method and device, medium and equipment

By determining environmental indicators in the projection connection, calculating the environmental complexity and selecting the appropriate scanning mode, the high-quality channel set is scanned first, solving the problem of low projection connection efficiency and achieving faster connection between devices.

CN120751196APending Publication Date: 2025-10-03SHENZHEN TCL DIGITAL TECH CO LTD

Patent Information

Application Number
CN202510954347.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-07-10
Publication Date
2025-10-03

AI Technical Summary

Technical Problem

Existing screen projection technology is inefficient when connecting devices, mainly due to invalid channel detection and interference channel delays caused by the full channel scanning method.

Method used

By determining environmental indicators such as signal-to-noise ratio, response delay, and historical connection success rate, the environment complexity is calculated, and weighted scanning or sequential scanning mode is selected based on the complexity to prioritize scanning high-quality channel sets and avoid invalid channel detection and repeated attempts.

Benefits of technology

Significantly improves the scanning efficiency of screen projection connections, reduces delays and repeated attempts caused by interfering channels, and increases connection speed.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120751196A_ABST
    Figure CN120751196A_ABST
Patent Text Reader

Abstract

The invention discloses a screen projection connection method and device, a medium and equipment, and the method comprises the steps: firstly determining an environment index used for indicating a connection environment with a main connection end, and then carrying out the precise matching of a target scanning mode for preferentially scanning a set target channel set according to the environment index, and scanning based on the target scanning mode and establishing projection screen connection with the main connection end. Compared with a traditional full-channel scanning mode, the mode of preferentially scanning the target channel set in combination with the actual connection environment can avoid time waste on a large number of invalid channels, reduce scanning delay and repeated attempts caused by channel interference, and remarkably improve scanning efficiency.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of computer technology, and in particular to a screen projection connection method, device, medium and equipment. Background Art

[0002] Existing screen projection technologies typically rely on full channel scanning to establish a communication link between devices. This process requires devices to individually scan all available channels in the wireless environment to find a valid channel for screen projection, but this method is inefficient. Summary of the Invention

[0003] Based on this, it is necessary to provide a screen projection connection method, device, medium and equipment to solve the problem of low efficiency of screen projection connection between devices caused by the existing channel selection strategy.

[0004] In a first aspect, an embodiment of the present application provides a screen projection connection method, which is applied to a slave connection end, and the method includes:

[0005] Determining a current environmental indicator; wherein the environmental indicator is an indicator for indicating the connection environment with the primary connection end;

[0006] Determine the corresponding target scanning mode according to the environmental indicators, scan in the target scanning mode and establish a projection connection with the main connection end; wherein, the target scanning mode is a mode that preferentially scans a set target channel set.

[0007] In some embodiments of the present application, the environmental indicator is environmental complexity, and determining the current environmental indicator includes:

[0008] Obtaining the signal-to-noise ratio of all current channels, the response delay of the primary connection end, and the historical connection success rate with the primary connection end;

[0009] The environment complexity is calculated according to the signal-to-noise ratio, the response delay, and the historical connection success rate.

[0010] In some embodiments of the present application, the environmental indicator is environmental complexity, and the scanning mode of the slave connection end includes a weighted scanning mode and a sequential scanning mode. The weighted scanning mode is a mode in which the target channel set with the highest weight is scanned first, and the sequential scanning mode is a mode in which the target channel set with the highest priority is scanned first. Determining the corresponding target scanning mode according to the environmental indicator includes:

[0011] If the environment complexity is greater than or equal to a complexity threshold, the weighted scanning mode is used as the target scanning mode;

[0012] If the environment complexity is less than a complexity threshold, the sequential scanning mode is used as the target scanning mode.

[0013] In some embodiments of the present application, when the target scanning mode is a weighted scanning mode, scanning in the target scanning mode and establishing a screen projection connection with the primary connection end includes:

[0014] Obtaining a first scan list; wherein the first scan list is used to describe different weights corresponding to different channel sets, each channel set including at least one preset channel;

[0015] Scanning a target channel set; wherein the target channel set is a channel set in the first scan list that has the highest current weight and has not been scanned;

[0016] If a screen projection connection is not established with the main connection end through the target channel set within the connection duration threshold, the weight of the target channel set is reduced by a preset value, and the channel set with the second highest current weight and not scanned in the first scanning list is used as the target channel set, and the step of scanning the target channel set is returned to execute until a screen projection connection is established with the main connection end through the target channel set within the connection duration threshold.

[0017] In some embodiments of the present application, when the target scanning mode is a sequential scanning mode, scanning in the target scanning mode and establishing a screen projection connection with the main connection end includes:

[0018] Obtaining a second scan list; wherein the second scan list is used to describe different priorities corresponding to different channel sets, each channel set including at least one preset channel;

[0019] Scanning a target channel set; wherein the target channel set is a channel set with the highest current priority and not scanned in the second scan list;

[0020] If a screen projection connection is not established with the main connection end through the target channel set within the connection duration threshold, the channel set with the second highest priority and not scanned in the second scanning list will be used as the target channel set, and the step of scanning the target channel set will be returned to execute until a screen projection connection is established with the main connection end through the target channel set within the connection duration threshold.

[0021] In some embodiments of the present application, scanning the target channel set includes:

[0022] All scanned channels in the target channel set are eliminated, and all unscanned channels in the target channel set are scanned in sequence.

[0023] In some embodiments of the present application, after scanning the target channel set, the method further includes:

[0024] Get the benchmark connection duration;

[0025] If the target scanning mode is a sequential scanning mode, the benchmark connection duration is used as the connection duration threshold;

[0026] If the target scanning mode is a weighted scanning mode, the product of the benchmark connection duration and the adjustment coefficient is used as the connection duration threshold; the adjustment coefficient>1.

[0027] In a second aspect, an embodiment of the present application further provides a screen projection connection device, the screen projection connection device comprising:

[0028] An indicator determination module, configured to determine a current environmental indicator; wherein the environmental indicator is an indicator for indicating the connection environment with the primary connection end;

[0029] A connection module is used to determine the corresponding target scanning mode according to the environmental indicators, scan in the target scanning mode and establish a projection connection with the main connection end; wherein, the target scanning mode is a mode that preferentially scans the set target channel set.

[0030] In a third aspect, an embodiment of the present application further provides a terminal device, which includes a memory, a processor, and a computer program stored in the memory and runnable on the processor. When the computer program is executed by the processor, the steps in the above-mentioned screen projection connection method are implemented.

[0031] In a fourth aspect, an embodiment of the present application further provides a computer-readable storage medium, on which a computer program is stored, and when the computer program is executed by a processor, the steps in the above-mentioned screen projection connection method are implemented.

[0032] In a fifth aspect, embodiments of the present application further provide a computer program product or computer program, which includes computer instructions stored in a computer-readable storage medium. A processor of a computer device reads the computer instructions from the computer-readable storage medium and executes the computer instructions, causing the computer device to perform the methods provided in the various optional implementations described in the embodiments of the present application.

[0033] The present invention provides a screen projection connection method, apparatus, medium, and device. The method first determines an environmental indicator for indicating the connection environment with the main connection end, then accurately matches a target scanning mode that prioritizes scanning a set of target channels based on the environmental indicator, and scans based on the target scanning mode to establish a screen projection connection with the main connection end. Compared to the traditional full-channel scanning method, this method of prioritizing scanning a set of target channels based on the actual connection environment can avoid wasting time on a large number of invalid channels, reduce scanning delays and repeated attempts caused by interfering channels, and significantly improve scanning efficiency. BRIEF DESCRIPTION OF THE DRAWINGS

[0034] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.

[0035] in:

[0036] Figure 1 A schematic diagram of the flow of the screen projection connection method provided in the first embodiment;

[0037] Figure 2 A schematic diagram of the flow of the screen projection connection method provided in the second embodiment;

[0038] Figure 3 This is a structural diagram of the screen projection connection device;

[0039] Figure 4 This is the structural block diagram of the terminal equipment. DETAILED DESCRIPTION

[0040] The following will clearly and completely describe the technical solutions in the embodiments of the present invention in conjunction with the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. All other embodiments obtained by ordinary technicians in this field based on the embodiments of the present invention without making any creative efforts shall fall within the scope of protection of the present invention.

[0041] The terms "first," "second," and the like in the specification and claims of this application and the accompanying drawings are used to distinguish between different objects, not to describe a particular order. Furthermore, the terms "including," "having," and any variations thereof, are intended to cover non-exclusive inclusions. For example, a process, method, system, product, or apparatus comprising a series of steps or elements is not limited to the listed steps or elements but may optionally include steps or elements not listed, or may optionally include other steps or elements inherent to the process, method, product, or apparatus.

[0042] References herein to "embodiments" mean that a particular feature, structure, or characteristic described in connection with the embodiments may be included in at least one embodiment of the present application. The appearance of this phrase in various places in the specification does not necessarily refer to the same embodiment, nor does it constitute an independent or alternative embodiment that is mutually exclusive of other embodiments. It is understood, both explicitly and implicitly, by those skilled in the art that the embodiments described herein may be combined with other embodiments.

[0043] See also Figure 1 , Figure 1 A flow chart of the screen projection connection method provided for the first embodiment of the present application. Although the logical order is shown in the flowchart, in some cases, the steps shown or described may be performed in an order different from that shown in the accompanying drawings. Specifically, the screen projection connection method provided in the first embodiment of the present application is applied to the slave connection end. Taking Miracast technology as an example, the slave connection end corresponds to the group client (GroupClient, GC) end in the Wi-Fi Direct connection process of the technology. The GC end is the client device that initiates the screen projection connection, which is responsible for sending a connection request to the main connection end and transmitting the projection content. The main connection end corresponds to the group owner (Group Owner, GO) end. The GO end is a device that acts like a traditional wireless access point (AP) in the Wi-Fi Direct connection, responsible for managing the communication link of the point-to-point group and coordinating the connection process. For example, in the scenario of casting the screen of a mobile phone to a smart TV, the smartphone acts as the GC end and runs the Miracast client. The user selects the screen projection function on the mobile phone to trigger the discovery and connection process. After the connection, the video, photo or game screen is encoded and transmitted to the GO end via Wi-Fi Direct. The smart TV acts as the GO end, responding to the connection request from the GC end under a specific channel. After the connection, it receives and decodes the audio and video streams transmitted by the mobile phone and displays them on the TV screen.

[0044] In existing technologies, establishing a communication link typically relies on full channel scanning. This process requires the device to detect all available channels in the wireless environment one by one to find a valid channel for screen projection. However, this method has low connection efficiency.

[0045] In response to the above problems, the specific process of the screen projection connection method provided in the first embodiment of the present application is as follows:

[0046] S101, determine current environmental indicators.

[0047] Among them, the environmental indicators are indicators used to indicate the connection environment between the main connection end, including but not limited to channel occupancy, signal strength (Received Signal Strength Indicator, RSSI), signal-to-noise ratio (SNR) and interference strength.

[0048] In some embodiments of the present application, the GC end analyzes the Beacon frame and data frame traffic on each channel, and then calculates the channel occupancy of each channel. Furthermore, the GC end sends a Probe Request frame, receives a ProbeResponse frame from the main connection end, and records the RSSI value. Furthermore, the GC end calculates the SNR based on the comparison between the received signal and the background noise. Furthermore, the GC end detects the interference intensity of other Wi-Fi networks, Bluetooth devices, or other wireless signals on the current channel, including the number and power level of interference sources.

[0049] S102, determine the corresponding target scanning mode according to the environmental indicators, scan in the target scanning mode and establish a screen projection connection with the main connection end.

[0050] Among them, the target scanning mode is a mode that preferentially scans the set target channel set. The target channel set here refers to at least one channel with a high probability of being used to establish a screen projection connection that is currently screened out from all available channels.

[0051] In some embodiments of the present application, the GC end first screens the target channel set based on the environmental indicators determined by S101. For example, channels with a channel occupancy rate lower than the occupancy threshold, a SNR higher than the signal-to-noise ratio threshold, a RSSI higher than the signal strength threshold, a number of interference sources less than the number threshold, and a power level of the interference source lower than the power threshold are preferentially selected. Assume that the screening results are channels 1 and 6 of 2.4GHz and channels 36 and 40 of 5GHz, which constitute the target channel set. The GC end then configures the wireless network card to scan only the target channel set (channels 1, 6, 36, and 40), and the scanning period is set to a milliseconds / channel. The total scanning time is about 4a milliseconds, which is significantly shortened compared to the full channel scan. Then, the GC end sends a Probe Request frame on the target channel set, receives the Probe Response frame from the GO end, and confirms the MAC address, monitoring channel, and service information of the GO end. The GC end and the GO end negotiate roles through the Action frame of the Wi-Fi Direct protocol, determine the GO end, and use WPS authentication to complete the four-way handshake to negotiate the encryption key and establish a projection connection. Finally, based on the Miracast protocol, the GC side encodes the screen content into H.264 format and transmits it to the GO side via Wi-Fi Direct. The GO side decodes and displays it, completing the screen projection connection.

[0052] In the first embodiment described above, an environmental indicator indicating the connection environment with the primary connection end is first determined. A target scanning pattern is then precisely matched to the environmental indicator to prioritize scanning a set of target channels. Scanning is then performed based on this target scanning pattern to establish a projection connection with the primary connection end. Compared to traditional full-channel scanning, this method, which prioritizes scanning a set of target channels based on the actual connection environment, avoids wasting time on a large number of invalid channels, reduces scanning delays and repeated attempts caused by interfering channels, and significantly improves scanning efficiency.

[0053] See also Figure 2 , Figure 2 A flowchart of the screen projection connection method provided in the second embodiment of the present application. Although a logical order is shown in the flowchart, in some cases, the steps shown or described may be performed in an order different from that shown in the drawings.

[0054] Specifically, the specific process of the screen projection connection method provided in the second embodiment of the present application is as follows:

[0055] S201: Obtain the signal-to-noise ratio of all current channels, the response delay of the primary connection end, and the historical connection success rate with the primary connection end.

[0056] In some embodiments of the present application, the GC side calculates the signal-to-noise ratio (SNR) based on the comparison between the received signal and the background noise. Furthermore, the GC side sends a Probe Request frame to the GO side and records the sending timestamp. After receiving the ProbeResponse frame from the GO side, the time difference is calculated as the response delay. Furthermore, the GC side queries the locally stored connection records and extracts the historical connection data with the target GO side. The ratio of the number of successful connections on each channel to the total number of attempts is calculated as the historical connection success rate.

[0057] S202: Calculate the environment complexity based on the signal-to-noise ratio, response delay, and historical connection success rate.

[0058] Among them, environmental complexity refers to the comprehensive interference level and channel availability conditions that affect the screen projection connection in the wireless environment. Environmental complexity is a single value (range 0-1). The higher the value, the more complex the environment is, and a more precise channel selection strategy is required.

[0059] Optionally, the calculation formula of the environment complexity S is expressed as:

[0060]

[0061] In the above formula, SNR current is the current signal-to-noise ratio; SNR max is the upper limit of the signal-to-noise ratio; D response is the current response delay; D threshold is the upper limit of response delay; R historical is the historical connection success rate; α, β, and γ are preset coefficients, α+β+γ=1.

[0062] Alternatively, the calculation formula of the environmental complexity S is expressed as:

[0063]

[0064] Compared to the first calculation formula, the square root function in the first term of this formula can smooth the impact of signal-to-noise ratio differences and avoid excessive penalty of low SNR channels by linear normalization, thereby more accurately reflecting the nonlinear changes in channel quality. At the same time, the use of a logarithmic function in the second term of this formula can smooth the impact of high-latency channels, emphasizing the weight of delays within a reasonable range while avoiding excessive contribution of extreme delay values ​​to complexity. The third term of this formula uses a square term because low-success-rate channels should have a more significant impact on environmental complexity. The square term amplifies the penalty of low-success-rate channels, giving priority to high-reliability channels.

[0065] The above S201-S202 provides data support for subsequent target channel screening and screen projection connection optimization by obtaining the signal-to-noise ratio, response delay and historical connection success rate, and calculating the environment complexity.

[0066] S203: Determine whether the environment complexity is greater than or equal to the complexity threshold. If the environment complexity is greater than or equal to the complexity threshold, execute S204. If the environment complexity is less than the complexity threshold, execute S208.

[0067] The complexity threshold is the threshold for determining environmental complexity and is used to determine the scanning mode. The complexity threshold can be a preset fixed value, such as 0.7. It can also be a dynamic value, for example, linked to device performance and real-time projection requirements. For example, the better the device performance, the higher the complexity threshold; the higher the real-time projection requirements, the lower the complexity threshold.

[0068] It can be understood that if the environmental complexity is greater than or equal to the complexity threshold, it means that the current environment is a high-interference environment for the GC end. Since the channel quality in a high-interference environment varies greatly, the weighted scanning mode (S204) is selected here to give priority to high-quality channels based on weights and reduce the risk of connection failure. If the environmental complexity is less than the complexity threshold, it means that the current environment is a low-interference environment for the GC end. Since most channels in a low-interference environment have high availability, the sequential scanning mode (S208) is selected here to simplify the scanning process and quickly establish a connection. In this way, by judging the environmental complexity and selecting the appropriate scanning mode (sequential scanning or weighted scanning), the channel scanning process can be optimized.

[0069] S204: Use the weighted scanning mode as the target scanning mode.

[0070] The weighted scanning mode is a mode that preferentially scans the target channel set with the highest weight.

[0071] S205: Obtain a first scan list.

[0072] The first scan list is used to describe different weights corresponding to different channel sets, and each channel set includes at least one preset channel.

[0073] Optionally, the initial first scan list may be as shown in Table 1 below:

[0074] Channel Weight % Negotiated Channel 100 Point-to-point scanning to discover channels 90 GC recommended channel 80 GO Recommended Channel 70 Both sides support channel 60 Omnichannel 50

[0075] Table 1

[0076] In Table 1 above, all channels corresponding to each row constitute a channel set. Negotiated channels refer to the channels explicitly agreed upon by the GC and GO through peer-to-peer negotiation (Group Owner Negotiation) during the previous Wi-Fi Direct connection. Since negotiated channels are mutually agreed upon communication channels, prioritizing them for faster GO discovery ensures the highest initial weight. Peer-to-peer discovery channels refer to the set of channels that the GO may be monitoring, detected by the GC during the device discovery phase of Wi-Fi Direct by sending Probe Request frames and receiving Probe Response frames from the GO. These channels are recently active on the GO and have a high probability of successful connection. Their initial weight is slightly lower than the negotiated channels. GC-recommended channels refer to the set of channels recommended by the GC based on its own hardware support, historical connection records, or environmental indicators (such as signal-to-noise ratio and response latency). These channels reflect the GC's local optimization choices and have a high connection success rate. However, due to GO limitations, their initial weight is lower than that of peer-to-peer discovery channels. GO-recommended channels refer to the set of channels recommended by the GO through signaling during device discovery or negotiation. They may be initially weighted lower than the GC-recommended channels. Supported channels refer to the set of channels compatible with both the GC and GO sides. Full channels refer to all available channels and are used as a last resort when other channel sets are ineffective. Because they have the lowest connection efficiency, they have the lowest initial weight. It is understood that the initial weights of the channel sets in Table 1 above can be adjusted based on actual needs and are not specifically limited here.

[0077] S206: Scan the target channel set.

[0078] The target channel set is a channel set in the first scan list that has the highest current weight and has not been scanned.

[0079] For example, initially all channel sets are not scanned, and the GC end selects the "negotiation channel" with the highest weight as the target channel set. Assuming that the negotiation channel is {channel 36 of 5GHz}, the GC end sends a Probe Request frame on channel 36 and waits for the Probe Response frame from the GO end. If a response is received within 50 milliseconds, the MAC address and monitoring channel of the GO end are confirmed, and the scan is stopped. If no response is received, channel 36 is recorded as "scanned", and the next round S206 is entered, and the next unscanned channel set with the highest weight is selected, that is, the point-to-point scanning discovery channel (such as, including {channels 1, 6, and 11 of 2.4GHz}) as the target channel set. The subsequent processing logic is the same, so it will not be repeated.

[0080] In some embodiments of the present application, S206 scans the target channel set in the following specific steps: eliminating all scanned channels in the target channel set, and sequentially scanning all unscanned channels in the target channel set.

[0081] For example, when the peer-to-peer scanning discovery channels are used as the target channel set, it is determined that the peer-to-peer scanning discovery channels include {channels 1, 6, and 11}. Subsequently, when the mutually supported channels are used as the target channel set, if it is determined that the mutually supported channels include {channels 1, 6, and 35}, the duplicate channels {1, 6} are marked as scanned channels and removed from the scan queue.

[0082] In this way, by eliminating the channels that have been scanned, the scanning process can be optimized for deduplication, avoiding repeated scanning of channels and reducing invalid scanning time.

[0083] S207, if the screen projection connection is not established with the main connection end through the target channel set within the connection duration threshold, the weight of the target channel set is reduced by a preset value, and the channel set with the second highest current weight and not scanned in the first scan list is used as the target channel set, and the process returns to execute S206 until the screen projection connection is established with the main connection end through the target channel set within the connection duration threshold.

[0084] The connection duration threshold refers to the preset maximum allowed connection time, which is used to limit the duration of the screen projection connection attempt.

[0085] Optionally, the weight of the target channel set can be reduced by a preset value by 10% each time, or the weight of the target channel set can be multiplied by a coefficient less than 1 each time, such as 0.9. Of course, other forms are also possible and are not specifically limited here. By continuously adjusting the weight of each channel set in the first scan list in this way, the timeliness of the first scan list can be maintained in real time, so that the channel that is currently easiest to connect to can be continuously determined based on the first scan list.

[0086] Optionally, a maximum failure count of 3 can be set for each target channel set. When the projection connection with the main connection end is not established through the target channel set for 3 times, the weight of the target channel set will be reduced to a preset value, and the channel set with the second highest current weight and not scanned in the first scan list will be used as the target channel set. This can enhance the fault tolerance of channel scanning and avoid premature abandonment of high-quality channels due to a single scan failure.

[0087] In some embodiments of the present application, the connection duration threshold in S207 is determined by obtaining a reference connection duration and, if the target scanning mode is a weighted scanning mode, multiplying the reference connection duration by the adjustment coefficient as the connection duration threshold.

[0088] The benchmark connection duration refers to a predefined reference connection time, which serves as a benchmark value for determining the connection duration threshold, and the adjustment coefficient is greater than 1.

[0089] For example, if the baseline connection duration is 10 seconds and the adjustment factor is 2, the connection duration threshold is 20 seconds. This increases the baseline connection duration in weighted scanning mode to accommodate longer scans in highly complex environments.

[0090] S208: Use the sequential scanning mode as the target scanning mode.

[0091] The sequential scanning mode is a mode that preferentially scans the target channel set with the highest priority.

[0092] S209: Obtain a second scan list.

[0093] The second scan list is used to describe different priorities corresponding to different channel sets, and each channel set includes at least one preset channel.

[0094] Optionally, the initial second scan list may be as shown in Table 2 below:

[0095] Priority Channel 1 Negotiated Channel 2 Point-to-point scanning to discover channels 3 GC recommended channel 4 GO Recommended Channel 5 Both sides support channel 6 Omnichannel

[0096] Table 2

[0097] The definitions of the channel sets in Table 2 are basically the same as those in Table 1 and will not be repeated here. It is understandable that the initial weights of the channel sets in Table 2 can also be adjusted according to actual needs and are not specifically limited here.

[0098] S210: Scan the target channel set.

[0099] The target channel set is a channel set in the second scan list that has the highest current priority and has not been scanned.

[0100] For example, initially all channel sets are not scanned, and the GC end selects the "negotiation channel" with the highest priority as the target channel set. Assuming that the negotiation channel is {channel 36 of 5GHz}, the GC end sends a Probe Request frame on channel 36 and waits for the Probe Response frame from the GO end. If a response is received within 50 milliseconds, the MAC address and monitoring channel of the GO end are confirmed, and the scan is stopped. If no response is received, channel 36 is recorded as "scanned", and the next round S206 is entered, and the next highest priority unscanned channel set is selected, that is, the point-to-point scanning discovery channel (such as, including {channels 1, 6, and 11 of 2.4GHz}) as the target channel set. The subsequent processing logic is the same, so it will not be repeated.

[0101] In some embodiments of the present application, the following steps may also be performed: all scanned channels in the target channel set are eliminated, and all unscanned channels in the target channel set are scanned in sequence. Since the principle of this embodiment is basically the same as that of the embodiment in S206, it will not be described in detail.

[0102] S211, if a screen projection connection is not established with the main connection end through the target channel set within the connection duration threshold, the channel set with the second highest priority and not scanned in the second scanning list will be used as the target channel set, and the process returns to execute S210 until a screen projection connection is established with the main connection end through the target channel set within the connection duration threshold.

[0103] Also optionally, a maximum failure limit of 3 can be set for each target channel set. When the projection connection with the main connection end is not established through the target channel set for 3 times, the weight of the target channel set will be reduced to a preset value, and the channel set with the second highest weight and not scanned in the second scan list will be used as the target channel set. This can enhance the fault tolerance of channel scanning and avoid premature abandonment of high-quality channels due to a single scan failure.

[0104] In some embodiments of the present application, the connection duration threshold in S211 is determined by obtaining a reference connection duration. If the target scanning mode is a sequential scanning mode, the reference connection duration is used as the connection duration threshold.

[0105] For example, if the baseline connection duration is 10 seconds, the connection duration threshold is 10 seconds. This eliminates the need for an adjustment factor in sequential scanning mode, where the baseline connection duration is used directly as the connection duration threshold, enabling fast connection control in low-complexity environments.

[0106] In general, in the second embodiment described above, by obtaining the signal-to-noise ratio of all current channels, the response delay of the main connection end, and the historical connection success rate, the environmental complexity is calculated using a specific formula, and then based on the comparison result of the environmental complexity and the threshold, the weighted scanning mode or the sequential scanning mode is intelligently selected. During the scanning process, the scanned channels are eliminated to avoid repeated operations, and at the same time, the connection duration threshold and the upper limit of the number of failures that match different scanning modes are set, and the weights of the channel sets are dynamically adjusted. In this way, in a high-interference environment, the weighted scanning mode gives priority to exploring high-quality channels to reduce the risk of connection failure; in a low-interference environment, the sequential scanning mode simplifies the process to achieve fast connection, which ultimately effectively improves the channel scanning efficiency and shortens the screen projection connection time.

[0107] In order to facilitate better implementation of the projection connection method of the present application, the present application also provides a projection connection device based on the above projection connection method. The meaning of the nouns is the same as in the above projection connection method, and the specific implementation details can be referred to the description in the method embodiment.

[0108] See also Figure 3 , Figure 3 This is a schematic diagram of the structure of the screen projection connection device provided in an embodiment of the present application, which may specifically include:

[0109] The indicator determination module 301 is used to determine the current environment indicator; wherein the environment indicator is an indicator used to indicate the connection environment with the primary connection end;

[0110] The connection module 302 is used to determine the corresponding target scanning mode according to the environmental indicators, scan in the target scanning mode and establish a projection connection with the main connection end; wherein, the target scanning mode is a mode that preferentially scans the set target channel set.

[0111] In the above embodiment, the indicator determination module first determines the environmental indicator used to indicate the connection environment with the main connection end. Then, the connection module accurately matches the target scanning mode that prioritizes scanning the set of target channels based on the environmental indicator, and scans based on the target scanning mode and establishes a projection connection with the main connection end. Compared with the traditional full-channel scanning method, this method of scanning the target channel set preferentially based on the actual connection environment can avoid wasting time on a large number of invalid channels, reduce scanning delays and repeated attempts caused by interfering channels, and significantly improve scanning efficiency.

[0112] In some embodiments of the present application, the environmental indicator is the environmental complexity. The scanning mode from the connection end includes a weighted scanning mode and a sequential scanning mode. The weighted scanning mode is a mode that preferentially scans the target channel set with the highest weight, and the sequential scanning mode is a mode that preferentially scans the target channel set with the highest priority. The corresponding target scanning mode is determined according to the environmental indicator, including: if the environmental complexity is greater than or equal to the complexity threshold, the weighted scanning mode is used as the target scanning mode; if the environmental complexity is less than the complexity threshold, the sequential scanning mode is used as the target scanning mode.

[0113] In some embodiments of the present application, when the target scanning mode is the weighted scanning mode, scanning is performed in the target scanning mode and a screen projection connection is established with the main connection end, including: obtaining a first scanning list; wherein the first scanning list is used to describe different weights corresponding to different channel sets, and each channel set includes at least one preset channel; scanning the target channel set; wherein the target channel set is the channel set with the highest current weight and that has not been scanned in the first scanning list; if a screen projection connection is not established with the main connection end through the target channel set within the connection duration threshold, the weight of the target channel set is reduced by a preset value, and the channel set with the second highest current weight and that has not been scanned in the first scanning list is used as the target channel set, and the step of scanning the target channel set is returned to execute until a screen projection connection is established with the main connection end through the target channel set within the connection duration threshold.

[0114] In some embodiments of the present application, when the target scanning mode is a sequential scanning mode, scanning is performed in the target scanning mode and a screen projection connection is established with the main connection end, including: obtaining a second scanning list; wherein the second scanning list is used to describe different priorities corresponding to different channel sets, and each channel set includes at least one preset channel; scanning the target channel set; wherein the target channel set is the channel set with the highest current priority and that has not been scanned in the second scanning list; if a screen projection connection is not established with the main connection end through the target channel set within the connection duration threshold, the channel set with the second highest current priority and that has not been scanned in the second scanning list is used as the target channel set, and the step of scanning the target channel set is returned to execute until a screen projection connection is established with the main connection end through the target channel set within the connection duration threshold.

[0115] In some embodiments of the present application, scanning the target channel set includes: eliminating all scanned channels in the target channel set, and sequentially scanning all unscanned channels in the target channel set.

[0116] In some embodiments of the present application, after scanning the target channel set, it also includes: obtaining a benchmark connection duration; if the target scanning mode is a sequential scanning mode, the benchmark connection duration is used as a connection duration threshold; if the target scanning mode is a weighted scanning mode, the product of the benchmark connection duration and the adjustment coefficient is used as the connection duration threshold; the adjustment coefficient>1.

[0117] In addition, the present application also provides a terminal device, such as Figure 4 As shown, it shows a schematic diagram of the structure of the terminal device involved in this application, specifically:

[0118] The terminal device may include one or more processing core processors 401, one or more computer-readable storage media memories 402, a power supply 403, an input unit 404 and other components. Those skilled in the art will understand that Figure 4 The terminal device structure shown in the figure does not constitute a limitation on the terminal device, and may include more or fewer components than shown in the figure, or combine certain components, or arrange the components differently.

[0119] in:

[0120] Processor 401 is the control center of the terminal device. It connects the various components of the entire terminal device using various interfaces and lines. By running or executing software programs and / or modules stored in memory 402 and accessing data stored in memory 402, it performs various terminal device functions and processes data, thereby providing overall monitoring of the terminal device. Optionally, processor 401 may include one or more processing cores. Preferably, processor 401 may integrate an application processor and a modem processor. The application processor primarily processes the operating system, user interface, and application programs, while the modem processor primarily handles wireless communications. It is understood that the modem processor may not be integrated into processor 401.

[0121] Memory 402 can be used to store software programs and modules. Processor 401 executes various functional applications and data processing by running the software programs and modules stored in memory 402. Memory 402 may primarily include a program storage area and a data storage area. The program storage area may store an operating system, at least one application required for a function, and the like; the data storage area may store data created based on the use of the terminal device. In addition, memory 402 may include high-speed random access memory and non-volatile memory, such as at least one disk storage device, flash memory device, or other volatile solid-state storage device. Accordingly, memory 402 may also include a memory controller to provide processor 401 with access to memory 402.

[0122] The terminal device also includes a power supply 403 for supplying power to various components. Preferably, the power supply 403 can be logically connected to the processor 401 via a power management system, thereby enabling the power management system to manage charging, discharging, and power consumption. The power supply 403 can also include one or more DC or AC power supplies, a recharging system, a power supply device debugging circuit, a power converter or inverter, a power status indicator, and other arbitrary components.

[0123] The terminal device may further include an input unit 404, which may 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.

[0124] Although not shown, the terminal device may also include a display unit, etc., which will not be described in detail here. Specifically in this embodiment, the processor 401 in the terminal device will load the executable file corresponding to the process of one or more applications into the memory 402 according to the following instructions, and the processor 401 will run the application stored in the memory 402, thereby implementing the steps in any one of the screen projection connection methods provided in the embodiments of the present application: determining the current environmental indicators; wherein the environmental indicators are indicators for indicating the connection environment with the main connection end; determining the corresponding target scanning mode according to the environmental indicators, scanning in the target scanning mode and establishing a screen projection connection with the main connection end; wherein the target scanning mode is a mode for preferentially scanning the set target channel set.

[0125] In the above embodiment, an environmental indicator indicating the connection environment with the primary connection end is first determined. A target scanning mode is then precisely matched to the environmental indicator to prioritize scanning a set of target channels. Scanning is then performed based on this target scanning mode to establish a projection connection with the primary connection end. Compared to the traditional full-channel scanning method, this method, which prioritizes scanning a set of target channels based on the actual connection environment, avoids wasting time on a large number of invalid channels, reduces scanning delays and repeated attempts caused by interfering channels, and significantly improves scanning efficiency.

[0126] The specific implementation of the above operations can be found in the previous embodiments and will not be repeated here.

[0127] Those skilled in the art will appreciate that all or part of the steps in the various methods of the above embodiments may be accomplished by instructions, or by controlling related hardware through instructions. The instructions may be stored in a computer-readable storage medium and loaded and executed by a processor.

[0128] To this end, the present application provides a computer-readable storage medium, on which a computer program is stored. The computer program can be loaded by a processor to execute the steps in any screen projection connection method provided in the present application.

[0129] The specific implementation of the above operations can be found in the previous embodiments and will not be repeated here.

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

[0131] Since the instructions stored in the computer-readable storage medium can execute the steps in any screen projection connection method provided in this application, the beneficial effects that can be achieved by any screen projection connection method provided in this application can be achieved. Please see the previous embodiments for details and will not be repeated here.

[0132] The above is a detailed introduction to the screen projection connection method, device, terminal equipment and computer-readable storage medium provided by this application. Specific examples are used herein to illustrate the principles and implementation methods of the present invention. The description of the above embodiments is only used to help understand the method of the present invention and its core idea; at the same time, for those skilled in the art, based on the ideas of the present invention, there will be changes in the specific implementation methods and application scope. In summary, the content of this specification should not be understood as a limitation on the present invention.

Claims

1. A screen projection connection method, characterized in that: Applied to a slave connection end, the method includes: Determining a current environmental indicator; wherein the environmental indicator is an indicator for indicating the connection environment with the primary connection end; Determine the corresponding target scanning mode according to the environmental indicators, scan in the target scanning mode and establish a projection connection with the main connection end; wherein, the target scanning mode is a mode that preferentially scans a set target channel set.

2. The screen projection connection method according to claim 1, characterized in that: The environmental indicator is environmental complexity, and determining the current environmental indicator includes: Obtaining the signal-to-noise ratio of all current channels, the response delay of the primary connection end, and the historical connection success rate with the primary connection end; The environment complexity is calculated according to the signal-to-noise ratio, the response delay, and the historical connection success rate.

3. The screen projection connection method according to claim 1, characterized in that: The environmental indicator is environmental complexity. The scanning mode of the slave connection end includes a weighted scanning mode and a sequential scanning mode. The weighted scanning mode is a mode for preferentially scanning the target channel set with the highest weight. The sequential scanning mode is a mode for preferentially scanning the target channel set with the highest priority. The corresponding target scanning mode is determined according to the environmental indicator, including: If the environment complexity is greater than or equal to a complexity threshold, the weighted scanning mode is used as the target scanning mode; If the environment complexity is less than a complexity threshold, the sequential scanning mode is used as the target scanning mode.

4. The screen projection connection method according to claim 1, characterized in that: When the target scanning mode is a weighted scanning mode, scanning in the target scanning mode and establishing a screen projection connection with the main connection end includes: Obtaining a first scan list; wherein the first scan list is used to describe different weights corresponding to different channel sets, each channel set including at least one preset channel; Scanning a target channel set; wherein the target channel set is a channel set in the first scan list that has the highest current weight and has not been scanned; If a screen projection connection is not established with the main connection end through the target channel set within the connection duration threshold, the weight of the target channel set is reduced by a preset value, and the channel set with the second highest current weight and not scanned in the first scanning list is used as the target channel set, and the step of scanning the target channel set is returned to execute until a screen projection connection is established with the main connection end through the target channel set within the connection duration threshold.

5. The screen projection connection method according to claim 1, characterized in that: When the target scanning mode is a sequential scanning mode, scanning in the target scanning mode and establishing a screen projection connection with the main connection end includes: Obtaining a second scan list; wherein the second scan list is used to describe different priorities corresponding to different channel sets, each channel set including at least one preset channel; Scanning a target channel set; wherein the target channel set is a channel set with the highest current priority and not scanned in the second scan list; If a screen projection connection is not established with the main connection end through the target channel set within the connection duration threshold, the channel set with the second highest priority and not scanned in the second scanning list will be used as the target channel set, and the step of scanning the target channel set will be returned to execute until a screen projection connection is established with the main connection end through the target channel set within the connection duration threshold.

6. The screen projection connection method according to claim 4 or 5, characterized in that: Scanning the target channel set includes: All scanned channels in the target channel set are eliminated, and all unscanned channels in the target channel set are scanned in sequence.

7. The screen projection connection method according to claim 4 or 5, characterized in that: After scanning the target channel set, the method further includes: Get the benchmark connection duration; If the target scanning mode is a sequential scanning mode, the benchmark connection duration is used as the connection duration threshold; If the target scanning mode is a weighted scanning mode, the product of the benchmark connection duration and the adjustment coefficient is used as the connection duration threshold; the adjustment coefficient>1.

8. A screen projection connection device, characterized in that: The screen projection connection device includes: An indicator determination module, configured to determine a current environmental indicator; wherein the environmental indicator is an indicator for indicating the connection environment with the primary connection end; A connection module is used to determine the corresponding target scanning mode according to the environmental indicators, scan in the target scanning mode and establish a projection connection with the main connection end; wherein, the target scanning mode is a mode that preferentially scans the set target channel set.

9. A computer-readable storage medium, characterized in that A computer program is stored, and when the computer program is executed by a processor, the processor is caused to perform the steps of the method according to any one of claims 1 to 7.

10. A terminal device, characterized in that: The method comprises a memory and a processor, wherein the memory stores a computer program, and when the computer program is executed by the processor, the processor executes the steps of the method according to any one of claims 1 to 7.

Citation Information

Patent Citations

  • Method and apparatus for scanning multi-mode wireless communication environments

    CN102124788A

  • Method and system of Wi-Fi to select optimal access point

    CN107995672A

  • Device discovery method and apparatus, and computer device

    CN112351417A

  • Data processing method based on scanning gun and related device

    CN116781838A

  • Low-power-consumption Bluetooth device connection matching detection system and method

    CN119854966A

Cited By

  • Wireless connection method for patting treasure and terminal equipment

    CN121463011A

  • A method for wireless connection between a paipai treasure and a terminal device

    CN121463011B