Screen projection method, electronic equipment and vehicle
By receiving screen projection instructions and determining whether the target field in the screen projection protocol content is missing, and determining and processing missing fields is solved, the problem that the screen projection receiver cannot project normally, achieving the smooth completion of screen projection and improving user experience.
Patent Information
- Application Number
- CN202411861569.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-17
- Publication Date
- 2025-04-11
- Estimated Expiration
- 2044-12-17
AI Technical Summary
During the use of screen projection, after receiving the screen projection command, the screen projection receiver often fails to project normally or prompts that the screen projection fails, which cannot meet the user's needs.
By receiving the screen projection command, obtain the content of the screen projection protocol, determine whether the target field is missing, determine the missing field, determine the target processing method based on the missing field, and obtain the result after processing. If the target field is complete, display the screen projection content.
It achieves the smooth completion of screen projection, meets users' screen projection needs, and improves user experience.
Smart Images

Figure CN119815087A_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the field of communication technology, and in particular to a screen projection method, electronic equipment and a vehicle. Background Art
[0002] Due to the limited screen size of mobile devices, users often cast the content displayed on the mobile devices to a larger screen for viewing when using the mobile devices.
[0003] During screen projection, it often happens that after the screen projection receiver receives the screen projection command, it cannot project the screen normally, or prompts that the screen projection fails, thus failing to meet user needs. Summary of the invention
[0004] In view of this, the purpose of the present disclosure is to propose a screen projection method, electronic device and vehicle, so as to solve the problem that in the current screen projection process, the screen projection receiving end often fails to project the screen normally after receiving the screen projection command, or prompts that the screen projection fails, thereby failing to meet user needs.
[0005] Based on the above purpose, the first aspect of the present disclosure provides a screen projection method, the method comprising:
[0006] Receive a screen projection command and obtain the screen projection protocol content contained in the screen projection command;
[0007] Determine whether a target field in the screen projection protocol content is missing, and if the target field is missing, determine the missing field in the screen projection protocol content;
[0008] Determine a target processing method according to the missing field, and obtain a processing result after processing based on the target processing method;
[0009] In response to the processing result that the target field is complete, the projection content corresponding to the projection instruction is displayed.
[0010] Based on the same inventive concept, the second aspect of the present disclosure proposes a screen projection device, comprising:
[0011] The instruction receiving module is configured to receive a screen projection instruction and obtain the screen projection protocol content contained in the screen projection instruction;
[0012] A missing field determination module is configured to determine whether a target field in the screen projection protocol content is missing, and if the target field is missing, determine the missing field in the screen projection protocol content;
[0013] A processing module is configured to determine a target processing method according to the missing field, and obtain a processing result after processing based on the target processing method;
[0014] The display module is configured to display the projection content corresponding to the projection instruction in response to the processing result that the target field is complete.
[0015] Based on the same inventive concept, the third aspect of the present disclosure proposes an electronic device, comprising a memory, a processor, and a computer program stored in the memory and executable by the processor, wherein the processor implements the screen projection method as described above when executing the computer program.
[0016] Based on the same inventive concept, the fourth aspect of the present disclosure proposes a non-transitory computer-readable storage medium, which stores computer instructions, and the computer instructions are used to enable a computer to execute the screen projection method as described above.
[0017] Based on the same inventive concept, the fifth aspect of the present disclosure provides a vehicle, including the projection device described in the second aspect or the electronic device described in the third aspect or the storage medium described in the fourth aspect.
[0018] From the above, it can be seen that the present disclosure proposes a screen projection method, an electronic device and a vehicle, which receive a screen projection instruction and obtain the screen projection protocol content corresponding to the screen projection instruction, wherein the screen projection protocol content includes the key fields required to achieve normal screen projection, that is, the target field mentioned later. If the target field in the screen projection protocol content is missing, it is necessary to determine the missing field at this time, and then determine whether successful screen projection can continue to be achieved. The target processing method is determined according to the missing field to obtain the processing result. Different processing methods are used for different missing fields, and the processing is more accurate. Through the target processing method, the smooth completion of the screen projection is achieved as much as possible. If the processing result is that the target field is complete, it means that the key fields required to achieve normal screen projection in the screen projection protocol content are complete. At this time, the screen projection operation can be completed, and the screen projection content corresponding to the screen projection instruction is displayed on the screen projection receiving end, thereby meeting the user's screen projection needs and improving the user experience. BRIEF DESCRIPTION OF THE DRAWINGS
[0019] In order to more clearly illustrate the technical solutions in the present disclosure or related technologies, the drawings required for use in the embodiments or related technical descriptions are briefly introduced below. Obviously, the drawings described below are only embodiments of the present disclosure. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.
[0020] Figure 1 This is a flow chart of the screen projection method according to an embodiment of the present disclosure;
[0021] Figure 2 This is a flowchart of the first part of the screen projection method according to another embodiment of the present disclosure;
[0022] Figure 3This is a flowchart of the second part of the screen projection method according to another embodiment of the present disclosure;
[0023] Figure 4 This is a flowchart of the third part of the screen projection method according to another embodiment of the present disclosure;
[0024] Figure 5 is a structural block diagram of a screen projection device according to an embodiment of the present disclosure;
[0025] Figure 6 It is a schematic diagram of the structure of an electronic device according to an embodiment of the present disclosure. DETAILED DESCRIPTION
[0026] In order to make the objectives, technical solutions and advantages of the present disclosure more clearly understood, the present disclosure is further described in detail below in combination with specific embodiments and with reference to the accompanying drawings.
[0027] It should be noted that, unless otherwise defined, the technical terms or scientific terms used in the embodiments of the present disclosure should be understood by people with ordinary skills in the field to which the present disclosure belongs. The "first", "second" and similar words used in the embodiments of the present disclosure do not indicate any order, quantity or importance, but are only used to distinguish different components. "Including" or "comprising" and similar words mean that the elements or objects appearing before the word cover the elements or objects listed after the word and their equivalents, without excluding other elements or objects. "Connect" or "connected" and similar words are not limited to physical or mechanical connections, but can include electrical connections, whether direct or indirect. "Up", "down", "left", "right" and the like are only used to indicate relative positional relationships. When the absolute position of the described object changes, the relative positional relationship may also change accordingly.
[0028] Due to the limited screen size of mobile devices, users often cast the content displayed on the mobile devices to a larger screen for viewing when using the mobile devices.
[0029] During screen projection, it often happens that after the screen projection receiver receives the screen projection command, it cannot project the screen normally, or prompts that the screen projection fails, thus failing to meet user needs.
[0030] The reason for screen casting failure may be that the content of the screen casting command sent by the corresponding mobile device does not fully refer to the key parameters required by each field in the protocol transmission link. On the other hand, the screen casting link sent by some applications may only support the official screen casting application under its application. Other players directly request video content through its link, which will be rejected by the server.
[0031] Based on the above description, this embodiment proposes a screen projection method, such as Figure 1As shown, the method includes:
[0032] Step 101, receive a screen projection instruction, and obtain the screen projection protocol content contained in the screen projection instruction.
[0033] In the specific implementation, a screen projection instruction is received, which means that the user wants to perform a screen projection operation. The screen projection instruction contains the screen projection protocol content, and the screen projection protocol content includes the key fields required to achieve normal screen projection, wherein the key fields include the screen projection content link, the screen projection content type and the screen projection content title.
[0034] The projection content link is a link of the projection content that needs to be played or displayed. The projection content type is used to distinguish the content type of the projection content, and then different players can be selected according to the content type, where the content type includes pictures, videos, audio, etc. The projection content title is the title content displayed during projection, such as the name of the video / music / picture, the singer of the music, etc.
[0035] The triggering mode of the screen projection instruction includes at least one of the following: voice triggering, touch triggering, etc. Exemplarily, the user clicks the screen projection virtual button on the mobile device, selects the corresponding target screen projection receiving end, and then the target screen projection receiving end can receive the screen projection instruction.
[0036] The screen projection method described in this embodiment is applied to a screen projection receiving end, which may be a car machine, a smart TV, a computer, etc.
[0037] Step 102, determine whether the target field in the screen projection protocol content is missing. If the target field is missing, determine the missing field in the screen projection protocol content.
[0038] During specific implementation, determine whether the target field in the screen projection protocol content is missing, compare the target field in the screen projection protocol content with the preset complete field, and determine whether the target field is consistent with the preset complete field, that is, determine whether the target field in the screen projection protocol content is complete. If complete, determine that the target field in the screen projection protocol content is complete. If incomplete, determine that the target field in the screen projection protocol content is missing, and determine the missing field in the screen projection protocol content. The target field is the key field required to achieve normal screen projection as described in the above steps.
[0039] In some embodiments, the target field is the projection content link and the projection content type. If it is determined that the target field in the projection agreement content is missing, the missing field is determined, wherein the missing field is the projection content link field and / or the projection content type field. That is, the missing field may be only the projection content link field, or only the projection content type field, or both the projection content link field and the projection content type field are missing.
[0040] If it is determined that the target fields in the screen projection protocol content are complete, the target player is directly determined based on the screen projection content type field, and the target player is used to display the screen projection content corresponding to the screen projection instruction.
[0041] Step 103, determining a target processing method according to the missing field, and obtaining a processing result after processing based on the target processing method.
[0042] In specific implementation, the target processing method corresponding to the missing field is determined according to the determined missing field, that is, different missing fields have different corresponding processing methods. Processing is performed according to the target processing method, and a processing result is obtained after the processing is completed.
[0043] Step 104, in response to the processing result that the target fields are complete, display the screen projection content corresponding to the screen projection instruction.
[0044] In the specific implementation, after processing the screen projection protocol content according to the target processing method, a processing result is obtained. If the processing result is that the target fields are complete, it means that the key fields required for normal screen projection are complete, so normal screen projection can be achieved.
[0045] Determine the content type corresponding to the projection content, determine the target player corresponding to the content type, and use the target player to display the projection content corresponding to the projection instruction.
[0046] Exemplarily, if the content type is audio, the corresponding target player is an audio player, and the audio is played using the audio player.
[0047] In this embodiment, if the screen projection protocol content includes a screen projection content title, the screen projection content title is displayed while displaying the screen projection content corresponding to the screen projection instruction.
[0048] Exemplarily, the title of the projected content is a song title and a singer, and the song title and the singer are displayed while the audio is played.
[0049] Through the above scheme, by obtaining the screen projection protocol content corresponding to the screen projection instruction, the screen projection protocol content includes the key fields required to achieve normal screen projection, that is, the target field mentioned later. If the target field in the screen projection protocol content is missing, it is necessary to determine the missing field at this time, and then determine whether successful screen projection can continue to be achieved. Determine the target processing method based on the missing field to obtain the processing result. Different processing methods are used for different missing fields, and the processing is more accurate. Through the target processing method, the smooth completion of screen projection can be achieved as much as possible. If the processing result is that the target field is complete, it means that the key fields required to achieve normal screen projection in the screen projection protocol content are complete. At this time, the screen projection operation can be completed, and the screen projection content corresponding to the screen projection instruction is displayed on the screen projection receiving end, thereby meeting the user's screen projection needs and improving the user experience.
[0050] The screen projection method described in the present disclosure can be applied to the DLNA protocol, and can also be applied to other similar screen projection and media sharing protocols, such as Miracast, AirPlay, Google Cast and other local area network-based multimedia transmission technologies.
[0051] In some embodiments, step 103 specifically includes:
[0052] Step 1031, in response to the missing field being a projection content link field, determining the target processing method is to output projection failure prompt information. Or,
[0053] Step 1032, in response to the missing field being the projection content type field and the projection content link field existing, determine the target processing method is to complete the missing field according to the projection content link field, and use the completion result as the processing result.
[0054] In specific implementation, if the missing field is the projection content link field, the projection operation cannot be completed regardless of whether the projection content type field exists. Therefore, a projection failure prompt message is output, wherein the projection failure prompt message is used to prompt the user that the projection has failed and needs to be retried.
[0055] In this embodiment, the prompt method of the screen projection failure prompt information includes at least one of the following: voice prompt, pop-up prompt, etc. For example, when it is determined that the missing field is a screen projection content link field, the prompt message of "Screen projection failed, please try again" is output.
[0056] If the missing field is the projection content type field, and there is a projection content link field, it means that only the projection content type field is missing at this time, and the target processing method is determined to be to fill in the missing field. Specifically, because the suffix information in the projection content link field may contain type information, the missing field can be filled in according to the existing projection content link field, and the filling result is used as the processing result.
[0057] Through the above scheme, by judging what the missing field is, if it is determined that the missing field is the projection content link field, it is impossible to determine and complete the missing projection content link field based on other fields in the projection protocol content. Therefore, a projection failure prompt message is output to let the user know that there is a problem with the projection and the projection command needs to be resent to further determine whether the projection can be completed.
[0058] In some embodiments, step 1032 specifically includes:
[0059] Step 10321, determine whether the projection content link field contains type key information;
[0060] Step 10322, in response to including type key information, taking the type corresponding to the type key information as the projection content type, and completing the missing field; or,
[0061] Step 10323, in response to not containing type key information, request the screen projection content link through the network protocol, receive the returned content, determine whether the playback type exists in the returned content, use the playback type as the screen projection content type, and fill in the missing field.
[0062] In specific implementation, the projection content link field may include type key information, where the type key information is information that can be used to know the content type of the projection content.
[0063] If the projection content link field contains type key information, the type corresponding to the type key information is used as the projection content type to complete the missing field. The database pre-stores the projection content type corresponding to each type key information, such as the type corresponding to .mp4 is video, the type corresponding to .flv is live video, the type corresponding to .jpg is picture, and the type corresponding to .mp3 is audio.
[0064] Exemplarily, the projection content link field is http: / / xxxx.mp4, that is, .mp4 is the type key information, and the type corresponding to the type key information is video, that is, the projection content type of the missing field is determined to be video.
[0065] If the projection content link field does not contain type key information, request the projection content link through the network protocol. Request the projection content link through the network protocol and receive the returned content. Determine whether there is a playback type in the returned content. If there is a playback type in the returned content, use the playback type as the projection content type to complete the missing field.
[0066] In this embodiment, the network protocol is the http protocol. Requesting the projection content link through the network protocol is equivalent to placing the projection content link on the web page. If it has a playback type, the content of the projection content link will be directly downloaded, and the returned content will be received, and the specific type will be determined based on the content.
[0067] In some embodiments, if the playback type does not exist in the returned content, it means that the type of the projection content cannot be determined based on the projection content link field. At this time, a projection failure prompt message is output to let the user know that the projection has failed. If projection is still required, the projection instruction is resent.
[0068] Through the above scheme, when the projection content type field is missing, first determine whether there is type key information in the projection content link field. If it contains type key information, the projection content type can be directly determined, which improves processing efficiency. If it does not contain type key information, the projection content link can be requested through a network protocol request, and then the projection content type can be determined based on the returned content, so as to find the projection content type to the greatest extent, ensure the smooth completion of the projection, and meet user needs.
[0069] In some embodiments, the target field is a projection content type field and a projection content link field, and step 104 specifically includes:
[0070] Step 1041, determining the screen projection content type corresponding to the screen projection content type field;
[0071] Step 1042, in response to the type of the screen projection content being audio, determining that the target player is an audio player, and using the audio player to display the screen projection content corresponding to the screen projection instruction; or,
[0072] Step 1043, in response to the type of the screen projection content being an image, determining that the target player is an image player, and using the image player to display the screen projection content corresponding to the screen projection instruction; or,
[0073] Step 1044, in response to the projection content type being a video, determine a target video player according to the projection content link field, and use the target video player to display the projection content corresponding to the projection instruction.
[0074] In specific implementation, the target field in the screen projection protocol content in this embodiment includes a screen projection content type field and a screen projection content link field, and determines the screen projection content type corresponding to the screen projection content type field, wherein the screen projection content type includes audio or image.
[0075] If it is determined that the type of projection content is audio, the target player required to display the projection content is determined to be an audio player, and the projection content corresponding to the projection instruction is displayed using the audio player, that is, the audio is played using the audio player.
[0076] If it is determined that the projection content type is an image, then the player required to display the projection content is determined to be an image player, and the image player is used to display the projection content corresponding to the projection instruction, that is, the projection picture is displayed using the image player.
[0077] If it is determined that the type of the projected content is video, then the player required to display the projected content is determined to be a video player. The specific type of the video player includes at least one of the following: a soft decoding player, a hard decoding player, and a native video player.
[0078] Specifically, the soft decoding player is compatible with all video formats, does not rely on specific hardware, can adapt to various video formats and encoding standards, and supports more functions, such as filters, subtitles, and image processing optimization, etc. However, it consumes more processing performance and power; compared with hard decoding, the efficiency of soft decoding is lower.
[0079] The native video player is the Android native video player, which is suitable for simple video playback and has good compatibility with the Android system, but supports fewer video formats and may not provide a smooth playback experience when playing high-definition videos.
[0080] The hardware decoding player is suitable for playing high-definition video content, with high playback efficiency, which can significantly improve the fluency and clarity of video playback, while effectively reducing CPU usage and power consumption. However, it requires the hardware to have a hardware decoding module and related drivers.
[0081] Since the projection content link field contains the decoding type of the projection video, the specific target video player corresponding to the projection video can be determined from the soft decoding player, hard decoding player and native video player according to the decoding type, and the target video player can be used to display the projection content corresponding to the projection instruction.
[0082] Through the above scheme, if the projection content type is video, in addition to determining the video player to be used, the type of video player can be further determined according to the projection content link field in the projection protocol content, so that the subsequent playback of the projection content can be smoother.
[0083] In some embodiments, the projection content link field includes a decoding type and a resolution, and step 1043 specifically includes:
[0084] Step 10431, in response to the decoding type being soft decoding, determining that the target video player is a soft decoding player; or,
[0085] Step 10432, in response to the decoding type being hard decoding, if it is determined that the resolution is less than or equal to a preset resolution threshold, the target video player is a native video player; or, if it is determined that the resolution is greater than a preset resolution threshold, the target video player is a hard decoding player.
[0086] In a specific implementation, the projection content link field includes a decoding type and a resolution, and the decoding type is soft decoding or hard decoding. If the decoding type is determined to be soft decoding, then the player required to display the projection content is determined to be a soft decoding player.
[0087] Specifically, if it is a live broadcast type, it involves real-time transmission of the video, and a soft decoding player needs to be used at this time. At the same time, if the video is not supported by hard decoding, a soft decoding player is selected.
[0088] If the decoding type is determined to be hard decoding, the resolution in the projection content link field is determined, and the resolution represents the resolution of the video when the projection content is a video. The resolution is compared with a preset resolution threshold, specifically:
[0089] If the resolution is less than or equal to the preset resolution threshold, it is determined that the player required to display the projection content is a native video player. If the resolution is greater than the preset resolution threshold, it is determined that the player required to display the projection content is a hard decoding player.
[0090] For example, the preset resolution threshold is 480p, and if the resolution of image A is determined to be 360p, then the player required to display image A is determined to be a native video player. If the resolution of image B is determined to be 1080p, then the player required to display image B is determined to be a hard decoding player.
[0091] Specifically, if the resolution is 480p, the native player can play smoothly due to its low resolution, which saves power and has low resource usage, so the image player uses a native video player. If the resolution is 720p, the image player uses a hard decoding player because of its high hard decoding efficiency, which is suitable for medium resolution and balances fluency and power consumption. If the resolution is 1080p, the image player uses a hard decoding player because of its high resolution, which relies on the hard decoding module to improve fluency and reduce CPU burden and power consumption.
[0092] Through the above scheme, the specific video player is first determined according to the decoding type. When the decoding type is determined to be hard decoding, the target video player is further determined according to the resolution. The selection of the target video player is more accurate, thereby achieving smooth playback of video data and improving user experience.
[0093] In some embodiments, step 1043 specifically includes:
[0094] Step 10A, requesting the projection content link and receiving the request result;
[0095] Step 10B, in response to the request result being access denied, adjusting the player agent corresponding to the screen casting content link to obtain a new screen casting content link field, and determining the target video player according to the new screen casting content link field; or
[0096] Step 10C, in response to the request result being that access is allowed, determining the target video player according to the projection content link field.
[0097] In the specific implementation, since some screen casting content requires active proxy setting, if it is not set, it will be rejected by the server. Therefore, first determine whether the screen casting link is likely to be rejected by the server.
[0098] Directly request the screen projection content link and obtain the request result. The screen projection content link contains a player proxy field. If the request result is access denied, the player proxy field contained in the screen projection content link needs to be adjusted. The player proxy is an intermediate server located between the screen projection receiving end and the screen projection sending end. It can be used as a transfer station between the screen projection receiving end and the screen projection sending end to forward the request issued by the screen projection sending end. Through the player proxy, some network acceleration and access control functions can be realized. After adjustment, a new screen projection content link is obtained, and then the target video player is determined according to the new screen projection content link field.
[0099] In this embodiment, the specific form of the request result being access denial is displaying a 403 error, wherein the 403 error (HTTP 403 Forbidden) means that the server has received the client's request but refuses to provide access, usually indicating that the user does not have permission to access the requested resource.
[0100] If the request result is that access is allowed, it means that there is no need to adjust the server proxy, and the target video player can be directly determined based on the projection content link field.
[0101] Through the above solution, by determining whether the screen projection link is likely to be rejected by the server, the screen projection failure caused by the use of its own server agent not supporting access to the server corresponding to the screen projection content can be avoided.
[0102] In some embodiments, step 10B specifically includes:
[0103] Step a, determining the target content source data contained in the projection content link field, and determining the proxy field supported by the target content source data, wherein the proxy field supported by the target content source data indicates that the projection receiving end is allowed to access the target content source data in the projection content link according to the proxy field;
[0104] Step b: obtain the identity information field in the projection content link, and modify the identity information field to a proxy field supported by the target content source data.
[0105] In a specific implementation, the target content source data contained in the projection content link field is determined, and the target content source data is the projection content data corresponding to the projection instruction, that is, the content data that the user wants to project. Each content source data corresponds to a supported proxy field, that is, the target content source data can be accessed using the supported proxy field.
[0106] The database pre-stores proxy fields supported by content source data and proxy fields not supported by content source data. The database is searched to obtain proxy fields supported by target content source data, and the proxy fields supported by target content source data indicate that the projection receiving end is allowed to access the target content source data in the projection content link according to the proxy fields, that is, the server corresponding to the target content source data can be accessed according to the supported proxy fields.
[0107] For example, most of the live broadcast links of a certain video website do not support the Android system or the agent of the multimedia framework in the Android system.
[0108] Obtain the identity information field in the projection content link, where the identity information field is located at the head of the projection content link field, and modify the identity information field to a proxy field supported by the target content source data.
[0109] In some embodiments, the method further comprises:
[0110] Step A, in response to receiving a player change instruction, determining a new target image player corresponding to the player change instruction;
[0111] Step B: Use the new target player to play the projection content corresponding to the projection instruction.
[0112] In specific implementation, after determining the target image player, if a player change instruction sent by the user is received, it means that the user wants to change the player to play the projection content.
[0113] Determine a new target image player corresponding to the player change instruction, and use the new target player to play the projection content corresponding to the projection instruction.
[0114] Through the above solution, if the user still has problems with the playback experience during use, he can try to switch to other players according to his needs, thereby improving the user experience.
[0115] In some embodiments, if other abnormalities are still encountered during the playback process, a re-screen projection guidance message is sent to the user to guide the user to re-project the screen. In this embodiment, other abnormalities may specifically include:
[0116] Network problems: unstable network, network delay or insufficient bandwidth, multicast data loss.
[0117] File or content problem: The projected file may be corrupted.
[0118] Media protection issue: Some screen projection content is only available to members, and the validity of the screen projection link is time-limited and may have timed out.
[0119] Based on the same inventive concept, another embodiment of the present disclosure provides a screen projection method, wherein the screen projection method is as follows: Figure 2 , Figure 3 and Figure 4 As shown, specifically including:
[0120] Step 201, receiving a screen projection instruction.
[0121] In the specific implementation, a screen projection instruction is received, which means that the user wants to perform a screen projection operation. The screen projection instruction corresponds to the screen projection protocol content, and the screen projection protocol content includes the key fields required to achieve normal screen projection, wherein the key fields include the screen projection content link, the screen projection content type and the screen projection content title.
[0122] Step 202, determine whether the target field in the screen projection agreement content is missing, if not missing, jump to step 211. If missing, jump to step 203.
[0123] During specific implementation, if it is determined that the target fields in the screen projection protocol content are complete, the target player is directly determined based on the screen projection content type field, and the target player is used to display the screen projection content corresponding to the screen projection instruction.
[0124] Step 203: If the missing field is the projection content link field, jump to step 204.
[0125] Step 204, output a prompt message indicating that the screen projection failed.
[0126] In specific implementation, if the missing field is the projection content link field, the projection operation cannot be completed regardless of whether the projection content type field exists. Therefore, a projection failure prompt message is output, wherein the projection failure prompt message is used to prompt the user that the projection has failed and needs to be retried.
[0127] Step 205, if the missing field is the projection content type field, and there is a projection content link field, jump to step 206.
[0128] In specific implementation, if the missing field is the projection content type field, and there is a projection content link field, it means that only the projection content type field is missing at this time, and the target processing method is determined to fill in the missing field. Specifically, because the suffix information in the projection content link field may contain type information, the missing field can be filled in according to the existing projection content link field.
[0129] Step 206, determine whether the projection content link field contains type key information. If it does, jump to step 207, if not, jump to step 208.
[0130] Step 207, taking the type corresponding to the type key information as the projection content type, and proceeding to step 211.
[0131] In specific implementation, the projection content link field may include type key information, where the type key information is information that can be used to know the content type of the projection content.
[0132] If the projection content link field contains type key information, the type corresponding to the type key information will be used as the projection content type to fill in the missing field.
[0133] Step 208: Request the screen projection content link through the network protocol and receive the returned content.
[0134] Step 209, determine whether the returned content contains a playback type. If not, jump to step 204; if so, jump to step 210.
[0135] Step 210: Use the playback type as the screen projection content type.
[0136] In specific implementation, if the projection content link field does not contain type key information, request the projection content link through the network protocol. Request the projection content link through the network protocol and receive the returned content. Determine whether there is a playback type in the returned content. If there is a playback type in the returned content, use the playback type as the projection content type to complete the missing field.
[0137] Step 211, determine the target player according to the type of screen projection content.
[0138] Step 212: the type of the screen projection content is audio, the target player is determined to be an audio player, and the audio player is used to play the audio.
[0139] Step 213: the type of the screen projection content is image, and the target player is determined to be an image player.
[0140] In specific implementation, the target field in the screen projection protocol content in this embodiment includes a screen projection content type field and a screen projection content link field, and determines the screen projection content type corresponding to the screen projection content type field, wherein the screen projection content type includes audio or image.
[0141] If it is determined that the type of projection content is audio, the target player required to display the projection content is determined to be an audio player, and the projection content corresponding to the projection instruction is displayed using the audio player, that is, the audio is played using the audio player.
[0142] If it is determined that the type of the projected content is an image, then the player required to display the projected content is determined to be an image player. Specifically, the type of the image player includes at least one of the following: a soft decoding player, a hard decoding player, and a native video player.
[0143] Step 214, request the screen projection content link and receive the request result.
[0144] Step 215: If the request result is access denied, adjust the player agent corresponding to the screen projection content link.
[0145] Step 216: If the request result is that access is allowed, determine the target image player according to the projection content link field.
[0146] During the specific implementation, since some screen casting content requires active proxy settings, if it is not set, it will most likely be rejected by the server. Therefore, first determine whether the screen casting link is likely to be rejected by the server.
[0147] Directly request the projection content link and get the request result. If the request result is access denied, the player agent corresponding to the projection content link needs to be adjusted. After the adjustment, a new projection content link is obtained, and then the target image player is determined according to the new projection content link field.
[0148] If the request result is that access is allowed, it means that there is no need to adjust the server proxy, and the target image player can be directly determined based on the projection content link field.
[0149] Step 217, obtain the decoding type and resolution contained in the projection content link field.
[0150] Step 218: If the decoding type is soft decoding, determine that the target image player is a soft decoding player, and use the soft decoding player to play the image.
[0151] Step 219: If the decoding type is hard decoding, obtain the resolution of the projection content.
[0152] Step 220: If it is determined that the resolution is less than or equal to a preset resolution threshold, then the target image player is a native video player, and the image is played using the native video player.
[0153] Step 221: determine that the resolution is greater than a preset resolution threshold, then the target image player is a hard decoding player, and use the hard decoding player to play the image.
[0154] In specific implementation, the projection content link field includes a decoding type and a resolution, and the decoding type is soft decoding or hard decoding. If the decoding type is determined to be soft decoding, then the player required to display the projection content is determined to be a soft decoding player.
[0155] If the decoding type is determined to be hard decoding, the resolution in the projection content link field is determined, and the resolution represents the resolution of the image when the projection content is an image. The resolution is compared with a preset resolution threshold, specifically:
[0156] If the resolution is less than or equal to the preset resolution threshold, it is determined that the player required to display the projection content is a native video player. If the resolution is greater than the preset resolution threshold, it is determined that the player required to display the projection content is a hard decoding player.
[0157] Step 222: In response to receiving a player change instruction, a new target image player corresponding to the player change instruction is determined, and the projection content corresponding to the projection instruction is played using the new target player.
[0158] In specific implementation, after determining the target image player, if a player change instruction sent by the user is received, it means that the user wants to change the player to play the projection content. A new target image player corresponding to the player change instruction is determined, and the projection content corresponding to the projection instruction is played using the new target player.
[0159] It should be noted that the method of the embodiment of the present disclosure can be performed by a single device, such as a computer or a server. The method of the present embodiment can also be applied in a distributed scenario and completed by multiple devices cooperating with each other. In the case of such a distributed scenario, one of the multiple devices can only perform one or more steps in the method of the embodiment of the present disclosure, and the multiple devices will interact with each other to complete the described method.
[0160] It should be noted that the above describes some embodiments of the present disclosure. Other embodiments are within the scope of the appended claims. In some cases, the actions or steps recorded in the claims can be performed in an order different from that in the above embodiments and still achieve the desired results. In addition, the processes depicted in the accompanying drawings do not necessarily require the specific order or continuous order shown to achieve the desired results. In some embodiments, multitasking and parallel processing are also possible or may be advantageous.
[0161] Based on the same inventive concept, corresponding to any of the above-mentioned embodiment methods, the present disclosure also provides a screen projection device.
[0162] refer to Figure 5 , Figure 5 The screen projection device of the embodiment includes:
[0163] The instruction receiving module 501 is configured to receive a screen projection instruction and obtain the screen projection protocol content contained in the screen projection instruction;
[0164] A missing field determination module 502 is configured to determine whether a target field in the screen projection protocol content is missing, and if the target field is missing, determine the missing field in the screen projection protocol content;
[0165] The processing module 503 is configured to determine a target processing method according to the missing field, and obtain a processing result after processing based on the target processing method;
[0166] The display module 504 is configured to display the screen projection content corresponding to the screen projection instruction in response to the processing result that the target field is complete.
[0167] In some embodiments, the processing module 503 specifically includes:
[0168] a prompt unit, configured to, in response to the missing field being a projection content link field, determine that the target processing method is to output projection failure prompt information; or,
[0169] The completion unit is configured to determine the target processing method to complete the missing field according to the projection content link field in response to the missing field being a projection content type field and the presence of a projection content link field, and use the completion result as the processing result.
[0170] In some embodiments, the padding unit is specifically configured to:
[0171] Determine whether the projection content link field contains type key information;
[0172] In response to the inclusion of type key information, the type corresponding to the type key information is used as the projection content type to complete the missing field; or,
[0173] In response to not containing type key information, request the screen projection content link through the network protocol, receive the returned content, determine whether the playback type exists in the returned content, use the playback type as the screen projection content type, and fill in the missing field.
[0174] In some embodiments, the target field is a projection content type field and a projection content link field, and the display module 504 specifically includes:
[0175] A type determination unit is configured to determine the type of projection content corresponding to the projection content type field; an audio playback unit is configured to determine that the target player is an audio player in response to the projection content type being audio, and use the audio player to display the projection content corresponding to the projection instruction; or
[0176] an image playing unit, configured to, in response to the type of the screen projection content being an image, determine that the target player is an image player, and use the image player to display the screen projection content corresponding to the screen projection instruction; or
[0177] The video playback unit is configured to determine a target video player according to the projection content link field in response to the projection content type being a video, and use the target video player to display the projection content corresponding to the projection instruction.
[0178] In some embodiments, the projection content link field includes a decoding type and a resolution; the video playback unit is specifically configured as follows:
[0179] In response to the decoding type being soft decoding, determining that the target video player is a soft decoding player; or,
[0180] In response to the decoding type being hard decoding, if it is determined that the resolution is less than or equal to a preset resolution threshold, the target video player is a native video player; or, if it is determined that the resolution is greater than a preset resolution threshold, the target video player is a hard decoding player.
[0181] In some embodiments, the video playback unit is further configured to:
[0182] Requesting the projection content link and receiving the request result;
[0183] In response to the request result being access denied, adjusting the player agent corresponding to the screen casting content link to obtain a new screen casting content link field, and determining the target video player according to the new screen casting content link field; or
[0184] In response to the request result being that access is allowed, a target video player is determined based on the projection content link field.
[0185] In some embodiments, the image playback unit is further configured to:
[0186] Determine the target content source data contained in the projection content link field, and determine the proxy field supported by the target content source data, wherein the proxy field supported by the target content source data indicates that the projection receiving end is allowed to access the target content source data in the projection content link according to the proxy field;
[0187] Obtain the identity information field in the projection content link, and modify the identity information field to a proxy field supported by the target content source data.
[0188] In some embodiments, the device further includes a player replacement module, and the player replacement module is specifically configured to:
[0189] In response to receiving a player change instruction, determining a new target image player corresponding to the player change instruction;
[0190] The new target player is used to play the projection content corresponding to the projection instruction.
[0191] For the convenience of description, the above device is described by dividing it into various modules according to its functions. Of course, when implementing the present disclosure, the functions of each module can be implemented in the same or multiple software and / or hardware.
[0192] The device of the above-mentioned embodiment is used to implement the corresponding screen projection method in any of the above-mentioned embodiments, and has the beneficial effects of the corresponding method embodiments, which will not be repeated here.
[0193] Based on the same inventive concept, corresponding to any of the above-mentioned embodiments and methods, the present disclosure also provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the program, the screen projection method described in any of the above embodiments is implemented.
[0194] Figure 6 A more specific schematic diagram of the hardware structure of an electronic device provided in this embodiment is shown, and the device may include: a processor 1010, a memory 1020, an input / output interface 1030, a communication interface 1040, and a bus 1050. The processor 1010, the memory 1020, the input / output interface 1030, and the communication interface 1040 are connected to each other through the bus 1050 in the device.
[0195] The processor 1010 can be implemented by a general-purpose CPU (Central Processing Unit), a microprocessor, an application-specific integrated circuit (ASIC), or one or more integrated circuits, and is used to execute relevant programs to implement the technical solutions provided in the embodiments of this specification.
[0196] The memory 1020 may be implemented in the form of ROM (Read Only Memory), RAM (Random Access Memory), static storage device, dynamic storage device, etc. The memory 1020 may store an operating system and other application programs. When the technical solutions provided in the embodiments of this specification are implemented by software or firmware, the relevant program codes are stored in the memory 1020 and are called and executed by the processor 1010.
[0197] The input / output interface 1030 is used to connect the input / output module to realize information input and output. The input / output module can be configured in the device as a component (not shown in the figure), or it can be externally connected to the device to provide corresponding functions. The input device may include a keyboard, a mouse, a touch screen, a microphone, various sensors, etc., and the output device may include a display, a speaker, a vibrator, an indicator light, etc.
[0198] The communication interface 1040 is used to connect a communication module (not shown) to realize communication interaction between the device and other devices. The communication module can realize communication through a wired mode (such as USB, network cable, etc.) or a wireless mode (such as mobile network, WIFI, Bluetooth, etc.).
[0199] The bus 1050 includes a path that transmits information between the various components of the device (eg, the processor 1010, the memory 1020, the input / output interface 1030, and the communication interface 1040).
[0200] It should be noted that, although the above device only shows the processor 1010, the memory 1020, the input / output interface 1030, the communication interface 1040 and the bus 1050, in the specific implementation process, the device may also include other components necessary for normal operation. In addition, it can be understood by those skilled in the art that the above device may also only include the components necessary for implementing the embodiments of the present specification, and does not necessarily include all the components shown in the figure.
[0201] The electronic device of the above-mentioned embodiment is used to implement the corresponding screen projection method in any of the aforementioned embodiments, and has the beneficial effects of the corresponding method embodiments, which will not be repeated here.
[0202] Based on the same inventive concept, corresponding to any of the above-mentioned embodiment methods, the present disclosure also provides a non-transitory computer-readable storage medium, wherein the non-transitory computer-readable storage medium stores computer instructions, and the computer instructions are used to enable the computer to execute the screen projection method described in any of the above embodiments.
[0203] The computer-readable medium of this embodiment includes permanent and non-permanent, removable and non-removable media, and information storage can be implemented by any method or technology. Information can be computer-readable instructions, data structures, modules of programs, or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technology, read-only compact disk read-only memory (CD-ROM), digital versatile disk (DVD) or other optical storage, magnetic cassettes, magnetic tape magnetic disk storage or other magnetic storage devices or any other non-transmission media that can be used to store information that can be accessed by a computing device.
[0204] The computer instructions stored in the storage medium of the above embodiments are used to enable the computer to execute the screen projection method described in any of the above embodiments, and have the beneficial effects of the corresponding method embodiments, which will not be repeated here.
[0205] Based on the same inventive concept, corresponding to any of the above-mentioned embodiments and methods, the present application also provides a vehicle, including the screen projection device in the above-mentioned embodiments, the electronic device in the above-mentioned embodiments, and the computer-readable storage medium in the above-mentioned embodiments, and the vehicle equipment implements the screen projection method described in any of the above embodiments.
[0206] The vehicle of the above-mentioned embodiment is used to implement the screen projection method described in any of the aforementioned embodiments, and has the beneficial effects of the corresponding method embodiments, which will not be repeated here.
[0207] It is understandable that before using the technical solutions of each embodiment of the present disclosure, the type, scope of use, usage scenarios, etc. of the personal information involved will be informed to the user in an appropriate manner, and the user's authorization will be obtained.
[0208] For example, in response to receiving an active request from a user, a prompt message is sent to the user to clearly remind the user that the operation requested to be performed will require obtaining and using the user's personal information. Thus, the user can independently choose whether to provide personal information to software or hardware such as an electronic device, application, server, or storage medium that performs the operation of the technical solution of the present disclosure according to the prompt message.
[0209] As an optional but non-limiting implementation, in response to receiving the user's active request, the prompt information may be sent to the user in the form of a pop-up window, in which the prompt information may be presented in text form. In addition, the pop-up window may also carry a selection control for the user to choose "agree" or "disagree" to provide personal information to the electronic device.
[0210] It is understandable that the above notification and the process of obtaining user authorization are merely illustrative and do not constitute a limitation on the implementation of the present disclosure. Other methods that meet relevant laws and regulations may also be applied to the implementation of the present disclosure.
[0211] Those skilled in the art should understand that the discussion of any of the above embodiments is merely illustrative and is not intended to imply that the scope of the present disclosure (including the claims) is limited to these examples. Based on the concept of the present disclosure, the technical features in the above embodiments or different embodiments may be combined, the steps may be implemented in any order, and there are many other variations of the different aspects of the embodiments of the present disclosure as described above, which are not provided in detail for the sake of simplicity.
[0212] In addition, to simplify the description and discussion, and in order not to make the embodiments of the present disclosure difficult to understand, the known power / ground connections to the integrated circuit (IC) chips and other components may or may not be shown in the provided figures. In addition, the device can be shown in the form of a block diagram to avoid making the embodiments of the present disclosure difficult to understand, and this also takes into account the fact that the details of the implementation of these block diagram devices are highly dependent on the platform on which the embodiments of the present disclosure will be implemented (that is, these details should be fully within the scope of understanding of those skilled in the art). Where specific details (e.g., circuits) are set forth to describe exemplary embodiments of the present disclosure, it is apparent to those skilled in the art that the embodiments of the present disclosure can be implemented without these specific details or with changes in these specific details. Therefore, these descriptions should be considered illustrative rather than restrictive.
[0213] Although the present disclosure has been described in conjunction with specific embodiments of the present disclosure, many replacements, modifications and variations of these embodiments will be apparent to those skilled in the art from the foregoing description. For example, other memory architectures (e.g., dynamic RAM (DRAM)) may use the embodiments discussed.
[0214] The embodiments of the present disclosure are intended to cover all such substitutions, modifications and variations that fall within the broad scope of the appended claims. Therefore, any omissions, modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the embodiments of the present disclosure should be included in the scope of protection of the present disclosure.
Claims
1. A screen projection method, characterized in that: include: Receive a screen projection command and obtain the screen projection protocol content contained in the screen projection command; Determine whether a target field in the screen projection protocol content is missing, and if the target field is missing, determine the missing field in the screen projection protocol content; Determine a target processing method according to the missing field, and obtain a processing result after processing based on the target processing method; In response to the processing result that the target field is complete, the projection content corresponding to the projection instruction is displayed.
2. The method according to claim 1, characterized in that The step of determining a target processing method according to the missing field to obtain a processing result includes: In response to the missing field being a screen projection content link field, determining the target processing method is to output a screen projection failure prompt message; or, In response to the missing field being the projection content type field and the presence of a projection content link field, the target processing method is determined to be to complete the missing field according to the projection content link field, and to use the completion result as the processing result.
3. The method according to claim 2, characterized in that The target processing method is to fill in the missing fields according to the projection content link field, and use the filling result as the processing result, including: Determine whether the projection content link field contains type key information; In response to the inclusion of type key information, the type corresponding to the type key information is used as the projection content type to complete the missing field; or, In response to not containing type key information, request the screen projection content link through the network protocol, receive the returned content, determine whether the playback type exists in the returned content, use the playback type as the screen projection content type, and fill in the missing field.
4. The method according to claim 1, characterized in that The target fields are the projection content type field and the projection content link field. The displaying of the screen projection content corresponding to the screen projection instruction includes: Determine the projection content type corresponding to the projection content type field; In response to the type of the screen projection content being audio, determining that the target player is an audio player, and using the audio player to display the screen projection content corresponding to the screen projection instruction; or, In response to the type of the screen projection content being an image, determining that the target player is an image player, and using the image player to display the screen projection content corresponding to the screen projection instruction; or, In response to the projection content type being video, a target video player is determined according to the projection content link field, and the projection content corresponding to the projection instruction is displayed using the target video player.
5. The method according to claim 4, characterized in that The projection content link field includes the decoding type and resolution; The determining a target video player according to the projection content link field includes: In response to the decoding type being soft decoding, determining that the target video player is a soft decoding player; or, In response to the decoding type being hard decoding, if it is determined that the resolution is less than or equal to a preset resolution threshold, the target video player is a native video player; or, if it is determined that the resolution is greater than a preset resolution threshold, the target video player is a hard decoding player.
6. The method according to claim 4, characterized in that The determining a target video player according to the projection content link field includes: Requesting the projection content link and receiving the request result; In response to the request result being access denied, adjusting the player agent corresponding to the screen casting content link to obtain a new screen casting content link field, and determining the target video player according to the new screen casting content link field; or In response to the request result being that access is allowed, a target video player is determined based on the projection content link field.
7. The method according to claim 6, characterized in that The adjusting the player agent corresponding to the screen projection content link includes: Determine the target content source data contained in the projection content link field, and determine the proxy field supported by the target content source data, wherein the proxy field supported by the target content source data indicates that the projection receiving end is allowed to access the target content source data in the projection content link according to the proxy field; Obtain the identity information field in the projection content link, and modify the identity information field to a proxy field supported by the target content source data.
8. The method according to claim 1, characterized in that: After displaying the projection content corresponding to the projection instruction, the method further includes: In response to receiving a player change instruction, determining a new target image player corresponding to the player change instruction; The new target player is used to play the projection content corresponding to the projection instruction.
9. An electronic device, characterized in that: The method comprises a memory, a processor and a computer program stored in the memory and executable on the processor, wherein when the processor executes the program, the method according to any one of claims 1 to 8 is implemented.
10. A vehicle, characterized in that: The vehicle includes the electronic device according to claim 9.
Citation Information
Patent Citations
Screen projection method and related device
CN110166823A
Screen projection blank screen detection method and device and computer readable storage medium
CN112788430A
Communication protocol method, system and device for local area network screen projection and storage medium
CN113259760A
Audio and video screen projection method, device, equipment, system and storage medium
CN114302202A
IN10782CHN2012A