A screen projection method, device, storage medium and screen projector
Patent Information
- Application Number
- CN202311208818.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-09-18
- Publication Date
- 2026-09-11
- Estimated Expiration
- 2043-09-18
AI Technical Summary
[0003]在对现有技术的研究和实践过程中,本申请的发明人发现,现有技术投屏器与待投屏设备之间建立连接比较耗时,一直是行业痛点,直接影响用户使用体验
[0037] A computer-readable storage medium storing a plurality of instructions adapted for loading by a processor to perform the steps in the screen projection method described above.
Smart Images

Figure CN117412402B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of computers, specifically to a screen projection method, apparatus, computer-readable storage medium, and computer equipment. Background Technology
[0002] In recent years, with the development and popularization of computer equipment technology, screen mirroring technology has been increasingly widely used in smart homes. To improve the user experience of screen mirroring, screen mirroring devices have emerged. Generally, screen mirroring devices require a computer or other computer device to be plugged into the device, and then the user must manually search for nearby wireless access points (APs) to establish a peer-to-peer (P2P) link for screen mirroring.
[0003] In the process of researching and practicing existing technologies, the inventors of this application discovered that establishing a connection between existing screen projectors and the device to be projected is time-consuming, which has always been a pain point in the industry and directly affects the user experience. Summary of the Invention
[0004] This application provides a screen projection method and apparatus that can shorten the connection establishment time between the screen projector and the device to be projected, thereby improving the user experience.
[0005] To address the aforementioned technical problems, this application provides the following technical solutions:
[0006] A screen mirroring method, applied to a screen mirroring device connected to a computer device, comprising:
[0007] Obtain the primary connection channel of the stored device to be projected;
[0008] Determine whether a connection can be established with the device to be projected within a first preset time period based on the primary connection channel, and obtain a first determination result;
[0009] Based on the first determination result, a connection is established with the device to be projected.
[0010] A screen projection device, used in a screen projection unit connected to a computer device, includes:
[0011] The acquisition module is used to acquire the primary connection channel of the stored device to be projected.
[0012] The determination module is used to determine whether a connection can be established with the device to be projected on the screen based on the primary connection channel within a first preset time period, and to obtain a first determination result;
[0013] A connection establishment module is used to establish a connection with the device to be projected based on the first determination result.
[0014] The screen projection device provided in this application embodiment includes a setup module, comprising:
[0015] The acquisition submodule is used to acquire the stored channel configuration table of the device to be projected if the first determination result indicates that no connection has been established with the device to be projected based on the primary connection channel within a first preset time period.
[0016] The first determining submodule is used to determine multiple candidate connection channels based on the channel configuration table and the primary connection channel;
[0017] The second determining submodule is used to determine whether a connection can be established with the device to be projected on based on any one of the multiple candidate connection channels within a second preset time period, and to obtain a second determining result.
[0018] A submodule is established to establish a connection with the device to be projected based on the second determination result.
[0019] In the screen projection device provided in this application embodiment, a submodule is established, including:
[0020] The first determining unit is configured to determine, in turn, whether any of the other multiple connection channels can establish a connection with the device to be projected if the second determining result indicates that no connection has been established with the device to be projected within a second preset time period based on any of the multiple candidate connection channels.
[0021] The establishment unit is used to establish a connection with the device to be projected when there are other connection channels among the multiple other connection channels that can establish a connection with the device to be projected.
[0022] In the screen projection device provided in this application embodiment, the establishment module, establishment sub-module, or establishment unit is used for:
[0023] Determine whether an Internet Protocol address sent by the device to be projected can be received within a specified time period;
[0024] If an Internet Protocol address is received from the device to be projected within a specified time period, a connection is established with the device to be projected based on the Internet Protocol address.
[0025] In the screen projection device provided in this application embodiment, before determining whether an Internet Protocol address sent by the device to be projected can be received within a specified time period, the device further includes:
[0026] Obtain the stored Bluetooth address of the device to be projected;
[0027] A Bluetooth connection is established with the device to be projected based on the Bluetooth address;
[0028] Creating modules, submodules, or units is also used for:
[0029] If no Internet Protocol address is received from the device to be projected within the specified time period, an Internet Protocol address request is sent to the device to be projected via the Bluetooth connection, triggering the device to be projected to respond with an Internet Protocol address request via the Bluetooth connection upon receiving the Internet Protocol address request.
[0030] Based on the feedback Internet Protocol address, a connection is established with the device to be projected.
[0031] In the screen mirroring device provided in this application embodiment, after establishing a connection with the device to be mirrored based on the feedback Internet Protocol address, it further includes:
[0032] The receiving module is used to receive the primary connection channel update request sent by the device to be projected via the Bluetooth connection, wherein the primary connection channel update request carries the updated primary connection channel;
[0033] The update module is used to update the primary connection channel of the device to be projected to the updated primary connection channel.
[0034] In the screen projection device provided in this application embodiment, the first determining submodule includes:
[0035] The second determining unit is used to determine the target mapping channel, which includes the primary connection channel, from a plurality of candidate mapping channels in the channel configuration table;
[0036] The third determining unit determines the connection channels other than the primary connection channel among the multiple connection channels corresponding to the target mapping channel as candidate connection channels, thereby obtaining multiple candidate connection channels.
[0037] A computer-readable storage medium storing a plurality of instructions adapted for loading by a processor to perform the steps in the screen projection method described above.
[0038] A screen mirroring device includes a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that the processor executes the program to implement the steps in the screen mirroring method described above.
[0039] This application embodiment obtains the primary connection channel of the device to be projected into the storage; determines whether a connection can be established with the device to be projected into the storage based on the primary connection channel within a first preset time period, and obtains a first determination result; based on the first determination result, a connection is established with the device to be projected into the storage. Thus, by prioritizing the scanning of the primary connection channel of the device to be projected into the storage during channel scanning, blind multi-channel scanning is avoided, thereby shortening the connection establishment time between the device to be projected into the storage and improving the user experience. Attached Figure Description
[0040] To more clearly illustrate the technical solutions in the embodiments of this application, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0041] Figure 1a This is a system schematic diagram of the screen projection method provided in the embodiments of this application.
[0042] Figure 1b This is a flowchart illustrating the screen projection method provided in an embodiment of this application.
[0043] Figure 2 This is a schematic diagram of the screen projection device provided in the embodiments of this application;
[0044] Figure 3 This is a schematic diagram of the screen projector provided in an embodiment of this application. Detailed Implementation
[0045] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only a part of the embodiments of this application, and not all of them. All other embodiments obtained by those skilled in the art based on the embodiments of this application without creative effort are within the scope of protection of this application.
[0046] This application provides a screen projection method, apparatus, and computer-readable storage medium.
[0047] Please see Figure 1a , Figure 1aThis is a schematic diagram of the screen projection system provided in this application embodiment. The system may include at least one computer device 1000, a screen projection device 2000 connected to the computer device 1000, a device 3000 to be projected onto, and a network 4000. The computer device 1000 and the screen projection device 2000 can be connected via USB or Type-C direct connection. After connection, the screen projection device 2000 connects to the device 3000 to be projected onto via the network 4000, thereby realizing the screen projection function of projecting the screen from the computer device 1000 onto the device 3000. The network 4000 can be a wireless network or a wired network, such as a wireless local area network (WLAN), local area network (LAN), cellular network, 2G network, 3G network, 4G network, 5G network, etc. Additionally, the computer devices 1000 can also connect to each other using their own Bluetooth network or hotspot network.
[0048] This application provides a screen mirroring method, which can be executed by a screen mirroring device 2000. For example... Figure 1a As shown, the screen projector 2000 acquires the primary connection channel of the device to be projected into the storage; determines whether a connection can be established with the device to be projected into the storage based on the primary connection channel within a first preset time period, and obtains a first determination result; based on the first determination result, a connection is established with the device to be projected into the storage. In this way, by prioritizing the scanning of the primary connection channel of the device to be projected into the storage during channel scanning, blind multi-channel scanning is avoided, thereby shortening the connection establishment time between the screen projector and the device to be projected into the storage, and improving the user experience.
[0049] It should be noted that, Figure 1a The schematic diagram of the screen projection system shown is merely an example. The screen projection system and scenarios described in this application are intended to more clearly illustrate the technical solutions of this application and do not constitute a limitation on the technical solutions provided in this application. As those skilled in the art will know, with the evolution of screen projection systems and the emergence of new business scenarios, the technical solutions provided in this application are also applicable to similar technical problems.
[0050] In this embodiment, the description will be from the perspective of the projection device, which can be integrated into a computer device that has a storage unit and a microprocessor and thus computing power.
[0051] Please see Figure 1b , Figure 1b This is a flowchart illustrating the screen mirroring method provided in an embodiment of this application. The screen mirroring method includes:
[0052] In step 101, the primary connection channel of the stored device to be projected is obtained.
[0053] Before connecting the screen sharing device to the computer, it needs to connect to the device to be shared with. This is done by running a thread and sending commands to obtain basic information about the device. This basic information may include the device's Service Set Identifier (SSID), Password Key (PSK), and primary connection channel. After obtaining this basic information, the screen sharing device stores it in its storage space.
[0054] Specifically, after the screen mirroring device is connected to the computer device, it retrieves the primary connection channel stored in the storage space. For example, the primary connection channel is channel 3.
[0055] In step 102, it is determined whether a connection can be established with the device to be projected based on the primary connection channel within a first preset time period, and a first determination result is obtained.
[0056] In this application, the first step is to detect whether the projection device can establish a connection with the device to be projected on based on the primary connection channel within a first preset time period, and to obtain a first determination result.
[0057] In step 103, based on the first determination result, a connection is established with the device to be projected.
[0058] Specifically, when the first determination result indicates that a connection can be established with the device to be projected on the primary connection channel within a first preset time period, a connection is established with the device to be projected on the primary connection channel based on the SSID and PSK.
[0059] In some implementations, the step of establishing a connection with the device to be projected based on the first determination result includes:
[0060] (1) If the first determination result indicates that no connection has been established with the device to be projected based on the primary connection channel within the first preset time period, then the channel configuration table of the device to be projected is obtained.
[0061] (2) Based on the channel configuration table and the primary connection channel, determine multiple candidate connection channels;
[0062] (3) Determine whether a connection can be established with the device to be projected on based on any one of the multiple candidate connection channels within a second preset time period, and obtain a second determination result;
[0063] (4) Based on the second determination result, establish a connection with the device to be projected.
[0064] If the first determination result indicates that no connection has been established with the device to be projected via the primary connection channel within a first preset time period, it means that a connection with the device to be projected via the primary connection channel cannot be obtained. Therefore, the stored channel configuration table of the device to be projected is retrieved. The channel configuration table is a channel configuration table pre-set for the device to be projected at the factory, and this channel configuration table is obtained when the projector attempts to connect with the device to be projected.
[0065] Table 1
[0066]
[0067] Specifically, as shown in Table 1, Table 1 shows the mapped channels corresponding to multiple channels. The mapped channels are used to indicate the channel number of the communication mapped channel corresponding to multiple channels.
[0068] Specifically, multiple candidate connection channels are determined using a channel configuration table and a primary connection channel; a second determination result is obtained by determining whether a connection can be established with the device to be projected within a second preset time period based on any of the multiple candidate connection channels; and a connection with the device to be projected is established based on the second determination result.
[0069] Specifically, the second preset time period can be the same as or different from the first preset time period; this is not limited here. When the primary connection channel cannot establish a connection with the device to be projected, the system prioritizes determining whether any one of the multiple candidate connection channels can establish a connection with the device to be projected within the second preset time period. This avoids blind multi-channel scanning, thereby shortening the connection establishment time between the projector and the device to be projected, and improving the user experience. Based on the second determination result, a connection is established with the device to be projected.
[0070] In some implementations, the step of determining multiple candidate connection channels based on the channel configuration table and the primary connection channel includes:
[0071] (1.1) Determine the target mapping channel, which includes the primary connection channel, from the multiple candidate mapping channels in the channel configuration table;
[0072] (1.2) Determine the connection channels other than the primary connection channel among the multiple connection channels corresponding to the target mapping channel as candidate connection channels to obtain multiple candidate connection channels.
[0073] Specifically, the method for determining multiple candidate connection channels based on the channel configuration table and the primary connection channel is as follows: determine the target mapping channel, which includes the primary connection channel, from the multiple candidate mapping channels recorded in the channel configuration table; determine the connection channels other than the primary connection channel from the multiple connection channels corresponding to the target mapping channel as candidate connection channels, thereby obtaining multiple candidate connection channels.
[0074] For example, if the primary connection channel is channel 3, and the multiple candidate mapping channels in Table 1 are mapping channels 1, 5, 9, 36, 60, 116, 140, 36+40, and 116+120 respectively, then the mapping channel including channel 3 is mapping channel 1, which is the target mapping channel. The channel range corresponding to mapping channel 1 is channels 1 to 4. Therefore, the connection channels in channels 1 to 4 other than channel 3 are determined as candidate connection channels, namely connection channel 1, connection channel 2, and connection channel 4, thus obtaining multiple candidate connection channels.
[0075] In some implementations, the step of establishing a connection with the device to be projected based on the second determination result includes:
[0076] (1.1) If the second determination result indicates that no connection has been established with the device to be projected within the second preset time period based on any of the multiple candidate connection channels, then it is sequentially determined whether any of the multiple other connection channels can establish a connection with the device to be projected.
[0077] (1.2) When there are other connection channels among the multiple other connection channels that can establish a connection with the device to be projected, establish a connection with the device to be projected.
[0078] Specifically, if the second determination result indicates that a connection cannot be established with the device to be projected using any of the multiple candidate connection channels, then a full channel scan is performed to determine whether any of the multiple other connection channels can establish a connection with the device to be projected; if there are other connection channels among the multiple other connection channels that can establish a connection with the device to be projected, then a connection is established with the device to be projected.
[0079] In some implementations, the step of establishing a connection with the device to be projected includes:
[0080] (1) Determine whether the Internet Protocol address sent by the device to be projected can be received within a specified time period;
[0081] (2) If an Internet Protocol address is received from the device to be projected within a specified time period, a connection is established with the device to be projected based on the Internet Protocol address.
[0082] The specific method for establishing a connection with the device to be projected is as follows: mutual link authentication is performed, an association is established, and a four-way handshake is used for user authentication and key negotiation when establishing a secure connection. After successfully obtaining the native Dynamic Host Configuration Protocol (DHCP) and Dynamic Internet Protocol Address (IP) addresses, the two parties establish a connection.
[0083] Specifically, it determines whether an Internet Protocol (IP) address sent by the device to be projected can be received within a specified time period. If an IP address sent by the device to be projected is received within the specified time period, it indicates that the DHCP IP address allocation function is normal. Then, a connection with the device to be projected is established based on the IP address.
[0084] In some implementations, before the step of determining whether an Internet Protocol address sent by the device to be projected can be received within a specified time period, the method further includes:
[0085] (1) Obtain the stored Bluetooth address of the device to be projected;
[0086] (2) Establish a Bluetooth connection with the device to be projected based on the Bluetooth address;
[0087] The method further includes:
[0088] (3) If no Internet Protocol address is received from the device to be projected within the specified time period, an Internet Protocol address request is sent to the device to be projected via the Bluetooth connection, triggering the device to be projected to respond with an Internet Protocol address request via the Bluetooth connection when it receives the Internet Protocol address request.
[0089] (4) Based on the Internet Protocol address provided in the feedback, establish a connection with the device to be projected.
[0090] Specifically, due to situations where the screen mirroring device cannot obtain its assigned IP address due to DHCP anomalies in the device to be mirrored, existing technologies perform Address Resolution Protocol (ARP) operations, inevitably leading to long connection times. Therefore, to further shorten the connection time with the device to be mirrored, this proposal establishes a Bluetooth connection with the device to be mirrored using the Bluetooth address of the device stored in the screen mirroring device before determining whether an Internet Protocol (IP) address sent by the device to be mirrored can be received within a specified time period. This generates a protocol data interaction link, i.e., an ATT connection. If an IP address sent by the device to be mirrored is not received within the specified time period, an IP address request is sent to the device to be mirrored via the Bluetooth connection. This triggers the device to respond with an IP address request via the Bluetooth connection upon receiving the request. Based on the responded IP address, a connection is established with the device to be mirrored.
[0091] To further shorten the connection time with the device to be projected, this proposal replaces the time-consuming ARP operation with a Bluetooth connection when no IP address is received from the device within a specified time period. This triggers the device to respond to the Internet Protocol address (IPA) request via Bluetooth, and a connection is established based on the returned IPA. This further reduces the connection time with the device to be projected.
[0092] In some implementations, after the step of establishing a connection with the device to be projected based on the feedback Internet Protocol address, the method further includes:
[0093] (1.1) Receive the primary connection channel update request sent by the device to be projected via the Bluetooth connection, wherein the primary connection channel update request carries the updated primary connection channel;
[0094] (1.2) Update the primary connection channel of the device to be projected to the updated primary connection channel.
[0095] Specifically, after the screen mirroring device establishes a connection with the device to be mirrored, if the user changes the primary connection channel of the device to be mirrored, the device to be mirrored will generate a primary connection channel update request based on the updated primary connection channel and send the primary connection channel update request to the screen mirroring device via Bluetooth. When the screen mirroring device receives the primary connection channel update request, it updates the stored primary connection channel of the device to be mirrored from the original primary connection channel to the updated primary connection channel.
[0096] Specifically, if the user changes other information about the device to be projected, such as the password, the updated information will be synchronized to the projector via Bluetooth connection.
[0097] As described above, this embodiment of the application obtains the primary connection channel of the device to be projected into the storage; determines whether a connection can be established with the device to be projected into the storage based on the primary connection channel within a first preset time period, and obtains a first determination result; based on the first determination result, a connection is established with the device to be projected into the storage. Therefore, by prioritizing the scanning of the primary connection channel of the device to be projected into the storage during channel scanning, blind multi-channel scanning is avoided, thereby shortening the connection establishment time between the device to be projected into the storage and improving the user experience.
[0098] To facilitate better implementation of the screen projection method provided in this application, this application also provides an apparatus based on the above-described screen projection method. The meanings of the terms used are the same as in the screen projection method described above, and specific implementation details can be found in the descriptions within the method embodiments.
[0099] Please see Figure 2 , Figure 2 This is a schematic diagram of the screen projection device provided in the embodiments of this application. The screen projection device may include an acquisition module 301, a determination module 302, and an establishment module 303, etc.
[0100] The acquisition module 301 is used to acquire the primary connection channel of the stored device to be projected.
[0101] The determining module 302 is used to determine whether a connection can be established with the device to be projected on the screen based on the primary connection channel within a first preset time period, and to obtain a first determining result;
[0102] Module 303 is used to establish a connection with the device to be projected based on the first determination result.
[0103] In some implementations, module 303 includes:
[0104] The acquisition submodule is used to acquire the stored channel configuration table of the device to be projected if the first determination result indicates that no connection has been established with the device to be projected based on the primary connection channel within a first preset time period.
[0105] The first determining submodule is used to determine multiple candidate connection channels based on the channel configuration table and the primary connection channel;
[0106] The second determining submodule is used to determine whether a connection can be established with the device to be projected on based on any one of the multiple candidate connection channels within a second preset time period, and to obtain a second determining result.
[0107] A submodule is established to establish a connection with the device to be projected based on the second determination result.
[0108] In some implementations, submodules are established, including:
[0109] The first determining unit is configured to determine, in turn, whether any of the other multiple connection channels can establish a connection with the device to be projected if the second determining result indicates that no connection has been established with the device to be projected within a second preset time period based on any of the multiple candidate connection channels.
[0110] The establishment unit is used to establish a connection with the device to be projected when there are other connection channels among the multiple other connection channels that can establish a connection with the device to be projected.
[0111] In some implementations, a module, submodule, or unit is created for:
[0112] Determine whether an Internet Protocol address sent by the device to be projected can be received within a specified time period;
[0113] If an Internet Protocol address is received from the device to be projected within a specified time period, a connection is established with the device to be projected based on the Internet Protocol address.
[0114] In some implementations, before determining whether an Internet Protocol address sent by the device to be projected can be received within a specified time period, the method further includes:
[0115] Obtain the stored Bluetooth address of the device to be projected;
[0116] A Bluetooth connection is established with the device to be projected based on the Bluetooth address;
[0117] Creating modules, submodules, or units is also used for:
[0118] If no Internet Protocol address is received from the device to be projected within the specified time period, an Internet Protocol address request is sent to the device to be projected via the Bluetooth connection, triggering the device to be projected to respond with an Internet Protocol address request via the Bluetooth connection upon receiving the Internet Protocol address request.
[0119] Based on the feedback Internet Protocol address, a connection is established with the device to be projected.
[0120] In some implementations, after establishing a connection with the device to be projected based on the feedback Internet Protocol address, the method further includes:
[0121] The receiving module is used to receive the primary connection channel update request sent by the device to be projected via the Bluetooth connection, wherein the primary connection channel update request carries the updated primary connection channel;
[0122] The update module is used to update the primary connection channel of the device to be projected to the updated primary connection channel.
[0123] In some implementations, the first determining submodule includes:
[0124] The second determining unit is used to determine the target mapping channel, which includes the primary connection channel, from a plurality of candidate mapping channels in the channel configuration table;
[0125] The third determining unit determines the connection channels other than the primary connection channel among the multiple connection channels corresponding to the target mapping channel as candidate connection channels, thereby obtaining multiple candidate connection channels.
[0126] As described above, this embodiment of the application obtains the primary connection channel of the device to be projected into the storage via the acquisition module 301; the determination module 302 determines whether a connection can be established with the device to be projected into the storage via the primary connection channel within a first preset time period, obtaining a first determination result; and the establishment module 303 establishes a connection with the device to be projected into the storage based on the first determination result. Thus, by prioritizing the scanning of the primary connection channel of the device to be projected into the storage during channel scanning, blind multi-channel scanning is avoided, thereby shortening the connection establishment time between the device to be projected into the storage and improving the user experience.
[0127] Accordingly, this application also provides a screen mirroring device, which can be used to connect a computer device and a device to be mirrored. The computer device can be a terminal or a server, and the terminal can be a smartphone, tablet, laptop, touch screen, game console, personal computer (PC), personal digital assistant (PDA), or other terminal device. The device to be mirrored can be a monitor, projector, or other display device. Figure 3 As shown, Figure 3This is a schematic diagram of the structure of a screen projector provided in an embodiment of this application. The screen projector 2000 includes a processor 401 with one or more processing cores, a memory 402 with one or more computer-readable storage media, and a computer program stored on the memory 402 and executable on the processor. The processor 401 and the memory 402 are electrically connected. Those skilled in the art will understand that the computer device structure shown in the figure does not constitute a limitation on the computer device, and may include more or fewer components than shown, or combine certain components, or have different component arrangements.
[0128] The processor 401 is the control center of the screen projector 2000. It connects various parts of the screen projector 2000 through various interfaces and lines. By running or loading software programs and / or modules stored in the memory 402, and calling data stored in the memory 402, it executes various functions of the screen projector 2000 and processes data, thereby performing overall monitoring of the screen projector 2000.
[0129] In this embodiment, the processor 401 in the screen mirroring device 2000 loads the instructions corresponding to the processes of one or more applications into the memory 402 according to the following steps, and the processor 401 runs the applications stored in the memory 402 to achieve various functions:
[0130] Obtain the primary connection channel of the device to be projected; determine whether a connection can be established with the device to be projected based on the primary connection channel within a first preset time period, and obtain a first determination result; establish a connection with the device to be projected based on the first determination result.
[0131] In some implementations, the step of establishing a connection with the device to be projected based on the first determination result includes:
[0132] If the first determination result indicates that no connection has been established with the device to be projected based on the primary connection channel within the first preset time period, then the stored channel configuration table of the device to be projected is obtained.
[0133] Based on the channel configuration table and the primary connection channel, multiple candidate connection channels are determined;
[0134] Determine whether a connection can be established with the device to be projected within a second preset time period based on any one of the multiple candidate connection channels, and obtain a second determination result;
[0135] Based on the second determination result, a connection is established with the device to be projected.
[0136] In some implementations, the step of establishing a connection with the device to be projected based on the second determination result includes:
[0137] If the second determination result indicates that no connection has been established with the device to be projected within the second preset time period based on any of the multiple candidate connection channels, then it is sequentially determined whether any of the multiple other connection channels can establish a connection with the device to be projected.
[0138] When there is another connection channel among the multiple other connection channels that can establish a connection with the device to be projected, a connection is established with the device to be projected.
[0139] In some implementations, the step of establishing a connection with the device to be projected includes:
[0140] Determine whether an Internet Protocol address sent by the device to be projected can be received within a specified time period;
[0141] If an Internet Protocol address is received from the device to be projected within a specified time period, a connection is established with the device to be projected based on the Internet Protocol address.
[0142] In some implementations, before the step of determining whether an Internet Protocol address sent by the device to be projected can be received within a specified time period, the method further includes:
[0143] Obtain the stored Bluetooth address of the device to be projected;
[0144] A Bluetooth connection is established with the device to be projected based on the Bluetooth address;
[0145] The method further includes:
[0146] If no Internet Protocol address is received from the device to be projected within the specified time period, an Internet Protocol address request is sent to the device to be projected via the Bluetooth connection, triggering the device to be projected to respond with an Internet Protocol address request via the Bluetooth connection upon receiving the Internet Protocol address request.
[0147] Based on the feedback Internet Protocol address, a connection is established with the device to be projected.
[0148] In some implementations, after the step of establishing a connection with the device to be projected based on the feedback Internet Protocol address, the method further includes:
[0149] Receive the primary connection channel update request sent by the device to be projected via the Bluetooth connection, wherein the primary connection channel update request carries the updated primary connection channel;
[0150] Update the primary connection channel of the device to be projected to the updated primary connection channel.
[0151] In some implementations, the step of determining multiple candidate connection channels based on the channel configuration table and the primary connection channel includes:
[0152] The target mapping channel, including the primary connection channel, is determined from a plurality of candidate mapping channels in the channel configuration table;
[0153] The connection channels other than the primary connection channel among the multiple connection channels corresponding to the target mapping channel are determined as candidate connection channels, thus obtaining multiple candidate connection channels.
[0154] For details on the implementation of each of the above operations, please refer to the previous examples, which will not be repeated here.
[0155] Optional, such as Figure 3 As shown, the screen projector 2000 also includes: a Bluetooth module 403, an RF circuit 404, a direct connection module 405, and a power supply 406. The processor 401 is electrically connected to the Bluetooth module 403, the RF circuit 404, the direct connection module 405, and the power supply 406. Those skilled in the art will understand that... Figure 3 The projection device structure shown does not constitute a limitation on the projection device and may include more or fewer components than shown, or combine certain components, or have different component arrangements.
[0156] Bluetooth module 403 is used to establish a Bluetooth connection with the device to be projected using the Bluetooth address of the device stored in the projector. Direct connection module 405 includes a USB interface and / or a Type-C interface configured for the projector to directly connect to a computer device or the device to be projected.
[0157] The radio frequency circuit 404 can be used to transmit and receive radio frequency signals to establish wireless communication with network devices or other computer devices, and to transmit and receive signals with network devices or other computer devices.
[0158] Power supply 406 supplies power to the various components of the projection device 2000. Optionally, power supply 407 can be logically connected to processor 401 through a power management system, thereby enabling functions such as charging, discharging, and power consumption management through the power management system. Power supply 407 may also include one or more DC or AC power supplies, recharging systems, power fault detection circuits, power converters or inverters, power status indicators, and other arbitrary components.
[0159] although Figure 3 As not shown in the diagram, the screen projector 2000 may also include a camera, sensors, wireless fidelity modules, etc., which will not be described in detail here.
[0160] In the above embodiments, the descriptions of each embodiment have different focuses. For parts not described in detail in a certain embodiment, please refer to the relevant descriptions in other embodiments.
[0161] As can be seen from the above, the screen projector provided in this embodiment obtains the primary connection channel of the device to be projected into the storage; determines whether a connection can be established with the device to be projected into the storage based on the primary connection channel within a first preset time period, and obtains a first determination result; based on the first determination result, a connection is established with the device to be projected into the storage. Thus, by prioritizing the scanning of the primary connection channel of the device to be projected into the storage during channel scanning, blind multi-channel scanning is avoided, thereby shortening the connection establishment time between the screen projector and the device to be projected into the storage, and improving the user experience.
[0162] Those skilled in the art will understand that all or part of the steps in the various methods of the above embodiments can be performed by instructions, or by instructions controlling related hardware. These instructions can be stored in a computer-readable storage medium and loaded and executed by a processor.
[0163] Therefore, embodiments of this application provide a computer-readable storage medium storing a plurality of computer programs that can be loaded by a processor to execute steps in any of the control methods provided in the embodiments of this application. For example, the computer program can execute the following steps:
[0164] Obtain the primary connection channel of the device to be projected; determine whether a connection can be established with the device to be projected based on the primary connection channel within a first preset time period, and obtain a first determination result; establish a connection with the device to be projected based on the first determination result.
[0165] For details on the implementation of each of the above operations, please refer to the previous examples, which will not be repeated here.
[0166] The storage medium may include: read-only memory (ROM), random access memory (RAM), disk or optical disk, etc.
[0167] Since the computer program stored in the storage medium can execute the steps in any of the screen projection methods provided in the embodiments of this application, the beneficial effects that any of the screen projection methods provided in the embodiments of this application can achieve can be realized. For details, please refer to the previous embodiments, which will not be repeated here.
[0168] The foregoing has provided a detailed description of a screen projection method, apparatus, computer-readable storage medium, and screen projector provided in the embodiments of this application. Specific examples have been used to illustrate the principles and implementation methods of this application. The descriptions of the above embodiments are only for the purpose of helping to understand the method and core ideas of this application. At the same time, for those skilled in the art, there will be changes in the specific implementation methods and application scope based on the ideas of this application. Therefore, the content of this specification should not be construed as a limitation of this application.
Claims
1. A screen projection method, characterized in that, Screen mirroring devices used for connection to computer equipment include: Obtain the primary connection channel of the stored device to be projected; Determine whether a connection can be established with the device to be projected within a first preset time period based on the primary connection channel, and obtain a first determination result; Based on the first determination result, establish a connection with the device to be projected onto the screen; The step of establishing a connection with the device to be projected based on the first determination result includes: if the first determination result indicates that a connection has not been established with the device to be projected based on the primary connection channel within a first preset time period, then obtaining a stored channel configuration table of the device to be projected; determining multiple candidate connection channels based on the channel configuration table and the primary connection channel; determining whether a connection can be established with the device to be projected based on any of the multiple candidate connection channels within a second preset time period, obtaining a second determination result; and establishing a connection with the device to be projected based on the second determination result. The step of determining multiple candidate connection channels based on the channel configuration table and the primary connection channel includes: determining a target mapping channel, which includes the primary connection channel, from multiple candidate mapping channels in the channel configuration table, wherein the channel configuration table includes multiple mapping channels and multiple connection channels corresponding to each of the multiple mapping channels, and the mapping channels are used to indicate the channel numbers of the corresponding multiple connection channels; determining the connection channels other than the primary connection channel among the multiple connection channels corresponding to the target mapping channel as candidate connection channels, thereby obtaining multiple candidate connection channels.
2. The screen projection method according to claim 1, characterized in that, The step of establishing a connection with the device to be projected based on the second determination result includes: If the second determination result indicates that no connection has been established with the device to be projected within the second preset time period based on any of the multiple candidate connection channels, then it is sequentially determined whether any of the multiple other connection channels can establish a connection with the device to be projected. When there is another connection channel among the multiple other connection channels that can establish a connection with the device to be projected, a connection is established with the device to be projected.
3. The screen projection method according to any one of claims 1 to 2, characterized in that, The step of establishing a connection with the device to be projected includes: Determine whether an Internet Protocol address sent by the device to be projected can be received within a specified time period; If an Internet Protocol address is received from the device to be projected within a specified time period, a connection is established with the device to be projected based on the Internet Protocol address.
4. The screen projection method according to claim 3, characterized in that, Before the step of determining whether an Internet Protocol address sent by the device to be projected can be received within a specified time period, the method further includes: Obtain the stored Bluetooth address of the device to be projected; A Bluetooth connection is established with the device to be projected based on the Bluetooth address; The method further includes: If no Internet Protocol address is received from the device to be projected within the specified time period, an Internet Protocol address request is sent to the device to be projected via the Bluetooth connection, triggering the device to be projected to respond with an Internet Protocol address request via the Bluetooth connection upon receiving the Internet Protocol address request. Based on the feedback Internet Protocol address, a connection is established with the device to be projected.
5. The screen projection method according to claim 4, characterized in that, After the step of establishing a connection with the device to be projected based on the feedback Internet Protocol address, the method further includes: Receive the primary connection channel update request sent by the device to be projected via the Bluetooth connection, wherein the primary connection channel update request carries the updated primary connection channel; Update the primary connection channel of the device to be projected to the updated primary connection channel.
6. A screen projection device, characterized in that, Screen mirroring devices used for connection to computer equipment include: The acquisition module is used to acquire the primary connection channel of the stored device to be projected. The determination module is used to determine whether a connection can be established with the device to be projected on the screen based on the primary connection channel within a first preset time period, and to obtain a first determination result; A connection establishment module is used to establish a connection with the device to be projected based on the first determination result; The step of establishing a connection with the device to be projected based on the first determination result includes: if the first determination result indicates that no connection has been established with the device to be projected based on the primary connection channel within a first preset time period, then obtaining a stored channel configuration table of the device to be projected; determining multiple candidate connection channels based on the channel configuration table and the primary connection channel; determining whether a connection can be established with the device to be projected based on any of the multiple candidate connection channels within a second preset time period, obtaining a second determination result; and establishing a connection with the device to be projected based on the second determination result. The step of establishing a module to determine multiple candidate connection channels based on the channel configuration table and the primary connection channel includes: determining a target mapping channel, which includes the primary connection channel, from multiple candidate mapping channels in the channel configuration table, wherein the channel configuration table includes multiple mapping channels and multiple connection channels corresponding to each of the multiple mapping channels, and the mapping channels are used to indicate the channel numbers of the corresponding multiple connection channels; and determining the connection channels other than the primary connection channel among the multiple connection channels corresponding to the target mapping channel as candidate connection channels to obtain multiple candidate connection channels.
7. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a plurality of instructions adapted for loading by a processor to perform the steps of the screen projection method according to any one of claims 1 to 5.
8. A screen projector, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the program, it implements the steps in the screen projection method as described in any one of claims 1 to 5.
Citation Information
Patent Citations
WiFi single-channel scanning method and device, terminal equipment and storage medium
CN113518408A
Data transmission method, device and equipment and computer readable storage medium
CN116419196A