Audio and video playing method and device, electronic equipment, storage medium and product
By building the popularity data set of playback equipment and automatically selecting the target playback equipment, the problem of manual selection of smart devices in a variety of audio and video playback devices is solved, and the audio and video playback efficiency and user experience are improved.
Patent Information
- Application Number
- CN202411655164.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-19
- Publication Date
- 2025-03-07
AI Technical Summary
When an intelligent device is connected to multiple audio and video playback devices, users need to manually select the playback device, resulting in low efficiency in selecting the playback device and affecting the audio and video playback efficiency and user experience.
By obtaining the audio and video types and application identifiers of the audio and video to be played, the pre-constructed playback device popularity data set is used to automatically determine the target playback device, and push the audio and video to the target playback device for playback.
It realizes automatic selection of suitable playback devices, improves the efficiency of playback device selection, improves the efficiency of audio and video playback and user experience, and can reasonably allocate devices in multiple playback device scenarios and play multiple audio and video simultaneously.
Smart Images

Figure CN119583905A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of audio and video processing technology, and in particular to an audio and video playback method, device, electronic device, storage medium and product. Background Art
[0002] At present, smart devices (such as tablets and mobile phones) basically support multiple audio and video playback devices, such as body speakers, Bluetooth headsets, wired headsets, Bluetooth speakers, wired speakers and other sound card devices. However, when a smart device is connected to multiple audio and video playback devices, if the smart device wants to play audio and video, the user needs to manually select a playback device from the multiple connected audio and video playback devices, which affects the selection efficiency of the playback device, thereby affecting the audio and video playback efficiency and reducing the user experience. Summary of the invention
[0003] Based on the above needs, the present application proposes an audio and video playback method, device, electronic device, storage medium and product, which can automatically select a suitable playback device for audio and video playback, improve the selection efficiency of the playback device, and thereby improve the audio and video playback efficiency and user experience.
[0004] To achieve the above objectives, this application proposes the following technical solutions:
[0005] According to a first aspect of an embodiment of the present application, there is provided an audio and video playback method, comprising:
[0006] Obtaining the audio and video type of the audio and video to be played and the identifier of the application that outputs the audio and video to be played;
[0007] Based on the playback device heat data set, the audio and video type and the identification of the application, determine the target playback device corresponding to the audio and video to be played; the playback device heat data set includes matching heat information between audio and video information and playback devices, and the audio and video information includes the audio and video type and / or the identification of the application that outputs the audio and video; the matching heat is determined based on the playback device set by the user for different audio and video information and / or the playback device of historical audio and video;
[0008] Push the audio and video to be played to the target playback device for playback.
[0009] Optionally, determining a target playback device corresponding to the audio or video to be played based on the playback device heat data set, the audio or video type, and the identifier of the application includes:
[0010] Querying the matching heat corresponding to the preliminary selected playback device matching the audio and video type and the identifier of the application from the playback device heat data set;
[0011] Based on the matching heat corresponding to the initially selected playback devices, a target playback device corresponding to the audio or video to be played is selected from the initially selected playback devices.
[0012] Optionally, based on the matching heat corresponding to the initially selected playback device, selecting a target playback device corresponding to the audio or video to be played from the initially selected playback devices includes:
[0013] According to the order of the matching heats corresponding to the preliminary selected playback devices from high to low, an available preliminary selected playback device is selected from the preliminary selected playback devices as the target playback device corresponding to the audio and video to be played.
[0014] Optionally, determining a target playback device corresponding to the audio or video to be played based on the playback device heat data set, the audio or video type, and the identifier of the application includes:
[0015] Querying the playback device heat data set for a playback device that matches the audio and video type and the identifier of the application;
[0016] If no playback device matching the audio and video type and the identifier of the application is found in the playback device heat data set, determining a target playback device corresponding to the audio and video to be played according to a preset selection rule;
[0017] The preset selection rule includes selecting a main playback device as the target playback device corresponding to the audio or video to be played, or selecting a playback device as the target playback device corresponding to the audio or video to be played according to the playback device priority.
[0018] Optionally, the audio and video playback device further includes:
[0019] Based on the target playback device, the audio and video type of the audio and video to be played, and the identifier of the application, updating the matching heat between the target audio and video information in the playback device heat data set and the target playback device;
[0020] The target audio and video information includes: the audio and video type of the audio and video to be played and the identifier of the application that outputs the audio and video to be played.
[0021] Optionally, the audio and video playback device also includes:
[0022] Obtaining a self-selected playback device selected by the user through an interactive interface, and pushing the audio and video to be played to the self-selected playback device for playback;
[0023] Based on the self-selected playback device, the audio and video type of the audio and video to be played, and the identifier of the application, updating the matching heat between the target audio and video information in the playback device heat data set and the self-selected playback device;
[0024] The target audio and video information includes: the audio and video type of the audio and video to be played and the identifier of the application that outputs the audio and video to be played.
[0025] Optionally, the method for constructing the playback device heat data set includes:
[0026] Collect audio and video information of historical audio and video, playback devices of historical audio and video, and selection types of playback devices of the historical audio and video; wherein the audio and video information of the historical audio and video includes: the audio and video type of the historical audio and video and the identifier of the application that outputs the historical audio and video, and the selection type of the playback device includes: automatic selection type and user selection type;
[0027] For all historical audio and video with the same audio and video information and playback device, determine the number of first historical audio and video with the automatic selection type of the playback device, and the number of second historical audio and video with the user selection type of the playback device;
[0028] Based on a first preset weight corresponding to the automatic selection type and a second preset weight corresponding to the user selection type, a weighted sum is taken of the number of the first historical audio and video and the number of the second historical audio and video to obtain a matching heat between the audio and video information and the playback device.
[0029] According to a second aspect of an embodiment of the present application, there is provided an audio and video playback device, comprising:
[0030] An acquisition module, used to acquire the audio and video type of the audio and video to be played and an identifier of an application that outputs the audio and video to be played;
[0031] A playback device determination module, used to determine the target playback device corresponding to the audio and video to be played based on the playback device heat data set, the audio and video type and the identification of the application; the playback device heat data set includes matching heat information between audio and video information and playback devices, the audio and video information includes the audio and video type and / or the identification of the application that outputs the audio and video; the matching heat is determined based on the playback device set by the user for different audio and video information and / or the playback device of historical audio and video;
[0032] The push module is used to push the audio and video to be played to the target playback device for playback.
[0033] According to a third aspect of an embodiment of the present application, there is provided an electronic device, including: a memory and a processor;
[0034] The memory is connected to the processor and is used to store programs;
[0035] The processor is used to implement the above-mentioned audio and video playback method by running the program in the memory.
[0036] According to a fourth aspect of an embodiment of the present application, a storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the above-mentioned audio and video playback method is implemented.
[0037] According to a fifth aspect of an embodiment of the present application, a computer program product is provided, including computer program instructions, which, when executed by a processor, enable the processor to implement the above-mentioned audio and video playback method.
[0038] The audio and video playback method proposed in the present application obtains the audio and video type of the audio and video to be played and the identifier of the application that outputs the audio and video to be played; based on the playback device heat data set, the audio and video type and the identifier of the application, determines the target playback device corresponding to the audio and video to be played; the playback device heat data set includes the matching heat information between the audio and video information and the playback device, the audio and video information includes the audio and video type and / or the identifier of the application that outputs the audio and video, and the matching heat is determined based on the playback device set by the user for different audio and video information and / or the playback device of the historical audio and video; the audio and video to be played is pushed to the target playback device for playback. Using the technical solution of the present application, based on the pre-constructed playback device heat data set, when the audio and video need to be played, the playback device can be automatically selected, thereby achieving the effect of intelligently selecting the playback device, improving the selection efficiency of the playback device, and then improving the playback efficiency of the audio and video and the user experience. Moreover, in the scenario of multiple playback devices, it is possible to reasonably allocate different playback devices to play different audio and video, and it is also possible to play multiple audio and video at the same time, thereby improving the user experience. BRIEF DESCRIPTION OF THE DRAWINGS
[0039] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on the provided drawings without paying any creative work.
[0040] Figure 1 A flowchart of an audio and video playback method provided in an embodiment of the present application;
[0041] Figure 2 A schematic diagram of a process flow for determining a target playback device provided in an embodiment of the present application;
[0042] Figure 3 A flowchart of another audio and video playback method provided in an embodiment of the present application;
[0043] Figure 4 A flowchart of another audio and video playback method provided in an embodiment of the present application;
[0044] Figure 5 A schematic diagram of a processing flow for constructing a playback device heat data set provided in an embodiment of the present application;
[0045] Figure 6 A schematic diagram of the structure of an audio and video playback device provided in an embodiment of the present application;
[0046] Figure 7 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0047] The technical solution of the embodiment of the present application is applicable to the application scenario of audio and video processing, and is specifically used in the application scenario of audio and video playback. The technical solution of the embodiment of the present application can automatically select a suitable playback device for audio and video playback, improve the selection efficiency of the playback device, and thus improve the audio and video playback efficiency and user experience.
[0048] At present, smart devices (such as tablets and mobile phones) basically support multiple audio and video playback devices, such as body speakers, Bluetooth headsets, wired headsets, Bluetooth speakers, wired speakers and other sound card devices. However, when a smart device is connected to multiple audio and video playback devices, if the smart device wants to play audio and video, the user needs to manually select a playback device from the multiple connected audio and video playback devices, which affects the selection efficiency of the playback device, thereby affecting the audio and video playback efficiency and reducing the user experience.
[0049] In addition, when different multimedia types of audio and video need to be played simultaneously on a smart device, the audio and video streams can only be played from the same playback device. When different multimedia types of audio and video are played simultaneously using the same playback device, only one of the audio and video may be played, while the others cannot be played. It is impossible to meet the playback needs of multiple audio and video at the same time, affecting the user experience.
[0050] Based on this, the present application proposes an audio and video playback method. This technical solution can automatically select a suitable playback device for audio and video playback, improve the selection efficiency of the playback device, and thereby improve the audio and video playback efficiency and user experience. Moreover, in the scenario of multiple playback devices, different playback devices can be reasonably allocated to play different audio and video, and multiple audio and video can be played simultaneously, thereby improving the user experience.
[0051] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.
[0052] Exemplary Methods
[0053] See also Figure 1 As shown, the embodiment of the present application proposes an audio and video playback method. The method includes:
[0054] S101: Obtain the audio or video type of the audio or video to be played and the identifier of the application that outputs the audio or video to be played.
[0055] In a smart terminal device (such as a tablet, a mobile phone, etc.), at least one audio and video playback application can be installed, and a user can use the audio and video playback application installed in the smart terminal device to play audio and video, wherein the audio and video playback needs to select a final playback device from all playback devices connected to the smart terminal device. The playback devices connected to the smart terminal device may include: a body speaker, a Bluetooth headset, a wired headset, a Bluetooth speaker, a wired speaker, a television, a computer, etc., which are set in the smart terminal device.
[0056] In this embodiment, the audio and video played by the user using the audio and video playback application installed in the smart terminal device is used as the audio and video to be played. Before determining the playback device of the audio and video to be played, it is necessary to first obtain the audio and video type of the audio and video to be played, and obtain the identifier of the application that outputs the audio and video to be played.
[0057] In this embodiment, the audio and video types include: Music, System, Ring, Voice_Call, Alarm, Notification, TTS, etc., where Music represents the audio stream type for music playback, System represents the audio stream type for system sounds, Ring represents the audio stream type for telephone ringtones, Voice_Call represents the audio stream type for telephone calls, Alarm represents the audio stream type for alarms, Notification represents the audio stream type for notifications, and TTS represents the audio stream type for text-to-speech conversion.
[0058] In this embodiment, the application that outputs the audio and video to be played is the audio and video playback application in the smart terminal device, in which the user plays the audio and video to be played. Each audio and video playback application in the smart terminal device is correspondingly provided with an application package name, and when each audio and video playback application is installed, the system of the smart terminal device itself will assign a corresponding UID to each audio and video playback application. In this embodiment, the application package name or the corresponding UID of each audio and video playback application is used as the identification of the application. In this embodiment, it is necessary to obtain the identification of the application that outputs the audio and video to be played.
[0059] In this embodiment, the audio and video type of the audio and video to be played and the identifier of the application that outputs the audio and video to be played can be obtained by using an audio service (Audio Service) in the smart terminal device.
[0060] S102: Determine a target playback device corresponding to the audio or video to be played based on the playback device heat data set, the audio or video type, and the identification of the application.
[0061] In this embodiment, a playback device heat data set is pre-constructed, and the playback device heat data set includes matching heat information between audio and video information and playback devices, wherein the audio and video information includes the audio and video type and / or the identifier of the application that outputs the audio and video. The matching heat information includes the matching heat between each audio and video information and each playback device, wherein the matching heat is determined based on the playback device set by the user for different audio and video information and / or the playback device of historical audio and video, that is, based on the playback device selected by the user according to different audio and video information and / or the playback device corresponding to the historical audio and video.
[0062] For example, the audio and video types include A and B, the identifiers of the applications that output the audio and video include 1 and 2, and the playback devices include a, b, and c. The playback device heat data set may include: the matching heat between the audio and video information composed of audio and video type A and application identification 1 and playback device a is X1, the matching heat between the audio and video information composed of audio and video type A and application identification 1 and playback device b is X2, and the matching heat between the audio and video information composed of audio and video type A and application identification 1 and playback device c is X3; the matching heat between the audio and video information composed of audio and video type A and application identification 2 and playback device a is Y1, the matching heat between the audio and video information composed of audio and video type A and application identification 2 and playback device b is Y2, and the matching heat between the audio and video information composed of audio and video type A and application identification 2 and playback device c is Y3; the matching heat between the audio and video information composed of audio and video type B and application identification 1 and playback device a is Z1, the matching heat between the audio and video information composed of audio and video type B and application identification 1 and playback device b is Z2, and the matching heat between the audio and video information composed of audio and video type B and application identification 1 and playback device c is Z3, etc.
[0063] After obtaining the audio and video type of the audio and video to be played and the identifier of the application that outputs the audio and video to be played, this embodiment queries all the pre-recorded playback devices that match the audio and video information of the audio and video to be played, and the matching heat between the audio and video information of the audio and video to be played and all the matching playback devices from the playback device heat data set according to the audio and video information of the audio and video to be played composed of the audio and video type and the identifier of the application. Then, according to the matching heat, the target playback device for playing the audio and video to be played is selected from all the playback devices that match the audio and video information of the audio and video to be played.
[0064] Furthermore, the specific steps are as follows:
[0065] First, the matching heat corresponding to the preliminary playback device that matches the audio and video type and the application identifier is queried from the playback device heat data set.
[0066] This embodiment uses the acquired audio and video type of the audio and video to be played and the identifier of the application that outputs the audio and video to be played as the audio and video information of the audio and video to be played, and then queries the playback device that has a matching relationship with the audio and video information of the audio and video to be played from the playback device heat data set as the preliminary playback device that matches the audio and video to be played, and queries the matching heat information between the audio and video information of the audio and video to be played and the preliminary playback device from the playback device heat data set, and the matching heat information includes the matching heat between the audio and video information of the audio and video to be played and each preliminary playback device.
[0067] Second, based on the matching heat corresponding to the preliminarily selected playback devices, a target playback device corresponding to the audio or video to be played is selected from the preliminarily selected playback devices.
[0068] After the embodiment queries the matching heat between the audio and video information of the audio and video to be played and each preliminary selected playback device, the target playback device corresponding to the audio and video to be played is selected from all the preliminary selected playback devices according to each matching heat. The embodiment preferably selects the playback device with the greatest matching heat between the audio and video information of the audio and video to be played from the preliminary selected playback devices as the target playback device corresponding to the audio and video to be played.
[0069] However, the playback device with the highest matching heat between the audio and video information of the audio and video to be played in the preliminary playback devices is not necessarily an available playback device. Therefore, this embodiment can select an available preliminary playback device from the preliminary playback devices as the target playback device corresponding to the audio and video to be played in order of the matching heat corresponding to the preliminary playback devices from high to low. Specifically, if the playback device with the highest matching heat between the audio and video information of the audio and video to be played in the preliminary playback devices is an available playback device, then the playback device is directly used as the target playback device corresponding to the audio and video to be played. If the playback device with the highest matching heat between the audio and video information of the audio and video to be played in the preliminary playback devices is an unavailable playback device, it is necessary to determine whether the playback device ranked second in the order of matching heat between the audio and video information of the audio and video to be played in the preliminary playback devices is an available playback device. If it is an available playback device, then the playback device ranked second in the order of matching heat between the audio and video information of the audio and video to be played in the preliminary playback devices is used as the target playback device corresponding to the audio and video to be played. If it is an unavailable playback device, then continue to determine whether the playback device ranked third in the order of matching heat between the audio and video information of the audio and video to be played in the preliminary playback devices is an available playback device, and so on. Among them, the available playback devices are playback devices that are turned on and connected to the smart terminal device, and the unavailable playback devices are playback devices that are not turned on, or playback devices that are not connected to the smart terminal device, or playback devices that have playback failures, etc.
[0070] S103: Push the audio and video to be played to the target playback device for playback.
[0071] After the target playback device corresponding to the audio and video to be played is determined through the above steps, the present embodiment directly pushes the audio and video to be played to the target playback device for playback. The technical solution of the present embodiment can automatically query the target playback device from the pre-built playback device heat data set when the audio and video need to be played, realize automatic selection of the playback device, and achieve the effect of intelligent selection of the playback device. Compared with the manual selection of the playback device by the user, the selection efficiency of the playback device is improved, and the playback efficiency of the audio and video can be improved to ensure the user experience.
[0072] In addition, this embodiment can determine the target playback device corresponding to each audio and video to be played for the audio and video information of multiple audio and video to be played, and then push each audio and video to be played to its corresponding target playback device for playback, so that in the scenario of multiple playback devices, it can reasonably allocate different playback devices to play different audio and video, and can play multiple audio and video at the same time, thereby improving the user experience. For example, in the scenario of using a mobile phone or tablet, nursery rhymes and stories are played from a Bluetooth speaker, the sound of listening to books is played from wired headphones, and the sound of games is played from speakers, so as to meet the multi-entertainment needs in this scenario and ensure the user experience.
[0073] Through the above introduction, it can be seen that the audio and video playback method proposed in the embodiment of the present application obtains the audio and video type of the audio and video to be played and the identification of the application that outputs the audio and video to be played; based on the playback device heat data set, the audio and video type and the identification of the application, the target playback device corresponding to the audio and video to be played is determined; the playback device heat data set includes the matching heat information between the audio and video information and the playback device, the audio and video information includes the audio and video type and / or the identification of the application that outputs the audio and video, and the matching heat is determined based on the playback device set by the user for different audio and video information and / or the playback device of the historical audio and video; the audio and video to be played is pushed to the target playback device for playback. Using the technical solution of this embodiment, based on the pre-constructed playback device heat data set, when the audio and video need to be played, the playback device can be automatically selected, thereby achieving the effect of intelligently selecting the playback device, improving the selection efficiency of the playback device, and then improving the playback efficiency of the audio and video and the user experience. Moreover, in the scenario of multiple playback devices, it is possible to reasonably allocate different playback devices to play different audio and video, and it is also possible to play multiple audio and video at the same time, thereby improving the user experience.
[0074] As an optional implementation, see Figure 2 As shown, in another embodiment of the present application, in step S102, based on the playback device heat data set, the audio and video type and the identification of the application, the target playback device corresponding to the audio and video to be played is determined, and specifically the following steps are also included:
[0075] S201: Query a playback device that matches the audio and video type and the application identifier from a playback device heat data set.
[0076] This embodiment uses the acquired audio and video type of the audio and video to be played and the identifier of the application that outputs the audio and video to be played as the audio and video information of the audio and video to be played, and queries the playback device that matches the audio and video information of the audio and video to be played from the playback device heat data set, and determines whether there is a playback device that matches the audio and video information of the audio and video to be played in the playback device heat data set.
[0077] If there is a playback device in the playback device heat data set that matches the audio and video information of the audio and video to be played, the matching heat corresponding to the preliminary playback device that matches the audio and video type and application identifier is queried from the playback device heat data set, and based on the matching heat corresponding to the preliminary playback device, the target playback device corresponding to the audio and video to be played is selected from the preliminary playback devices.
[0078] If there is no playback device matching the audio and video information of the audio and video to be played in the playback device heat data set, step S202 is executed. Among them, when the application corresponding to the identifier of the application that outputs the audio and video to be played is used for the first time to play the audio and video of the audio and video type of the audio and video to be played, the playback device heat data set may not store a playback device matching the audio and video information of the audio and video to be played, that is, the matching heat information corresponding to the audio and video information of the audio and video to be played is not stored.
[0079] S202: If no playback device matching the audio or video type and the identification of the application is found in the playback device heat data set, a target playback device corresponding to the audio or video to be played is determined according to a preset selection rule.
[0080] If no playback device matching the audio and video type and the identification of the application is found in the playback device heat data set, the target playback device corresponding to the audio and video to be played is directly determined according to the preset selection rule. The preset selection rule includes selecting the main playback device as the target playback device corresponding to the audio and video to be played, or selecting the playback device as the target playback device corresponding to the audio and video to be played according to the playback device priority.
[0081] That is to say, in this embodiment, a main playback device is pre-set, and if a playback device matching the audio and video type and the identification of the application is not found from the playback device heat data set, the pre-set main playback device can be directly used as the target playback device corresponding to the audio and video to be played. Alternatively, in this embodiment, by counting the playback devices commonly used by most users, the priority of each playback device is pre-set, and then when a playback device matching the audio and video type and the identification of the application is not found from the playback device heat data set, the target playback device corresponding to the audio and video to be played is selected according to the priority of each playback device, that is, first determine whether the playback device with the highest priority is an available playback device, if the playback device with the highest priority is an available playback device, then directly use the playback device with the highest priority as the target playback device corresponding to the audio and video to be played, if the playback device with the highest priority is an unavailable playback device, then determine whether the playback device with the second priority is an available playback device, if the playback device with the second priority is an available playback device, then directly use the playback device with the second priority as the target playback device corresponding to the audio and video to be played, if the playback device with the second priority is an unavailable playback device, then determine whether the playback device with the third priority is an available playback device, and so on.
[0082] Furthermore, the target playback device corresponding to the audio and video to be played is determined through the above steps. If the target playback device is playing other audio and video at this time, the audio node logic in the existing multi-source arbitration mechanism is used to determine whether the target playback device continues to play other audio and video or plays the audio and video to be played. In addition, if the target playback device is playing other audio and video at this time, the target playback device can also be determined as an unavailable playback device, and the target playback device corresponding to the audio and video to be played can be re-determined.
[0083] As an optional implementation, the present application embodiment also proposes an audio and video playback method. Figure 3 As shown, the method specifically comprises the following steps:
[0084] S301: Obtain the audio or video type of the audio or video to be played and the identifier of the application that outputs the audio or video to be played.
[0085] S302: Determine a target playback device corresponding to the audio or video to be played based on the playback device heat data set, the audio or video type, and the identification of the application.
[0086] S303: Push the audio and video to be played to the target playback device for playback.
[0087] S304: Based on the target playback device, the audio and video type of the audio and video to be played, and the identifier of the application, the matching heat between the target audio and video information in the playback device heat data set and the target playback device is updated.
[0088] After determining the target playback device corresponding to the audio and video to be played, this embodiment needs to recalculate and update the matching heat between the target audio and video information of the audio and video to be played recorded in the playback device heat data set and the target playback device. The target audio and video information of the audio and video to be played includes the audio and video type of the audio and video to be played and the identifier of the application that outputs the audio and video to be played.
[0089] In this embodiment, the matching heat between the audio and video information and the playback device is calculated according to the number of times the playback device is selected by all audio and video that meet the audio and video information, wherein a first value is obtained by multiplying the number of times the playback device is automatically selected in all audio and video that meet the audio and video information by the corresponding weight of the automatic selection, and a second value is obtained by multiplying the number of times the playback device is selected by the user in all audio and video that meet the audio and video information by the corresponding weight of the user selection. The sum of the first value and the second value is the matching heat between the audio and video information and the playback device.
[0090] In this embodiment, after the target playback device corresponding to the audio and video to be played is determined, the number of times that the audio and video that meets the target audio and video information automatically selects the target playback device increases by one. Therefore, it is necessary to recalculate and update the matching heat between the target audio and video information of the audio and video to be played and the target playback device corresponding to the audio and video to be played according to the above calculation method.
[0091] The specific implementation manner of steps S301 to S303 in this embodiment is the same as the specific implementation manner of steps S101 to S103 in the above embodiment, and will not be repeated in this embodiment.
[0092] As an optional implementation, the present application embodiment also proposes an audio and video playback method, see Figure 4 As shown, the audio and video playback method also includes the following steps:
[0093] S401, obtaining the self-selected playback device selected by the user through the interactive interface, and pushing the audio and video to be played to the self-selected playback device for playback.
[0094] In this embodiment, the smart terminal device provides an interactive interface for the user, through which the user can select the playback device for the audio and video to be played, and use the playback device for the audio and video to be played selected by the user through the interactive interface as the self-selected playback device, and then push the audio and video to be played to the self-selected playback device for playback.
[0095] Specifically, if the present embodiment can determine the target playback device of the audio and video to be played through steps S101 to S103, and has played the audio to be played through the target playback device, and during the process of the target playback device playing the audio to be played, the user selects a self-selected playback device through the interactive interface, then the target playback device is stopped from playing the audio and video to be played, and the audio and video to be played is switched to the self-selected playback device. If the present embodiment has not determined the target playback device corresponding to the audio and video to be played, and the user has selected a self-selected playback device through the interactive interface, then the audio and video to be played is directly played using the self-selected playback device, and the target playback device corresponding to the audio and video to be played is no longer automatically determined. If the present embodiment automatically determines the target playback device corresponding to the audio and video to be played, and the user also selects a self-selected playback device through the interactive interface, then the user's selection shall prevail, that is, the audio and video to be played is played using the self-selected playback device selected by the user through the interactive interface.
[0096] S402: Based on the self-selected playback device, the audio and video type of the audio and video to be played, and the identifier of the application, the matching heat between the target audio and video information in the playback device heat data set and the self-selected playback device is updated.
[0097] After determining the self-selected playback device corresponding to the audio and video to be played, this embodiment needs to recalculate and update the matching heat between the target audio and video information of the audio and video to be played recorded in the playback device heat data set and the self-selected playback device. The target audio and video information of the audio and video to be played includes the audio and video type of the audio and video to be played and the identifier of the application that outputs the audio and video to be played.
[0098] In this embodiment, the matching heat between the audio and video information and the playback device is calculated according to the number of times the playback device is selected by all audio and video that meet the audio and video information, wherein a first value is obtained by multiplying the number of times the playback device is automatically selected in all audio and video that meet the audio and video information by the corresponding weight of the automatic selection, and a second value is obtained by multiplying the number of times the playback device is selected by the user in all audio and video that meet the audio and video information by the corresponding weight of the user selection. The sum of the first value and the second value is the matching heat between the audio and video information and the playback device.
[0099] In this embodiment, after the self-selected playback device corresponding to the audio and video to be played is determined, the number of times that the audio and video that meets the target audio and video information is selected by the user through the self-selected playback device increases by one. Therefore, it is necessary to recalculate and update the matching heat between the target audio and video information of the audio and video to be played and the self-selected playback device corresponding to the audio and video to be played according to the above calculation method.
[0100] As an optional implementation, see Figure 5As shown, in another embodiment of the present application, a process for constructing a playback device heat data set is disclosed, which specifically includes the following steps:
[0101] S501, collecting audio and video information of historical audio and video, playback devices of historical audio and video, and selection types of playback devices of historical audio and video.
[0102] This embodiment needs to collect audio and video information of historical audio and video, as well as the playback device of historical audio and video, and determine the selection type used by the historical audio and video to select the playback device. The audio and video information of historical audio and video includes: the audio and video type of historical audio and video and the identifier of the application that outputs the historical audio and video. The selection type used to select the playback device includes: automatic selection type and user selection type. The automatic selection type is to use the above embodiment to select the playback device. Figure 1 The type selected by the automatic selection method shown in the figure is the type selected by the user using the above embodiment Figure 4 The type of selection shown is made by the user.
[0103] S502: For all historical audio and video with the same audio and video information and playback device, determine the number of first historical audio and video with the automatic selection type of the playback device and the number of second historical audio and video with the user selection type of the playback device.
[0104] This embodiment first divides all historical audio and video with the same audio and video information and playback device into the same group as a historical audio frame group, and then takes the historical audio frames in a group of historical audio frame groups whose playback device selection type is an automatic selection type as the first historical audio frames, and determines the number of first historical audio frames in this group of historical audio frame groups, takes the historical audio frames in this group of historical audio frame groups whose playback device selection type is a user selection type as the second historical audio frames, and determines the number of second historical audio frames in this group of historical audio frame groups.
[0105] Through the above content, the number of first historical audio frames and the number of second historical audio frames in each group of historical audio frames can be determined.
[0106] S503: Based on the first preset weight corresponding to the automatic selection type and the second preset weight corresponding to the user selection type, weighted sum is performed on the number of the first historical audio and video and the number of the second historical audio and video to obtain the matching heat between the audio and video information and the playback device.
[0107] In this embodiment, a first preset weight corresponding to the automatic selection type and a second preset weight corresponding to the user selection type are pre-set. For a certain group of historical audio frame groups, the number of the first historical audio and video and the number of the second historical audio and video in the group of historical audio frame groups are weighted and summed, so as to obtain the matching heat between the audio and video information corresponding to the group of historical audio frame groups and the playback device corresponding to the group of historical audio frame groups. That is, the first preset weight corresponding to the automatic selection type is used as the weight of the number of the first historical audio and video, and the second preset weight corresponding to the user selection type is used as the weight of the number of the second historical audio and video. The weighted sum of the number of the first historical audio and video and the number of the second historical audio and video in the group of historical audio frame groups is the product of the first historical audio and video in the group of historical audio frame groups and the first preset weight, plus the product of the second historical audio and video in the group of historical audio frame groups and the second preset weight.
[0108] Exemplary Devices
[0109] Accordingly, the present application also provides an audio and video playback device, see Figure 6 As shown, the device comprises:
[0110] An acquisition module 100 is used to acquire the audio and video type of the audio and video to be played and the identifier of the application that outputs the audio and video to be played;
[0111] The playback device determination module 110 is used to determine the target playback device corresponding to the audio and video to be played based on the playback device heat data set, the audio and video type and the identification of the application; the playback device heat data set includes the matching heat information between the audio and video information and the playback device, and the audio and video information includes the audio and video type and / or the identification of the application that outputs the audio and video; the matching heat is determined based on the playback device set by the user for different audio and video information and / or the playback device of the historical audio and video;
[0112] The push module 120 is used to push the audio and video to be played to the target playback device for playback.
[0113] From the above introduction, it can be seen that the audio and video playback device proposed in the embodiment of the present application can automatically select a playback device when audio and video need to be played based on a pre-constructed playback device heat data set, thereby achieving the effect of intelligently selecting a playback device, improving the selection efficiency of the playback device, and further improving the audio and video playback efficiency and user experience. Moreover, in the scenario of multiple playback devices, it is possible to reasonably allocate different playback devices to play different audio and video, and it is also possible to play multiple audio and video at the same time, thereby improving the user experience.
[0114] As an optional implementation, another embodiment of the present application discloses that the playback device determination module 110 includes: a query unit and a selection unit.
[0115] A query unit, used to query the matching heat corresponding to the preliminary selected playback device matching the audio and video type and the identifier of the application from the playback device heat data set;
[0116] The first selection unit is used to select a target playback device corresponding to the audio or video to be played from the preliminary selected playback devices based on the matching heat corresponding to the preliminary selected playback devices.
[0117] As an optional implementation manner, another embodiment of the present application discloses that the first selection unit is specifically used to:
[0118] According to the order of the matching heat corresponding to the preliminary playback devices from high to low, an available preliminary playback device is selected from the preliminary playback devices as the target playback device corresponding to the audio and video to be played.
[0119] As an optional implementation, another embodiment of the present application discloses that the playback device determination module 110 further includes: a second selection unit.
[0120] The query unit is further used to query the playback device matching the audio and video type and the identification of the application from the playback device heat data set;
[0121] A second selection unit is used to determine a target playback device corresponding to the audio and video to be played according to a preset selection rule if no playback device matching the audio and video type and the application identifier is found in the playback device heat data set;
[0122] The preset selection rule includes selecting a main playback device as a target playback device corresponding to the audio or video to be played, or selecting a playback device as a target playback device corresponding to the audio or video to be played according to the playback device priority.
[0123] As an optional implementation, another embodiment of the present application discloses that the audio and video playback device further includes: an update module.
[0124] An updating module, used to update the matching heat between the target audio and video information in the playback device heat data set and the target playback device based on the target playback device, the audio and video type of the audio and video to be played, and the identifier of the application;
[0125] The target audio and video information includes: the audio and video type of the audio and video to be played and the identifier of the application that outputs the audio and video to be played.
[0126] As an optional implementation, another embodiment of the present application discloses that the audio and video playback device further includes: a self-selection module.
[0127] The self-selection module is used to obtain the self-selected playback device selected by the user through the interactive interface, and push the audio and video to be played to the self-selected playback device for playback;
[0128] The update module is further used to update the matching heat between the target audio and video information in the playback device heat data set and the self-selected playback device based on the self-selected playback device, the audio and video type of the audio and video to be played, and the identification of the application;
[0129] The target audio and video information includes: the audio and video type of the audio and video to be played and the identifier of the application that outputs the audio and video to be played.
[0130] As an optional implementation, another embodiment of the present application discloses that the audio and video playback device also includes: a collection module, a quantity determination module and a matching heat determination module.
[0131] A collection module, used to collect audio and video information of historical audio and video, playback devices of historical audio and video, and selection types of playback devices of historical audio and video; wherein the audio and video information of historical audio and video includes: audio and video types of historical audio and video and identifiers of applications that output historical audio and video, and the selection types of playback devices include: automatic selection type and user selection type;
[0132] A quantity determination module is used to determine, for all historical audio and video with the same audio and video information and playback device, the number of first historical audio and video with the selection type of the playback device being the automatic selection type, and the number of second historical audio and video with the selection type of the playback device being the user selection type;
[0133] The matching heat determination module is used to perform weighted summation on the number of first historical audio and video and the number of second historical audio and video based on the first preset weight corresponding to the automatic selection type and the second preset weight corresponding to the user selection type to obtain the matching heat between the audio and video information and the playback device.
[0134] The audio and video playback device provided in this embodiment belongs to the same application concept as the audio and video playback method provided in the above embodiments of this application, and can execute the audio and video playback method provided in any of the above embodiments of this application, and has the corresponding functional modules and beneficial effects of executing the audio and video playback method. For technical details not fully described in this embodiment, please refer to the specific processing content of the audio and video playback method provided in the above embodiments of this application, and will not be repeated here.
[0135] Exemplary Electronic Devices
[0136] Another embodiment of the present application also provides an electronic device, see Figure 7 As shown, the device includes:
[0137] Memory 200 and processor 210;
[0138] The memory 200 is connected to the processor 210 and is used to store programs;
[0139] The processor 210 is used to implement the audio and video playback method disclosed in any of the above embodiments by running the program stored in the memory 200.
[0140] Specifically, the electronic device may further include: a bus, a communication interface 220 , an input device 230 and an output device 240 .
[0141] The processor 210, the memory 200, the communication interface 220, the input device 230 and the output device 240 are connected to each other via a bus.
[0142] A bus may include a pathway that transfers information between components of a computer system.
[0143] The processor 210 may be a general-purpose processor, such as a general-purpose central processing unit (CPU), a microprocessor, etc., or an application-specific integrated circuit (ASIC), or one or more integrated circuits for controlling the execution of the program of the scheme of the present invention. It may also be a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field programmable gate array (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components.
[0144] The processor 210 may include a main processor, and may also include a baseband chip, a modem, and the like.
[0145] The memory 200 stores a program for executing the technical solution of the present invention, and may also store an operating system and other key services. Specifically, the program may include a program code, and the program code includes a computer operation instruction. More specifically, the memory 200 may include a read-only memory (ROM), other types of static storage devices that can store static information and instructions, a random access memory (RAM), other types of dynamic storage devices that can store information and instructions, a disk storage, a flash, and the like.
[0146] The input device 230 may include a device for receiving data and information input by a user, such as a keyboard, a mouse, a camera, a scanner, a light pen, a voice input device, a touch screen, a pedometer, or a gravity sensor.
[0147] Output device 240 may include devices that allow information to be output to a user, such as a display screen, printer, speaker, etc.
[0148] The communication interface 220 may include any device such as a transceiver to communicate with other devices or communication networks, such as Ethernet, a radio access network (RAN), a wireless local area network (WLAN), etc.
[0149] The processor 210 executes the program stored in the memory 200 and calls other devices, which can be used to implement each step of any audio and video playback method provided in the above embodiments of the present application.
[0150] Exemplary computer program products and storage media
[0151] In addition to the above-mentioned methods and devices, an embodiment of the present application may also be a computer program product, which includes computer program instructions, which, when executed by a processor, enable the processor to execute the steps of the audio and video playback method according to various embodiments of the present application described in the above-mentioned "Exemplary Method" section of this specification.
[0152] The computer program product may be written in any combination of one or more programming languages to write program codes for performing the operations of the embodiments of the present application, including object-oriented programming languages, such as Java, C++, etc., and conventional procedural programming languages, such as "C" language or similar programming languages. The program code may be executed entirely on the user computing device, partially on the user device, as an independent software package, partially on the user computing device and partially on a remote computing device, or entirely on a remote computing device or server.
[0153] In addition, an embodiment of the present application may also be a storage medium on which a computer program is stored, and the computer program is executed by a processor to execute the steps of the audio and video playback method according to various embodiments of the present application described in the above "Exemplary Method" section of this specification.
[0154] For the aforementioned method embodiments, for the sake of simplicity, they are all described as a series of action combinations, but those skilled in the art should be aware that the present application is not limited by the order of the actions described, because according to the present application, some steps can be performed in other orders or simultaneously. Secondly, those skilled in the art should also be aware that the embodiments described in the specification are all preferred embodiments, and the actions and modules involved are not necessarily required by the present application.
[0155] It should be noted that each embodiment in this specification is described in a progressive manner, and each embodiment focuses on the differences from other embodiments, and the same or similar parts between the embodiments can be referred to each other. For the device embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiment.
[0156] The steps in the methods of each embodiment of the present application can be adjusted in order, combined and deleted according to actual needs, and the technical features recorded in each embodiment can be replaced or combined.
[0157] The modules and sub-modules in the devices and terminals of the various embodiments of the present application can be combined, divided and deleted according to actual needs.
[0158] In the several embodiments provided in the present application, it should be understood that the disclosed terminals, devices and methods can be implemented in other ways. For example, the terminal embodiments described above are only schematic, for example, the division of modules or submodules is only a logical function division, and there may be other division methods in actual implementation, for example, multiple submodules or modules can be combined or integrated into another module, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be an indirect coupling or communication connection through some interfaces, devices or modules, which can be electrical, mechanical or other forms.
[0159] The modules or submodules described as separate components may or may not be physically separated, and the components of the modules or submodules may or may not be physical modules or submodules, that is, they may be located in one place, or they may be distributed on multiple network modules or submodules. Some or all of the modules or submodules may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0160] In addition, each functional module or submodule in each embodiment of the present application may be integrated into one processing module, or each module or submodule may exist physically separately, or two or more modules or submodules may be integrated into one module. The above-mentioned integrated modules or submodules may be implemented in the form of hardware or in the form of software functional modules or submodules.
[0161] Professionals may further appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of the two. In order to clearly illustrate the interchangeability of hardware and software, the composition and steps of each example have been generally described in the above description according to function. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professionals and technicians may use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this application.
[0162] The steps of the method or algorithm described in conjunction with the embodiments disclosed herein may be implemented directly by hardware, software units executed by a processor, or a combination of the two. The software units may be placed in a random access memory (RAM), a memory, a read-only memory (ROM), an electrically programmable ROM, an electrically erasable programmable ROM, a register, a hard disk, a removable disk, a CD-ROM, or any other form of storage medium known in the art.
[0163] Finally, it should be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "comprise a ..." do not exclude the presence of other identical elements in the process, method, article or device including the elements.
[0164] The above description of the disclosed embodiments enables those skilled in the art to implement or use the present application. Various modifications to these embodiments will be apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the present application. Therefore, the present application will not be limited to the embodiments shown herein, but will conform to the widest scope consistent with the principles and novel features disclosed herein.
Claims
1. An audio and video playback method, characterized in that: include: Obtaining the audio and video type of the audio and video to be played and the identifier of the application that outputs the audio and video to be played; Determine a target playback device corresponding to the audio and video to be played based on the playback device heat data set, the audio and video type, and the identifier of the application; The playback device heat data set includes matching heat information between audio and video information and playback devices, the audio and video information includes the audio and video type and / or the identifier of the application that outputs the audio and video; the matching heat is determined based on the playback devices set by the user for different audio and video information and / or the playback devices of historical audio and video; Push the audio and video to be played to the target playback device for playback.
2. The method according to claim 1, characterized in that Determining a target playback device corresponding to the audio and video to be played based on the playback device heat data set, the audio and video type, and the identifier of the application includes: Querying the matching heat corresponding to the preliminary selected playback device matching the audio and video type and the identifier of the application from the playback device heat data set; Based on the matching heat corresponding to the initially selected playback devices, a target playback device corresponding to the audio or video to be played is selected from the initially selected playback devices.
3. The method according to claim 2, characterized in that Based on the matching heat corresponding to the preliminarily selected playback device, selecting a target playback device corresponding to the audio or video to be played from the preliminarily selected playback device includes: According to the order of the matching heats corresponding to the preliminary selected playback devices from high to low, an available preliminary selected playback device is selected from the preliminary selected playback devices as the target playback device corresponding to the audio and video to be played.
4. The method according to claim 1, characterized in that: Determining a target playback device corresponding to the audio and video to be played based on the playback device heat data set, the audio and video type, and the identifier of the application includes: Querying the playback device heat data set for a playback device that matches the audio and video type and the identifier of the application; If no playback device matching the audio and video type and the identifier of the application is found in the playback device heat data set, determining a target playback device corresponding to the audio and video to be played according to a preset selection rule; The preset selection rule includes selecting a main playback device as the target playback device corresponding to the audio or video to be played, or selecting a playback device as the target playback device corresponding to the audio or video to be played according to the playback device priority.
5. The method according to claim 1, characterized in that Also includes: Based on the target playback device, the audio and video type of the audio and video to be played, and the identifier of the application, updating the matching heat between the target audio and video information in the playback device heat data set and the target playback device; The target audio and video information includes: the audio and video type of the audio and video to be played and the identifier of the application that outputs the audio and video to be played.
6. The method according to claim 1, characterized in that Also includes: Obtaining a self-selected playback device selected by the user through an interactive interface, and pushing the audio and video to be played to the self-selected playback device for playback; Based on the self-selected playback device, the audio and video type of the audio and video to be played, and the identifier of the application, updating the matching heat between the target audio and video information in the playback device heat data set and the self-selected playback device; The target audio and video information includes: the audio and video type of the audio and video to be played and the identifier of the application that outputs the audio and video to be played.
7. The method according to claim 1, characterized in that The process of constructing the playback device heat data set includes: Collect audio and video information of historical audio and video, playback devices of historical audio and video, and selection types of playback devices of the historical audio and video; wherein the audio and video information of the historical audio and video includes: the audio and video type of the historical audio and video and the identifier of the application that outputs the historical audio and video, and the selection type of the playback device includes: automatic selection type and user selection type; For all historical audio and video with the same audio and video information and playback device, determine the number of first historical audio and video with the automatic selection type of the playback device, and the number of second historical audio and video with the user selection type of the playback device; Based on a first preset weight corresponding to the automatic selection type and a second preset weight corresponding to the user selection type, a weighted sum is taken of the number of the first historical audio and video and the number of the second historical audio and video to obtain a matching heat between the audio and video information and the playback device.
8. An audio and video playback device, characterized in that: include: An acquisition module, used to acquire the audio and video type of the audio and video to be played and an identifier of an application that outputs the audio and video to be played; A playback device determination module, used to determine a target playback device corresponding to the audio and video to be played based on the playback device heat data set, the audio and video type and the identification of the application; The playback device heat data set includes matching heat information between audio and video information and playback devices, the audio and video information includes the audio and video type and / or the identifier of the application that outputs the audio and video; the matching heat is determined based on the playback devices set by the user for different audio and video information and / or the playback devices of historical audio and video; The push module is used to push the audio and video to be played to the target playback device for playback.
9. An electronic device, characterized in that: include: Memory and processor; The memory is connected to the processor and is used to store programs; The processor is used to implement the audio and video playback method as described in any one of claims 1 to 7 by running the program in the memory.
10. A storage medium, characterized in that: The storage medium stores a computer program, and when the computer program is executed by the processor, the audio and video playback method according to any one of claims 1 to 7 is implemented.
11. A computer program product, characterized in that It includes computer program instructions, which, when executed by a processor, enable the processor to implement the audio and video playback method as described in any one of claims 1 to 7.