Screen projection function testing method and electronic device
By establishing a data channel between the electronic device and the display device, sending test videos and playing them on the display device, and using the display device to detect the test videos, the problem of time-consuming and labor-consuming manual screen projection function in the prior art is solved, and automated detection and more efficient abnormal recognition are achieved.
Patent Information
- Application Number
- CN202311831221.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-12-27
- Publication Date
- 2025-03-18
- Estimated Expiration
- 2043-12-27
AI Technical Summary
In the prior art, when manually detecting the wired screen projection function of electronic devices that support screen projection function, it is difficult to effectively identify whether there is an abnormal frame picture in the test video, and consumes human resources and detection time.
By establishing a data channel between the electronic device and the display device, sending test videos and playing them on the display device, and using the display device to detect the test videos, the normality of the screen projection function is determined.
Unmanned automatic detection of the screen projection function of electronic equipment is realized, saving human resources and detection time, and able to more effectively identify abnormal situations of the screen projection function.
Smart Images

Figure CN118450112B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of screen projection technology, and specifically to a screen projection function testing method and electronic device. Background Art
[0002] Screen projection technology is a technology that transmits the screen content of a mobile phone, tablet computer, computer or other electronic device that supports screen projection to another display device wirelessly or wiredly. Usually, in order to ensure that users can use screen projection technology normally, electronic devices that support screen projection need to be tested before they are put on the market.
[0003] At present, manual testing is used to test the wired screen projection function of electronic devices that support the screen projection function. Specifically, after the electronic device that supports the screen projection function is connected to another display device through a data cable, the electronic device projects a test video onto the display device, and the testing personnel observe whether the test video on the display device is played abnormally. When it is determined that the playback is abnormal, it is determined that the screen projection function of the electronic device is abnormal.
[0004] However, in the above-mentioned manual detection method, it is difficult to effectively identify whether there are abnormal frames in the test video, and it consumes human resources and detection time. Summary of the invention
[0005] The present application provides a screen projection function testing method and electronic device, which can more effectively determine whether the screen projection function of the electronic device is normal and save human resources and detection time.
[0006] In a first aspect, the present application provides a screen projection function testing method, which is applied to a first communication system, where the first communication system includes a first electronic device and a second electronic device, and the method includes:
[0007] During the process of playing the test video, the first electronic device sends a first request to the second electronic device in response to the successful establishment of a data channel between the first electronic device and the second electronic device, and the first request is used to instruct the second electronic device to establish a screen projection connection with the first electronic device; the second electronic device sends a first message to the first electronic device in response to the first request, and the first message is used to indicate that the second electronic device accepts to establish a screen projection connection with the first electronic device; the first electronic device sends the test video being played by the first electronic device to the second electronic device in response to the first message; when the second electronic device receives the test video, it plays the test video and performs a first detection on the test video to obtain a first detection result, and the first detection is used to detect whether the test video is played abnormally in the second electronic device; the second electronic device sends a second request to the first electronic device, and the second request is used to instruct the first electronic device to disconnect the screen projection connection with the second electronic device; the first electronic device reads the first detection result in the second electronic device in response to the second request; the first electronic device determines whether the screen projection function of the first electronic device is normal based on the first detection result.
[0008] In the above method, the first electronic device sends a test video to the second electronic device when establishing a screen projection connection with the second electronic device. During the process of the second electronic device playing the test video, the test video is subjected to a first detection. The first electronic device reads the first detection result obtained by the second electronic device, and determines that the screen projection function of the first electronic device is abnormal when the first detection result indicates that the test video is played abnormally in the second electronic device. When the first detection result indicates that the test video is played normally in the second electronic device, it is determined that the screen projection function of the first electronic device is normal. Thus, unmanned automatic detection of the screen projection function of the first electronic device is realized, which is suitable for intercepting a variety of screen projection abnormal scenarios, can effectively determine whether the screen projection function of the first electronic device is normal, and saves human resources and time resources.
[0009] In combination with the first aspect, in some implementations of the first aspect, the method further includes:
[0010] In response to the first message, the first electronic device performs a second detection on the test video being played by the first electronic device to obtain a second detection result, wherein the second detection is used to detect whether the test video is played abnormally in the first electronic device; the first electronic device determines whether the screen projection function of the first electronic device is normal based on the first detection result, including: the first electronic device determines whether the screen projection function of the first electronic device is normal based on the first detection result and the second detection result.
[0011] In the above method, while the second electronic device performs a first detection on the test video projected from the first electronic device, the first electronic device can also perform a second detection on the test video being played and projected to the second electronic device to obtain a second detection result. Based on this, the first electronic device can also read the first detection result of the second electronic device after obtaining the second detection result, and combine the first detection result and the second detection result. When the first detection result and the second detection result both indicate that the projection function of the first electronic device is normal, it can be determined that the projection function of the first electronic device is normal. When any one of the first detection result and the second detection result indicates that the projection function of the first electronic device is abnormal, it can be determined that the projection function of the first electronic device is abnormal. Based on this, combined with the second detection result of the first electronic device and the first detection result of the second electronic device, unmanned automatic detection of the projection function of the first electronic device is realized, which is suitable for intercepting a variety of abnormal projection scenarios, and can more accurately and effectively determine whether the projection function of the first electronic device is normal, saving human resources and time resources.
[0012] In combination with the first aspect, in some implementations of the first aspect, before sending the first request to the second electronic device, the method further includes:
[0013] The first electronic device creates a first folder in the second electronic device and writes identification information of the first electronic device and current time information in the first folder. The identification information of the first electronic device is used to uniquely identify the first electronic device. The first detection result is stored in the first folder.
[0014] In the above method, the first electronic device writes the identification information of the first electronic device and the current time information in the first folder of the second electronic device, so as to mark the test status of each first electronic device and distinguish the screen projection test status of the first electronic device from the screen projection test status of other electronic devices.
[0015] In combination with the first aspect, in some implementations of the first aspect, the data channel between the first electronic device and the second electronic device is established through a data line, and before sending the first request to the second electronic device, the method further includes:
[0016] The first electronic device reads a first resolution and a first frame rate supported by the second electronic device for playing a video, and a second resolution and a second frame rate supported by the data line for transmitting a video; the first electronic device sends a test video being played by the first electronic device to the second electronic device, including: the first electronic device determines a third resolution and a third frame rate for sending the test video being played by the first electronic device to the second electronic device based on the first resolution and the first frame rate, and the second resolution and the second frame rate; the first electronic device sends the test video being played by the first electronic device to the second electronic device based on the third resolution and the third frame rate.
[0017] In the above method, before sending a test video to the second electronic device, the first electronic device can determine in advance the resolution and frame rate supported by the second electronic device, as well as the resolution and frame rate supported by the data line, thereby ensuring that a test video supported by both the data line and the second electronic device can be transmitted to the second electronic device, thereby avoiding the situation where the first electronic device cannot project the screen to the second electronic device due to resolution and frame rate factors.
[0018] In a second aspect, the present application provides a screen projection function testing method, which is applied to a first electronic device, the first electronic device is applied to a first communication system, the first communication system includes a first electronic device and a second electronic device, and the method includes:
[0019] During the process of playing the test video, in response to establishing a data channel between the first electronic device and the second electronic device, a first request is sent to the second electronic device, and the first request is used to instruct the second electronic device to establish a screen projection connection with the first electronic device; when a first message sent by the second electronic device is received, the test video being played by the first electronic device is sent to the second electronic device, so that the second electronic device plays the test video, and a first detection is performed on the playing test video, and the first detection is used to detect whether the test video is played abnormally in the second electronic device, and the first message is used to indicate that the second electronic device accepts to establish a screen projection connection with the first electronic device; when a second request sent by the second electronic device is received, the first detection result in the second electronic device is read, and the first detection result is obtained by the second electronic device performing the first detection on the playing test video, and the second request is used to instruct the first electronic device to disconnect the screen projection connection with the second electronic device; according to the first detection result, it is determined whether the screen projection function of the first electronic device is normal.
[0020] In the above method, the first electronic device sends a test video to the second electronic device when establishing a screen projection connection with the second electronic device, so that the second electronic device performs a first detection on the test video during the process of playing the test video. Thereafter, the first electronic device can read the first detection result obtained by the second electronic device, and when the first detection result indicates that the test video is played abnormally in the second electronic device, it is determined that the screen projection function of the first electronic device is abnormal; when the first detection result indicates that the test video is played normally in the second electronic device, it is determined that the screen projection function of the first electronic device is normal. In this way, unmanned automatic detection of the screen projection function of the first electronic device is realized, which is suitable for intercepting a variety of screen projection abnormal scenarios, can effectively determine whether the screen projection function of the first electronic device is normal, and saves human resources and time resources.
[0021] In conjunction with the second aspect, in some implementations of the second aspect, the method further includes:
[0022] When a first message sent by a second electronic device is received, a second detection is performed on the test video being played by the first electronic device to obtain a second detection result, wherein the second detection is used to detect whether the test video is played abnormally in the first electronic device; based on the first detection result, determining whether the screen projection function of the first electronic device is normal, including: determining whether the screen projection function of the first electronic device is normal based on the first detection result and the second detection result.
[0023] In the above method, while the second electronic device performs a first detection on the test video projected from the first electronic device, the first electronic device can also perform a second detection on the test video that is being played and projected to the second electronic device to obtain a second detection result. Based on this, the first electronic device can also read the first detection result of the second electronic device after obtaining the second detection result. By combining the first detection result and the second detection result, it can be more accurately determined whether the screen projection function of the first electronic device is normal, thereby ensuring the accuracy of the screen projection function test.
[0024] In conjunction with the second aspect, in some implementations of the second aspect, the second detection includes a freeze detection, and the second detection is performed on the test video being played by the first electronic device to obtain a second detection result, including:
[0025] A freeze detection is performed on a test video being played by the first electronic device, and when the test video freezes, a second detection result is determined to be a detection result indicating that a screen projection function of the first electronic device is abnormal.
[0026] In the above method, whether the screen projection function of the first electronic device is abnormal can be determined through freeze detection.
[0027] In conjunction with the second aspect, in some implementations of the second aspect, the second detection further includes picture abnormality detection, and the method further includes:
[0028] A screen abnormality detection is performed on a test video being played by the first electronic device. When the test video screen is abnormal, a second detection result is determined as a detection result indicating that a screen projection function of the first electronic device is abnormal. The screen abnormality includes at least one of white bars, a black screen, and screen deviation.
[0029] In the above method, whether the screen projection function of the first electronic device is abnormal can be determined through screen abnormality detection.
[0030] In combination with the second aspect, in some implementations of the second aspect, the first detection includes freeze detection and / or screen abnormality detection.
[0031] In the above method, the second electronic device may use the same detection method as the first electronic device to detect the test video being played by the second electronic device.
[0032] In conjunction with the second aspect, in some implementations of the second aspect, before sending the first request to the second electronic device, the method further includes:
[0033] A first folder is created in the second electronic device, and identification information of the first electronic device and current time information are written into the first folder. The identification information of the first electronic device is used to uniquely identify the first electronic device. The first detection result is stored in the first folder.
[0034] In the above method, the first electronic device writes the identification information of the first electronic device and the current time information in the first folder of the second electronic device, so as to mark the test status of each first electronic device and distinguish the screen projection test status of the first electronic device from the screen projection test status of other electronic devices.
[0035] In conjunction with the second aspect, in some implementations of the second aspect, the data channel between the first electronic device and the second electronic device is established through a data line, and before sending the first request to the second electronic device, the method further includes:
[0036] Reading a first resolution and a first frame rate supported by the second electronic device for playing a video, and a second resolution and a second frame rate supported by the data line for transmitting a video; sending a test video being played by the first electronic device to the second electronic device, including: determining a third resolution and a third frame rate for sending the test video being played by the first electronic device to the second electronic device based on the first resolution and the first frame rate, and the second resolution and the second frame rate; and sending the test video being played by the first electronic device to the second electronic device based on the third resolution and the third frame rate.
[0037] In the above method, the first electronic device determines in advance the resolution and frame rate supported by the second electronic device, as well as the resolution and frame rate supported by the data line, thereby ensuring that a test video supported by both the data line and the second electronic device can be transmitted to the second electronic device, thereby avoiding the situation where the first electronic device cannot project the screen to the second electronic device due to resolution and frame rate factors.
[0038] In conjunction with the second aspect, in some implementations of the second aspect, during the process of playing the test video, in response to establishing a data channel between the first electronic device and the second electronic device, before sending the first request to the second electronic device, the method further includes:
[0039] Start a screen projection test application, which is an application installed in the first electronic device for triggering screen projection between devices, and the screen projection test application pre-stores a test video; play the test video through the test application.
[0040] In the above method, the first electronic device can manage, save, and play the test video through the screen projection test application.
[0041] In a third aspect, the present application provides a screen projection function testing method, which is applied to a second electronic device, the second electronic device is applied to a first communication system, the first communication system includes a first electronic device and a second electronic device, and the method includes:
[0042] Upon receiving a first request sent by a first electronic device, a first message is returned to the first electronic device, the first request is sent by the first electronic device to the second electronic device in response to a successful establishment of a data channel between the first electronic device and the second electronic device during the process of playing a test video, the first request is used to instruct the second electronic device to establish a screen projection connection with the first electronic device, and the first message is used to indicate that the second electronic device accepts the establishment of a screen projection connection with the first electronic device; upon receiving a test video sent by the first electronic device, the test video is played; a first detection is performed on the test video being played to obtain a first detection result, the first detection is used to detect whether the test video is played abnormally in the second electronic device; a second request is sent to the first electronic device, so that the first electronic device reads the first detection result in response to the second request, and determines whether the screen projection function of the first electronic device is normal based on the first detection result, and the second request is used to instruct the first electronic device to disconnect the screen projection connection with the second electronic device.
[0043] In the above method, when the first electronic device establishes a screen projection connection with the second electronic device, the second electronic device can receive the test video sent by the first electronic device, thereby playing the test video, and performing a first test on the test video to obtain a first test result, and sending a second request to the first electronic device so that the first electronic device responds to the first request, and determines whether the screen projection function of the first electronic device is normal according to the first test result.
[0044] In combination with the third aspect, in some implementations of the third aspect, sending a second request to the first electronic device so that the first electronic device reads the first detection result in response to the second request, and determining whether the screen projection function of the first electronic device is normal according to the first detection result, includes:
[0045] A second request is sent to the first electronic device so that the first electronic device reads the first detection result in response to the second request, and determines whether the screen projection function of the first electronic device is normal based on the first detection result and the second detection result. The second detection result is obtained by the first electronic device performing a second detection on the test video being played by the first electronic device. The second detection is used to detect whether the test video is played abnormally in the first electronic device.
[0046] In the above method, while the second electronic device performs a first detection on the test video projected from the first electronic device, the first electronic device can also perform a second detection on the test video that is being played and projected to the second electronic device to obtain a second detection result. Based on this, the first electronic device can combine the first detection result and the second detection result to more accurately determine whether the screen projection function of the first electronic device is normal, thereby ensuring the accuracy of the screen projection function test.
[0047] In combination with the third aspect, in some implementations of the third aspect, the test video received by the second electronic device includes a video stream and an audio stream of the test video, the first detection includes a parameter detection, and the first detection is performed on the test video being played to obtain a first detection result, including:
[0048] The video stream is decoded to obtain a first parameter corresponding to the test video, wherein the first parameter includes a third resolution and a third frame rate; the audio stream is decoded to obtain a second parameter corresponding to the test video, wherein the second parameter includes a sampling rate, a sampling bit value, and a number of sampling channels; parameter detection is performed on the test video being played, and when the first parameter is different from a first preset parameter pre-stored in the second electronic device, and / or the second parameter is different from a second preset parameter pre-stored in the second electronic device, it is determined that the first detection result is a detection result indicating that the screen projection function of the first electronic device is abnormal, wherein the first preset parameter includes a preset resolution and a preset frame rate, and the second preset parameter includes a preset sampling rate, a preset sampling bit value, and a preset number of sampling channels.
[0049] In the above method, the second electronic device can detect the first parameter and the second parameter of the test video, thereby determining that the screen projection function of the first electronic device is abnormal when the first parameter and the second parameter are different from preset related parameters.
[0050] In combination with the third aspect, in some implementations of the third aspect, the first detection further includes a freeze detection, and the method further includes:
[0051] When the first parameter is the same as the first preset parameter, and the second parameter is the same as the second preset parameter, a freeze detection is performed on the test video. When the test video freezes, it is determined that the first detection result is a detection result indicating that the screen projection function of the first electronic device is abnormal.
[0052] In the above method, whether the screen projection function of the first electronic device is abnormal can be determined through freeze detection.
[0053] In conjunction with the third aspect, in some implementations of the third aspect, the first detection further includes picture abnormality detection, and the method further includes:
[0054] A test video is detected for screen abnormalities. When the test video screen is abnormal, a first detection result is determined as a detection result indicating that a screen projection function of the first electronic device is abnormal. The screen abnormality includes at least one of white bars, a black screen, and screen deviation.
[0055] In the above method, whether the screen projection function of the first electronic device is abnormal can be determined through screen abnormality detection.
[0056] In combination with the third aspect, in certain implementations of the third aspect, the second detection includes freeze detection and / or screen abnormality detection.
[0057] In the above method, the first electronic device may use the same detection method as the second electronic device to detect the test video being played by the first electronic device.
[0058] In conjunction with the third aspect, in certain implementations of the third aspect, after performing a first detection on the test video being played and obtaining the first detection result, the method further includes:
[0059] The first detection result is saved in a first folder. The first folder is created by the first electronic device in the second electronic device when a data channel is successfully established between the first electronic device and the second electronic device. The first folder includes identification information of the first electronic device and current time information. The identification information of the first electronic device and the current time information are written after the first electronic device creates the first folder. The identification information of the first electronic device is used to uniquely identify the first electronic device.
[0060] In the above method, the second electronic device marks the test status of each first electronic device through the identification information of the first electronic device written by the first electronic device in the second electronic device and the current time information, so as to distinguish the screen projection test status of the first electronic device from the screen projection test status of other electronic devices.
[0061] In conjunction with the third aspect, in some implementations of the third aspect, the method further includes:
[0062] In response to disconnecting the data channel between the first electronic device and the second electronic device, the first detection result is deleted.
[0063] In the above method, after the screen projection function test of the first electronic device is completed, the second electronic device can clear the first detection result, so that the storage pressure of the second electronic device is released, the performance degradation of the second electronic device can be avoided, and the performance and stability of the second electronic device are guaranteed.
[0064] In a fourth aspect, the present application provides an electronic device comprising one or more processors, a memory and one or more computer programs, wherein the one or more computer programs are stored in the memory, and when the computer programs are executed by one or more processors, the electronic device executes the screen projection function testing method in the first aspect and any possible implementation method of the first aspect.
[0065] In a fifth aspect, the present application provides a chip system, which includes a processor for calling and running a computer program from a memory, so that an electronic device equipped with the chip system executes the screen projection function testing method in the first aspect and any possible implementation method of the first aspect.
[0066] In a sixth aspect, the present application provides a computer-readable storage medium, including a computer program. When the computer program runs on an electronic device, the electronic device executes the screen projection function testing method in the first aspect and any possible implementation of the first aspect.
[0067] In a seventh aspect, the present application provides a computer program product. When the computer program product runs on a computer, it enables the computer to execute the screen projection function testing method in the first aspect and any possible implementation of the first aspect.
[0068] It can be understood that the beneficial effects of the fourth to seventh aspects mentioned above can be found in the relevant descriptions of the first to third aspects mentioned above, and will not be repeated here. BRIEF DESCRIPTION OF THE DRAWINGS
[0069] Figure 1 A schematic diagram of a scenario of a screen projection function testing method provided by the prior art;
[0070] Figure 2 A flowchart of a screen projection function testing method provided by the prior art;
[0071] Figure 3 A schematic diagram of a scenario of a screen projection function testing method provided in an embodiment of the present application;
[0072] Figure 4 A schematic diagram of the structure of an electronic device provided in one embodiment of the present application;
[0073] Figure 5 A diagram showing a relationship between a first electronic device and a second electronic device provided in one embodiment of the present application;
[0074] Figure 6 A flowchart of a screen projection function testing method provided in one embodiment of the present application;
[0075] Figure 7 A flowchart of a screen projection function testing method provided in one embodiment of the present application;
[0076] Figure 8 A schematic diagram of a generation process of an image detection algorithm provided in one embodiment of the present application;
[0077] Fig. 9 A flowchart of a screen projection function testing method provided in one embodiment of the present application;
[0078] Fig.10 A flowchart of a screen projection function testing method provided in one embodiment of the present application. DETAILED DESCRIPTION
[0079] In this application, "at least one" means one or more, and "plurality" means 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, where A and B can be singular or plural. The character " / " generally indicates that the associated objects before and after are in an "or" relationship. "At least one of the following" or similar expressions refers to any combination of these items, including any combination of single items or plural items. For example, at least one of a, b, or c alone can represent: a, b, c, a and b, a and c, or a, b, and c, where a, b, and c can be single or multiple. In addition, the terms "first" and "second" are used for descriptive purposes only and cannot be understood as indicating or implying relative importance.
[0080] Screen projection technology is a technology that transmits the screen content of a mobile phone, tablet computer, computer or other electronic device that supports screen projection to another display device wirelessly or wiredly. Usually, in order to ensure that users can use screen projection technology normally, electronic devices that support screen projection need to be tested before they are put on the market.
[0081] At present, manual testing is used to test the wired screen projection function of electronic devices that support the screen projection function. Specifically, after the electronic device that supports the screen projection function is connected to another display device through a data cable, the electronic device projects a test video onto the display device, and the testing personnel observe whether the test video on the display device is played abnormally. When it is determined that the playback is abnormal, it is determined that the screen projection function of the electronic device is abnormal.
[0082] Among them, screen projection refers to the process by which an electronic device transmits images, audio or video content to a display device for display through a certain protocol.
[0083] like Figure 1 As shown, taking a mobile phone as an electronic device that supports the screen projection function as an example, the mobile phone has a test video stored in advance. Before the mobile phone plays the test video, or during the playing of the test video, the mobile phone can be connected to the display device via a data cable, and the test video in the mobile phone can be projected to the display device through the screen projection function of the mobile phone, so that the display device displays the test video. In this way, the inspection personnel can observe whether there is any abnormality in the test video screen on the display device. When it is determined that the playback is abnormal, it is determined that the screen projection function of the mobile phone is abnormal.
[0084] like Figure 2 As shown, specifically, the mobile phone includes a screen projection test application, in which a test video is pre-stored. After receiving an operation to open the test application, the mobile phone launches the screen projection test video application; after receiving an operation to play the test video, the mobile phone plays the test video; after the mobile phone is connected to the display device via a data cable, it can establish a screen projection connection with the display device through a screen projection protocol; the mobile phone sends the test video being played to the display device through the screen projection connection; after receiving the test video, the display device can play the test video; the mobile phone can disconnect the screen projection connection after playing the test video; when the mobile phone or the display device receives an operation to disconnect the data cable, the connection between the mobile phone and the display device is disconnected, and the test ends.
[0085] While the test video on the mobile phone is playing and being sent to the display device so that the display device is also playing the test video, the inspector can observe whether the test video on the display device is playing abnormally, and observe whether the test video on the mobile phone is playing abnormally. When the test video on either the mobile phone or the display device is playing abnormally, it is determined that the screen projection function of the mobile phone is abnormal.
[0086] The above-mentioned test video resource may be a 4k 60Hz video resource.
[0087] In some embodiments, when the data transmission interface of the mobile phone is a serial bus hardware interface (USB type-C interface, Type C) interface, and the data transmission interface of the display device is a high-definition multimedia interface (HDMI) interface, the above-mentioned data cable is a Type C to HDMI cable.
[0088] In other embodiments, when the data transmission interface of the mobile phone is a Type C interface and the data transmission interface of the display device is a digital display port (display port, DP), the above-mentioned data cable is a Type C to DP cable.
[0089] In some embodiments, the screen projection protocol may be a DP-Link protocol.
[0090] However, the above manual detection method has three main problems:
[0091] Question 1: There may be differences between electronic devices and display devices. For example, the standard values of the resolution and audio sampling rate of the test video displayed by the electronic device and the display device are different, which makes the test video sent to the display device by the electronic device through the screen projection function play abnormally, making it difficult for the inspector to effectively identify it.
[0092] Problem 2: It is difficult to effectively identify whether there are abnormal frames in the test video; for example, a black screen, freezes, white bars, etc.
[0093] Question 3: It consumes more human resources and testing time; for example, one electronic device requires one inspector to inspect.
[0094] In the face of the above problems, the present application can provide a screen projection function testing method, electronic device, chip system, computer-readable storage medium and computer program product. The electronic device can project a test video to a test device. During the process of playing the test video, the test device performs freeze detection and abnormal display detection on the image in the test video to obtain the test result of the test device. When the electronic device determines that the test result of the test device indicates that the screen projection function of the mobile phone is abnormal, it determines that the screen projection function of the mobile phone is abnormal. Thus, unmanned automatic detection of the screen projection function of the electronic device can be realized, and it can more effectively and accurately determine whether the screen projection function of the electronic device is normal, and it can save human resources and detection time, and improve test efficiency. The above-mentioned electronic device can be an electronic device with display hardware and corresponding software support, a screen projection function, and an abnormality detection function.
[0095] For example, the electronic devices may be mobile phones, tablet computers, vehicle-mounted devices, laptop computers, wearable devices, ultra-mobile personal computers (UMPCs), netbooks, personal digital assistants (PDAs), smart cars, smart TVs, robots, and other devices.
[0096] It should be pointed out that in some possible implementations, the electronic device may also be called a terminal device, user equipment (UE), etc., which is not limited in the embodiments of the present application.
[0097] The above-mentioned testing device may be a device with an abnormality detection function.
[0098] Test equipment can exist independently or be integrated into other equipment.
[0099] When the test device is integrated into other devices, the other devices may be televisions, projectors, mobile phones, tablet computers, vehicle-mounted devices, laptop computers, wearable devices, ultra-mobile personal computers (UMPCs), netbooks, personal digital assistants (PDAs), smart cars, smart TVs, robots, and the like.
[0100] See also Figure 3 , Figure 3 A scenario diagram of a screen projection function testing method provided in an embodiment of the present application is shown.
[0101] like Figure 3 As shown, a screen projection function testing method provided in an embodiment of the present application is applicable to a communication system including a first electronic device and a second electronic device.
[0102] The first electronic device may be the electronic device mentioned above, and the second electronic device may be the testing device mentioned above.
[0103] Among them, the first electronic device can be a device with a screen projection function, which is used to play the test video and send the test video. The first electronic device can also be described as a sending device or a sending end.
[0104] The second electronic device may be a receiving device whose screen is projected, and is used to receive the test video sent by the electronic device and play the test video. The second electronic device may also be described as a receiving device or a receiving end.
[0105] The first electronic device can detect the image data of the test video played during the transmission to the second electronic device to determine whether the image is stuck and / or whether the image is abnormal, thereby obtaining the test result of the first electronic device.
[0106] The second electronic device can detect the image data of the received test video to determine whether the image is stuck and / or whether the image is abnormal, thereby obtaining the test result of the second electronic device.
[0107] At the end of playing the test video, the first electronic device can read the test result of the second electronic device. If it is determined that the test result of the first electronic device and the test result of the second electronic device both indicate that the screen projection function of the first electronic device is normal, then the first electronic device can determine that the screen projection function of the first electronic device is normal; if it is determined that either the test result of the first electronic device or the test result of the second electronic device indicates that the screen projection function of the first electronic device is abnormal, then the first electronic device can determine that the screen projection function of the first electronic device is abnormal.
[0108] In some embodiments, the first electronic device and the second electronic device may be connected via a data line, the first electronic device sends a test video to the second electronic device via the data line, and the second electronic device receives the test video sent by the first electronic device via the data line.
[0109] The types of the first electronic device and the second electronic device may be the same or different; the present application does not specifically limit the type of the first electronic device and the type of the second electronic device.
[0110] It should be understood that the above is an example of a scenario and does not limit the scenario of the present application.
[0111] For ease of explanation, Figure 4 In the description, the first electronic device is the electronic device 100, and the electronic device 100 is a mobile phone.
[0112] like Figure 4 As shown, in some embodiments, the electronic device 100 may include a processor 101, a communication module 102, a display screen 103, a camera 104, a sensor 105, an internal memory 106, a USB interface 107, an external memory interface 108, a charging management module 109, a power management module 110, and a battery 111, etc.
[0113] The processor 101 may include one or more processing units, for example, the processor 101 may include an application processor (AP), a modem processor, a graphics processor, an image signal processor (ISP), a controller, a memory, a video stream codec, a digital signal processor (DSP), a baseband processor, and / or a neural-network processing unit (NPU), etc. Different processing units may be independent devices or integrated in one or more processors 101.
[0114] The controller may be the nerve center and command center of the electronic device 100. The controller may generate an operation control signal according to the instruction operation code and the timing signal to complete the control of fetching and executing instructions.
[0115] The processor 101 may also be provided with a memory for storing instructions and data.
[0116] The communication module 102 may include antenna 1 and antenna 2, a mobile communication module, and / or a wireless communication module.
[0117] The display screen 103 is used to display images or videos in the human-computer interaction interface. The display screen 103 includes a display panel. The display panel can be a liquid crystal display (LCD), an organic light-emitting diode (OLED), an active-matrix organic light-emitting diode or an active-matrix organic light-emitting diode (AMOLED), a flexible light-emitting diode (FLED), MiniLED, MicroLED, Micro-OLED, quantum dot light emitting diodes (QLED), etc. In some embodiments, the electronic device 100 may include 1 or N display screens 103, where N is a positive integer greater than 1.
[0118] Optionally, the electronic device 100 may further include peripheral devices, such as a mouse, buttons, indicator lights, a keyboard, a speaker, a microphone, etc.
[0119] It can be understood that the structure illustrated in this embodiment does not constitute a specific limitation on the electronic device 100 .
[0120] In other embodiments, the electronic device 100 may include more or fewer components than shown, or combine some components, or separate some components, or arrange the components differently. The components shown may be implemented in hardware, software, or a combination of software and hardware.
[0121] Please refer to Figure 5 , is a schematic diagram of the relationship between a first electronic device and a second electronic device provided in an embodiment of the present application. The image acquisition method provided in an embodiment of the present application is applied to Figure 5 When the first electronic device is shown, the software in the first electronic device can be divided into the following Figure 5 The illustrated application layer 201 , application framework layer (framework, FWK) 202 , hardware abstraction layer (hardware abstraction layer, HAL) 203 , and kernel layer 204 .
[0122] Multiple applications may be installed in the application layer 201, which may include a screen projection test application (application, APP) for implementing a screen projection test function.
[0123] Among them, the screen projection test application refers to a computer program running on an operating system that can perform the tasks of displaying a test video and projecting the test video to a second electronic device.
[0124] The screen projection test application is connected to a cloud analysis module. After obtaining the final test results, the screen projection test application can send the test results to the cloud analysis module, so that the cloud analysis module can notify relevant personnel of the detection results of the screen projection function of the first electronic device.
[0125] The application framework layer 202 provides a set of basic functions and services for the application layer 201 to call and use.
[0126] Among them, the application framework layer 202 may include a display projection framework and an anomaly detection module.
[0127] The display projection framework can be used for projection management (for example, sending a test video sent by a projection test application to a second electronic device), resolution management, screen management, color management, screenshot / recording, brightness management, and frame rate management.
[0128] The anomaly detection module is used to detect anomalies in test videos.
[0129] The application framework layer 202 includes a defined language interface, and the screen projection test application can communicate with the application framework layer 202 through the defined language interface, such as receiving a test video sent by the screen projection test application, so that the display screen projection framework manages the test video, and sends it to the hardware abstraction layer, and enables the anomaly detection module to perform anomaly detection on the test video.
[0130] The hardware abstraction layer 203 is a software located between the operating system kernel and the hardware circuit, and is usually used to abstract the hardware to achieve the interaction between the operating system and the hardware circuit at the logic layer.
[0131] In an embodiment of the present application, the hardware abstraction layer 203 may include a display sub-abstraction layer that enables the screen projection test application to interact with the second electronic device at the logical layer.
[0132] The hardware abstraction layer 203 may include a display sub-abstraction layer (HAL display).
[0133] The display sub-abstraction layer can be used for screen off management, brightness management, frame rate control, and screen information management.
[0134] The display sub-abstraction layer includes an abstraction layer interface, through which the display sub-abstraction layer can communicate with the application framework layer 202, for example, receiving a test video sent by the display projection framework, so that the display sub-abstraction layer manages the test video and sends it to the kernel layer.
[0135] The definition language interface may include a hardware interface definition language interface (HIDL) and an Android interface definition language interface (AIDL).
[0136] The kernel layer 204 may have multiple drivers installed therein for driving the hardware.
[0137] The core layer 204 may include a display device driver.
[0138] The display device driver may be connected to the second electronic device, and is used to receive the test video sent by the display sub-abstraction layer, and transmit the test video to the second electronic device.
[0139] It should be noted that the application layer 201, the application framework layer 202, the hardware abstraction layer 203, and the kernel layer 204 of the first electronic device may also include other contents, which are not specifically limited here.
[0140] Based on the description of the above scenario description, the screen projection function testing method provided in the embodiment of the present application is described in detail below in combination with the accompanying drawings and application scenarios.
[0141] Among them, the screen projection function testing method can be applied to a first communication system, and the first communication system includes a first electronic device and a second electronic device.
[0142] The first electronic device may be a sending device for screen projection testing, and the second electronic device may be a receiving device for screen projection testing.
[0143] For example, the first electronic device may be a mobile phone, and the second electronic device may be a DP box.
[0144] The second electronic device is an auxiliary testing device, which is used to determine whether the screen projection function of the first electronic device is normal by detecting whether the test video is played normally.
[0145] When the first electronic device sends a test video to the second electronic device, the test application can send the test video to the second electronic device in sequence through the display projection framework, display abstraction sublayer, and display device driver of the first electronic device.
[0146] See also Figure 6 , Figure 6 A flow chart of a screen projection function testing method provided in one embodiment of the present application is shown.
[0147] like Figure 6 As shown, the screen projection function testing method provided in this application may include:
[0148] S11. The first electronic device starts a screen projection test application.
[0149] Among them, the first electronic device includes a screen projection test application for screen projection testing, and the first electronic device can start the screen projection test application in a variety of ways.
[0150] In some embodiments, the first electronic device includes an icon of a test application. After receiving an operation by the user to trigger the icon of the screen projection test application (such as a click, double-click, or long press operation, etc.), the first electronic device can start the screen projection test application.
[0151] In other embodiments, an assistant is added to the first electronic device, and after receiving a specific wake-up word input by the user's voice, the voice assistant can be woken up, and after receiving an instruction to open a screen projection test application input by the user's voice, the first electronic device can start the screen projection test application.
[0152] For example, the voice assistant may be YOYO. After receiving the user's voice input of "Hello, YOYO", YOYO can be woken up. After receiving the user's voice input of the voice instruction "open the test application", the first electronic device can start the screen projection test application.
[0153] This application does not limit the specific implementation method of launching the screen projection test application.
[0154] S12. The first electronic device plays a test video.
[0155] The first electronic device can play the test video in a variety of ways.
[0156] In some embodiments, when the first electronic device starts a screen projection test application, a first interface of the screen projection test application can be displayed, and the first interface includes a test video being played.
[0157] In other embodiments, when the first electronic device starts a test application, a first interface of the screen projection test application can be displayed, and the first interface includes a playback control. When the user's operation on the playback control is received, the first interface includes the test video being played.
[0158] This application does not specifically limit the method of playing the test video. This application does not specifically limit the display position, display style, display size and other parameters of the playback control.
[0159] Among them, the present application can pre-store the test video in the first electronic device and / or a storage device that communicates with the first electronic device, so as to facilitate the first electronic device to play the test video and send the test video to the second electronic device.
[0160] S13: The first electronic device or the second electronic device establishes a data channel for sending data between the first electronic device and the second electronic device, so that the first electronic device and the second electronic device can send data to each other.
[0161] Among them, S13 can be executed after S12 or before S11.
[0162] After the first electronic device or the second electronic device establishes a data channel for sending data between the first electronic device and the second electronic device, the second electronic device can receive the data sent by the first electronic device.
[0163] There may be multiple ways for the first electronic device or the second electronic device to establish a data channel for sending data between the first electronic device and the second electronic device.
[0164] In some embodiments, the first electronic device or the second electronic device may establish a data channel between the first electronic device and the second electronic device through a data line communication method.
[0165] In some embodiments, when the first electronic device or the second electronic device establishes a data channel between the first electronic device and the second electronic device through a data line, a manipulator can be used to connect the data line between the first electronic device and the second electronic device to establish a data channel between the first electronic device and the second electronic device.
[0166] Among them, if the first electronic device sends data to the second electronic device via a data cable, it is not limited by the current usage status of the second electronic device; for example, factors such as unstable wireless fidelity (WiFi), WiFi disconnection, or insufficient power, and the speed of sending the test video via the data cable is faster.
[0167] There are many types of data lines, and the type of data line may depend on the data transmission interface of the first electronic device and the second electronic device.
[0168] In some embodiments, when the data transmission interface of the first electronic device is a Type C interface and the data transmission interface of the second electronic device is an HDMI interface, the above-mentioned data cable is a Type C to HDMI cable.
[0169] In other embodiments, when the data transmission interface of the first electronic device is a Type C interface and the data transmission interface of the second electronic device is a DP interface, the above-mentioned data cable is a Type C to DP cable.
[0170] This application does not specifically limit the type of data line.
[0171] In other embodiments, the first electronic device or the second electronic device may establish a data channel between the first electronic device and the second electronic device through wireless communication such as a wireless network.
[0172] S14: The first electronic device sends a mounting request to the second electronic device.
[0173] The mount request is used to instruct the second electronic device to be connected to the first electronic device in the form of a USB disk (or storage device).
[0174] It should be understood that when the second electronic device is connected to the first electronic device in the form of a USB flash drive, the first electronic device can perform operations such as creating a folder and writing data in the second electronic device.
[0175] S15. The second electronic device returns the mounting result to the first electronic device.
[0176] After receiving the mounting request, if the second electronic device supports mounting, the second electronic device may return a mounting result to the first electronic device, where the mounting result is used to indicate that the second electronic device accepts mounting on the first electronic device.
[0177] Thus, the second electronic device can be connected to the first electronic device in the form of a USB flash drive, and the first electronic device can perform operations such as creating folders and writing data in the second electronic device.
[0178] In some embodiments, the mount may be in the form of a universal serial bus (USB) mount broadcast.
[0179] It can be understood that after the first electronic device receives the mounting result sent by the second electronic device, the state between the first electronic device and the second electronic device is the mounting state.
[0180] S16: The first electronic device reads the resolution 1 and frame rate 1 supported by the second electronic device, and the resolution 2 and frame rate 2 supported by the data line.
[0181] It should be understood that the resolution and frame rate supported by the second electronic device may be different from the resolution and frame rate supported by the data line. The first electronic device can pre-read the resolution and frame rate supported by the second electronic device and the data line respectively, so as to prepare data for the first electronic device to send a test video to the second electronic device via the data line.
[0182] In some embodiments, the first electronic device or the second electronic device establishes a data channel for sending data between the first electronic device and the second electronic device through a data line, then the first electronic device can read the interface protocol supported by the second electronic device and the interface protocol supported by the data line; wherein the interface protocol supported by the second electronic device includes resolution 1 and frame rate 1 supported by the second electronic device, and the interface protocol supported by the data line includes resolution 2 and frame rate 2 supported by the second electronic device.
[0183] Based on this, the first electronic device can read the resolution 1 and frame rate 1 supported by the second electronic device, and the resolution 2 and frame rate 2 supported by the data line.
[0184] For example, the second electronic device supports playing videos with a resolution of 4k and a frame rate of 60 Hz, and the data cable supports transmitting videos with a resolution of 2k and a frame rate of 60 Hz.
[0185] S17. The first electronic device determines a resolution 3 and a frame rate 3 of the test video to be sent.
[0186] Among them, when the first electronic device reads the resolution 1 and frame rate 1 supported by the second electronic device, and the resolution 2 and frame rate 2 supported by the data line, it can determine the resolution 1 and frame rate 1, and the smallest resolution and frame rate among the resolution 2 and frame rate 2 as the resolution 3 and frame rate 3 of the test video to be sent.
[0187] For example, assuming that the second electronic device supports playing videos with a resolution of 4k and a frame rate of 60Hz, and the data line supports transmitting videos with a resolution of 2k and a frame rate of 60Hz, then the first electronic device determines that the resolution of the test video to be sent is 2k and the frame rate is 60Hz.
[0188] Based on the above description, before sending a test video to the second electronic device, the first electronic device can determine in advance the resolution 1 and frame rate 1 supported by the second electronic device, as well as the resolution 2 and frame rate 2 supported by the data line, thereby ensuring that the test video supported by both the data line and the second electronic device can be transmitted to the second electronic device, thereby avoiding the situation where the first electronic device fails to project the screen to the second electronic device or the screen projection is abnormal due to factors such as resolution and frame rate.
[0189] It should be noted that if no operating error occurs, for example, the second electronic device matches the first electronic device (resolution and frame rate match), and the data line connecting the first electronic device and the second electronic device matches the first electronic device (resolution and frame rate match), then resolution 1 and frame rate 1 are respectively the same as resolution 2 and frame rate 2, and the determined resolution 3 and frame rate 3 are respectively the same as resolution 1 and frame rate 1, and resolution 2 and frame rate 2, which can avoid the subsequent situation where the resolution, frame rate, etc. of the test video determined in S53 are inconsistent with the preset resolution, preset frame rate, etc.
[0190] If an operational error occurs, such as the second electronic device does not match the first electronic device (resolution and frame rate do not match), and the data line connecting the first electronic device and the second electronic device does not match the first electronic device (resolution and frame rate do not match), then resolution 1 and frame rate 1 may be different from resolution 2 and frame rate 2, respectively, and the determined resolution 3 and frame rate 3 may be different from resolution 1 and frame rate 1, respectively, and may also be different from resolution 2 and frame rate 2, respectively. The subsequent situation such as S53 determining that the resolution, frame rate, etc. of the test video are inconsistent with the preset resolution, preset frame rate, etc.
[0191] Assume that the resolution of the test video is 4k and the frame rate is 60Hz, the preset resolution is 4k and the frame rate is 60Hz, and the resolution supported by the second electronic device is 4k and the frame rate is 60Hz. At this time, if a manipulator is used to connect the first electronic device and the second electronic device through a data cable, the wrong data cable may be taken. The manipulator should take a data cable that supports the resolution of 4k and the frame rate of 60Hz for video transmission. If the manipulator takes a data cable that supports the resolution of 2k and the frame rate of 60Hz for video transmission, the following situations may occur:
[0192] The resolution of the test video sent by the first electronic device to the second electronic device is 2k and the frame rate is 60Hz, so that the frame rate and resolution of the test video during subsequent abnormality detection are inconsistent with the preset resolution and preset sampling rate respectively.
[0193] S18: The first electronic device creates a test record folder in the second electronic device, and writes the identification information and current time information of the first electronic device.
[0194] The test record folder is a folder into which data can be written by the first electronic device and into which the data written by the first electronic device is stored.
[0195] The first electronic device creates a test record folder in the second electronic device, which can prepare data for the first electronic device to write the identification information and current time information of the first electronic device into the second electronic device.
[0196] There may be multiple situations for the identification information of the first electronic device.
[0197] In some embodiments, the identification information of the first electronic device includes a unique serial number (SN) of the first electronic device; the unique serial number of the first electronic device is used to uniquely identify the first electronic device.
[0198] In some other embodiments, the identification information of the first electronic device includes the SN number of the first electronic device and the current version information of the first electronic device; the current version information of the first electronic device is the version number of the operating system of the first electronic device.
[0199] Taking the first electronic device as a mobile phone as an example, the current version information of the mobile phone is the version number of the mobile phone operating system. The operating system version number identifies the specific version of the operating system software running on the mobile phone. Different mobile phone brands and models use different operating systems, such as Android and iOS. Each operating system will regularly release new versions to provide users with new features, performance improvements and security fixes.
[0200] It should be noted that the second electronic device may be connected to multiple first electronic devices at the same time, and it is necessary to perform screen projection function tests for multiple first electronic devices, or the second electronic device may perform screen projection function tests for multiple first electronic devices continuously. Therefore, by writing the identification information and current time information of the first electronic device, it is convenient to mark the test status of each first electronic device.
[0201] In some embodiments, the above time information is the current timestamp information; the smaller the timestamp value, the earlier the test record folder was created (the earlier the test video was detected for anomalies), and the larger the timestamp value, the later the test record folder was created (the later the test video was detected for anomalies).
[0202] S19. The first electronic device sends a screen projection connection request to the second electronic device.
[0203] The screen projection connection request is used to instruct the second electronic device to establish a screen projection connection with the first electronic device.
[0204] The screen projection connection request includes a screen projection protocol; when the first electronic device projects the screen to the second electronic device, a specific protocol is usually used to achieve data transmission and display. This protocol is the screen projection protocol. The screen projection protocol is used to define the data transmission format, rules and processes to ensure that the data transmission and display from the first electronic device to the second electronic device are completed efficiently and accurately.
[0205] In some embodiments, the screen projection protocol is the DPLink protocol.
[0206] It should be understood that after the first electronic device or the second electronic device establishes a data channel for sending data between the first electronic device and the second electronic device, if the first electronic device projects the screen to the second electronic device, the first electronic device needs to send a screen projection connection request to the second electronic device. When the second electronic device receives the screen projection connection request, the second electronic device can perform corresponding processing according to the screen projection protocol to realize data transmission and display.
[0207] S20. The second electronic device returns a screen projection connection notification to the first electronic device.
[0208] Among them, the screen projection connection notification is used to notify the first electronic device that the second electronic device can receive and display the screen projection content.
[0209] Based on S19, the second electronic device will also send a screen projection connection notification to the first electronic device to inform the first electronic device that the second electronic device can receive the screen projection content and start displaying it.
[0210] Therefore, after receiving the screen projection connection notification, the first electronic device can process it and start transmitting the content to the second electronic device.
[0211] It can be understood that after the first electronic device receives the screen projection connection notification sent by the second electronic device, the state between the first electronic device and the second electronic device is in the screen projection state and is no longer in the mounted state.
[0212] It should be noted that after the first electronic device or the second electronic device establishes a data channel for sending data between the first electronic device and the second electronic device, there are two states between the first electronic device and the second electronic device, one is the mounting state, and the other is the screen projection state.
[0213] S21. The first electronic device sends a test video to the second electronic device according to a resolution of 3 and a frame rate of 3.
[0214] When the first electronic device receives the screen projection connection notification, the first electronic device can determine that the second electronic device can receive and display the projected content. Therefore, the first electronic device can send a test video to the second electronic device to achieve screen projection.
[0215] Specifically, the first electronic device may send a test video to the second electronic device according to a resolution of 3 and a frame rate of 3.
[0216] For example, when the first electronic device determines that the resolution 3 is 2k and the frame rate 3 is 60 Hz, the first electronic device may send a test video with a resolution of 2k and a frame rate of 60 Hz to the second electronic device.
[0217] S22. The first electronic device performs an abnormality detection on the test video and generates a test result 1.
[0218] It should be understood that a situation may occur where the test video plays normally when the first electronic device is not projecting the test video to the second electronic device, but the test video cannot play normally when the first electronic device plays the test video during the process of projecting the test video to the second electronic device.
[0219] That is to say, the first electronic device may be able to play the test video normally when the test video is not projected. When the screen projection function is turned on, the first electronic device cannot play the test video normally, that is, the test video playback is abnormal.
[0220] Based on this, the first electronic device needs to perform anomaly detection on the test video when playing the test video during the process of projecting the screen to the second electronic device.
[0221] The first electronic device detects the test video and when it is determined that the image of the test video is in a normal state, the obtained test result 1 indicates that the screen projection function of the first electronic device is normal.
[0222] When the first electronic device detects the test video and determines that there is an abnormality in the image of the test video, the obtained test result 1 indicates that the screen projection function of the first electronic device is abnormal.
[0223] In some embodiments, when the image of the test video appears to be stuck, has white bars, a black screen, and / or the image is offset, the first electronic device can determine that the test video is played abnormally.
[0224] Image deflection can be understood as a situation where the image display is offset, tilted or misaligned. This may be caused by incorrect projection settings of the first electronic device, signal transmission problems, etc.
[0225] In some embodiments, when the image of the test video does not show freezes, white bars, black screen, or image deviation, the first electronic device can determine that the test video is played normally.
[0226] The specific implementation of S22 can be found in Figure 7 The relevant descriptions of S41-S49 shown are not repeated here.
[0227] S23. The second electronic device performs an abnormality detection on the test video and generates a test result 2.
[0228] It should be understood that a situation may occur where the test video plays normally when the first electronic device is not projecting the test video to the second electronic device, but the test video cannot play normally when the second electronic device plays the test video when the first electronic device is projecting the test video to the second electronic device.
[0229] That is to say, the first electronic device may be able to play the test video normally when the test video is not projected. When the screen projection function is turned on, the second electronic device cannot play the received test video normally, that is, the test video playback is abnormal.
[0230] Based on this, the second electronic device needs to perform abnormality detection on the test video during the process of receiving the test video and playing the test video.
[0231] The second electronic device detects the test video and when it is determined that the image of the test video is in a normal state, the obtained test result 2 indicates that the screen projection function of the first electronic device is normal.
[0232] When the second electronic device detects the test video and determines that there is an abnormality in the image of the test video, the obtained test result 2 indicates that the screen projection function of the first electronic device is abnormal.
[0233] The specific implementation of S23 can be found in Fig. 9 The relevant descriptions of S51-S63 shown are not repeated here.
[0234] S24. The second electronic device saves the test result 2 in a test record folder.
[0235] Based on S18, the first electronic device has created a record folder in the second electronic device. After obtaining the test result 2, the second electronic device can save the test result 2 in the test record folder.
[0236] Based on the above description, it can be known that the test result 2 is the test result of the test video sent to the first electronic device. Therefore, the second electronic device can save the test result 2 in the test record folder.
[0237] S25. The second electronic device sends a request to disconnect the screen projection to the first electronic device.
[0238] The request to disconnect the screen projection is used to instruct the first electronic device to disconnect the screen projection connection between the first electronic device and the second electronic device.
[0239] In some embodiments, the second electronic device may send a request to disconnect the screen projection to the first electronic device upon obtaining test result 2.
[0240] In other embodiments, when the detection duration reaches a preset duration, the second electronic device sends a request to disconnect the screen projection to the first electronic device; the preset duration may be pre-set by the second electronic device.
[0241] Among them, S24 and S25 can be executed sequentially or simultaneously.
[0242] S26: The first electronic device sends a mounting request to the second electronic device.
[0243] S27: The second electronic device returns the mounting result to the first electronic device.
[0244] After the first electronic device and the second electronic device establish a data channel, there are two states between the first electronic device and the second electronic device, one is a mounting state, and the other is a screen projection state, that is, the second electronic device is mounted on the first electronic device in the form of a USB flash drive, and the second electronic device is connected to the first electronic device in the form of a screen projection connection. Then, when the first electronic device receives a request to disconnect the screen projection, it can disconnect the screen projection connection with the second electronic device and send a mounting request to the second electronic device, so that the second electronic device can be mounted on the first electronic device in the form of a USB flash drive.
[0245] Among them, S26 and S27 are respectively Figure 6 The implementation of S14 and S15 in the illustrated embodiment is similar and will not be described in detail here.
[0246] S28. The first electronic device reads the test result 2 in the second electronic device.
[0247] Based on S23 and S24, the second electronic device has obtained test result 2 and saved test result 2 in the test record file. When the second electronic device is connected to the first electronic device in the form of a USB flash drive again, the first electronic device can read the test result 2 in the second electronic device, thereby preparing data for obtaining the final test result of the test video.
[0248] S29. The first electronic device obtains test result 3 according to test result 1 and test result 2.
[0249] Among them, test result 1 has two situations: abnormal screen projection function and normal screen projection function; test result 2 has two situations: abnormal screen projection function and normal screen projection function. Then, test result 3 includes four situations, namely:
[0250] Case 1: Test result 1 indicates that the screen projection function of the first electronic device is abnormal, and test result 2 indicates that the screen projection function of the first electronic device is normal.
[0251] For situation 1, it can be seen that abnormal playback occurs when the first electronic device plays a test video during screen projection to the second electronic device, and the first electronic device determines that the screen projection function of the first electronic device is abnormal. Abnormal playback occurs when the second electronic device plays a test video sent by the first electronic device based on its screen projection function, and the second electronic device determines that the screen projection function of the first electronic device is abnormal. Therefore, it is indicated that there may be an abnormality in the screen projection function of the first electronic device.
[0252] Case 2: Test result 1 indicates that the screen projection function of the first electronic device is abnormal, and test result 2 indicates that the screen projection function of the first electronic device is normal.
[0253] For situation 2, it can be seen that abnormal playback occurs when the first electronic device plays the test video during screen projection to the second electronic device, and the first electronic device determines that the screen projection function of the first electronic device is abnormal. When the second electronic device plays the test video sent by the first electronic device based on its screen projection function, no abnormal playback occurs, and the second electronic device determines that the screen projection function of the first electronic device is normal. Therefore, it is indicated that the screen projection function of the first electronic device is abnormal.
[0254] Case 3: Test result 1 indicates that the screen projection function of the first electronic device is normal, and test result 2 indicates that the screen projection function of the first electronic device is abnormal.
[0255] For situation 3, it can be seen that when the first electronic device plays the test video during the screen projection process to the second electronic device, there is no abnormal playback. The first electronic device determines that the screen projection function of the first electronic device is normal. When the second electronic device plays the test video sent by the first electronic device based on its screen projection function, abnormal playback occurs. The second electronic device determines that the screen projection function of the first electronic device is abnormal. Therefore, it is indicated that the screen projection function of the first electronic device is abnormal.
[0256] Case 4: Test result 1 indicates that the screen projection function of the first electronic device is normal, and test result 2 indicates that the screen projection function of the first electronic device is normal.
[0257] For situation 4, it can be seen that when the first electronic device plays the test video during the screen projection process to the second electronic device, there is no abnormal playback, and the first electronic device determines that the screen projection function of the first electronic device is normal. When the second electronic device plays the test video sent by the first electronic device based on its screen projection function, there is no abnormal playback, and the second electronic device determines that the screen projection function of the first electronic device is normal. Therefore, it is shown that the screen projection function of the first electronic device is normal.
[0258] Based on the above description, when the first electronic device is projecting its screen to the second electronic device, the test video is played normally on both the first electronic device and the second electronic device, which indicates that the projection function of the first electronic device is normal.
[0259] That is to say, when both test result 1 and test result 2 indicate that the screen projection function of the first electronic device is normal, test result 3 indicates that the screen projection function of the first electronic device is normal; when either test result 1 or test result 2 indicates that the screen projection function of the first electronic device is abnormal, test result 3 indicates that the screen projection function of the first electronic device is abnormal.
[0260] S30: The first electronic device sends a disconnection request to the second electronic device.
[0261] The disconnect mount request is used to instruct the second electronic device to disconnect from the first electronic device in the form of a USB flash drive.
[0262] After obtaining test result 3, the first electronic device can determine that the screen projection function test process of the first electronic device is completed. Therefore, the first electronic device can send a disconnection request to the second electronic device, requesting to disconnect the connection with the first electronic device in the form of a USB flash drive.
[0263] S31: The second electronic device returns a disconnection result to the first electronic device.
[0264] After receiving the disconnection mount request, the second electronic device may return a disconnection mount result to the first electronic device, where the disconnection mount result is used to indicate that the second electronic device accepts disconnection from the first electronic device.
[0265] S32: The first electronic device or the second electronic device disconnects the data channel for sending data between the first electronic device and the second electronic device.
[0266] The first electronic device or the second electronic device may disconnect the data channel for sending data between the first electronic device and the second electronic device in a corresponding manner according to different connection modes between the first electronic device and the second electronic device.
[0267] For example, a data channel is established between the first electronic device and the second electronic device via a data line connection, and the data channel between the first electronic device and the second electronic device can be disconnected by disconnecting the data line.
[0268] In some embodiments, a robot arm may be used to disconnect the data line connecting the first electronic device and the second electronic device.
[0269] S33. The second electronic device clears test result 2.
[0270] Among them, S33 is an optional step.
[0271] Based on the above description, when the screen projection function test of the first electronic device is completed, the second electronic device can clear the test result, so that the storage pressure of the second electronic device is released, the performance degradation of the second electronic device can be avoided, and the performance and stability of the second electronic device are guaranteed.
[0272] In the screen projection function testing method of the present application, the second electronic device can perform abnormality detection on the test video projected from the first electronic device to obtain test result 2. If the test video is played normally, test result 2 indicates that the screen projection function of the first electronic device is normal. If the test video is played abnormally, test result 2 indicates that the screen projection function of the first electronic device is abnormal. Therefore, it can be effectively determined whether the screen projection function of the first electronic device is normal, saving human resources and time resources.
[0273] While the second electronic device performs abnormality detection on the test video projected from the first electronic device, the first electronic device can also perform abnormality detection on the test video being played and projected to the second electronic device to obtain test result 1. Based on this, the first electronic device can also read test result 2 of the second electronic device after obtaining test result 1, and obtain test result 3 by combining test result 1 and test result 2. When both test result 1 and test result 2 indicate that the projection function of the first electronic device is normal, test result 3 indicates that the projection function of the first electronic device is normal. When either test result 1 or test result 2 indicates that the projection function of the first electronic device is abnormal, test result 3 indicates that the projection function of the first electronic device is abnormal. Based on this, combined with test result 1 of the first electronic device and test result 2 of the second electronic device, unmanned automatic detection of the projection function of the first electronic device is realized, which is suitable for intercepting a variety of projection abnormal scenarios, and can more accurately and effectively determine whether the projection function of the first electronic device is normal, saving human resources and time resources.
[0274] Based on the above Figure 6 According to the description of the illustrated embodiment, the first electronic device can obtain the test result 1 by detecting whether the image of the test video is stuck and whether the display is abnormal.
[0275] Next, combine Figure 7 , which introduces in detail the specific implementation process of the first electronic device of this application performing abnormality detection on the test video and generating test result 1.
[0276] See also Figure 7 , Figure 7 A schematic diagram of a process for a first electronic device provided in an embodiment of the present application to perform abnormality detection on a test video and generate a test result 1 is shown.
[0277] like Figure 7 As shown, the first electronic device provided by the present application performs abnormality detection on the test video, and the step of generating a test result 1 may include:
[0278] S41. The first electronic device periodically obtains an image i in a test video.
[0279] The image i is used to represent a frame of image acquired by the first electronic device in the test video. i is a positive integer greater than or equal to 1.
[0280] In some embodiments, the first electronic device may acquire image i in the test video every time duration 1, where time duration 1 is preset.
[0281] For example, duration 1 is 200 ms, that is, when the first electronic device is projecting its screen to the second electronic device and playing the test video, it obtains a frame of image in the test video every 200 ms.
[0282] S42: The first electronic device determines whether the image i is consistent with the image i acquired last time.
[0283] The last acquired image i is used to represent a frame of image acquired by the first electronic device before image i, that is, a frame of image acquired by the first electronic device in the last time period.
[0284] For example, duration 1 is 200ms, the timing starts from 0ms when the first electronic device sends a video to the second electronic device, image i is the image acquired by the first electronic device at 400ms, and the last acquired image i is the image acquired by the first electronic device at 200ms.
[0285] The first electronic device may determine whether the image i is consistent with the image i acquired last time by at least one of the image attributes such as pixel content and image features.
[0286] The first electronic device determines whether image i is consistent with the last acquired image i by pixel content: the first electronic device can determine whether image i is consistent with image i-1 by comparing the color value of each pixel point of image i with the last acquired image i one by one.
[0287] If the color value of each pixel of the image i is exactly the same as that of the image i acquired last time, then the first electronic device can determine that the image i is consistent with the image i acquired last time.
[0288] The first electronic device determines whether image i is consistent with image i acquired last time through image features: the first electronic device may extract image features of image i and image i acquired last time through different feature extraction methods, and compare them to determine whether image i is consistent with image i acquired last time; for example, image gradient, edge, texture and other features of the image may be extracted, or deep learning methods may be used for feature extraction and comparison.
[0289] If the image i has the same image features as the image i acquired last time, then the first electronic device may determine that the image i is consistent with the image i acquired last time.
[0290] When the image i is consistent with the image i acquired last time, the first electronic device may determine that there is a freeze in the image of the test video, and thus, the first electronic device may execute S43.
[0291] When the image i is inconsistent with the image i acquired last time, the first electronic device may determine that there is no freeze in the image of the test video, and thus, the first electronic device may execute S46.
[0292] It should be noted that, when i=1, image 1 is the first frame of image acquired by the first electronic device, and the first electronic device does not need to perform all steps after S41.
[0293] When i≥2, the first electronic device may determine whether the image i is consistent with the image i acquired last time.
[0294] S43: The first electronic device records the number of freezes.
[0295] The first electronic device may record the number of freezes each time it determines that the image i is consistent with the image i acquired last time.
[0296] That is, when the first electronic device determines for the first time that image i is consistent with the image i acquired last, it records the number of freezes as 1; when the first electronic device determines for the second time that image i is consistent with the image i acquired last, it records the number of freezes as 2, and so on.
[0297] In other words, the second electronic device may add 1 to the original number of freezes the second time, and each time thereafter, when it determines that the image i is consistent with the image i acquired last time.
[0298] S44: The first electronic device determines whether the number of freezes is greater than a threshold value 1.
[0299] After determining that image i is consistent with image i acquired last time and recording the number of freezes each time, the first electronic device can determine whether the number of freezes is greater than a threshold value 1.
[0300] Among them, threshold 1 is preset, and threshold 1 can be set according to actual conditions.
[0301] For example, threshold 1 is 5.
[0302] For example, when threshold 1 is 5 and the number of freezes is greater than 5 times, the first electronic device can determine that freezes exist in the test video.
[0303] When the number of freezes is greater than threshold 1, the first electronic device can determine that the test video displays the same image for a long time, that is, the freeze time of the same image is long, so the first electronic device can execute S45, that is, determine that the test video has a freeze.
[0304] When the number of freezes is less than or equal to the threshold 1, the first electronic device may execute S41 again.
[0305] S45: The first electronic device determines that the test video is frozen.
[0306] It should be understood that since the first electronic device periodically acquires image i in the test video, if the number of times image i is consistent with the last acquired image i is greater than the number corresponding to threshold 1, then it can be determined that the test video is stuck for a long time, causing the test video to be stuck on one image for a long time.
[0307] Based on this, the first electronic device can determine that the screen of the test video is frozen.
[0308] S46: The first electronic device performs abnormal display detection on the image i.
[0309] When the image i is inconsistent with the image i acquired last time, the first electronic device can determine that there is no freeze in the test video, and thus, the next detection can be performed, that is, abnormal display detection of the image i.
[0310] In some embodiments, the first electronic device may perform abnormality detection on the image i by using an image detection algorithm; the image detection algorithm is used to detect whether the image is displayed abnormally.
[0311] The present application may store the image detection algorithm in the first electronic device and / or a storage device that communicates with the first electronic device, so that the first electronic device can call the image detection algorithm to perform abnormality detection on image i.
[0312] Among them, the image detection algorithm is pre-generated.
[0313] In some embodiments, a server may be used to pre-generate an image detection algorithm.
[0314] In some embodiments, the generation process of the image detection algorithm includes:
[0315] Step 1: Obtain multiple normal images, where a normal image is an image without freeze, white bars, black screen, or image deviation.
[0316] Step 2: Determine a prediction result of each normal image in the plurality of normal images, where the prediction result is used to indicate whether each normal image is a normal image.
[0317] Step 3: According to the prediction result of each normal image in the multiple normal images, the original image detection algorithm is trained to obtain an image detection algorithm.
[0318] Combination Figure 8Based on the above description, in the training stage, multiple normal images can be input as training data into the generator of the original image detection algorithm to obtain the prediction result of each normal image in the multiple normal images, and then the prediction result of each normal image in the multiple normal images is input into the original image detection algorithm to train the image detection algorithm.
[0319] When the first electronic device performs abnormality detection on image i through an image detection algorithm, the first electronic device can input image i as an unknown frame image into the image detection algorithm, and the generator generates an image similar to image i and synthesizes a new image with image i, and the discriminator determines whether the new image is a normal frame image or an abnormal image.
[0320] The image detection algorithm is a generative adversarial network (GAN) algorithm. The generator and the discriminator are two important components for implementing the generative adversarial network.
[0321] The generator is a neural network model whose purpose is to generate new samples similar to the training data. The generator accepts a random noise vector as input and outputs a synthetic image.
[0322] The discriminator is also a neural network model, whose purpose is to determine whether the input image is a normal image or an abnormal image. The discriminator outputs a probability value to indicate the possibility that the input image is an abnormal image. By training the discriminator, normal images and abnormal images can be accurately distinguished.
[0323] During the training process, the generator and the discriminator compete and play against each other. The goal of the discriminator is to identify the difference between normal images and abnormal images as accurately as possible. Through repeated iterative training, the generator and the discriminator can gradually improve their performance.
[0324] S47: The first electronic device determines whether the image i is abnormal.
[0325] When abnormal conditions such as white bars, a black screen, and / or image deviation appear in the image i, the first electronic device may determine that the image i is abnormal.
[0326] When the image i does not have abnormal conditions such as white bars, a black screen, and image deviation, the first electronic device can determine that the image i is normal.
[0327] Based on this, the first electronic device determines whether the image i is abnormal by determining whether the image i has abnormal conditions such as white bars, a black screen, and / or image deviation.
[0328] When it is determined that the picture of the image i is abnormal, the first electronic device may execute S48, ie, determine that the picture of the test video is abnormal.
[0329] When it is determined that the picture of image i is normal, the first electronic device can determine that the picture of the test video is normal and can continue to execute S41, that is, acquire image i in the test video again for detection in the next cycle until image i in the test video acquired for the last time is detected.
[0330] S48: The first electronic device determines that the image of the test video is abnormal.
[0331] Based on S47, when abnormal conditions such as white bars, a black screen, and / or image deviation appear on the screen of image i, the first electronic device may determine that the screen of image i is abnormal.
[0332] S49. The first electronic device obtains test result 1.
[0333] When it is determined that the picture of the test video is frozen, or when it is determined that the picture of the test video is abnormal, the test result 1 obtained by the first electronic device indicates that the screen projection function of the first electronic device is abnormal.
[0334] It can be understood that since the first electronic device periodically obtains image i in the test video for detection, the first electronic device can obtain multiple sub-test results 1. When at least one sub-test result 1 of the multiple sub-test results 1 indicates that the screen projection function of the first electronic device is abnormal, the test result 1 indicates that the screen projection function of the first electronic device is abnormal; when multiple sub-test results 1 all indicate that the screen projection function of the first electronic device is normal, the test result 1 indicates that the screen projection function of the first electronic device is normal.
[0335] In summary, the first electronic device determines whether the picture of the test video is frozen by the number of times that image i is consistent with the last acquired image i. When it is determined that the picture of the test video is frozen, it is determined that test result 1 indicates that the screen projection function of the first electronic device is abnormal; and when image i is inconsistent with image i acquired last, the first electronic device determines whether the picture of the test video is abnormal by determining whether the picture of image i is displayed abnormally. When it is determined that the picture of the test video is abnormal, it is determined that test result 1 indicates that the screen projection function of the first electronic device is abnormal.
[0336] Based on the above Figure 6 According to the description of the illustrated embodiment, the second electronic device can obtain test result 2 by detecting whether the image of the test video is stuck and whether it is displayed abnormally, so that the first electronic device can combine test result 1 and test result 2 to obtain final test result 3, and determine whether the screen projection function of the first electronic device is normal through test result 3.
[0337] Next, combine Fig. 9 , which introduces in detail the specific implementation process of the second electronic device of the present application performing abnormality detection on the test video and generating test result 2.
[0338] See also Fig. 9 , Fig. 9 A schematic diagram of a process for generating a test result 1 by a second electronic device performing anomaly detection on a test video provided by an embodiment of the present application is shown.
[0339] like Fig. 9 As shown, the second electronic device provided by the present application performs abnormality detection on the test video, and the step of generating test result 1 may include:
[0340] S51: The second electronic device decodes a video stream corresponding to a test video to obtain a frame rate and a resolution of the test video.
[0341] It should be understood that video data is continuous, real-time data, and therefore, the transmission of video between two electronic devices is usually in the form of a data stream.
[0342] Based on this, when the first electronic device sends the test video to the second electronic device, it can be sent in the form of a data stream, and the data stream includes a video stream and an audio stream.
[0343] Among them, the video stream is used to transmit image information. The video stream is a data stream composed of a series of continuous image frames, and each image frame includes parameters such as image pixel information, frame rate and resolution.
[0344] The video stream is compressed and encoded. Therefore, if the test video needs to be played normally, the video stream needs to be decoded to restore the compressed and encoded video stream to multiple original images.
[0345] When the compressed and encoded video stream is restored to a plurality of original images, the second electronic device can obtain the frame rates and resolutions respectively corresponding to the plurality of original images, that is, the frame rate and resolution of the test video.
[0346] S52: The second electronic device decodes the audio stream corresponding to the test video to obtain the sampling rate, sampling size, and number of sampling channels of the test video.
[0347] The audio stream is used to transmit sound information. The audio stream consists of a series of continuous audio sample data. Each audio sample data includes information such as sampling rate, sampling size (also called sampling bit number) and number of channels.
[0348] The audio stream is compressed and encoded. Therefore, if the test video needs to be played normally, the audio stream needs to be decoded to restore the compressed and encoded audio stream into multiple audio data.
[0349] When the compressed and encoded audio stream is restored to multiple audio data, the second electronic device can obtain the sampling rate, sampling size and number of sampling channels corresponding to the multiple audio data, that is, the sampling rate, sampling size and number of sampling channels of the test video.
[0350] Among them, S51 and S52 can be executed simultaneously or sequentially. When S51 and S52 are executed sequentially, S51 can be executed first and then S52, or S52 can be executed first and then S51.
[0351] S53. The second electronic device determines whether the frame rate, resolution, sampling rate, sampling size and number of sampling channels of the test video are consistent with a preset frame rate, preset resolution, preset sampling rate, preset sampling size and preset number of sampling channels.
[0352] Among them, the preset frame rate, preset resolution, preset sampling rate, preset sampling size and preset number of sampling channels are all pre-set, and the preset frame rate, preset resolution, preset sampling rate, preset sampling size and preset number of sampling channels can be set according to the first electronic device to be detected and the actual situation of the test video.
[0353] The present application can store the preset frame rate, preset resolution, preset sampling rate, preset sampling size and preset number of sampling channels in a second electronic device and / or a storage device that communicates with the second electronic device, so that the second electronic device can call the preset frame rate, preset resolution, preset sampling rate, preset sampling size and preset number of sampling channels for comparison when obtaining the frame rate, resolution, sampling rate, sampling size and number of sampling channels of the test video.
[0354] When the frame rate, resolution, sampling rate, sampling size and number of sampling channels of the test video are respectively consistent with the preset frame rate, preset resolution, preset sampling rate, preset sampling size and preset number of sampling channels, the second electronic device can determine that the transmission of the test video is normal, and the second electronic device can execute S55.
[0355] When the frame rate, resolution, sampling rate, sampling size and number of sampling channels of the test video are respectively inconsistent with the preset frame rate, preset resolution, preset sampling rate, preset sampling size and preset number of sampling channels, the second electronic device may execute S54.
[0356] Assume that the resolution of the test video is 4k and the frame rate is 60Hz, the preset resolution is 4k and the frame rate is 60Hz, and the resolution supported by the second electronic device is 4k and the frame rate is 60Hz. At this time, if a manipulator is used to connect the first electronic device and the second electronic device through a data cable, the wrong data cable may be taken. The manipulator should take a data cable that supports the resolution of 4k and the frame rate of 60Hz for video transmission. If the manipulator takes a data cable that supports the resolution of 2k and the frame rate of 60Hz for video transmission, the following situations may occur:
[0357] The resolution of the test video sent by the first electronic device to the second electronic device is 2k and the frame rate is 60 Hz, so that the frame rate and resolution of the test video are inconsistent with the preset resolution and the preset sampling rate, respectively.
[0358] S54: The second electronic device determines that the test video transmission is abnormal.
[0359] Based on S53, when the frame rate, resolution, sampling rate, sampling size and number of sampling channels of the test video are inconsistent with any one of the preset frame rate, preset resolution, preset sampling rate, preset sampling size and preset number of sampling channels, it can be determined that the data stream transmission of the test video is abnormal.
[0360] S55. The second electronic device periodically obtains image i in the test video.
[0361] S56: The second electronic device determines whether the image i is consistent with the image i acquired last time.
[0362] S57: The second electronic device records the number of freezes.
[0363] S58: The second electronic device determines whether the number of freezes is greater than a threshold value 1.
[0364] S59: The second electronic device determines that the test video is frozen.
[0365] S60: The second electronic device performs abnormality detection on the image i.
[0366] S61: The second electronic device determines whether the picture of image i is abnormal.
[0367] S62: The second electronic device determines that the image of the test video is abnormal.
[0368] S63: The second electronic device obtains test result 2.
[0369] Among them, S55, S56, S57, S58, S59, S60, S61, S62 and S63 are respectively Figure 7The implementation methods of S41, S42, S43, S44, S45, S46, S47, S48 and S49 in the illustrated embodiment are similar and will not be repeated here.
[0370] It can be understood that since the second electronic device periodically obtains image i in the test video for detection, the second electronic device can obtain multiple sub-test results 2. When at least one sub-test result 2 among the multiple sub-test results 2 indicates that the screen projection function of the first electronic device is abnormal, the test result 2 indicates that the screen projection function of the first electronic device is abnormal; when multiple sub-test results 2 all indicate that the screen projection function of the first electronic device is normal, the test result 2 indicates that the screen projection function of the first electronic device is normal.
[0371] In summary, the second electronic device determines whether the transmission of the test video is normal by comparing the frame rate, resolution, sampling rate, sampling size and number of sampling channels of the test video to see whether they are consistent with the preset frame rate, preset resolution, preset sampling rate, preset sampling size and preset number of sampling channels. When it is determined that they are inconsistent, test result 2 indicates that the screen projection function of the first electronic device is abnormal.
[0372] In addition, the second electronic device determines whether the screen of the test video is frozen by the number of times that image i is consistent with the last acquired image i. When it is determined that the screen of the test video is frozen, test result 2 indicates that the screen projection function of the first electronic device is abnormal. And, when image i is inconsistent with image i acquired last, the second electronic device determines whether the screen of the test video is abnormal by determining whether the screen of image i is displayed abnormally. When it is determined that the screen of the test video is abnormal, test result 2 indicates that the screen projection function of the first electronic device is abnormal.
[0373] Based on some of the aforementioned embodiments, the screen projection function testing method provided by the present application is introduced below.
[0374] Exemplarily, the present application provides a method for testing a screen projection function.
[0375] See also Fig.10 , Fig.10 A flow chart of a screen projection function testing method provided in one embodiment of the present application is shown.
[0376] like Fig.10 As shown, the screen projection function testing method provided in this application may include:
[0377] In a first aspect, the present application provides a screen projection function testing method, which is applied to a first communication system, where the first communication system includes a first electronic device and a second electronic device, and the method includes:
[0378] S301. During the process of playing a test video, in response to a successful establishment of a data channel between the first electronic device and the second electronic device, the first electronic device sends a first request to the second electronic device, where the first request is used to instruct the second electronic device to establish a screen projection connection with the first electronic device.
[0379] The specific implementation method for successfully establishing a data channel between the first electronic device and the second electronic device can be found in Figure 6 The relevant description of S13 in is not repeated here.
[0380] For the specific implementation of the first request, please refer to Figure 6 The description of S19 regarding the screen projection connection request is not repeated here.
[0381] For the specific implementation of S301, please refer to Figure 6 The description of S11-S13 and S19 in the description will not be repeated here.
[0382] S302. The second electronic device sends a first message to the first electronic device in response to the first request. The first message is used to indicate that the second electronic device accepts to establish a screen projection connection with the first electronic device.
[0383] The specific implementation of the first message can be found in Figure 6 The relevant description of S20 about screen projection connection notification is not repeated here.
[0384] For the specific implementation of S302, please refer to Figure 6 The relevant description of S20 in is not repeated here.
[0385] S303: The first electronic device sends the test video being played by the first electronic device to the second electronic device in response to the first message.
[0386] The specific implementation of S303 can be found in Figure 6 The relevant description of S21 in will not be repeated here.
[0387] S304: When receiving the test video, the second electronic device plays the test video and performs a first detection on the test video to obtain a first detection result, where the first detection is used to detect whether the test video is played abnormally in the second electronic device.
[0388] The specific implementation of the first detection can be found in Figure 6 The description of anomaly detection in S23 is not repeated here.
[0389] For the specific implementation of S304, please refer to Figure 6 The relevant description of S23 in is not repeated here.
[0390] S305. The second electronic device sends a second request to the first electronic device, where the second request is used to instruct the first electronic device to disconnect the screen projection connection with the second electronic device.
[0391] The specific implementation of the second request can be found in Figure 6 The description of S25 regarding the screen projection connection request is not repeated here.
[0392] For the specific implementation of S305, please refer to Figure 6 The description of S25 in is not repeated here.
[0393] S306: The first electronic device reads the first detection result in the second electronic device in response to the second request.
[0394] The specific implementation method of the first detection result can be found in Figure 6 The descriptions of test result 2 in S23, S24, and S28 are not repeated here.
[0395] For the specific implementation of S306, please refer to Figure 6 The description of S28 in is not repeated here.
[0396] S307: The first electronic device determines whether the screen projection function of the first electronic device is normal based on the first detection result.
[0397] When the first detection result indicates that the test video is played abnormally in the second electronic device, the first electronic device determines that the screen projection function of the first electronic device is abnormal; when the first detection result indicates that the test video is played normally in the second electronic device, the first electronic device determines that the screen projection function of the first electronic device is normal.
[0398] In the present application, the first electronic device sends a test video to the second electronic device when establishing a screen projection connection with the second electronic device. During the process of the second electronic device playing the test video, the test video is subjected to a first detection. The first electronic device reads the first detection result obtained by the second electronic device, and determines that the screen projection function of the first electronic device is abnormal when the first detection result indicates that the test video is played abnormally in the second electronic device. When the first detection result indicates that the test video is played normally in the second electronic device, it is determined that the screen projection function of the first electronic device is normal. Thus, unmanned automatic detection of the screen projection function of the first electronic device is implemented, which is suitable for intercepting a variety of screen projection abnormal scenarios, can effectively determine whether the screen projection function of the first electronic device is normal, and saves human resources and time resources.
[0399] In some embodiments, the screen projection function testing method of the present application may include:
[0400] In response to the first message, the first electronic device performs a second detection on the test video being played by the first electronic device to obtain a second detection result, wherein the second detection is used to detect whether the test video is played abnormally in the first electronic device; the first electronic device determines whether the screen projection function of the first electronic device is normal based on the first detection result, including: the first electronic device determines whether the screen projection function of the first electronic device is normal based on the first detection result and the second detection result.
[0401] The specific implementation of the second detection can be found in Figure 6 The description of anomaly detection in S22 is not repeated here.
[0402] The specific implementation method of the second detection result can be found in Figure 6 The description of test result 1 in S22 is not repeated here.
[0403] The specific implementation of the above steps can be found in Figure 6 The description of S29 in is not repeated here.
[0404] Among them, while the second electronic device performs a first detection on the test video projected from the first electronic device, the first electronic device can also perform a second detection on the test video being played and projected to the second electronic device to obtain a second detection result. Based on this, the first electronic device can also read the first detection result of the second electronic device after obtaining the second detection result, and combine the first detection result and the second detection result. When the first detection result and the second detection result both indicate that the screen projection function of the first electronic device is normal, it can be determined that the screen projection function of the first electronic device is normal, and when any one of the first detection result and the second detection result indicates that the screen projection function of the first electronic device is abnormal, it can be determined that the screen projection function of the first electronic device is abnormal. Based on this, combined with the second detection result of the first electronic device and the first detection result of the second electronic device, unmanned automatic detection of the screen projection function of the first electronic device is realized, which is suitable for intercepting a variety of abnormal screen projection scenarios, and can more accurately and effectively determine whether the screen projection function of the first electronic device is normal, saving human resources and time resources.
[0405] In some embodiments, the screen projection function testing method of the present application may include:
[0406] The first electronic device creates a first folder in the second electronic device and writes identification information of the first electronic device and current time information in the first folder. The identification information of the first electronic device is used to uniquely identify the first electronic device. The first detection result is stored in the first folder.
[0407] The specific implementation of the first folder can be found in Figure 6The description of the test record folder in S18 is not repeated here.
[0408] The specific implementation of the above steps can be found in Figure 6 The description of S18 in is not repeated here.
[0409] In some embodiments, the screen projection function testing method of the present application may include:
[0410] The first electronic device reads a first resolution and a first frame rate supported by the second electronic device for playing a video, and a second resolution and a second frame rate supported by the data line for transmitting a video; the first electronic device sends a test video being played by the first electronic device to the second electronic device, including: the first electronic device determines a third resolution and a third frame rate for sending the test video being played by the first electronic device to the second electronic device based on the first resolution and the first frame rate, and the second resolution and the second frame rate; the first electronic device sends the test video being played by the first electronic device to the second electronic device based on the third resolution and the third frame rate.
[0411] The specific implementation of the first resolution and the first frame rate can be found in Figure 6 S16 in the description about resolution 1 and frame rate 1.
[0412] For details on how to implement the second resolution and the second frame rate, see Figure 6 S16 in the description about resolution 2 and frame rate 2.
[0413] For details on how to implement the third resolution and the third frame rate, see Figure 6 S17 in the description about resolution 3 and frame rate 3.
[0414] The specific implementation of the above steps can be found in Figure 6 The description of S16-S17 in the description will not be repeated here.
[0415] Based on some of the aforementioned embodiments, the screen projection function testing method provided by the present application is introduced below.
[0416] Exemplarily, the present application provides a method for testing a screen projection function.
[0417] For the sake of convenience, the screen projection function test method of this application can be Figure 4 The electronic device 100 is used to execute.
[0418] Taking the electronic device 100 as a first electronic device as an example, the first electronic device is applied to a first communication system, and the first communication system includes a first electronic device and a second electronic device.
[0419] Combination Fig.10, the application screen projection function testing method provided in this application may include:
[0420] S401. During the process of playing a test video, in response to establishing a data channel between a first electronic device and a second electronic device, a first request is sent to the second electronic device, where the first request is used to instruct the second electronic device to establish a screen projection connection with the first electronic device.
[0421] S402. When receiving a first message sent by a second electronic device, send the test video being played by the first electronic device to the second electronic device so that the second electronic device plays the test video, and perform a first detection on the playing test video, wherein the first detection is used to detect whether the test video is played abnormally in the second electronic device, and the first message is used to indicate that the second electronic device accepts to establish a screen projection connection with the first electronic device.
[0422] S403. When receiving a second request sent by a second electronic device, read a first detection result in the second electronic device, where the first detection result is obtained by the second electronic device performing a first detection on the test video being played, and the second request is used to instruct the first electronic device to disconnect the screen projection connection with the second electronic device.
[0423] S404. Determine whether the screen projection function of the first electronic device is normal according to the first detection result.
[0424] The specific implementation of the above S401-S404 can be found in Fig.10 The relevant descriptions of S301-S307 in are not repeated here.
[0425] In some embodiments, the screen projection function testing method of the present application may include:
[0426] When a first message sent by a second electronic device is received, a second detection is performed on the test video being played by the first electronic device to obtain a second detection result, wherein the second detection is used to detect whether the test video is played abnormally in the first electronic device; based on the first detection result, determining whether the screen projection function of the first electronic device is normal, including: determining whether the screen projection function of the first electronic device is normal based on the first detection result and the second detection result.
[0427] The specific implementation of the above steps can be found in Figure 6 The description of S29 in is not repeated here.
[0428] In some embodiments, the second detection includes a freeze detection, and the screen projection function test method of the present application may include:
[0429] A freeze detection is performed on a test video being played by the first electronic device, and when the test video freezes, a second detection result is determined to be a detection result indicating that a screen projection function of the first electronic device is abnormal.
[0430] The specific implementation of the above-mentioned jam detection steps can be found in Figure 7 The description of S41-S45 and S49 in the description will not be repeated here.
[0431] In some embodiments, the second detection further includes screen abnormality detection, and the screen projection function test method of the present application may include:
[0432] A screen abnormality detection is performed on a test video being played by the first electronic device. When the test video screen is abnormal, a second detection result is determined as a detection result indicating that a screen projection function of the first electronic device is abnormal. The screen abnormality includes at least one of white bars, a black screen, and screen deviation.
[0433] The specific implementation of the above-mentioned abnormality detection step can be found in Figure 7 The description of S46-S49 in the description will not be repeated here.
[0434] In some embodiments, the first detection includes freeze detection and / or screen abnormality detection.
[0435] The specific implementation method of performing the first detection on the test video being played by the first electronic device can be found in Fig. 9 The description of S51-S63 in the description will not be repeated here.
[0436] In some embodiments, the screen projection function testing method of the present application may include:
[0437] A first folder is created in the second electronic device, and identification information of the first electronic device and current time information are written into the first folder. The identification information of the first electronic device is used to uniquely identify the first electronic device. The first detection result is stored in the first folder.
[0438] The specific implementation of the above steps can be found in Figure 6 The description of S18 in is not repeated here.
[0439] In some embodiments, the data channel between the first electronic device and the second electronic device is established through a data line, and the screen projection function test method of the present application may include:
[0440] Reading a first resolution and a first frame rate supported by the second electronic device for playing a video, and a second resolution and a second frame rate supported by the data line for transmitting a video; sending a test video being played by the first electronic device to the second electronic device, including: determining a third resolution and a third frame rate for sending the test video being played by the first electronic device to the second electronic device based on the first resolution and the first frame rate, and the second resolution and the second frame rate; and sending the test video being played by the first electronic device to the second electronic device based on the third resolution and the third frame rate.
[0441] The specific implementation of the above steps can be found in Figure 6 The description of S16-S17 in the description will not be repeated here.
[0442] In some embodiments, the screen projection function testing method of the present application may include:
[0443] Start a screen projection test application, which is an application installed in the first electronic device for triggering screen projection between devices, and the screen projection test application pre-stores a test video; play the test video through the test application.
[0444] The specific implementation of the above steps can be found in Figure 6 The description of S11-S12 in the description will not be repeated here.
[0445] Based on some of the aforementioned embodiments, the screen projection function testing method provided by the present application is introduced below.
[0446] Exemplarily, the present application provides a method for testing a screen projection function.
[0447] For the sake of convenience, the screen projection function test method of this application can be Figure 4 The electronic device 100 is used to execute.
[0448] For example, the electronic device 100 is a second electronic device. The second electronic device is applied to a first communication system. The first communication system includes a first electronic device and a second electronic device.
[0449] Combination Fig.10 , the screen projection function testing method provided in this application may include:
[0450] S501. Upon receiving a first request sent by a first electronic device, a first message is returned to the first electronic device. The first request is sent by the first electronic device to the second electronic device in response to a successful establishment of a data channel between the first electronic device and the second electronic device during the process of playing a test video. The first request is used to instruct the second electronic device to establish a screen projection connection with the first electronic device. The first message is used to indicate that the second electronic device accepts to establish a screen projection connection with the first electronic device.
[0451] S502: When receiving the test video sent by the first electronic device, play the test video.
[0452] S503: Perform a first detection on the test video being played to obtain a first detection result, where the first detection is used to detect whether the test video is played abnormally in the second electronic device.
[0453] S504. Send a second request to the first electronic device so that the first electronic device reads the first detection result in response to the second request, and determines whether the screen projection function of the first electronic device is normal based on the first detection result. The second request is used to instruct the first electronic device to disconnect the screen projection connection with the second electronic device.
[0454] The specific implementation of the above S501-S504 can be found in Fig.10 The relevant descriptions of S301-S307 in are not repeated here.
[0455] In some embodiments, the screen projection function testing method of the present application may include:
[0456] A second request is sent to the first electronic device so that the first electronic device reads the first detection result in response to the second request, and determines whether the screen projection function of the first electronic device is normal based on the first detection result and the second detection result. The second detection result is obtained by the first electronic device performing a second detection on the test video being played by the first electronic device. The second detection is used to detect whether the test video is played abnormally in the first electronic device.
[0457] The specific implementation of the above steps can be found in Figure 6 The description of S29 in is not repeated here.
[0458] In some embodiments, the test video received by the second electronic device includes a video stream and an audio stream of the test video, the first detection includes a parameter detection, and the screen projection function test method of the present application may include:
[0459] The video stream is decoded to obtain a first parameter corresponding to the test video, wherein the first parameter includes a third resolution and a third frame rate; the audio stream is decoded to obtain a second parameter corresponding to the test video, wherein the second parameter includes a sampling rate, a sampling bit value, and a number of sampling channels; parameter detection is performed on the test video being played, and when the first parameter is different from a first preset parameter pre-stored in the second electronic device, and / or the second parameter is different from a second preset parameter pre-stored in the second electronic device, it is determined that the first detection result is a detection result indicating that the screen projection function of the first electronic device is abnormal, wherein the first preset parameter includes a preset resolution and a preset frame rate, and the second preset parameter includes a preset sampling rate, a preset sampling bit value, and a preset number of sampling channels.
[0460] The specific implementation of video streaming can be found in Fig. 9 The relevant description of S51 in is not repeated here.
[0461] For the specific implementation of audio streaming, please refer to Fig. 9 The description of S52 in is not repeated here.
[0462] The specific implementation of the above steps can be found in Fig. 9 The description of S51-S54 and S63 in the description will not be repeated here.
[0463] In some embodiments, the first detection also includes a freeze detection, and the screen projection function test method of the present application may include:
[0464] When the first parameter is the same as the first preset parameter, and the second parameter is the same as the second preset parameter, a freeze detection is performed on the test video. When the test video freezes, it is determined that the first detection result is a detection result indicating that the screen projection function of the first electronic device is abnormal.
[0465] The specific implementation of the above steps can be found in Fig. 9 The description of S55-S59 and S63 in the specification will not be repeated here.
[0466] In some embodiments, the first detection also includes screen abnormality detection, and the screen projection function test method of the present application may include:
[0467] A test video is detected for screen abnormalities. When the test video screen is abnormal, a first detection result is determined as a detection result indicating that a screen projection function of the first electronic device is abnormal. The screen abnormality includes at least one of white bars, a black screen, and screen deviation.
[0468] The specific implementation of the above-mentioned abnormality detection step can be found in Fig. 9 The description of S60-S62 and S63 in the description will not be repeated here.
[0469] In some embodiments, the second detection includes freeze detection and / or screen abnormality detection.
[0470] The specific implementation method of performing the second detection on the test video being played by the first electronic device can be found in Figure 7 The description of S41-S49 in the description will not be repeated here.
[0471] In some embodiments, the screen projection function testing method of the present application may include:
[0472] The first detection result is saved in a first folder. The first folder is created by the first electronic device in the second electronic device when a data channel is successfully established between the first electronic device and the second electronic device. The first folder includes identification information of the first electronic device and current time information. The identification information of the first electronic device and the current time information are written after the first electronic device creates the first folder. The identification information of the first electronic device is used to uniquely identify the first electronic device.
[0473] The specific implementation of the above steps can be found in Figure 6 The relevant description of S24 in will not be repeated here.
[0474] In some embodiments, the screen projection function testing method of the present application may include:
[0475] In response to disconnecting the data channel between the first electronic device and the second electronic device, the first detection result is deleted.
[0476] The specific implementation of the above steps can be found in Figure 6 The description of S33 in is not repeated here.
[0477] Exemplarily, the present application provides an electronic device, comprising a processor; when the processor executes computer code or instructions in the memory, the electronic device executes the screen projection function testing method in the previous embodiment.
[0478] Exemplarily, the present application provides an electronic device, comprising: a memory and a processor; the memory is coupled to the processor, and the memory is used to store program codes or instructions; the processor is used to call the program codes or instructions in the memory so that the electronic device executes the screen projection function testing method in the previous embodiment.
[0479] Exemplarily, the present application provides a chip system, which is applied to an electronic device including a memory, a display screen and a sensor; the chip system includes: one or more interface circuits and one or more processors; the interface circuit and the processor are interconnected through lines; the interface circuit is used to receive signals from the memory and send signals to the processor, and the signals include computer codes or instructions stored in the memory; when the processor executes the computer code or instructions, the electronic device executes the screen projection function testing method in the previous embodiment.
[0480] Exemplarily, the present application provides a computer-readable storage medium, in which codes or instructions are stored. When the codes or instructions are run on an electronic device, the screen projection function testing method in the foregoing embodiment is implemented when the electronic device executes them.
[0481] Exemplarily, the present application provides a computer program product, which, when executed on a computer, enables an electronic device to implement the screen projection function testing method in the foregoing embodiment.
[0482] In the above embodiments, all or part of the functions can be implemented by software, hardware, or a combination of software and hardware. When implemented using software, it can be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer codes or instructions. When the computer program code or instructions are loaded and executed on a computer, the process or function according to the present application is generated in whole or in part. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable devices. The computer code or instructions can be stored in a computer-readable storage medium. The computer-readable storage medium can be any available medium that a computer can access or a data storage device such as a server or a data center that includes one or more available media integration. Available media can be magnetic media, (e.g., floppy disk, hard disk, tape), optical media (e.g., DVD), or semiconductor media (e.g., solid state disk (SSD)), etc.
[0483] A person skilled in the art can understand that to implement all or part of the processes in the above-mentioned embodiments, the processes can be completed by a computer program to instruct the relevant hardware, and the program can be stored in a computer-readable storage medium. When the program is executed, it can include the processes of the above-mentioned method embodiments. The aforementioned storage medium includes: a read-only memory (ROM) or a random access memory (RAM), a magnetic disk or an optical disk, and other media that can store program codes.
Claims
1. A screen projection function testing method, characterized in that: Applied to a first communication system, the first communication system includes a first electronic device and a second electronic device, the method includes: During the process of playing the test video, in response to the successful establishment of a data channel between the first electronic device and the second electronic device, the first electronic device sends a first request to the second electronic device, where the first request is used to instruct the second electronic device to establish a screen projection connection with the first electronic device; In response to the first request, the second electronic device sends a first message to the first electronic device, where the first message is used to indicate that the second electronic device accepts to establish a screen projection connection with the first electronic device; In response to the first message, the first electronic device sends the test video being played by the first electronic device to the second electronic device, and performs a second detection on the test video being played by the first electronic device to obtain a second detection result, wherein the second detection includes a freeze detection and a screen abnormality detection, and the screen abnormality includes at least one of white bars, a black screen, and screen deviation in the image; When receiving the test video, the second electronic device plays the test video and performs a first detection on the test video to obtain a first detection result, where the first detection includes the freeze detection and the screen abnormality detection; The second electronic device sends a second request to the first electronic device, where the second request is used to instruct the first electronic device to disconnect the screen projection connection with the second electronic device; The first electronic device reads the first detection result in the second electronic device in response to the second request; The first electronic device determines whether the screen projection function of the first electronic device is normal based on the first detection result and the second detection result.
2. The method according to claim 1, characterized in that Before sending the first request to the second electronic device, the method further includes: The first electronic device creates a first folder in the second electronic device and writes identification information of the first electronic device and current time information in the first folder, wherein the identification information of the first electronic device is used to uniquely identify the first electronic device, and the first detection result is stored in the first folder.
3. The method according to claim 2, characterized in that The data channel between the first electronic device and the second electronic device is established through a data line. Before sending the first request to the second electronic device, the method further includes: The first electronic device reads a first resolution and a first frame rate that the second electronic device supports for playing a video, and a second resolution and a second frame rate that the data line supports for transmitting a video; The first electronic device sending the test video being played by the first electronic device to the second electronic device includes: The first electronic device determines, according to the first resolution and the first frame rate, and the second resolution and the second frame rate, to send a third resolution and a third frame rate of the test video being played by the first electronic device to the second electronic device; The first electronic device sends the test video being played by the first electronic device to the second electronic device according to the third resolution and the third frame rate.
4. A screen projection function testing method, characterized in that: Applied to a first electronic device, the first electronic device is applied to a first communication system, the first communication system includes the first electronic device and a second electronic device, the method includes: During the playing of the test video, in response to establishing a data channel between the first electronic device and the second electronic device, sending a first request to the second electronic device, where the first request is used to instruct the second electronic device to establish a screen projection connection with the first electronic device; When receiving the first message sent by the second electronic device, sending the test video being played by the first electronic device to the second electronic device, and performing a second detection on the test video being played by the first electronic device to obtain a second detection result, wherein the second detection includes a freeze detection and a screen abnormality detection, the first message is used to indicate that the second electronic device accepts to establish a screen projection connection with the first electronic device, and the screen abnormality includes at least one of white bars, a black screen, and screen deviation on the image; Upon receiving the second request sent by the second electronic device, reading a first detection result in the second electronic device, where the first detection result is obtained by the second electronic device performing a first detection on the test video being played, where the first detection includes the freeze detection and the screen abnormality detection, and the second request is used to instruct the first electronic device to disconnect the screen projection connection with the second electronic device; Based on the first detection result and the second detection result, determine whether the screen projection function of the first electronic device is normal.
5. The method according to claim 4, characterized in that The performing a second detection on the test video being played by the first electronic device to obtain a second detection result includes: A freeze detection is performed on the test video being played by the first electronic device, and when the test video freezes, it is determined that the second detection result is a detection result indicating that the screen projection function of the first electronic device is abnormal.
6. The method according to claim 5, characterized in that The method further comprises: The screen abnormality detection is performed on the test video being played by the first electronic device. When the screen of the test video is abnormal, it is determined that the second detection result is a detection result indicating that the screen projection function of the first electronic device is abnormal.
7. The method according to any one of claims 4 to 6, characterized in that Before sending the first request to the second electronic device, the method further includes: A first folder is created in the second electronic device, and identification information of the first electronic device and current time information are written into the first folder, wherein the identification information of the first electronic device is used to uniquely identify the first electronic device, and the first detection result is stored in the first folder.
8. The method according to claim 7, characterized in that The data channel between the first electronic device and the second electronic device is established through a data line. Before sending the first request to the second electronic device, the method further includes: Reading a first resolution and a first frame rate supported by the second electronic device for playing a video, and a second resolution and a second frame rate supported by the data line for transmitting a video; The sending the test video being played by the first electronic device to the second electronic device includes: Determine, according to the first resolution and the first frame rate, and the second resolution and the second frame rate, to send to the second electronic device a third resolution and a third frame rate of the test video being played by the first electronic device; The test video being played by the first electronic device is sent to the second electronic device according to the third resolution and the third frame rate.
9. The method according to any one of claims 4 to 8, characterized in that In the process of playing the test video, in response to establishing a data channel between the first electronic device and the second electronic device, before sending a first request to the second electronic device, the method further includes: Starting a screen projection test application, where the screen projection test application is an application installed in the first electronic device for triggering screen projection between devices and implementing a screen projection test function, and the screen projection test application pre-stores the test video; The test video is played through the screen projection test application.
10. A method for testing a screen projection function, characterized in that: Applied to a second electronic device, the second electronic device is applied to a first communication system, the first communication system includes a first electronic device and the second electronic device, the method includes: Upon receiving a first request sent by the first electronic device, returning a first message to the first electronic device, wherein the first request is sent by the first electronic device to the second electronic device in response to successful establishment of a data channel between the first electronic device and the second electronic device during playback of a test video, the first request is used to instruct the second electronic device to establish a screen projection connection with the first electronic device, and the first message is used to indicate that the second electronic device accepts to establish a screen projection connection with the first electronic device; When receiving the test video sent by the first electronic device, playing the test video; Performing a first detection on the test video being played to obtain a first detection result, wherein the first detection includes freeze detection and screen abnormality detection, and the screen abnormality includes at least one of white bars, a black screen, and screen deviation in the image; A second request is sent to the first electronic device so that the first electronic device reads the first detection result in response to the second request, and determines whether the screen projection function of the first electronic device is normal based on the first detection result and the second detection result. The second detection result is obtained by performing a second detection on the test video being played by the first electronic device during the process of the first electronic device sending the test video being played to the second electronic device. The second detection includes the freeze detection and the screen abnormality detection. The second request is used to instruct the first electronic device to disconnect the screen projection connection with the second electronic device.
11. The method according to claim 10, characterized in that The test video received by the second electronic device includes a video stream and an audio stream of the test video, the first detection further includes parameter detection, and the first detection is performed on the test video being played to obtain a first detection result, including: Decoding the video stream to obtain first parameters corresponding to the test video, where the first parameters include a third resolution and a third frame rate; Decoding the audio stream to obtain a second parameter corresponding to the test video, the second parameter including a sampling rate, a sampling bit value, and a number of sampling channels; Perform parameter detection on the test video being played, and when the first parameter is different from a first preset parameter pre-stored in the second electronic device, and / or the second parameter is different from a second preset parameter pre-stored in the second electronic device, determine that the first detection result is a detection result indicating that the screen projection function of the first electronic device is abnormal, the first preset parameter includes a preset resolution and a preset frame rate, and the second preset parameter includes a preset sampling rate, a preset sampling bit value and a preset number of sampling channels.
12. The method according to claim 11, characterized in that The method further comprises: When the first parameter is the same as the first preset parameter, and the second parameter is the same as the second preset parameter, a freeze detection is performed on the test video. When the test video freezes, it is determined that the first detection result is a detection result indicating that the screen projection function of the first electronic device is abnormal.
13. The method according to claim 12, characterized in that The method further comprises: The test video is subjected to the screen abnormality detection, and when the screen of the test video is abnormal, it is determined that the first detection result is a detection result indicating that the screen projection function of the first electronic device is abnormal.
14. The method according to claim 13, characterized in that After performing a first detection on the test video being played and obtaining a first detection result, the method further includes: The first detection result is saved in a first folder. The first folder is created by the first electronic device in the second electronic device when the data channel is successfully established between the first electronic device and the second electronic device. The first folder includes identification information of the first electronic device and current time information. The identification information of the first electronic device and the current time information are written after the first electronic device creates the first folder. The identification information of the first electronic device is used to uniquely identify the first electronic device.
15. The method according to any one of claims 10 to 14, characterized in that The method further comprises: In response to the data channel between the first electronic device and the second electronic device being disconnected, the first detection result is deleted.
16. An electronic device, characterized in that: include: One or more processors, a memory, and one or more computer programs; wherein the one or more computer programs are stored in the memory, and when the computer programs are executed by the one or more processors, the electronic device executes the screen projection function test method as described in any one of claims 4 to 9, and / or the screen projection function test method as described in any one of claims 10 to 15.
17. A chip system, characterized in that: The chip system includes a processor for calling and running a computer program from a memory, so that an electronic device equipped with the chip system executes the screen projection function test method as described in any one of claims 4 to 9, and / or the screen projection function test method as described in any one of claims 10 to 15.
18. A computer-readable storage medium comprising a computer program, characterized in that: When the computer program runs on an electronic device, the electronic device executes the screen projection function testing method as described in any one of claims 4 to 9, and / or the screen projection function testing method as described in any one of claims 10 to 15.
Citation Information
Patent Citations
Screen transmission image detection method and system and device with storage function
CN111787393A
Sound and picture synchronization detection method, sound and picture synchronization generation method, electronic equipment and storage medium
CN114071134A
Screen projection method and electronic equipment
CN116033157A