Screen mirroring connection method and device, storage medium, and terminal
By using ultrasonic audio signals and data frame slow-in and slow-out technology in the screen casting connection, the problem of miscasting and low efficiency caused by users manually inputting the screen casting code is solved, and a more efficient and accurate screen casting connection is achieved. .
Patent Information
- Application Number
- PCT/CN2024/082245
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- Priority Date
- 2023-03-30
- Filing Date
- 2024-03-18
- Publication Date
- 2024-10-03
AI Technical Summary
In the existing screen casting connection method, users need to manually enter the screen casting code, which can easily lead to input errors and low screen transmission efficiency.
The first terminal modulates the screen projection code, generates an audio signal and broadcasts it in the form of ultrasound. The second terminal receives and demodulates the screen projection code to establish a screen projection connection to avoid mistaken screen projection. This is achieved through the synchronization bits and stop bits of the data frame. Ease in and out of the audio signal, smooth the frequency mutation, and extend the continuous transmission time of the audio signal to improve reception accuracy.
It improves the accuracy and efficiency of screen projection connection, avoids miscast screen, enhances transmission distance and reduces audible noise, and solves the problem of short ultrasonic broadcast receiving distance.
Smart Images

Figure CN2024082245_03102024_PF_FP_ABST
Abstract
Description
Screen projection connection method, device, storage medium and terminal
[0001] This application claims priority to Chinese patent application No. 2023103351757, filed on March 30, 2023, entitled “Screen projection connection method, device, storage medium and terminal”, the entire contents of which are incorporated by reference into this application. Technical Field
[0002] The present application relates to the field of screen projection control technology, and in particular to a screen projection connection method, device, storage medium and terminal. Background Art
[0003] Nowadays, screen projection technology has greatly facilitated people's work and daily life needs. For example, after establishing a screen projection connection between a mobile device (such as a laptop, mobile phone, tablet, etc.) and another device (such as a projector, conference tablet, TV, etc.), the content on the mobile device can be displayed on the other device simultaneously.
[0004] Summary of the Invention
[0005] The present application provides a screen projection connection method, device, storage medium and terminal, which can at least improve the efficiency of device screen projection.
[0006] Other features and advantages of the present application will become apparent from the following detailed description, or may be learned in part by practice of the present application.
[0007] In the first aspect, a screen projection connection method is provided, which is applied to a first terminal, and includes: receiving a request message sent by a second terminal, and determining a data frame corresponding to a screen projection code, and determining the frequency of parameters in the above data frame; determining a first audio signal corresponding to the above data frame according to the frequency of the above parameters; determining a continuous transmission duration of a frequency point in the above first audio signal, wherein the above continuous transmission duration is determined according to the spectrum analysis duration of the above second terminal and the length of the maximum reflection path in the space where the above first terminal is located; determining a second audio signal according to the continuous transmission duration of the frequency point in the above first audio signal; broadcasting the above second audio signal in the form of ultrasound, so that the above second terminal receives the above second audio signal, and demodulating the above second audio signal to obtain the above screen projection code, and enabling the above second terminal to establish a screen projection connection with the above first terminal according to the above screen projection code.
[0008] The second aspect provides a screen projection connection method, which is applied to a second terminal and includes: sending a request message to the first terminal so that the first terminal determines the data frame corresponding to the screen projection code and determines the frequency of the parameters in the data frame; and, the first terminal determines the first audio signal corresponding to the data frame based on the frequency of the parameters; and, the first terminal determines the continuous sending duration of the frequency point in the first audio signal, wherein the continuous sending duration is determined based on the spectrum analysis duration of the second terminal and the length of the maximum reflection path in the space where the first terminal is located; and, the first terminal determines the second audio signal based on the continuous sending duration of the frequency point in the first audio signal, and broadcasts the second audio signal in the form of ultrasound; receives the second audio signal sent by the first terminal, and obtains the screen projection code based on the second audio signal; and establishes a screen projection connection with the first terminal based on the screen projection code.
[0009] According to the third aspect, a screen projection connection device is provided, which is configured at a first terminal and includes: a determination module, which is used to: receive the request information sent by the second terminal, and determine the data frame corresponding to the screen projection code, and determine the frequency of the parameters in the above data frame; determine the first audio signal corresponding to the above data frame according to the frequency of the parameters in the above data frame; determine the continuous transmission duration of the frequency point in the above first audio signal, wherein the above continuous transmission duration is determined according to the spectrum analysis duration of the above second terminal and the length of the maximum reflection path in the space where the above first terminal is located; determine the second audio signal according to the continuous transmission duration of the frequency point in the above first audio signal; a first sending module, which is used to: broadcast the above second audio signal in the form of ultrasound, so that the above second terminal receives the above second audio signal, and demodulates the above second audio signal to obtain the above screen projection code, and enables the above second terminal to establish a screen projection connection with the above first terminal according to the above screen projection code.
[0010] In a fourth aspect, a screen projection connection device is provided, which is configured at a second terminal and includes: a second sending module, used to: send a request message to the first terminal, so that the first terminal determines the data frame corresponding to the screen projection code, and determines the frequency of the parameters in the data frame; and, enables the first terminal to determine the first audio signal corresponding to the data frame according to the frequency of the parameters; and, enables the first terminal to determine the continuous sending duration of the frequency point in the first audio signal, wherein the continuous sending duration is determined according to the spectrum analysis duration of the second terminal and the length of the maximum reflection path in the space where the first terminal is located; and, enables the first terminal to determine the second audio signal according to the continuous sending duration of the frequency point in the first audio signal, and broadcast the second audio signal in the form of ultrasound; a receiving module, used to: receive the second audio signal sent by the first terminal, and demodulate the second audio signal to obtain the screen projection code; a connection module, used to: establish a screen projection connection with the first terminal according to the screen projection code.
[0011] In the fifth aspect, a terminal is provided, comprising a memory, a processor, and a computer program stored in the memory and runnable on the processor. When the processor executes the computer program, the terminal executes the screen projection connection method described in the first aspect, and executes the screen projection connection method described in the second aspect.
[0012] In the sixth aspect, a computer-readable storage medium is provided, on which a computer program is stored. When the above computer program is executed by a processor, it implements the screen projection connection method described in the first aspect, as well as the screen projection connection method described in the second aspect. BRIEF DESCRIPTION OF THE DRAWINGS
[0013] The accompanying drawings are incorporated into and constitute a part of the specification, illustrate embodiments consistent with the present application, and together with the specification, are used to explain the principles of the present application. Obviously, the drawings described below are only some embodiments of the present application, and those skilled in the art can derive other drawings based on these drawings without inventive effort.
[0014] FIG1 is an interactive diagram of an example screen projection connection method provided by this application;
[0015] FIG2 is a schematic diagram of an example of audio signal transmission in space provided by the present application;
[0016] FIG3 is a schematic diagram of an example of signal aliasing provided by the present application;
[0017] FIG4 is a time domain diagram of an example of a first audio signal provided by the present application;
[0018] FIG5a to FIG5c are schematic diagrams of an example of smoothing a first audio signal provided by the present application;
[0019] FIG6 is a time-frequency diagram of an example of a second audio signal provided by the present application;
[0020] FIG7 is a flowchart of an example of demodulating a second audio signal provided by the present application;
[0021] FIG8 is a schematic diagram of an example of a third audio signal provided by the present application;
[0022] FIG9 is a flowchart of an example of determining a data value corresponding to a frequency point in a second audio signal provided by the present application;
[0023] FIG10 is a structural diagram of an example of a screen projection connection device provided by the present application;
[0024] FIG11 is a structural diagram of another example of a screen projection connection device provided by the present application;
[0025] FIG12 is a structural diagram of another example of a screen projection connection device provided by the present application;
[0026] FIG13 is a block diagram of an example terminal provided in this application. DETAILED DESCRIPTION
[0027] In order to make the objectives, technical solutions and advantages of this application clearer, the embodiments of this application will be further described in detail below with reference to the accompanying drawings.
[0028] When the following description refers to the accompanying drawings, unless otherwise indicated, the same numbers in different drawings represent the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present application. Instead, they are merely examples of devices and methods consistent with certain aspects of the present application, as detailed in the appended claims.
[0029] In the description of this application, it should be understood that the terms "first", "second", etc. are used for descriptive purposes only and should not be understood as indicating or implying relative importance. For those of ordinary skill in the art, the specific meanings of the above terms in this application can be understood according to specific circumstances. In addition, in the description of this application, unless otherwise specified, "multiple" refers to two or more. "And / or" describes the association relationship of associated objects, indicating that three relationships may exist. For example, A and / or B can represent: A exists alone, A and B exist at the same time, and B exists alone. The character " / " generally indicates that the previous and subsequent associated objects are in an "or" relationship.
[0030] When projecting the display content of a mobile device (hereinafter referred to as the "second terminal") to another device (hereinafter referred to as the "first terminal"), it is possible that multiple second terminals in the same local area network will simultaneously project the content. In this case, the first terminal will receive multiple projection requests, which may cause the wrong projection.
[0031] For example, assume that the second terminal A, the second terminal B, the first terminal A, and the first terminal B are networked devices in the same local area network. User A needs to project the content of the second terminal A to the first terminal A, and sends a projection connection request through the second terminal A; user B needs to project the content of the second terminal B to the first terminal B, and sends a projection connection request through the second terminal B. If the projection connection request first received by the first terminal A is sent by the second terminal B, the first terminal A will establish a projection connection with the second terminal B and display the content of the second terminal B instead of the content of the second terminal A, thus causing an erroneous projection.
[0032] To avoid the above situation, when the first terminal establishes a screen projection connection with the second terminal, a verification operation needs to be performed on the second terminal. In the relevant technology, the usual solution is that the user manually enters the screen projection code (or screen transmission code, etc.) of the first terminal on the second terminal.
[0033] For example, after the second terminal A and the second terminal B send a screen projection request, user A enters the screen projection code of the first terminal A on the second terminal A, and user B enters the screen projection code of the first terminal B on the second terminal B, so that the second terminal A / second terminal B can establish a screen projection connection with the corresponding first terminal, avoiding the occurrence of accidental projection. However, the operation of manually entering the screen projection code in the second terminal is prone to input errors and will reduce the efficiency of screen transmission.
[0034] This application proposes a screen projection connection method, device, storage medium and terminal, which can solve the problem of low screen transmission efficiency in related technologies.
[0035] Below, the various steps of the screen projection connection method in this example implementation will be described in more detail with reference to the accompanying drawings and examples.
[0036] Figure 1 is an interactive diagram of an example screen projection connection method provided in this application.
[0037] In an exemplary embodiment, as shown in FIG1 , the first terminal 10 may be a terminal device capable of projection, such as a projector, a conference tablet, or a television; the second terminal 11 may be a terminal device capable of projection, such as a laptop, a mobile phone, or a tablet.
[0038] The main idea of the screen projection connection method provided in this application is: the first terminal 10 modulates the screen projection code to obtain an audio signal, and broadcasts the audio signal in the form of ultrasound. After the second terminal 11 receives the audio signal, it demodulates it to obtain the corresponding screen projection code. Thus, the second terminal 11 establishes a screen projection connection with the first terminal 10 based on the demodulated screen projection code.
[0039] Among them, the reason for transmitting the screen projection code in the form of an audio signal is that the audio signal has poor wall penetration. For example, in a general conference room scene, even if tempered glass is used as a partition, the audio signal cannot penetrate. As a result, the audio signal emitted by the first terminal 10 will not be mistakenly received by the second terminal 11 in other rooms (for example, the next door conference room) like a Bluetooth signal, thereby improving the accuracy of the screen projection.
[0040] In addition, the main reason for using the ultrasonic frequency band (the frequency in actual use is above 18.5kHz) is that the higher the frequency of the audio signal, the weaker the wall penetration performance; at the same time, the actual audible frequency of the human ear is generally lower than 18.5kHz, so using the ultrasonic frequency band can also avoid the impact of noise on the human ear.
[0041] The following is a detailed introduction to the process of establishing the above-mentioned screen projection connection.
[0042] Exemplarily, continuing to refer to Figure 1, the first terminal 10 and the second terminal 11 are devices in the same local area network, and / or a Bluetooth communication connection is established between the first terminal 10 and the second terminal 11. When implementing the screen projection connection between the second terminal 11 and the first terminal 10, the second terminal 11 first sends a request message to the first terminal 10 via Bluetooth or wireless communication technology (Wi-Fi), thereby requesting a screen projection code from the first terminal 10, that is, the second terminal 11 executes S110: sending a request message.
[0043] The second terminal 11 sending the request information to the first terminal 10 may include: the second terminal 11 sending a beacon frame corresponding to the request information to the first terminal 10. The beacon frame is a periodic frame that sends a beacon signal to the outside world at regular intervals to announce the existence of its own wireless network.
[0044] For example, referring to Figure 1, after the first terminal 10 receives the beacon frame corresponding to the above request information via Bluetooth or Wi-Fi, it modulates the screen projection code. The screen projection code can be randomly generated by the first terminal 10 or manually set in advance. This application does not limit the method for determining the screen projection code.
[0045] The following is a detailed introduction to the process of the first terminal 10 modulating the projection code.
[0046] In an exemplary embodiment, continuing to refer to Figure 1, the first terminal 10 executes S120: receiving the request information, and determining the data frame corresponding to the projection code and the frequency of the parameters in the data frame, and S130: determining the first audio signal corresponding to the data frame according to the frequency of the parameters.
[0047] First, the first terminal 10 determines the data frame corresponding to the screen projection code:
[0048] For example, the projection code may be modulated using a multiple frequency-shift keying (MFSK) method, where MFSK is a modulation method that can represent a variety of digital information using multiple different carrier frequencies.
[0049] For example, the projection code may be modulated using decimal frequency shift keying: assuming that the projection code of the first terminal 10 is "MA27ZX", the data frame corresponding to the projection code is shown in Table 1:
[0050] Table 1
[0051] Referring to Table 1, the method of converting the projection code into a decimal number can be implemented using the American Standard Code for Information Interchange (ASCII). As shown in Table 1, each bit in the decimal ASCII corresponding to the projection code is the data value in the sign bit. For example, the decimal ASCII corresponding to "M" is "77", where "7" and "7" are the two data values in the sign bit; the decimal ASCII corresponding to "2" is "50", where "5" and "0" are the two data values in the sign bit.
[0052] The checksum is a cumulative checksum, which takes the last two digits of the sum of the ASCII codes corresponding to the projection code. For example, in Table 1, the sum of the ASCII codes for "MA27ZX" is 77+65+50+55+90+88=425. Taking the last two digits of 425 yields a checksum of "25," where "2" and "5" are the two data values in the checksum.
[0053] Among them, the check bit can be used by the second terminal 11 to check the projection code: the second terminal 11 uses the check bit in the received data frame to determine whether the data value in the sign bit is correct, so that when erroneous data is received, the data frame is discarded and received again.
[0054] The synchronization bit "start" is used to identify the starting position of the data frame, and the stop bit "stop" is used to identify the ending position of the data frame.
[0055] Afterwards, the first terminal 10 determines the frequency of the parameter in the data frame:
[0056] Exemplarily, the first terminal 10 uses parameters in the data frame (the parameters include the synchronization bit, the data value in the sign bit, the check value in the check bit, and the stop bit) as frequency points, and maps the frequencies of the frequency points.
[0057] According to the Nyquist sampling theorem, audio frequencies should not exceed 22kHz, while the human ear's audible range is generally below 18.5kHz. Therefore, the frequency range used by MSFK should be within the range of [18.5kHz, 22kHz].
[0058] For example, for the synchronization bit "start", the frequency of the corresponding frequency point can be taken as: start_freq=18502 Hz; for the stop bit "stop", the frequency of the corresponding frequency point can be taken as: stop_freq=20660 Hz.
[0059] Considering that the time for the first terminal 10 to transmit the first audio signal is as short as possible, and combining the actual accuracy requirements of the short-time Fourier transform (STFT), the time length T for the second terminal 11 to slice the audio signal and perform spectrum analysis can be set to 6ms.
[0060] It should be noted that the above-mentioned sampling duration values of the second terminal 11 are only examples and are not limited in this embodiment. The sampling duration is also related to the computing power of the central processing unit (CPU) in the second terminal 11. The higher the computing power of the CPU, the shorter the sampling duration is.
[0061] Assuming the sampling rate of the second terminal 11 is 48 kHz, 6 ms contains 48 kHz * 0.006 s = 288 frequency points. Therefore, the frequency resolution of the STFT is F = 48 kHz / 288 = 166.66666666667 Hz. Therefore, when the first terminal 10 maps the frequency points to the corresponding frequencies, an integer multiple of the STFT frequency resolution F can be selected, that is, the frequency Freq = N * F.
[0062] The frequency mapped by the frequency point is an integer multiple of the STFT resolution, which can improve the reception accuracy of the second terminal 11 and increase the transmission distance of the audio signal.
[0063] For example, the frequencies corresponding to the data values 0 to 9 in the sign bit may be mapped to: data_freq=[19000, 19166, 19332, 19498, 19664, 19830, 19996, 20162, 20328, 20494].
[0064] Next, after determining the frequency of the frequency point corresponding to the above parameters, the first terminal 10 may convert the data frame into the corresponding first audio signal through MSFK.
[0065] In the exemplary embodiment, reference is continued to be made to Fig. 1. Next, the first terminal 10 performs S140: determining a continuous transmission time of a frequency point in the first audio signal.
[0066] In an exemplary embodiment, there is a problem when using the ultrasonic frequency band to broadcast the audio signal: the transmission distance of ultrasonic waves is short and it is difficult to exceed the transmission distance of 3 meters.
[0067] Refer to the schematic diagram of audio signal transmission in space shown in FIG2 , and the schematic diagram of signal aliasing shown in FIG3 .
[0068] As shown in Figure 2, after the first terminal 10 broadcasts the audio signal, part of the audio signal that does not encounter obstacles in the space (for example, walls) is received by the second terminal 11 as a direct signal, while part of the audio signal will be reflected and delayed due to encountering obstacles, and thus be received by the second terminal 11 as a reflected signal (or delayed signal).
[0069] As shown in Figure 3, the main reason for the short transmission distance of ultrasound is the multipath effect similar to that in wireless transmission: since the speed of sound waves is relatively low, only 340m / s, as long as the reflection path of the reflected signal is 1m longer than the direct path of the direct signal, the reflected signal will be delayed by 3ms to reach the second terminal 11 and superimposed on the direct signal, resulting in signal aliasing.
[0070] Therefore, for common transmission spaces (e.g., conference rooms, classrooms, living rooms, etc.), it is necessary to evaluate their maximum delay distance (i.e., maximum reflection path). Through engineering testing, this application sets the maximum delay distance d to 14m. Therefore, the maximum delay time is 14m*3ms=42ms. That is, when the difference between the reflection path and the direct path is no more than 14m, the transmission time of the frequency point in the first audio signal is extended by 42ms (or, the sampling delay of the second terminal 11 is 42ms), which can avoid the impact of aliasing of the reflected signal.
[0071] Assume that the transmission space of the audio signal is a conference room with a length of 10m, a width of 4m and a height of 3.5m. Since the intensity attenuation of the audio signal is inversely proportional to the square of the transmission distance, even at the maximum direct distance r 直达 = 10m, compared with the direct signal, the attenuation of the reflected signal is: That is, when the transmission distance is the largest, the difference in signal strength between the reflected signal and the direct signal is also relatively large. In this way, the second terminal 11 can easily distinguish the reflected signal from the direct signal.
[0072] The sampling duration of the second terminal 11 can be set according to the frequency resolution, bandwidth, data frame length, etc. of the short-time Fourier transform, for example, the sampling duration is set to 6ms. The numerical value of the sampling duration is not limited in this embodiment.
[0073] In addition, to prevent position deviation of the second terminal 11 when sampling the received audio signal, the hold time of the frequency point in the first audio signal can be set to 6ms. The hold time can be determined based on the actual engineering debugging value, and the value of the hold time is not limited in this embodiment.
[0074] In summary, when the first terminal 10 transmits the first audio signal, the continuous transmission duration of each frequency point can be: maximum delay time + sampling duration + hold time = 42 + 6 + 6 = 54 ms. In other words, different parameters in the data frame correspond to different signal segments, the duration of each signal segment is the continuous transmission duration, and each signal segment includes at least one frequency point. For example, after modulating the data value "7" in the sign bit, a signal segment with a duration of 54 ms is obtained, where the frequency point has a frequency of 20162 Hz.
[0075] It should be noted that the above-mentioned values for the duration of continuous transmission of each frequency point are only examples. The duration of continuous transmission obtained by different sampling durations and holding times may also be different. The selection of the maximum delay time can also be carried out according to engineering measurements in actual space. In this embodiment, the value of the duration of continuous transmission is not limited.
[0076] 1 , after determining the continuous transmission time, the second audio signal can be determined according to the continuous transmission time. That is, the first terminal 10 executes S150: determining the second audio signal according to the continuous transmission time of the frequency point in the first audio signal.
[0077] In an exemplary embodiment, there is another problem when broadcasting audio signals using the ultrasonic frequency band: increasing the transmission power of the first terminal 10 (ie, increasing the volume of the first audio signal transmitted by the first terminal 10 ) may generate severe audible noise.
[0078] There are two main reasons why severe audible noise occurs when the first terminal 10 performs ultrasonic broadcasting: first, when stopping the broadcast and starting the broadcast of the first audio signal, a sudden change in the sound may cause the generation of low-frequency sound components; second, when modulating different parameters in the data frame, frequency inconsistency may occur, resulting in a sudden change in frequency.
[0079] Refer to the time domain diagram of the first audio signal shown in FIG4 .
[0080] As shown in Figure 4, to address the first issue, ease-in and ease-out sections are added to the data frame header and footer, respectively, so that the intensity of the first audio signal gradually increases at the start and decreases at the end. The sync bit and stop bit in the data frame implement the ease-in and ease-out functions, respectively.
[0081] 5a to 5c are schematic diagrams of smoothing the first audio signal, wherein the horizontal axis represents time t in ms, and the vertical axis represents amplitude in decibels (db).
[0082] As shown in Figure 5a, suppose a frequency mutation occurs when modulating the two adjacent data values "5" and "0" in the data frame. The frequency point causing the frequency mutation is the frequency point corresponding to "0." As shown in Figure 5b, after zooming in on this frequency mutation point, it can be clearly seen that the amplitude of this frequency point has a large difference compared to the amplitudes of adjacent frequency points.
[0083] Therefore, to solve the second problem, it is necessary to process the frequency points that cause frequency mutations in the first audio signal. As shown in FIG5c , the frequency points that cause frequency mutations can be smoothed by using a bandpass filter or other method to avoid severe frequency mutations.
[0084] In addition, the first audio signal is sent in a continuous mode (ie, non-discontinuous mode), that is, the continuity of the first audio signal is maintained in the sampling delay region, thereby avoiding the generation of noise caused by the discontinuity of the first audio signal.
[0085] For example, in addition to determining the continuous transmission time of the frequency point, the first audio signal can also be smoothed and transmitted in a continuous mode. The resulting time-frequency diagram of the second audio signal is shown in Figure 6. The horizontal axis represents time t in milliseconds, and the vertical axis represents frequency in Hz (the frequencies in the figure are in reverse order).
[0086] As shown in Figure 6, different frequency bands correspond to different parameters in the data frame. For example, frequency band A corresponds to the synchronization bit "start" (frequency is 18502 Hz), frequency band B corresponds to the data value "7" in the sign bit (frequency is 20162 Hz), and frequency band C corresponds to the data value "6" in the sign bit (frequency is 19996 Hz). Each parameter is sent continuously for 54 ms.
[0087] Through the above solution, the transmission distance of the final second audio signal can break the limit of 3m, and even when the transmission power of the first terminal 10 reaches the maximum value, the audible noise when sending the second audio signal will be very weak.
[0088] In the exemplary embodiment, referring to Figure 1 , after determining the second audio signal, the first terminal 10 performs S160 : broadcasting the second audio signal in the form of ultrasound.
[0089] In an exemplary embodiment, after receiving the second audio signal broadcast by the first terminal 10, the second terminal 11 demodulates the signal to obtain a screen casting code. Specifically, the second terminal 11 executes step S170: demodulating the second audio signal to obtain a screen casting code. The following describes in detail the process of demodulating the second audio signal by the second terminal 11.
[0090] Refer to the flowchart of demodulating the second audio signal shown in FIG. 7 .
[0091] Exemplarily, as shown in FIG7 , the second terminal 11 first executes S701 : receiving a third audio signal, wherein the length of the third audio signal is greater than or equal to twice that of the second audio signal.
[0092] Refer to the schematic diagram of the third audio signal shown in Figure 8. As shown in Figure 8, assuming that the entire duration of the second audio signal is TS (i.e., from the synchronization bit "start" to the stop bit "stop"), then if the reception duration of the second terminal 11 is set to be greater than or equal to 2TS, then it can be ensured that the second terminal 11 receives the entire second audio signal.
[0093] For example, referring to Figure 7, after receiving the third audio signal, the second terminal 11 may traverse the third audio signal in steps with a preset duration, and detect whether the parameters corresponding to the frequency points contain synchronization bits.
[0094] The preset duration can be determined according to actual conditions, for example, the preset duration can be set to 1ms, etc. In this embodiment, the value of the preset duration is not limited. The parameters are the parameters in the above data frame.
[0095] Specifically, during each step detection, the second terminal 11 executes S702: converting the frequency points of the third audio signal within the preset duration to obtain parameters corresponding to the frequency points within the preset duration, and executes S730: determining whether a synchronization bit is present in the parameters. If no synchronization bit is present, the second terminal 11 continues to execute S702.
[0096] For example, assuming the preset duration is 1ms, a 1ms-long signal segment is taken from the start position of the third audio signal, and the frequency points in the signal segment are converted into corresponding parameters. It is then determined whether the parameters contain a synchronization bit. If the synchronization bit does not exist in the signal segment, the frequency points in the next 1ms-long signal segment are converted into corresponding parameters, and it is determined whether the parameters contain a synchronization bit. This process is repeated in this way until the first synchronization bit in the third audio signal is detected.
[0097] For example, referring to Figure 7, if the result of S703 is that a synchronization bit exists, the second terminal 11 executes S704: determining whether the next parameter adjacent to the synchronization bit is a sign bit. If not, the second terminal 11 continues to execute S702.
[0098] Specifically, after detecting the synchronization bit in the third audio signal, the second terminal 11 converts the next adjacent frequency point into a corresponding parameter and determines whether the parameter is any integer value from 0 to 9. If not, S702 is continued to be executed until the first sign bit in the third audio signal is detected.
[0099] For example, referring to Figure 7 , if the result of step S704 is a sign bit, the second audio signal can be directly determined from the third audio signal based on the length TS. That is, the second terminal 11 executes step S705 : starting with the synchronization bit, determining the second audio signal from the third audio signal.
[0100] For example, referring to Figure 7 , after obtaining the second audio signal, the synchronization bit is filtered out. Specifically, the second terminal 11 executes S706: filtering out the synchronization bit in the second audio signal. After filtering out the synchronization bit, the second terminal 11 executes S707: converting one or more data values included in the sign bit to obtain a projection code.
[0101] Afterwards, the second terminal 11 executes S708: converting the frequency points in the second audio signal to obtain check bits corresponding to the frequency points in the second audio signal.
[0102] Exemplarily, when executing S707 to S708, the second terminal 11 can convert the frequency points in the second audio signal in sequence, and determine whether the parameters obtained after the conversion are stop bits and check bits. If they are not stop bits or check bits, they are converted into corresponding characters according to ASCII. For example, the corresponding character obtained by decoding the data values "7" and "7" is "M".
[0103] As to why the corresponding character isn't determined based on a single data value, the reason is that the characters corresponding to ASCII values 0-9 are control characters with different functions. For example, the character corresponding to ASCII value 3 is ETX, which stands for End of Text and is used to mark the end of a header; the character corresponding to ASCII value 6 is ACK, which stands for Acknowledgement and is used in data communications. Therefore, the second terminal 11 can simply combine the two data values and perform decoding.
[0104] Exemplarily, if the obtained parameter is a stop bit, the second terminal 11 executes S709: determining whether the data value in the second audio signal is correct based on the check bit. If correct, execute S710: establishing a screen projection connection with the first terminal based on the screen projection code; if incorrect, continue to execute S701.
[0105] For example, if the data value received by the second terminal 11 is "7, 7, 6, 5, 5, 0, 5, 5, 9, 0, 8, 8", it can be judged that the data value is correct according to the check bit "25", then the second terminal 11 can establish a screen projection connection with the first terminal 10 according to the screen projection code "MA27ZX" obtained by decoding the data value; and if the data value received by the second terminal 11 is "7, 8, 6, 5, 5, 0, 5, 5, 9, 0, 8, 8", it can be judged that the data value is wrong according to the check bit "25", then the second terminal 11 receives the third audio signal again.
[0106] In an exemplary embodiment, due to some complex environments, the sampling delay added by the first terminal 10 may not completely avoid aliasing of the reflected signal. Therefore, the second terminal 11 can detect the frequency points in the second audio signal to determine whether the frequency points are reflected signals or direct signals, and filter the frequency points corresponding to the reflected signals, retaining the frequency points corresponding to the direct signals.
[0107] With reference to the flowchart of determining the data value corresponding to the frequency point of the second audio signal shown in FIG9 , the above determination process is described in detail below.
[0108] For example, the second terminal 11 receives the first frequency point (denoted as the first frequency point F n), convert it; next, the second terminal 11 receives the second frequency point (denoted as, the second frequency point F n+1 ). The second frequency point is a frequency point with the largest amplitude in the second audio signal.
[0109] As shown in FIG. 9 , the second terminal 11 first executes S901 : determining whether a first data value corresponding to a first frequency point and a second data value corresponding to a second frequency point in the second audio signal are the same.
[0110] Assume that the first frequency point F n The corresponding first data value is "7". If the first data value is different from the second data value (for example, the second data value is "6"), the second terminal 11 executes S906': determining that the second data value is the data value in the sign bit. In other words, if the first data value is different from the second data value, the second frequency point F is set to n+1 The corresponding second data value is saved as the real data value.
[0111] If the second frequency point F is obtained n+1 The corresponding second data value is still "7", so it is necessary to determine whether the second data value "7" is a direct signal or a reflected signal generated when the first data value is sent.
[0112] Therefore, if the first data value is the same as the second data value, the second terminal 11 executes S902: determining a third frequency point with the second largest amplitude in the second audio signal, and executes S903: determining a difference between the amplitude of the third frequency point and the amplitude of the second frequency point.
[0113] The second terminal 11 needs to determine the frequency point with the second largest amplitude in the second audio signal (denoted as the third frequency point F n+1_temp ), and calculate the third frequency point F n+1_temp Amplitude A n+1_temp With the second frequency F n+1 Amplitude A n+1 The difference between .
[0114] Next, the second terminal 11 executes S904: determining whether the difference is greater than a preset value. The preset value can be determined based on an engineering debugging value. For example, if the length of the audio signal transmission space is 10 meters, the preset value can be a value between [0dB, 7.6dB], for example, the preset value is 3dB.
[0115] It should be noted that if the preset value is too large, when the first terminal 10 sends continuous identical signals, the intensity difference between the direct signal and the reflected signal will not be obvious due to the direct signal being blocked, resulting in the direct signal being incorrectly filtered out.
[0116] If the difference is less than the preset value, the second terminal 11 executes S906'. If the difference is less than the preset value, it means that the second frequency point F n+1 The intensity of the second frequency F n+1 For direct signal, the second frequency F n+1 The corresponding second data value is saved as the real data value.
[0117] If the difference is greater than the preset value, the second terminal 11 executes S905: converts the third frequency point to obtain a third data value corresponding to the third frequency point, and executes S906: determines that the third data value is the data value in the sign bit.
[0118] If the difference is greater than the preset value, it means that the second frequency point F n+1 The intensity of the second frequency F is not strong enough, and it is likely to be a reflected signal. n+1 Filter out the third frequency F n+1_temp The corresponding third data value is saved as the real data value.
[0119] This application uses ultrasonic broadcast communication to establish a screen projection connection between the first terminal and the second terminal, which can improve the efficiency of screen projection. In addition, this application proposes that the first terminal should have a certain continuous transmission time when sending audio signals, thereby solving the problem of short reception distance in practical applications of ultrasonic broadcasting, so that the transmission distance of the final second audio signal exceeds the limit of 3m.
[0120] Furthermore, the present application implements slow-in and slow-out of the audio signal through the synchronization bit and stop bit of the data frame, and smoothes the frequency points of frequency mutations, so that the audible noise when the first terminal sends the second audio signal is very weak.
[0121] The following are device embodiments of the present application, which can be used to implement the method embodiments of the present application. For details not disclosed in the device embodiments of the present application, please refer to the method embodiments of the present application.
[0122] Among them, Figure 10 shows a structural diagram of an example of a screen projection connection device provided in this application, which is configured on the first terminal.
[0123] The screen projection connection device 1000 provided in this application includes: a determination module 1001 and a first sending module 1002.
[0124] The determination module 1001 is configured to: receive a request message sent by the second terminal, determine a data frame corresponding to the screen projection code, and determine a frequency of a parameter in the data frame;
[0125] determining a first audio signal corresponding to the data frame according to a frequency of a parameter in the data frame;
[0126] Determine a duration for continuously transmitting the frequency point of the first audio signal, wherein the duration for continuously transmitting is determined based on a duration for spectrum analysis of the second terminal and a length of a maximum reflection path in a space where the first terminal is located;
[0127] The second audio signal is determined according to a continuous transmission duration of the frequency point in the first audio signal.
[0128] The first sending module 1002 is used to: broadcast the second audio signal in the form of ultrasound so that the second terminal receives the second audio signal, and demodulate the second audio signal to obtain a screen projection code, and enable the second terminal to establish a screen projection connection with the first terminal according to the screen projection code.
[0129] Among them, Figure 11 shows a structural diagram of another example of a screen projection connection device provided in this application, which is configured on the first terminal.
[0130] In one possible implementation, the above-mentioned determination module 1001 is specifically used to: determine the frequency resolution of the short-time Fourier transform based on the spectrum analysis duration of the second terminal and the sampling frequency of the second terminal; determine the frequency of the parameter in the data frame based on an integer multiple of the frequency resolution of the short-time Fourier transform, wherein the frequency difference between two adjacent parameters in the data frame is an integer multiple of the frequency resolution of the short-time Fourier transform.
[0131] In an exemplary embodiment, based on the aforementioned scheme, the parameters include a sign bit, and one or more of a synchronization bit, a check bit, and a stop bit; wherein the synchronization bit is used to identify the starting position of the data frame, and is used to implement the slow-in of the second audio signal; the sign bit includes one or more data values obtained by converting the projection code; the check bit includes one or more check values determined based on the first data value; the stop bit is used to identify the end position of the data frame, and is used to implement the slow-out of the second audio signal.
[0132] Optionally, the apparatus further includes a smoothing processing module 1003. The smoothing processing module 1003 is configured to perform smoothing processing on frequency points in the first audio signal that cause frequency mutations by using a bandpass filter.
[0133] Among them, Figure 12 shows a structural diagram of another example of a screen projection connection device provided in this application, which is configured on the second terminal.
[0134] The screen projection connection device 1200 provided in this application includes: a second sending module 1201, a receiving module 1202, and a connection module 1203.
[0135] The second sending module 1201 is used to: send a request message to the first terminal so that the first terminal determines the data frame corresponding to the projection code and determines the frequency of the parameters in the data frame; and, enables the first terminal to determine the first audio signal corresponding to the data frame according to the frequency of the parameters; and, enables the first terminal to determine the continuous sending duration of the frequency point in the first audio signal, wherein the continuous sending duration is determined according to the spectrum analysis duration of the second terminal and the length of the maximum reflection path in the space where the first terminal is located; and, enables the first terminal to determine the second audio signal according to the continuous sending duration of the frequency point in the first audio signal, and broadcast the second audio signal in the form of ultrasound.
[0136] The receiving module 1202 is used to: receive the second audio signal sent by the first terminal, and demodulate the second audio signal to obtain the screen projection code.
[0137] The connection module 1203 is used to establish a screen projection connection with the first terminal according to the screen projection code.
[0138] In a possible implementation, the receiving module 1202 is specifically configured to receive a third audio signal and determine a second audio signal according to the third audio signal, wherein a length of the third audio signal is twice a length of the second audio signal.
[0139] In one possible implementation, the above-mentioned receiving module 1202 is specifically used to: convert the frequency points of the third audio signal within a preset time length, obtain parameters corresponding to the frequency points within the preset time length, and determine whether there is a synchronization bit in the parameters; when there is a synchronization bit in the parameters, determine whether the next parameter adjacent to the synchronization bit is a sign bit; when the next parameter adjacent to the synchronization bit is a sign bit, starting with the synchronization bit, determine the second audio signal from the third audio signal.
[0140] In one possible implementation, the receiving module 1202 is specifically used to: filter out the synchronization bit in the second audio signal; and convert one or more data values included in the sign bit to obtain a screen projection code.
[0141] In one possible implementation, the connection module 1203 is specifically used to: convert the frequency point in the second audio signal to obtain the check bit corresponding to the frequency point in the second audio signal; determine whether the data value in the second audio signal is correct based on the check bit; and when the data value in the second audio signal is correct, establish a screen projection connection with the first terminal based on the screen projection code.
[0142] In one possible implementation, the receiving module 1202 is further used to: determine whether a first data value corresponding to a first frequency point in the second audio signal is the same as a second data value corresponding to a second frequency point, wherein the second frequency point is the frequency point with the largest amplitude in the second audio signal; when the first data value and the second data value are the same, determine a third frequency point with the second largest amplitude in the second audio signal; determine a difference between the amplitude of the third frequency point and the amplitude of the second frequency point, and determine whether the difference is greater than a preset value; when the difference is greater than the preset value, convert the third frequency point to obtain a third data value corresponding to the third frequency point; and determine that the third data value is the data value in the sign bit.
[0143] It should be noted that the screen projection connection device provided in the above embodiment only uses the division of the above-mentioned functional modules as an example when executing the screen projection connection method. In actual applications, the above-mentioned functions can be assigned to different functional modules as needed, that is, the internal structure of the device can be divided into different functional modules to complete all or part of the functions described above. In addition, the screen projection connection device provided in the above embodiment and the screen projection connection method embodiment belong to the same concept. Therefore, for details not disclosed in the embodiment of the device of this application, please refer to the embodiment of the screen projection connection method of this application, which will not be repeated here.
[0144] The serial numbers of the above embodiments of the present application are for description only and do not represent the advantages or disadvantages of the embodiments.
[0145] An embodiment of the present application also provides a terminal, including a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the program, the steps of any of the above-mentioned method embodiments are implemented.
[0146] FIG13 shows a structural diagram of an example terminal provided by the present application. Referring to FIG13 , the terminal 1300 includes: a processor 1301 and a memory 1302 .
[0147] In the embodiment of the present application, the processor 1301 is the control center of the computer system, which can be the processor of a physical machine or the processor of a virtual machine. The processor 1301 may include one or more processing cores, such as a 4-core processor, an 8-core processor, etc. The processor 1301 can be implemented in at least one hardware form of digital signal processing (DSP), field programmable gate array (FPGA), and programmable logic array (PLA). The processor 1301 may also include a main processor and a coprocessor. The main processor is a processor for processing data in the awake state, also known as a central processing unit (CPU); the coprocessor is a low-power processor for processing data in the standby state.
[0148] In this application, the processor 1301 is used to:
[0149] Receive the request information sent by the second terminal, and determine the data frame corresponding to the projection code, and determine the frequency of the parameters in the above data frame; determine the first audio signal corresponding to the above data frame according to the frequency of the above parameters; determine the continuous sending duration of the frequency point in the above first audio signal, wherein the above continuous sending duration is determined according to the spectrum analysis duration of the above second terminal and the length of the maximum reflection path in the space where the above first terminal is located; determine the second audio signal according to the continuous sending duration of the frequency point in the above first audio signal; broadcast the above second audio signal in the form of ultrasound, so that the above second terminal receives the above second audio signal, and demodulates the above second audio signal to obtain the above projection code, and enables the above second terminal to establish a projection connection with the above first terminal according to the above projection code.
[0150] Furthermore, the above-mentioned processor 1301 is specifically used to: determine the frequency resolution of the short-time Fourier transform based on the spectrum analysis duration of the above-mentioned second terminal and the sampling frequency of the above-mentioned second terminal; determine the frequency of the parameters in the above-mentioned data frame based on the integer multiples of the frequency resolution of the above-mentioned short-time Fourier transform, wherein the frequency difference between two adjacent parameters in the above-mentioned data frame is an integer multiple of the frequency resolution of the above-mentioned short-time Fourier transform.
[0151] In an exemplary embodiment, based on the above-mentioned scheme, the above-mentioned parameters include a sign bit, and one or more of a synchronization bit, a check bit and a stop bit; wherein the above-mentioned synchronization bit is used to identify the starting position of the above-mentioned data frame, and is used to realize the slow-in of the above-mentioned second audio signal; the above-mentioned sign bit includes one or more data values obtained by converting the above-mentioned projection code; the above-mentioned check bit includes one or more check values determined based on the above-mentioned first data value; the above-mentioned stop bit is used to identify the end position of the above-mentioned data frame, and is used to realize the slow-out of the above-mentioned second audio signal.
[0152] Optionally, the processor 1301 is further configured to: perform smoothing processing on frequency points causing frequency mutations in the first audio signal through a bandpass filter.
[0153] In this application, the processor 1301 is further configured to:
[0154] Send a request message to the first terminal so that the first terminal determines the data frame corresponding to the projection code and determines the frequency of the parameters in the data frame; and, the first terminal determines the first audio signal corresponding to the data frame according to the frequency of the parameters; and, the first terminal determines the continuous sending duration of the frequency point in the first audio signal, wherein the continuous sending duration is determined according to the spectrum analysis duration of the second terminal and the length of the maximum reflection path in the space where the first terminal is located; and, the first terminal determines the second audio signal according to the continuous sending duration of the frequency point in the first audio signal, and broadcasts the second audio signal in the form of ultrasound; receives the second audio signal sent by the first terminal, and obtains the projection code according to the second audio signal; and establishes a projection connection with the first terminal according to the projection code.
[0155] Furthermore, the processor 1301 is specifically configured to: receive a third audio signal, and determine the second audio signal according to the third audio signal, wherein a length of the third audio signal is twice a length of the second audio signal.
[0156] Optionally, the processor 1301 is specifically configured to: convert the frequency of the third audio signal within a preset time length, obtain parameters corresponding to the frequency within the preset time length, and determine whether a synchronization bit exists in the parameters; if a synchronization bit exists in the parameters, determine whether the next parameter adjacent to the synchronization bit is a sign bit; if the next parameter adjacent to the synchronization bit is a sign bit, determine the second audio signal from the third audio signal starting with the synchronization bit.
[0157] Optionally, the processor 1301 is specifically configured to: filter out the synchronization bit in the second audio signal; and convert one or more data values included in the sign bit to obtain the screen projection code.
[0158] Optionally, the processor 1301 is specifically used to: convert the frequency point in the second audio signal to obtain the check bit corresponding to the frequency point in the second audio signal; determine whether the data value in the second audio signal is correct based on the check bit; and when the data value in the second audio signal is correct, establish a screen projection connection with the first terminal based on the screen projection code.
[0159] Optionally, the processor 1301 is further configured to: determine whether a first data value corresponding to a first frequency point in the second audio signal is the same as a second data value corresponding to a second frequency point, wherein the second frequency point is a frequency point with the largest amplitude in the second audio signal; when the first data value is the same as the second data value, determine a third frequency point with the second largest amplitude in the second audio signal; determine a difference between the amplitude of the third frequency point and the amplitude of the second frequency point, and determine whether the difference is greater than a preset value; when the difference is greater than the preset value, convert the third frequency point to obtain a third data value corresponding to the third frequency point; and determine that the third data value is the data value in the sign bit.
[0160] Memory 1302 may include one or more computer-readable storage media, which may be non-transitory. Memory 1302 may also include high-speed random access memory and non-volatile memory, such as one or more disk storage terminals and flash memory storage terminals. In some embodiments of the present application, the non-transitory computer-readable storage medium in memory 1302 is used to store at least one instruction, which is used to be executed by processor 1301 to implement the method in the embodiment of the present application.
[0161] In some embodiments, terminal 1300 further includes a peripheral device interface 1303 and at least one peripheral device. Processor 1301, memory 1302, and peripheral device interface 1303 may be connected via a bus or signal lines. Each peripheral device may be connected to peripheral device interface 1303 via a bus, signal lines, or circuit boards. Specifically, the peripheral device includes at least one of a display screen 1304, a camera 1305, and an audio circuit 1306.
[0162] The peripheral device interface 1303 can be used to connect at least one input / output (I / O)-related peripheral device to the processor 1301 and the memory 1302. In some embodiments of the present application, the processor 1301, the memory 1302, and the peripheral device interface 1303 are integrated on the same chip or circuit board; in some other embodiments of the present application, any one or two of the processor 1301, the memory 1302, and the peripheral device interface 1303 can be implemented on separate chips or circuit boards. This embodiment of the present application is not specifically limited to this.
[0163] Display screen 1304 is used to display a user interface (UI). The UI may include graphics, text, icons, videos, and any combination thereof. When display screen 1304 is a touch screen display, display screen 1304 also has the ability to collect touch signals on or above the surface of display screen 1304. The touch signals can be input as control signals to processor 1301 for processing. In some embodiments of the present application, display screen 1304 can be one, provided on the front panel of terminal 1300; in other embodiments of the present application, display screen 1304 can be at least two, provided on different surfaces of terminal 1300 or in a foldable design; in still other embodiments of the present application, display screen 1304 can be a flexible display, provided on a curved surface or a foldable surface of terminal 1300. Display screen 1304 can even be provided in a non-rectangular irregular shape, i.e., a special-shaped screen. Display screen 1304 can be made of materials such as liquid crystal display (LCD) and organic light-emitting diode (OLED).
[0164] The camera 1305 is used to collect images or videos. Optionally, the camera 1305 includes a front camera and a rear camera.
[0165] The audio circuit 1306 may include a microphone and a speaker. The microphone is used to collect sound waves from the user and the environment, and convert the sound waves into electrical signals that are input to the processor 1301 for processing.
[0166] The power supply 1307 is used to supply power to various components in the terminal 1300. The power supply 1307 can be alternating current, direct current, a disposable battery, or a rechargeable battery.
[0167] The terminal structure block diagram shown in the embodiment of the present application does not constitute a limitation on the terminal 1300. The terminal 1300 may include more or fewer components than shown in the figure, or combine certain components, or adopt a different component arrangement.
[0168] The present application also provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the steps of any of the aforementioned methods. The computer-readable storage medium may include, but is not limited to, any type of disk, including a floppy disk, an optical disk, a DVD, a CD-ROM, a microdrive, a magneto-optical disk, a ROM, a RAM, an EPROM, an EEPROM, a DRAM, a VRAM, a flash memory device, a magnetic card or an optical card, a nanosystem (including a molecular memory IC), or any type of medium or device suitable for storing instructions and / or data.
[0169] In this application, the terms "first," "second," etc. are used for descriptive purposes only and are not to be construed as indicating or implying relative importance or order; the term "plurality" refers to two or more, unless expressly limited otherwise. Terms such as "installed," "connected," "connected," and "fixed" should be understood in a broad sense. For example, "connected" can mean a fixed connection, a detachable connection, or an integral connection; "connected" can mean a direct connection or an indirect connection through an intermediary. Those skilled in the art will understand the specific meanings of the above terms in this application based on the specific circumstances.
[0170] In the description of this application, it should be understood that the terms "upper" and "lower" and the like indicate orientations or positional relationships based on the orientations or positional relationships shown in the accompanying drawings, and are only for the convenience of describing this application and simplifying the description, rather than indicating or implying that the device or unit referred to must have a specific direction, be constructed and operated in a specific orientation. Therefore, they should not be understood as limitations on this application.
[0171] The above description is merely a specific embodiment of the present application, but the scope of protection of the present application is not limited thereto. Any modifications or substitutions that can be easily conceived by a person skilled in the art within the technical scope disclosed in the present application should be included in the scope of protection of the present application. Therefore, equivalent modifications made according to the claims of the present application are still within the scope of protection of the present application.
Claims
1. A screen projection connection method, applied to a first terminal, comprising: Receive the request information sent by the second terminal, determine the data frame corresponding to the screen projection code, and determine the frequency of the parameters in the data frame; determining, according to the frequency of the parameter, a first audio signal corresponding to the data frame; Determine a continuous transmission duration of a frequency point in the first audio signal, wherein the continuous transmission duration is determined according to a spectrum analysis duration of the second terminal and a length of a maximum reflection path in a space where the first terminal is located; Determine a second audio signal according to a continuous transmission duration of a frequency point in the first audio signal; The second audio signal is broadcast in the form of ultrasound, so that the second terminal receives the second audio signal, demodulates the second audio signal, obtains the screen projection code, and enables the second terminal to establish a screen projection connection with the first terminal according to the screen projection code.
2. The screen projection connection method according to claim 1, wherein: The data frame corresponding to the screen projection code is determined, including: The screen projection code is modulated using a multi-level frequency shift keying method to obtain a data frame corresponding to the screen projection code.
3. The screen projection connection method according to claim 1, wherein: The determining the frequency of the parameter in the data frame comprises: Determining a frequency resolution of a short-time Fourier transform according to a spectrum analysis duration of the second terminal and a sampling frequency of the second terminal; The frequency of the parameter in the data frame is determined according to an integer multiple of the frequency resolution of the short-time Fourier transform, wherein the frequency difference between two adjacent parameters in the data frame is an integer multiple of the frequency resolution of the short-time Fourier transform.
4. The screen projection connection method according to claim 1, wherein: The parameters include a sign bit, and one or more of a synchronization bit, a check bit, and a stop bit; The synchronization bit is used to identify the starting position of the data frame and to implement slow-in of the second audio signal; The sign bit includes one or more data values obtained by converting the screen projection code; The check bit includes one or more check values determined according to the first data value; The stop bit is used to identify the end position of the data frame and to achieve slow-out of the second audio signal.
5. The screen projection connection method according to claim 1, wherein: The determining, according to the frequency of the parameter, the first audio signal corresponding to the data frame comprises: According to the frequency of the parameter, the data frame is converted into a corresponding first audio signal through MSFK.
6. The screen projection connection method according to claim 1, wherein: After determining the duration of continuous transmission of the frequency point in the first audio signal, the method further includes: The frequency points causing frequency mutation in the first audio signal are smoothed by using a bandpass filter.
7. A screen projection connection method, applied to a second terminal, comprising: Sending a request message to the first terminal so that the first terminal determines a data frame corresponding to the screen projection code and determines the frequency of the parameters in the data frame; and causing the first terminal to determine a first audio signal corresponding to the data frame according to the frequency of the parameter; and enabling the first terminal to determine a continuous transmission duration of a frequency point in the first audio signal, wherein the continuous transmission duration is determined according to a spectrum analysis duration of the second terminal and a length of a maximum reflection path in a space where the first terminal is located; and enabling the first terminal to determine a second audio signal according to the continuous transmission duration of the frequency point in the first audio signal, and broadcast the second audio signal in the form of ultrasound; receiving the second audio signal sent by the first terminal, and obtaining the screen projection code according to the second audio signal; Establish a screen projection connection with the first terminal according to the screen projection code.
8. The screen projection connection method according to claim 7, wherein: The receiving the second audio signal sent by the first terminal includes: receiving a third audio signal, and determining the second audio signal according to the third audio signal, wherein a length of the third audio signal is twice a length of the second audio signal; The determining the second audio signal according to the third audio signal comprises: Converting the frequency points of the third audio signal within a preset time length to obtain parameters corresponding to the frequency points within the preset time length, and determining whether there is a synchronization bit in the parameters; In the case where a synchronization bit exists in the parameter, determining whether the next parameter adjacent to the synchronization bit is a sign bit; In the case that the next parameter adjacent to the synchronization bit is a sign bit, the second audio signal is determined from the third audio signal starting with the synchronization bit.
9. The screen projection connection method according to claim 8, wherein: The obtaining the screen projection code according to the second audio signal includes: filtering out synchronization bits in the second audio signal; One or more data values included in the sign bit are converted to obtain the screen projection code.
10. The screen projection connection method according to claim 8, wherein: The establishing a screen projection connection with the first terminal according to the screen projection code includes: Converting the frequency point in the second audio signal to obtain a check bit corresponding to the frequency point in the second audio signal; determining whether a data value in the second audio signal is correct according to the check bit; When the data value in the second audio signal is correct, a screen projection connection is established with the first terminal according to the screen projection code.
11. The screen projection connection method according to claim 9, wherein: Prior to converting the one or more data values included in the sign bit, the method further comprises: determining whether a first data value corresponding to a first frequency point and a second data value corresponding to a second frequency point in the second audio signal are the same, wherein the second frequency point is a frequency point with the largest amplitude in the second audio signal; When the first data value is the same as the second data value, determining a third frequency point having a second largest amplitude in the second audio signal; Determine a difference between the amplitude of the third frequency point and the amplitude of the second frequency point, and determine whether the difference is greater than a preset value; When the difference is greater than the preset value, converting the third frequency point to obtain a third data value corresponding to the third frequency point; The third data value is determined to be a data value in the sign bit.
12. A screen projection connection device, configured on a first terminal, comprising: A determination module, used to: receive the request information sent by the second terminal, and determine the data frame corresponding to the screen projection code, and determine the frequency of the parameters in the data frame; Determining a first audio signal corresponding to the data frame according to the frequency of the parameter in the data frame; Determine a continuous transmission duration of a frequency point in the first audio signal, wherein the continuous transmission duration is determined according to a spectrum analysis duration of the second terminal and a length of a maximum reflection path in a space where the first terminal is located; Determine a second audio signal according to a continuous transmission duration of a frequency point in the first audio signal; The first sending module is used to: broadcast the second audio signal in the form of ultrasound so that the second terminal receives the second audio signal, and demodulates the second audio signal to obtain the screen projection code, and enable the second terminal to establish a screen projection connection with the first terminal according to the screen projection code.
13. A screen projection connection device, configured on a second terminal, comprising: A second sending module is used to: send request information to the first terminal, so that the first terminal determines the data frame corresponding to the screen projection code, and determines the frequency of the parameters in the data frame; and causing the first terminal to determine a first audio signal corresponding to the data frame according to the frequency of the parameter; and enabling the first terminal to determine a continuous transmission duration of a frequency point in the first audio signal, wherein the continuous transmission duration is determined according to a spectrum analysis duration of the second terminal and a length of a maximum reflection path in a space where the first terminal is located; and enabling the first terminal to determine a second audio signal according to the continuous transmission duration of the frequency point in the first audio signal, and broadcast the second audio signal in the form of ultrasound; A receiving module, used to: receive the second audio signal sent by the first terminal, and demodulate the second audio signal to obtain the screen projection code; A connection module is used to establish a screen projection connection with the first terminal according to the screen projection code.
14. A terminal comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the screen projection connection method as described in any one of claims 1 to 6 when executing the computer program.
15. A terminal comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the screen projection connection method as described in any one of claims 7 to 11 when executing the computer program.
16. A computer-readable storage medium having a computer program stored thereon, wherein the computer program, when executed by a processor, implements the screen projection connection method as described in any one of claims 1 to 6.
17. A computer-readable storage medium having a computer program stored thereon, wherein the computer program, when executed by a processor, implements the screen projection connection method as described in any one of claims 7 to 11.
Citation Information
Patent Citations
Wireless screen projection method, device and system
CN108736981A
Wireless screen transmission device communication establishment interaction mode
CN110011737A
Screen projection method
CN110769523A
Screen projection signal processing method, terminal and computer readable storage medium
CN112637743A
Screen transmission control method and device, storage medium and electronic equipment
CN114816287A
