Screen projection method, electronic device and vehicle
By identifying and processing missing fields in the screen mirroring protocol, the problem of the receiving end being unable to mirror properly was solved, enabling successful screen mirroring and improving the user experience.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- GREAT WALL MOTOR CO LTD
- Filing Date
- 2024-12-17
- Publication Date
- 2026-04-10
AI Technical Summary
During the screen mirroring process, the receiving end often fails to mirror the screen or displays a screen mirroring failure message after receiving the screen mirroring command, which fails to meet user needs.
By determining whether the target fields in the screen casting protocol content are missing, the missing fields are identified, and the target processing method is determined based on the missing fields. The corresponding processing is carried out to ensure that the screen casting protocol content is complete, thereby achieving normal screen casting.
It improves the success rate of screen mirroring and user experience, ensuring that screen mirrored content can be displayed smoothly and meeting user needs.
Smart Images

Figure CN119815087B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present disclosure relates to the technical field of communication, and particularly relates to a screen projection method, an electronic device and a vehicle. BACKGROUND
[0002] Due to the limited screen size of a mobile device, a user often projects the content displayed by the mobile device to a larger screen for viewing when using the mobile device.
[0003] During screen projection use, the screen projection receiving end often fails to normally project after receiving a screen projection instruction, or prompts a screen projection failure, thereby failing to meet user needs. SUMMARY
[0004] Therefore, the present disclosure aims to provide a screen projection method, an electronic device and a vehicle to solve the problem that the screen projection receiving end often fails to normally project after receiving a screen projection instruction, or prompts a screen projection failure, thereby failing to meet user needs during screen projection use.
[0005] To achieve the above purpose, a first aspect of the present disclosure provides a screen projection method, which comprises the following steps:
[0006] receiving a screen projection instruction and obtaining screen projection protocol content contained in the screen projection instruction;
[0007] determining whether a target field in the screen projection protocol content is missing, and determining a missing field in the screen projection protocol content if the target field is missing;
[0008] determining a target processing mode according to the missing field, and obtaining a processing result after processing based on the target processing mode;
[0009] in response to the processing result being that the target field is complete, displaying screen projection content corresponding to the screen projection instruction.
[0010] Based on the same inventive concept, a second aspect of the present disclosure provides a screen projection device, which comprises:
[0011] an instruction receiving module configured to receive a screen projection instruction and obtain screen projection protocol content contained in the screen projection instruction;
[0012] a missing field determining module configured to determine whether a target field in the screen projection protocol content is missing, and determine a missing field in the screen projection protocol content if the target field is missing;
[0013] a processing module configured to determine a target processing mode according to the missing field, and obtain a processing result after processing based on the target processing mode;
[0014] The display module is configured to display the screen projection content corresponding to the screen projection instruction in response to the processing result being that the target field is complete.
[0015] Based on the same inventive concept, a third aspect of the present disclosure provides 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, a fourth aspect of the present disclosure provides a non-transitory computer-readable storage medium, which stores computer instructions for causing a computer to execute the screen projection method as described above.
[0017] Based on the same inventive concept, a fifth aspect of the present disclosure provides a vehicle, comprising the screen projection device of the second aspect, the electronic device of the third aspect, or the storage medium of the fourth aspect.
[0018] As can be seen from the above, the present disclosure provides a screen projection method, an electronic device, and a vehicle. After receiving a screen projection instruction, screen projection protocol content corresponding to the screen projection instruction is obtained, wherein the target field required for normal screen projection is included in the screen projection protocol content, i.e., the target field mentioned later. If the target field in the screen projection protocol content is missing, the missing field needs to be determined, and then it is determined whether successful screen projection can be continued. According to the missing field, a target processing mode is determined, and a processing result is obtained. Different processing modes are used for different missing fields, and the processing is more accurate. Through the target processing mode, the smooth completion of screen projection is realized as much as possible. If the processing result is that the target field is complete, it means that the key field required for normal screen projection in the screen projection protocol content is complete, and at this time, the screen projection operation can be completed. The screen projection content corresponding to the screen projection instruction is displayed at the screen projection receiving end, thereby meeting the user's screen projection demand and improving the user experience. BRIEF DESCRIPTION OF DRAWINGS
[0019] In order to more clearly illustrate the technical solutions in the present disclosure or the related art, the following will briefly introduce the drawings needed to be used in the embodiments or related art descriptions. Obviously, the drawings in the following description are only embodiments of the present disclosure, and for those skilled in the art, other drawings can also be obtained without creative labor based on these drawings.
[0020] Figure 1 The flowchart of the screen projection method of the embodiment of the present disclosure;
[0021] Figure 2 The first part flowchart of the screen projection method of another embodiment of the present disclosure;
[0022] Figure 3A second partial flowchart of the screen projection method according to another embodiment of the present disclosure;
[0023] Figure 4 A third partial flowchart of the screen projection method according to another embodiment of the present disclosure;
[0024] Figure 5 A structure block diagram of the screen projection device according to an embodiment of the present disclosure;
[0025] Figure 6 A structure schematic diagram of the 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 clearer, the present disclosure will be further described in detail below with reference to specific embodiments and 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 as the common meanings understood by those skilled in the art to which the present disclosure belongs. The terms "first", "second", and similar terms used in the embodiments of the present disclosure do not represent any order, number, or importance, but are only used to distinguish different components. The terms "include", "contain", and similar terms mean that the elements or objects before the terms encompass the elements or objects listed after the terms and their equivalents, and do not exclude other elements or objects. The terms "connect" or "connected" and similar terms do not mean physical or mechanical connections, but can include electrical connections, whether direct or indirect. The terms "upper", "lower", "left", "right", and the like only represent relative positional relationships, and when the absolute positions of the described objects change, the relative positional relationships may also change accordingly.
[0028] Due to the limited screen size of the mobile device, users often project the content displayed by the mobile device to a larger screen for viewing when using the mobile device.
[0029] During the use of screen projection, it often happens that the screen projection receiving end cannot normally project after receiving the screen projection instruction, or prompts that the screen projection fails, thereby failing to meet the user's needs.
[0030] For the reasons for screen projection failure, on the one hand, the corresponding mobile device end may not completely refer to the key parameters required by each field in the protocol transmission link for the content of the screen projection instruction sent by the mobile device. On the other hand, the screen projection link sent by some applications only supports the official screen projection application under its application. Other players directly request video content through their links, which will be rejected by the server.
[0031] Based on the above description, the present embodiment proposes a screen projection method, as shown in Figure 1As shown, the method comprises:
[0032] In step 101, a screen projection instruction is received, and screen projection protocol content contained in the screen projection instruction is acquired.
[0033] In implementation, the screen projection instruction is received, which indicates that the user wants to perform a screen projection operation. The screen projection instruction contains screen projection protocol content, which includes key fields required for normal screen projection. The key fields include a screen projection content link, a screen projection content type, and a screen projection content title.
[0034] The screen projection content link is a specific screen projection content link that needs to be played or displayed. The screen projection content type is used to distinguish the content type of the screen projection content, so that different players can be selected according to the content type. The content type includes pictures, videos, audio, and the like. The screen projection content title is the title content displayed during screen projection, such as the name of a video / music / picture, the singer of a song, and the like.
[0035] The trigger mode of the screen projection instruction includes at least one of the following: voice triggering, touch triggering, and the like. For example, the user clicks a screen projection virtual button on a mobile device, selects a 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 can be a car machine, a smart television, a computer, and the like.
[0037] In step 102, it is determined whether a target field in the screen projection protocol content is missing. If the target field is missing, the missing field in the screen projection protocol content is determined.
[0038] In implementation, it is determined whether a target field in the screen projection protocol content is missing. The target field in the screen projection protocol content is compared with a preset complete field to determine whether the target field is consistent with the preset complete field, that is, whether the target field in the screen projection protocol content is complete. If it is complete, it is determined that the target field in the screen projection protocol content is complete. If it is not complete, it is determined that the target field in the screen projection protocol content is missing, and the missing field in the screen projection protocol content is determined. The target field is the key field required for normal screen projection as described in the above steps.
[0039] In some embodiments, the target field is a screen projection content link and a screen projection content type. If it is determined that the target field in the screen projection protocol content is missing, the missing field is determined, wherein the missing field is a screen projection content link field and / or a screen projection content type field. That is, the missing field can be only a screen projection content link field, or only a screen projection content type field, or both a screen projection content link field and a screen projection content type field are missing.
[0040] If it is determined that the target field in the screen projection protocol content is complete, a target player is determined according to 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] In step 103, a target processing mode is determined according to the missing field, and a processing result is obtained after processing based on the target processing mode.
[0042] In specific implementation, the target processing mode corresponding to the missing field is determined according to the determined missing field, that is, different missing fields correspond to different target processing modes. The target processing mode is used for processing, and a processing result is obtained after processing.
[0043] In step 104, in response to the processing result being that the target field is complete, the screen projection content corresponding to the screen projection instruction is displayed.
[0044] In specific implementation, after the screen projection protocol content is processed according to the target processing mode, a processing result is obtained. If the processing result is that the target field is complete, it means that the key fields required for normal screen projection are complete, and thus normal screen projection can be implemented.
[0045] The content type corresponding to the screen projection content is determined, a target player corresponding to the content type is determined, and the target player is used to display the screen projection content corresponding to the screen projection instruction.
[0046] For example, the content type is audio, and the target player corresponding to the audio is an audio player, and the audio is played by 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 at the same time when the screen projection content corresponding to the screen projection instruction is displayed.
[0048] For example, the screen projection content title is a song name and a singer, and the song name and the singer are displayed at the same time when the audio is played.
[0049] By the above scheme, the screen projection protocol content corresponding to the screen projection instruction is acquired, wherein the screen projection protocol content includes the key field required for normal screen projection, i.e., the target field mentioned later. If the target field in the screen projection protocol content is missing, the missing field is determined, and it is then judged whether the successful screen projection can be continued. According to the missing field, the target processing mode is determined, and a processing result is obtained. Different processing modes are adopted for different missing fields, and the processing is more accurate. Through the target processing mode, the smooth completion of screen projection is realized as much as possible. If the processing result is that the target field is complete, it means that the key field required for normal screen projection in the screen projection protocol content is complete, and at this time, the screen projection operation can be completed, the screen projection content corresponding to the screen projection instruction is displayed on the screen projection receiving end, and the user's screen projection demand is met, thereby 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 multimedia transmission technologies based on a local area network.
[0051] In some embodiments, step 103 specifically includes:
[0052] Step 1031, in response to the missing field being a screen projection content link field, determining that the target processing mode is to output a screen projection failure prompt information. Or,
[0053] Step 1032, in response to the missing field being a screen projection content type field and there being a screen projection content link field, determining that the target processing mode is to perform a padding processing on the missing field according to the screen projection content link field, and taking the padding result as the processing result.
[0054] In specific implementation, if the missing field is a screen projection content link field, at this time, whether there is a screen projection content type field or not, the screen projection operation cannot be continued, and therefore a screen projection failure prompt information is outputted, wherein the screen projection failure prompt information is used to prompt the user that the screen projection has failed and needs to be retried.
[0055] In the present embodiment, the prompt mode 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, a prompt information of "screen projection failure, please retry" is outputted.
[0056] If the missing field is a screen projection content type field and there is a screen projection content link field, it means that only the screen projection content type field is missing at this time, and the target processing mode is determined to be padding the missing field. Specifically, because the suffix information in the screen projection content link field can include type information, the missing field can be padded according to the existing screen projection content link field, and the padding result is taken as the processing result.
[0057] Through the above scheme, by judging why the missing field is specifically a field, if it is determined that the missing field is a screen projection content link field, at this time, the missing screen projection content link field cannot be determined and completed according to other fields in the screen projection protocol content, therefore, a screen projection failure prompt information is output for the user to know that there is a problem with screen projection, and the screen projection instruction needs to be re-sent to further determine whether screen projection can be completed.
[0058] In some embodiments, step 1032 specifically comprises:
[0059] Step 10321, judging whether the type key information is contained in the screen projection content link field;
[0060] Step 10322, in response to containing the type key information, taking the type corresponding to the type key information as the screen projection content type to complete the missing field; or,
[0061] Step 10323, in response to not containing the type key information, requesting the screen projection content link through a network protocol, receiving returned content, determining that the play type exists in the returned content, taking the play type as the screen projection content type to complete the missing field.
[0062] In specific implementation, the type key information may be contained in the screen projection content link field, wherein the type key information is information that can obtain the content type of the screen projection content.
[0063] If the type key information is contained in the screen projection content link field, at this time, the type corresponding to the type key information is taken as the screen projection content type to complete the missing field. The database pre-stores the screen projection content type corresponding to each type key information, such as that 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 screen 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 screen projection content type of the missing field is determined to be video.
[0065] If the type key information is not contained in the screen projection content link field, the screen projection content link is requested through a network protocol. The screen projection content link is requested through a network protocol, and returned content is received. It is judged whether the play type exists in the returned content, if the play type exists in the returned content, the play type is taken as the screen projection content type to complete the missing field.
[0066] In this embodiment, the network protocol is the http protocol, the screen projection content link is requested through the network protocol, that is, the screen projection content link is placed in a webpage, if the play type exists, the content of the screen projection content link is directly downloaded, the returned content is received, and the specific type is determined according to the content.
[0067] In some embodiments, if the play type does not exist in the returned content, that is, the type of the screen projection content cannot be determined according to the screen projection content link field, a screen projection failure prompt information is output at this time, so that the user knows that the screen projection fails, and if the screen projection is still needed, the screen projection instruction is re-sent.
[0068] Through the above scheme, when the screen projection content type field is missing, whether the type key information exists in the screen projection content link field is first determined, if the type key information exists, the type of the screen projection content can be directly determined, and the processing efficiency is improved. If the type key information does not exist, the screen projection content link can also be requested through the network protocol, and then the type of the screen projection content is determined according to the returned content, so that the type of the screen projection content is found to the greatest extent, the smooth completion of the screen projection is ensured, and the user demand is met.
[0069] In some embodiments, the target field is the screen projection content type field and the screen 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 screen projection content type being audio, determining that the target player is an audio player, and displaying the screen projection content corresponding to the screen projection instruction by using the audio player; or,
[0072] Step 1043, in response to the screen projection content type being image, determining that the target player is an image player, and displaying the screen projection content corresponding to the screen projection instruction by using the image player; or,
[0073] Step 1044, in response to the screen projection content type being video, determining a target video player according to the screen projection content link field, and displaying the screen projection content corresponding to the screen projection instruction by using the target video player.
[0074] In specific implementation, the target field in the screen projection protocol content in this embodiment includes the screen projection content type field and the screen projection content link field, the screen projection content type corresponding to the screen projection content type field is determined, and the screen projection content type includes audio or image.
[0075] If it is determined that the screen projection content type is audio, it is determined that the target player required to display the screen projection content is an audio player, and the screen projection content corresponding to the screen projection instruction is displayed by using the audio player, that is, the audio is played by using the audio player.
[0076] If it is determined that the screen projection content type is image, it is determined that the player required to display the screen projection content is an image player, and the screen projection content corresponding to the screen projection instruction is displayed by using the image player, that is, the screen projection picture is displayed by using the image player.
[0077] If it is determined that the screen projection content type is video, it is determined that the player required to display the screen projection content is a video player, and the 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 formats of videos, does not depend on specific hardware, can adapt to various video formats and coding standards, and supports more functions such as filters, subtitles, and picture processing optimization. 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 an Android native video player, which is suitable for simple video playing, has good compatibility with the Android system, but supports fewer video formats, and may not provide a smooth playing experience when playing high-definition videos.
[0080] The hard decoding player is suitable for playing high-definition video content, has high playing efficiency, can significantly improve the smoothness and clarity of video playing, effectively reduces CPU occupancy, and reduces power consumption. However, it needs a hardware decoding module and related drivers.
[0081] Since the decoding type of the screen projection video is included in the screen projection content link field, the specific target video player suitable for the screen projection video can be determined from the soft decoding player, the hard decoding player, and the native video player according to the decoding type, and the screen projection content corresponding to the screen projection instruction is displayed by using the target video player.
[0082] Through the above scheme, if the screen projection content type is video, the type of the video player can be further determined according to the screen projection content link field in the screen projection protocol content in addition to the video player, so that the subsequent playing of the screen projection content is more smooth.
[0083] In some embodiments, the screen 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] In step 10432, in response to the decoding type being hard decoding, if the resolution is less than or equal to a preset resolution threshold, the target video player is a native video player; or if the resolution is greater than the preset resolution threshold, the target video player is a hard decoding player.
[0086] In a specific implementation, the decoding type in the screen projection content link field is soft decoding or hard decoding. If it is determined that the decoding type is soft decoding, it is determined that the player required to display the screen projection content is a soft decoding player.
[0087] Specifically, if the type is live streaming, real-time transmission of the video is involved, and a soft decoding player needs to be used at this time. Meanwhile, if the video is not supported by hard decoding, a soft decoding player is selected.
[0088] If it is determined that the decoding type is hard decoding, the resolution in the screen projection content link field is determined, and the resolution represents the resolution of the video when the screen projection content is a video. The resolution is compared with a preset resolution threshold, and 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 screen 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 screen projection content is a hard decoding player.
[0090] For example, the preset resolution threshold is 480p. If it is determined that the resolution of image A is 360p, it is determined that the player required to display the image A is a native video player. If it is determined that the resolution of image B is 1080p, it is determined that the player required to display the image B is a hard decoding player.
[0091] Specifically, if the resolution is 480p, because the resolution is low, a native player can play smoothly, power consumption is low, and resource occupation is low, and therefore the image player uses a native video player. If the resolution is 720p, because hard decoding is efficient, it is suitable for medium resolution, and balance is achieved between smoothness and power consumption, and therefore the image player uses a hard decoding player. If the resolution is 1080p, because high resolution relies on a hard decoding module, smoothness is improved, CPU burden and power consumption are reduced, and therefore the image player uses a hard decoding player.
[0092] Through the foregoing scheme, first, the specific video player is determined according to the decoding type. When it is determined that the decoding type is hard decoding, the target video player is further determined according to the resolution. The selection of the target video player is more accurate, and smooth playing of video data is achieved, and user experience is improved.
[0093] In some embodiments, step 1043 specifically comprises:
[0094] Step 10A, request the screen projection content link, and receive a request result;
[0095] Step 10B, in response to the request result being denied access, adjusting the player agent corresponding to the screen projection content link to obtain a new screen projection content link field, and determining a target video player according to the new screen projection content link field; or
[0096] Step 10C, in response to the request result being allowed access, determining a target video player according to the screen projection content link field.
[0097] In specific implementation, because part of the screen projection content needs to be actively set as an agent, if it is not set, it will be rejected by the server with a high probability. Therefore, first determine whether the screen projection link has the possibility of being rejected by the server.
[0098] Directly request the screen projection content link to obtain a request result. The screen projection content link contains a player agent field. If the request result is denied access, the player agent field contained in the screen projection content link needs to be adjusted at this time. The player agent is an intermediate server located between the screen projection receiving end and the screen projection sending end, which can act as a transfer station between the screen projection receiving end and the screen projection sending end to forward the request sent by the screen projection sending end. Through the player agent, some network acceleration and access control functions can be realized. After adjustment, a new screen projection content link is obtained, and a 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 denied access is to display a 403 error, wherein the 403 error (HTTP 403 Forbidden) means that the server has received the request of the client, but refuses to provide access, and usually indicates that the user has no permission to access the requested resource.
[0100] If the request result is allowed access, it means that there is no need to adjust the server agent, and the target video player can be directly determined according to the screen projection content link field.
[0101] Through the above scheme, by determining whether the screen projection link has the possibility of being rejected by the server, the phenomenon that the screen projection fails due to the fact that the server agent itself does not support access to the server corresponding to the screen projection content is avoided.
[0102] In some embodiments, step 10B specifically comprises:
[0103] Step a, determining the target content source data contained in the screen 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 target content source data in the screen projection content link is allowed to be accessed according to the proxy field by the screen projection receiver;
[0104] Step b, obtaining the identity information field in the screen projection content link, and modifying the identity information field into the proxy field supported by the target content source data.
[0105] In specific implementation, the target content source data contained in the screen projection content link field is determined, and the target content source data is the screen projection content data corresponding to the screen 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 by using the supported proxy field.
[0106] The database pre-stores the proxy field supported by the content source data and the proxy field not supported by the content source data. The proxy field supported by the target content source data is found in the database, and the proxy field supported by the target content source data indicates that the target content source data in the screen projection content link is allowed to be accessed by the screen projection receiver according to the proxy field, that is, the server corresponding to the target content source data can be accessed according to the supported proxy field.
[0107] Exemplarily, the live link of a certain video website does not support the proxy of the Android system or the multimedia framework in the Android system.
[0108] The identity information field in the screen projection content link is obtained, the identity information field is located at the head of the screen projection content link field, and the identity information field is modified into the proxy field supported by the target content source data.
[0109] In some embodiments, the method specifically further includes:
[0110] Step A, in response to receiving a player replacement instruction, determining a new target image player corresponding to the player replacement instruction;
[0111] Step B, playing the screen projection content corresponding to the screen projection instruction by using the new target player.
[0112] In specific implementation, after the target image player is determined, if a player replacement instruction sent by the user is received, it indicates that the user wants to replace the player to play the screen projection content.
[0113] The new target image player corresponding to the player replacement instruction is determined, and the screen projection content corresponding to the screen projection instruction is played by using the new target player.
[0114] Through the above scheme, if the user still has a problem in playing experience during use, the user can try to switch other players according to own needs, and the use experience of the user is improved.
[0115] In some embodiments, if other exceptions are still encountered during playing, re-screen projection guide information is sent to the user to guide the user to re-project. In this embodiment, the other exceptions can specifically include:
[0116] Network problem: unstable network, network delay or insufficient bandwidth, multicast data loss.
[0117] File or content problem: the projected file may be damaged.
[0118] Media protection problem: part of the projected content only supports member projection, the validity of the projection link has a time limit and may have expired.
[0119] Based on the same inventive concept, another embodiment of the present disclosure proposes a projection method, as shown in Figure 2 , Figure 3 and Figure 4 , specifically comprising:
[0120] Step 201, receiving a projection instruction.
[0121] In specific implementation, when the projection instruction is received, it means that the user wants to perform a projection operation. The projection instruction corresponds to projection protocol content, and the projection protocol content includes key fields required to implement normal projection, wherein the key fields include a projection content link, a projection content type and a projection content title.
[0122] Step 202, determining whether the target field in the projection protocol content is missing, if not, jumping to step 211. If missing, jumping to step 203.
[0123] In specific implementation, if it is determined that the target field in the projection protocol content is complete, the target player is directly determined according to the projection content type field, and the target player is used to display the projection content corresponding to the projection instruction.
[0124] Step 203, if the missing field is the projection content link field, jumping to step 204.
[0125] Step 204, outputting a projection failure prompt information.
[0126] In specific implementation, if the missing field is the projection content link field, whether there is a projection content type field or not, the projection operation cannot be continued, and therefore the projection failure prompt information is outputted, wherein the projection failure prompt information is used to prompt the user that the projection fails and needs to be retried.
[0127] In step 205, if the missing field is the screen projection content type field and the screen projection content link field exists, the process jumps to step 206.
[0128] In implementation, if the missing field is the screen projection content type field and the screen projection content link field exists, it indicates that only the screen projection content type field is missing at this time, and the target processing mode is determined to be to fill in the missing field. Specifically, because the suffix information in the screen projection content link field can contain type information, the missing field can be filled in according to the existing screen projection content link field.
[0129] In step 206, it is determined whether the screen projection content link field contains type key information. If yes, the process jumps to step 207, and if no, the process jumps to step 208.
[0130] In step 207, the type corresponding to the type key information is taken as the screen projection content type, and the process jumps to step 211.
[0131] In implementation, the screen projection content link field can contain type key information, where the type key information is information that can obtain the content type of the screen projection content.
[0132] If the screen projection content link field contains type key information, the type corresponding to the type key information is taken as the screen projection content type to fill in the missing field.
[0133] In step 208, the screen projection content link is requested through a network protocol, and the returned content is received.
[0134] In step 209, it is determined whether the returned content contains a play type. If no, the process jumps to step 204, and if yes, the process jumps to step 210.
[0135] In step 210, the play type is taken as the screen projection content type.
[0136] In implementation, if the screen projection content link field does not contain type key information, the screen projection content link is requested through a network protocol. The screen projection content link is requested through a network protocol, and the returned content is received. It is determined whether the returned content contains a play type. If the returned content contains a play type, the play type is taken as the screen projection content type to fill in the missing field.
[0137] In step 211, the target player is determined according to the screen projection content type.
[0138] In step 212, the screen projection content type is audio, the target player is determined to be an audio player, and the audio is played by using the audio player.
[0139] Step 213, the projection content type is an image, and the target player is determined as an image player.
[0140] In a specific implementation, the target field in the projection protocol content includes a projection content type field and a projection content link field, and the projection content type corresponding to the projection content type field is determined, where the projection content type includes audio or image.
[0141] If the projection content type is determined as audio, the target player required to display the projection content is determined as an audio player, and the projection content corresponding to the projection instruction is displayed by using the audio player, that is, the audio is played by using the audio player.
[0142] If the projection content type is determined as an image, the player required to display the projection content is determined as an image player, and 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, the projection content link is requested, and a request result is received.
[0144] Step 215, if the request result is a refusal to access, the player agent corresponding to the projection content link is adjusted.
[0145] Step 216, if the request result is permission to access, the target image player is determined according to the projection content link field.
[0146] In a specific implementation, because some projection content needs to be actively set as an agent, if the agent is not set, the server is likely to refuse. Therefore, it is first determined whether the projection link has a possibility of being refused by the server.
[0147] The projection content link is directly requested to obtain a request result. If the request result is a refusal to access, the player agent corresponding to the projection content link needs to be adjusted at this time. After adjustment, a new projection content link is obtained, and the target image player is determined according to the new projection content link field.
[0148] If the request result is permission to access, it indicates that the server agent does not need to be adjusted, and the target image player can be directly determined according to the projection content link field.
[0149] Step 217, a decoding type and a resolution included in the projection content link field are obtained.
[0150] Step 218, if the decoding type is soft decoding, the target image player is determined as a soft decoding player, and the image is played by using the soft decoding player.
[0151] In step 219, if the decoding type is hard decoding, the resolution of the screen projection content is obtained.
[0152] In step 220, if the resolution is less than or equal to a preset resolution threshold, the target image player is a native video player, and the image is played by using the native video player.
[0153] In step 221, if the resolution is greater than the preset resolution threshold, the target image player is a hard decoding player, and the image is played by using the hard decoding player.
[0154] In implementation, the decoding type and the resolution are included in the screen projection content link field, and the decoding type is soft decoding or hard decoding. If it is determined that the decoding type is soft decoding, it is determined that the player required to display the screen projection content is a soft decoding player.
[0155] If it is determined that the decoding type is hard decoding, the resolution in the screen projection content link field is determined, and the resolution represents the resolution of the image when the screen projection content is an image. The resolution is compared with a preset resolution threshold, and 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 screen 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 screen projection content is a hard decoding player.
[0157] In step 222, in response to receiving a player replacement instruction, a new target image player corresponding to the player replacement instruction is determined, and the screen projection content corresponding to the screen projection instruction is played by using the new target player.
[0158] In implementation, after the target image player is determined, if a player replacement instruction sent by a user is received, it indicates that the user wants to replace the player to play the screen projection content. A new target image player corresponding to the player replacement instruction is determined, and the screen projection content corresponding to the screen projection instruction is played by using the new target player.
[0159] It should be noted that the method of the embodiment of the present disclosure can be executed by a single device, such as a computer or a server. The method of the embodiment can also be applied to a distributed scenario, and completed by multiple devices cooperating with each other. In this distributed scenario, one of the multiple devices can only execute one or more steps in the method of the embodiment of the present disclosure, and the multiple devices can interact with each other to complete the method.
[0160] It is to be understood that the foregoing description is directed to some embodiments of the disclosure. Other embodiments fall within the scope of the following claims. In some cases, the actions or steps recited in the claims can be performed in a different order and still achieve desirable results. Additionally, the processes depicted in the accompanying figures do not necessarily require the particular order shown or sequential order to achieve the desired results. In certain implementations, multitasking and parallel processing can be advantageous.
[0161] Based on the same inventive concept, the disclosure also provides a screen projection device corresponding to the method of any of the above embodiments.
[0162] Reference Figure 5 , Figure 5 The screen projection device of the embodiments comprises:
[0163] The instruction receiving module 501 is configured to receive a screen projection instruction and obtain screen projection protocol content contained in the screen projection instruction.
[0164] The missing field determining module 502 is configured to determine whether a target field in the screen projection protocol content is missing, and determine a missing field in the screen projection protocol content if the target field is missing.
[0165] The processing module 503 is configured to determine a target processing mode according to the missing field, and obtain a processing result based on the target processing mode.
[0166] The display module 504 is configured to display screen projection content corresponding to the screen projection instruction in response to the processing result being that the target field is complete.
[0167] In some embodiments, the processing module 503 specifically comprises:
[0168] The prompting unit is configured to determine that the target processing mode is to output screen projection failure prompt information in response to the missing field being a screen projection content link field; or
[0169] The supplement unit is configured to determine that the target processing mode is to perform supplement processing on the missing field according to the screen projection content link field and take a supplement result as the processing result in response to the missing field being a screen projection content type field and there being a screen projection content link field.
[0170] In some embodiments, the supplement unit is specifically configured to:
[0171] Determine whether the screen 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, and the missing field is filled in; or...
[0173] In response to the absence of type key information, a request for the screen-casting content link is made via a network protocol, the returned content is received, it is determined that the returned content contains a playback type, the playback type is used as the screen-casting content type, and the missing field is filled in.
[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] The type determination unit is configured to determine the type of the screen-casting content corresponding to the screen-casting content type field; the audio playback unit is configured to, in response to the screen-casting content type being audio, determine the target player as an audio player and use the audio player to display the screen-casting content corresponding to the screen-casting instruction; or...
[0176] The image playback unit is configured to, in response to the screen-projected content type being an image, determine the target player as an image player, and use the image player to display the screen-projected content corresponding to the screen-projection command; or...
[0177] The video playback unit is configured to respond to the casting content type being video, determine the target video player based on the casting content link field, and use the target video player to display the casting content corresponding to the casting command.
[0178] In some embodiments, the screen-projected content link field includes decoding type and resolution; the video playback unit is specifically configured as follows:
[0179] In response to the decoding type being software decoding, the target video player is determined to be a software decoding player; or,
[0180] In response to the decoding type being hardware decoding, if the resolution is determined to be less than or equal to a preset resolution threshold, then the target video player is a native video player; or, if the resolution is determined to be greater than the preset resolution threshold, then the target video player is a hardware decoding player.
[0181] In some embodiments, the video playback unit is further configured to:
[0182] Request the link to the screen-projected content and receive the request result;
[0183] In response to the request result being "access denied," the player proxy corresponding to the cast content link is adjusted to obtain a new cast content link field. The target video player is then determined based on the new cast content link field; or...
[0184] In response to the request result being permission to access, a target video player is determined according to the screen projection content link field.
[0185] In some embodiments, the image playing unit is specifically further configured to:
[0186] Determine target content source data contained in the screen projection content link field, and determine a proxy field supported by the target content source data, wherein the proxy field supported by the target content source data indicates that the target content source data in the screen projection content link is allowed to be accessed by the screen projection receiver according to the proxy field;
[0187] Obtain an identity information field in the screen projection content link, and modify the identity information field to the proxy field supported by the target content source data.
[0188] In some embodiments, the device further comprises a player replacement module, which is specifically configured to:
[0189] In response to receiving a player replacement instruction, determine a new target image player corresponding to the player replacement instruction;
[0190] Play screen projection content corresponding to the screen projection instruction by using the new target player.
[0191] For the convenience of description, the above device is described in various modules according to functions. Of course, the functions of the modules can be implemented in one or more software and / or hardware when implementing the present disclosure.
[0192] The device of the above embodiments is used to implement the corresponding screen projection method in any of the above embodiments, and has the beneficial effects of the corresponding method embodiments, which will not be described here.
[0193] Based on the same inventive concept, the present disclosure also provides an electronic device corresponding to any of the above method embodiments, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the screen projection method of any of the above embodiments when executing the program.
[0194] Figure 6 A more specific hardware structure of an electronic device is shown in the embodiment, which can 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 for communication within the device.
[0195] The processor 1010 can be implemented by a general-purpose CPU (Central Processing Unit), a microprocessor, an ASIC (Application Specific Integrated Circuit), or one or more integrated circuits, etc., for executing relevant programs to implement the technical solutions provided by the embodiments of the present specification.
[0196] The memory 1020 can be implemented in the form of a ROM (Read Only Memory), a RAM (Random Access Memory), a static storage device, a dynamic storage device, etc. The memory 1020 can store an operating system and other application programs, and when the technical solutions provided by the embodiments of the present specification are implemented by software or firmware, the relevant program codes are saved in the memory 1020 and called and executed by the processor 1010.
[0197] The input / output interface 1030 is configured to connect input / output modules to implement information input and output. The input / output modules can be configured as components in the device (not shown in the figure) or externally connected to the device to provide corresponding functions. The input devices can include a keyboard, a mouse, a touch screen, a microphone, various sensors, etc., and the output devices can include a display, a speaker, a vibrator, an indicator light, etc.
[0198] The communication interface 1040 is configured to connect a communication module (not shown in the figure) to implement the communication interaction between the device and other devices. The communication module can realize communication through a wired manner (such as USB, network cable, etc.) or through a wireless manner (such as mobile network, WIFI, Bluetooth, etc.).
[0199] The bus 1050 includes a channel for transmitting information between various components (such as the processor 1010, the memory 1020, the input / output interface 1030, and the communication interface 1040) of the device.
[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 can also include other components necessary for normal operation. In addition, those skilled in the art can understand that the above device can also only include the components necessary to implement the solutions of the embodiments of the present specification, and does not have to include all the components shown in the figure.
[0201] The electronic device of the above embodiment is used to implement the corresponding screen projection method in any of the preceding embodiments, and has the beneficial effects of the corresponding method embodiment, which will not be repeated here.
[0202] Based on the same inventive concept, the disclosure also provides a non-transitory computer-readable storage medium storing computer instructions for causing the computer to perform the screen projection method according to any of the preceding embodiments.
[0203] The computer-readable medium of the present embodiment includes permanent and non-permanent, removable and non-removable media, which can be implemented by any method or technology to store information. The information can be computer-readable instructions, data structures, program modules 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 technologies, compact disc read-only memory (CD-ROM), digital versatile disc (DVD) or other optical storage, magnetic cassette, magnetic tape, magnetic disk storage or other magnetic storage devices, or any other non-transmission medium 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 embodiment are used to cause the computer to perform the screen projection method according to any of the preceding embodiments, and have the beneficial effects of the corresponding method embodiment, which will not be repeated here.
[0205] Based on the same inventive concept, the disclosure also provides a vehicle comprising the screen projection device of the above embodiment, the electronic device of the above embodiment, and the computer-readable storage medium of the above embodiment, the vehicle device implementing the screen projection method of any of the preceding embodiments.
[0206] The vehicle of the above embodiment is used to implement the screen projection method of any of the preceding embodiments, and has the beneficial effects of the corresponding method embodiment, which will not be repeated here.
[0207] It can be understood that before using the technical solutions of the various embodiments of the present disclosure, the user will be informed of the type, scope of use, use scenario, etc. of the personal information involved by appropriate means, and the authorization of the user will be obtained.
[0208] For example, in response to receiving an active request of a user, a prompt information is sent to the user to explicitly prompt the user that the operation requested to be performed will require obtaining and using personal information of the user. Thus, the user can autonomously select whether to provide the personal information to the software or hardware such as an electronic device, an application program, a server or a storage medium performing the operation of the technical solution of the present disclosure according to the prompt information.
[0209] As an optional but non-limiting implementation, in response to receiving an active request of a user, the manner of sending a prompt information to the user may, for example, be a pop-up window manner, and the prompt information may, for example, be presented in the pop-up window in the form of text. In addition, the pop-up window may, for example, also carry a selection control for the user to select "agree" or "disagree" to provide personal information to the electronic device.
[0210] It can be understood that the above notification and obtaining user authorization process is only illustrative, and does not limit the implementation of the present disclosure, and other manners meeting the relevant laws and regulations can also be applied to the implementation of the present disclosure.
[0211] It should be understood by those skilled in the art that the above discussion of any embodiment is only exemplary and is not intended to imply that the scope of the present disclosure (including claims) is limited to these examples; under the idea of the present disclosure, the above embodiments or technical features in different embodiments can also be combined, the steps can be implemented in any order, and there are many other changes of different aspects of the embodiments of the present disclosure as described above. In order to be brief, they are not provided in detail.
[0212] In addition, in order to simplify the description and discussion, and so as not to make the embodiments of the present disclosure difficult to understand, the well-known power / ground connections of integrated circuit (IC) chips and other components can or can not be shown in the provided drawings. In addition, the devices can be shown in the form of block diagrams in order 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 are to be implemented (i.e., these details should be fully within the understanding of those skilled in the art). Where specific details (e.g., circuitry) are set forth in order to describe an illustrative embodiment of the present disclosure, it will be apparent to those skilled in the art that the embodiments of the present disclosure can be practiced without these specific details or with variations on these specific details. Therefore, these descriptions should be considered as illustrative rather than limiting.
[0213] While the present disclosure has been described in connection with certain embodiments thereof, many modifications, substitutions, and variations will be apparent to those of ordinary skill in the art from the foregoing description. For instance, other memory architectures (e.g., dynamic RAM (DRAM)) can use the embodiments discussed.
[0214] Embodiments of the disclosure are intended to cover all such alternatives, modifications, and variations as falling within the broad scope of the appended claims. Accordingly, any one or more of the above-described embodiments can be combined with any one or more of the above-described embodiments in any manner within the scope of the disclosure.
Claims
1. A screen projection method, characterized by, The method comprises the following steps: receiving a screen projection instruction, and obtaining screen projection protocol content contained in the screen projection instruction; determining whether a target field in the screen projection protocol content is missing, and if the target field is missing, determining a missing field in the screen projection protocol content; determining a target processing mode according to the missing field, and processing the target processing mode to obtain a processing result; in response to the processing result being that the target field is complete, displaying screen projection content corresponding to the screen projection instruction; the method of determining a target processing mode according to the missing field to obtain a processing result comprises: in response to the missing field being a screen projection content link field, determining that the target processing mode is to output a screen projection failure prompt information; or, in response to the missing field being a screen projection content type field and there being a screen projection content link field, determining that the target processing mode is to perform a filling processing on the missing field according to the screen projection content link field, and taking a filling result as the processing result.
2. The method of claim 1, wherein, the method of determining that the target processing mode is to perform a filling processing on the missing field according to the screen projection content link field to take a filling result as the processing result comprises: determining whether the screen projection content link field contains type key information; in response to containing type key information, taking a type corresponding to the type key information as a screen projection content type, and filling the missing field; or in response to not containing type key information, requesting the screen projection content link through a network protocol, receiving a return content, determining that a play type exists in the return content, taking the play type as a screen projection content type, and filling the missing field.
3. The method of claim 1, wherein, the target field is a screen projection content type field and a screen projection content link field, the method of displaying screen projection content corresponding to the screen projection instruction comprises: determining a screen projection content type corresponding to the screen projection content type field; in response to the screen projection content type being audio, determining that a target player is an audio player, and displaying the screen projection content corresponding to the screen projection instruction by using the audio player; or in response to the screen projection content type being image, determining that a target player is an image player, and displaying the screen projection content corresponding to the screen projection instruction by using the image player; or in response to the screen projection content type being video, determining a target video player according to the screen projection content link field, and displaying the screen projection content corresponding to the screen projection instruction by using the target video player.
4. The method of claim 3, wherein, the screen projection content link field comprises a decoding type and a resolution; the method of determining a target video player according to the screen projection content link field comprises: 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, determining that the resolution is less than or equal to a preset resolution threshold, and then the target video player is a native video player; or determining that the resolution is greater than the preset resolution threshold, and then the target video player is a hard decoding player.
5. The method of claim 3, wherein, the method of determining a target video player according to the screen projection content link field comprises: requesting the screen projection content link, and receiving a request result; In response to the request result being access denied, adjusting the player agent corresponding to the screen projection content link to obtain a new screen projection content link field, and determining a target video player according to the new screen projection content link field; or In response to the request result being access allowed, determining a target video player according to the screen projection content link field.
6. The method of claim 5, wherein, The adjusting the player agent corresponding to the screen projection content link comprises: Determining target content source data contained in the screen projection content link field, and determining an agent field supported by the target content source data, wherein the agent field supported by the target content source data indicates that the target content source data in the screen projection content link is allowed to be accessed by the screen projection receiver according to the agent field; Obtaining an identity information field in the screen projection content link, and modifying the identity information field to the agent field supported by the target content source data.
7. The method of claim 1, wherein, After the screen projection content corresponding to the screen projection instruction is displayed, the method further comprises: In response to receiving a player replacement instruction, determining a new target image player corresponding to the player replacement instruction; Playing the screen projection content corresponding to the screen projection instruction by using the new target image player.
8. An electronic device, comprising: The electronic device comprises a memory, a processor, and a computer program stored in the memory and executable on the processor, and the processor executes the program to implement the method according to any one of claims 1 to 7.
9. A vehicle characterized by comprising: The vehicle comprises the electronic device according to claim 8.
Citation Information
Patent Citations
Screen projection method and related device
CN110166823A
Communication protocol method, system and device for local area network screen projection and storage medium
CN113259760A