Playback control method and apparatus, storage medium and terminal device
By obtaining the data length of data to be transmitted by the Bluetooth module in the terminal device, determining the current playback status and sending it to the Bluetooth player, the problem of audio data not being transmitted through the player in HDMI, VOD and other scenarios is solved, and the effective playback control of the terminal device in any scenario is realized.
Patent Information
- Application Number
- PCT/CN2024/116485
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- Priority Date
- 2023-10-24
- Filing Date
- 2024-09-03
- Publication Date
- 2025-05-01
AI Technical Summary
In HDMI, VOD and other playback scenarios, audio data is not transmitted through the player, resulting in the terminal device being unable to obtain the current playback status, which in turn leads to the silent speaker.
By acquiring the data to be transmitted received by the Bluetooth module in the terminal device at a preset time interval, the data length of the data to be transmitted is determined, thereby determining the current playback status and sending the status to the Bluetooth player to trigger the corresponding playback control.
Ensure that the terminal device can determine the current playback status in any playback scenario, thereby avoiding the silent speakers and achieving effective playback control of the Bluetooth player.
Smart Images

Figure CN2024116485_01052025_PF_FP_ABST
Abstract
Description
Playback control method, device, storage medium and terminal equipment
[0001] This application claims priority to the Chinese patent application filed with the China Patent Office on October 24, 2023, with application number 202311389955.6 and application name “A playback control method, device, storage medium and terminal device”, the entire contents of which are incorporated by reference into this application. Technical Field
[0002] The present application relates to the field of computers, and in particular to a playback control method, apparatus, computer-readable storage medium, and computer equipment. Background Art
[0003] In the modern digital age, the demand for home entertainment devices is increasing. In order to provide a better audio experience, many users connect speaker devices to TVs to better enjoy high-quality audio.
[0004] In the prior art, after a terminal device is connected to a speaker via Bluetooth, when playing audio, the speaker will actively request the terminal device to obtain the current playback status. In response to this behavior on the speaker side, the terminal device will reply to the speaker based on the playback status provided by the player to determine whether to play / pause the Bluetooth speaker. Technical issues
[0005] The existing technology process has defects. For example, when playing audio in playback scenarios such as HDMI and VOD, the audio data is not transmitted through the player, and the current playback status cannot be obtained, which will cause the speaker to return to the pause state, resulting in silence. Technical Solutions
[0006] The embodiments of the present application provide a playback control method and device, which can enable a terminal device to determine the current playback status when playing audio in any playback scenario, thereby triggering a Bluetooth player to perform corresponding playback control according to the current playback status determined by the terminal device.
[0007] To solve the above technical problems, the embodiments of the present application provide the following technical solutions:
[0008] A playback control method, applied to a terminal device connected to a Bluetooth player via a Bluetooth module, comprising:
[0009] Acquire the data to be transmitted received by the Bluetooth module at a preset time interval, and determine the data length of the data to be transmitted;
[0010] Determining a current playback state based on the data length of the data to be transmitted;
[0011] Receive a playback status acquisition request sent by the Bluetooth player, send the current playback status to the Bluetooth player, and trigger the Bluetooth player to perform playback control based on the current playback status.
[0012] A playback control device, applied to a terminal device connected to a Bluetooth player via a Bluetooth module, comprising:
[0013] A first determining module is configured to obtain the data to be transmitted received by the Bluetooth module at a preset time interval and determine the data length of the data to be transmitted;
[0014] A second determining module, configured to determine a current playback state based on a data length of the data to be transmitted;
[0015] The sending module is used to receive the playback status acquisition request sent by the Bluetooth player, send the current playback status to the Bluetooth player, and trigger the Bluetooth player to perform playback control based on the current playback status.
[0016] In the playback control device provided in the embodiment of the present application, the second determination module includes:
[0017] An acquisition submodule, configured to acquire a target number of times that the length of the data to be transmitted exceeds a preset data length within a preset statistical period;
[0018] A comparison submodule, configured to compare the target number of times with a preset number of times to obtain a comparison result;
[0019] The first determining submodule is configured to determine a current playback state according to the comparison result.
[0020] In the playback control device provided in the embodiment of the present application, the first determination submodule includes:
[0021] a first determining unit, configured to determine that the current playback state is a playback state if the comparison result indicates that the target number of times reaches or exceeds the preset number of times;
[0022] The second determining unit is configured to determine that the current playback state is a non-playing state if the comparison result indicates that the target number of times does not reach the preset number of times.
[0023] In the playback control device provided in the embodiment of the present application, the sending module includes:
[0024] A second determining submodule is configured to receive a playback status acquisition request sent by the Bluetooth player and determine a historical statistical period before the preset statistical period;
[0025] A third determining submodule is configured to determine a historical playback state determined in the historical statistical period;
[0026] The sending submodule is configured to send the current playing state to the Bluetooth player if the current playing state is different from the historical playing state.
[0027] In the playback control device provided in the embodiment of the present application, the sending module further includes:
[0028] The prohibition submodule is used to prohibit the current playing state from being sent to the Bluetooth player if the current playing state is the same as the historical playing state, and trigger the Bluetooth player to continue playing according to the historical playing state.
[0029] In the playback control device provided in the embodiment of the present application, the device further includes:
[0030] A third determining module is configured to receive a pause playback request sent by the Bluetooth player and determine whether the current playback state is a playback state;
[0031] A first acquisition module is used to acquire the device number of the Bluetooth player if the current playback state is the playback state;
[0032] A construction module is used to construct a rejection condition based on the pause playback request and the device number.
[0033] In the playback control device provided in the embodiment of the present application, the device further includes:
[0034] A second acquisition module is configured to receive a pause play request and acquire a sending device number of a device that sends the pause play request;
[0035] A rejection module is used to reject the request to pause playback if the sending device number is the same as the device number in the rejection condition.
[0036] A computer-readable storage medium stores a plurality of instructions, wherein the instructions are suitable for being loaded by a processor to execute the steps in the above-mentioned playback control method.
[0037] A terminal device includes a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the steps of the above-mentioned playback control method when executing the program. Beneficial effects
[0038] The embodiment of the present application obtains the data to be transmitted received by the Bluetooth module at a preset time interval to determine the data length of the data to be transmitted; determines the current playback state based on the data length of the data to be transmitted; receives a playback state acquisition request sent by the Bluetooth player, sends the current playback state to the Bluetooth player, and triggers the Bluetooth player to perform playback control based on the current playback state. In this way, the current playback state of the terminal device is determined by the data length of the data to be transmitted received by the Bluetooth module. This allows the terminal device to determine the current playback state when playing audio in any playback scenario, thereby triggering the Bluetooth player to perform corresponding playback control based on the current playback state determined by the terminal device. BRIEF DESCRIPTION OF THE DRAWINGS
[0039] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are only some embodiments of the present application. For those skilled in the art, other drawings can be obtained based on these drawings without creative work.
[0040] FIG1a is a system diagram of a playback control method provided in an embodiment of the present application.
[0041] FIG1 b is a flow chart of the playback control method provided in an embodiment of the present application.
[0042] FIG1c is a first signaling interaction diagram between a terminal device and a Bluetooth player provided in an embodiment of the present application.
[0043] FIG1d is a second signaling interaction diagram between a terminal device and a Bluetooth player provided in an embodiment of the present application.
[0044] FIG2 is a schematic structural diagram of a playback control device provided in an embodiment of the present application.
[0045] FIG3 is a schematic diagram of the structure of a terminal device provided in an embodiment of the present application.
[0046] Implementation Methods of the Application
[0047] 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 embodiments described 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 those skilled in the art without making creative efforts are within the scope of protection of this application.
[0048] Embodiments of the present application provide a playback control method, device, and computer-readable storage medium.
[0049] Please refer to Figure 1a, which is a system schematic diagram of the playback control system provided in an embodiment of the present application. The system may include at least one terminal device 1000. The terminal device 1000 may be a mobile phone, tablet computer, computer, television or other device. A calculator application may be installed in the terminal device 1000, and users can perform simple mathematical calculations through the calculator application.
[0050] The embodiment of the present application provides a playback control method, which can be executed by a terminal device 1000. As shown in Figure 1a, the terminal device 1000 obtains the data to be transmitted received by the Bluetooth module at a preset time interval to determine the data length of the data to be transmitted; determines the current playback state based on the data length of the data to be transmitted; receives a playback state acquisition request sent by the Bluetooth player, sends the current playback state to the Bluetooth player, and triggers the Bluetooth player to perform playback control based on the current playback state. In this way, the current playback state of the terminal device is determined by the data length of the data to be transmitted received by the Bluetooth module, so that the terminal device can determine the current playback state when playing audio in any playback scenario, thereby triggering the Bluetooth player to perform corresponding playback control according to the current playback state determined by the terminal device.
[0051] It should be noted that the scenario diagram of the playback control system shown in Figure 1a is only an example. The playback control system and scenario described in the embodiment of the present application are intended to more clearly illustrate the technical solution of the embodiment of the present application, and do not constitute a limitation on the technical solution provided by the embodiment of the present application. Ordinary technicians in this field can know that with the evolution of the playback control system and the emergence of new business scenarios, the technical solution provided by the embodiment of the present application is also applicable to similar technical problems.
[0052] In this embodiment, the description will be made from the perspective of a playback control device, which can be integrated into a computer device having a storage unit and a microprocessor installed therein and having computing capabilities.
[0053] Please refer to Figure 1b, which is a flow chart of a playback control method provided in an embodiment of the present application. The playback control method includes:
[0054] In step 101, the data to be transmitted received by the Bluetooth module is acquired at a preset time interval, and the data length of the data to be transmitted is determined.
[0055] The difference between this application and the prior art is that the terminal device in the prior art can only obtain the player's playback status in non-HDMI, VOD and other playback scenarios, and thus control the playback of the audio system based on the player's playback status. However, this application determines the current playback status of the terminal device by the length of the data to be transmitted to the audio system when the audio system and the terminal device are connected via Bluetooth for playback, and then triggers the audio system to control playback based on the determined current playback status.
[0056] Specifically, no matter whether the playback scenario is HDMI, VOD, or other playback scenarios, as long as it is played through a Bluetooth player, Audio Hal or the Audio bottom layer will send the data to be transmitted to the Bluetooth module to be transmitted to the Bluetooth player. If the terminal device is currently in a non-playing state, for example: not playing state, or paused playback state, the data length of the data to be transmitted is 0; if the terminal device is currently in a playing state, the data length of the data to be transmitted is not 0.
[0057] The preset time interval may be 5ms or 10ms, which is not limited here.
[0058] In step 102, the current playing state is determined based on the data length of the data to be transmitted.
[0059] Since different playback states may cause the data length of the data to be transmitted to be 0 or not 0, the current playback state may be determined based on the data length of the data to be transmitted.
[0060] In some implementations, the step of determining the current playback state based on the data length of the data to be transmitted includes:
[0061] (1) obtaining a target number of times that the data length of the data to be transmitted exceeds a preset data length within a preset statistical period;
[0062] (2) comparing the target number of times with the preset number of times to obtain a comparison result;
[0063] (3) Determine the current playback status based on the comparison result.
[0064] Among them, in order to avoid the problem of inaccurate determination of the current playback state due to the playback state being paused for a short period of time under user control, a preset statistical period can be set, for example, 1s. Within 1s, according to a preset time interval, for example, 10ms, the data length of 1s / 10ms = 100 data to be transmitted can be obtained. The preset data length here is 0, then the target number of times the data length of the data to be transmitted exceeds the preset data length within the preset statistical period is obtained, that is, the target number of times the data length of the data to be transmitted sent in the playback state is obtained. For example, the target number of times the data length exceeds 0 among the statistical number of 100 data to be transmitted is 80 times.
[0065] Specifically, a preset number of times is set, for example, 60 times, and the target number of times is compared with the preset number of times, thereby determining the current playback state based on the comparison result.
[0066] In some implementations, the step of determining the current playback state based on the comparison result includes:
[0067] (1.1) If the comparison result indicates that the target number of times reaches or exceeds the preset number of times, the current playback state is determined to be the playback state;
[0068] (1.2) If the comparison result indicates that the target number of times does not reach the preset number of times, it is determined that the current playback state is a non-playing state.
[0069] Among them, if the comparison result indicates that the target number of times reaches or exceeds the preset number of times, it means that within the preset statistical period, there is a large amount of data to be transmitted with actual data, and the current playback state is the playback state; if the comparison result indicates that the target number of times does not reach the preset number of times, it means that within the preset statistical period, there is a large amount of data to be transmitted with no actual data, and the current playback state is the non-playing state.
[0070] In step 103, a playback status acquisition request sent by the Bluetooth player is received, the current playback status is sent to the Bluetooth player, and the Bluetooth player is triggered to perform playback control based on the current playback status.
[0071] Among them, after determining the current playback status of the terminal device, since some Bluetooth speakers that support AVRCP Profile will actively obtain the current playback status from the terminal device, when the terminal device receives the playback status acquisition request sent by the Bluetooth player, it will send the current playback status to the Bluetooth player, so that the Bluetooth player can control the playback according to the current playback status determined by the terminal device.
[0072] For example, when the Bluetooth player obtains from the terminal device that the current playback state is the playing state, it plays according to the data to be transmitted received from the terminal device; when the Bluetooth player obtains from the terminal device that the current playback state is the non-playing state, the Bluetooth player also does not play synchronously.
[0073] In some implementations, the step of receiving a playback status acquisition request sent by the Bluetooth player and sending the current playback status to the Bluetooth player includes:
[0074] (1) receiving a playback status acquisition request sent by the Bluetooth player, and determining a historical statistical period before the preset statistical period;
[0075] (2) determining the historical playback status determined in the historical statistical period;
[0076] (3) If the current playback status is different from the historical playback status, the current playback status is sent to the Bluetooth player.
[0077] To reduce resource usage and reduce the operating speed of both devices due to frequent interactions between the terminal device and the Bluetooth player, the terminal device, when receiving a playback status acquisition request from the Bluetooth player, may prioritize determining a historical playback status determined in a historical statistical period prior to the preset statistical period. The current playback status is transmitted to the Bluetooth player only if the current playback status differs from the historical playback status.
[0078] For example, if the preset statistical period is from the 1st to the 2nd second at 10:10, then a historical statistical period within the preset statistical period is from the 0th to the 1st second at 10:10. If the current playback state determined by the preset statistical period is the non-playing state, and the historical playback state determined by the historical statistical period is the playing state, then the current playback state being the non-playing state is sent to the Bluetooth player, so that the Bluetooth player changes from controlling playback triggered by the historical playback state determined by the historical statistical period being the playing state to controlling non-playing (pausing or stopping playback) triggered by the current playback state determined by the preset statistical period being the non-playing state.
[0079] In some embodiments, the method further comprises:
[0080] If the current play state is the same as the historical play state, the current play state is prohibited from being sent to the Bluetooth player, triggering the Bluetooth player to continue to perform play control according to the historical play state.
[0081] As shown in FIG1c , FIG1c is a first signaling interaction diagram between a terminal device and a Bluetooth player provided in an embodiment of the present application.
[0082] Among them, if the current playback status is the same as the historical playback status, it means that the current playback status follows the previous historical playback status. At this time, the playback control of the Bluetooth player is based on the historical playback status, so the terminal device may not send the current playback status to the Bluetooth player, thereby triggering the Bluetooth player to follow the playback control of the historical playback status.
[0083] For example, if the historical playback status is playing and the current playback status is also playing, the terminal device does not send the playback status to the Bluetooth player. When the Bluetooth player does not receive the playback status of the terminal device within a period of time, it continues to use the historical playback status for playback control.
[0084] In some implementations, after the step of determining the current playback state based on the data length of the data to be transmitted, the method further includes:
[0085] (1) receiving a pause play request sent by the Bluetooth player, and determining whether the current play state is a play state;
[0086] (2) If the current playback state is the playback state, obtain the device number of the Bluetooth player;
[0087] (3) Construct a rejection condition based on the pause playback request and the device number.
[0088] Among them, in the prior art, when the Bluetooth player sends a pause play request (AVDTP_SUSPENGD) to the terminal device due to an abnormality of the Bluetooth player itself, if the current play state is play, the terminal device will suspend the audio node, which will cause the speaker device to be silent. In order to further solve this technical problem, the present application can obtain the device number of the Bluetooth player when the current play state is play and a pause play request sent by the Bluetooth player is received. The device number can be the name of the Bluetooth player's audio system, or the device address, etc., which can uniquely identify the number of the Bluetooth player. According to the device number and the pause play request, a rejection condition is constructed.
[0089] Specifically, please refer to Table 1. Table 1 constructs a rejection condition, which is used to reject the rejection event "pause play request" sent by the rejection device "Bluetooth player 1".
[0090] In some implementations, after the step of constructing a rejection condition based on the pause playback request and the device number, the method further includes:
[0091] (1) receiving a pause play request and obtaining a sending device number of a device that sends the pause play request;
[0092] (2) If the sending device number is the same as the device number in the rejection condition, the pause playback request is rejected.
[0093] As shown in Figure 1d, which is a second signaling interaction diagram between a terminal device and a Bluetooth player provided in an embodiment of the present application, after establishing a rejection condition, if a pause play request is received thereafter, the sending device number of the device sending the pause play request is obtained. If the sending device number is the same as the device number in the rejection condition, the pause play request is rejected.
[0094] For example, if the sending device number of the device sending the pause play request is "Bluetooth player 1", and its device number is the same as the rejecting device "Bluetooth player 1" in the rejection condition, the pause play request will be rejected, and the silent self-healing of the audio will be achieved.
[0095] Specifically, in order to avoid the pause playback request being initiated by the user controlling the Bluetooth player, a premise for constructing a rejection condition can be set. For example, if the terminal device receives multiple pause playback requests initiated by the Bluetooth player within a specified time period, and each time the pause playback request is received, the current playback status is playing, then a rejection condition is constructed.
[0096] As can be seen from the above, the embodiment of the present application obtains the data to be transmitted received by the Bluetooth module at a preset time interval to determine the data length of the data to be transmitted; determines the current playback status based on the data length of the data to be transmitted; receives a playback status acquisition request sent by the Bluetooth player, sends the current playback status to the Bluetooth player, and triggers the Bluetooth player to perform playback control based on the current playback status. In this way, the current playback status of the terminal device is determined by the data length of the data to be transmitted received by the Bluetooth module. This allows the terminal device to determine the current playback status when playing audio in any playback scenario, thereby triggering the Bluetooth player to perform corresponding playback control based on the current playback status determined by the terminal device.
[0097] To facilitate better implementation of the playback control method provided in the embodiment of the present application, the embodiment of the present application also provides a device based on the above playback control method. The meanings of the terms are the same as those in the above playback control method, and the specific implementation details can be referred to the description in the method embodiment.
[0098] Please refer to Figure 2, which is a structural diagram of the playback control device provided in an embodiment of the present application, wherein the playback control device is applied to a terminal device connected to a Bluetooth player via a Bluetooth module, and may include a first determination module 301, a second determination module 302, and a sending module 303, etc.
[0099] A first determining module 301 is configured to obtain the data to be transmitted received by the Bluetooth module at a preset time interval and determine the data length of the data to be transmitted;
[0100] A second determining module 302 is configured to determine a current playback state based on the length of the data to be transmitted;
[0101] The sending module 303 is configured to receive a playback status acquisition request sent by the Bluetooth player, send the current playback status to the Bluetooth player, and trigger the Bluetooth player to perform playback control based on the current playback status.
[0102] In the playback control device provided in the embodiment of the present application, the second determining module 302 includes:
[0103] An acquisition submodule, configured to acquire a target number of times that the length of the data to be transmitted exceeds a preset data length within a preset statistical period;
[0104] A comparison submodule, configured to compare the target number of times with a preset number of times to obtain a comparison result;
[0105] The first determining submodule is configured to determine a current playback state according to the comparison result.
[0106] In the playback control device provided in the embodiment of the present application, the first determination submodule includes:
[0107] a first determining unit, configured to determine that the current playback state is a playback state if the comparison result indicates that the target number of times reaches or exceeds the preset number of times;
[0108] The second determining unit is configured to determine that the current playback state is a non-playing state if the comparison result indicates that the target number of times does not reach the preset number of times.
[0109] In the playback control device provided in the embodiment of the present application, the sending module 303 includes:
[0110] A second determining submodule is configured to receive a playback status acquisition request sent by the Bluetooth player and determine a historical statistical period before the preset statistical period;
[0111] A third determining submodule is configured to determine a historical playback state determined in the historical statistical period;
[0112] The sending submodule is configured to send the current playing state to the Bluetooth player if the current playing state is different from the historical playing state.
[0113] In the playback control device provided in the embodiment of the present application, the sending module 303 further includes:
[0114] The prohibition submodule is used to prohibit the current playing state from being sent to the Bluetooth player if the current playing state is the same as the historical playing state, and trigger the Bluetooth player to continue playing according to the historical playing state.
[0115] In the playback control device provided in the embodiment of the present application, the device further includes:
[0116] A third determining module is configured to receive a pause playback request sent by the Bluetooth player and determine whether the current playback state is a playback state;
[0117] A first acquisition module is used to acquire the device number of the Bluetooth player if the current playback state is the playback state;
[0118] A construction module is used to construct a rejection condition based on the pause playback request and the device number.
[0119] In the playback control device provided in the embodiment of the present application, the device further includes:
[0120] A second acquisition module is configured to receive a pause play request and acquire a sending device number of a device that sends the pause play request;
[0121] A rejection module is used to reject the request to pause playback if the sending device number is the same as the device number in the rejection condition.
[0122] As can be seen from the above, the embodiment of the present application obtains the data to be transmitted received by the Bluetooth module at a preset time interval through the first determination module 301, and determines the data length of the data to be transmitted; the second determination module 302 determines the current playback state based on the data length of the data to be transmitted; the sending module 303 receives the playback state acquisition request sent by the Bluetooth player, sends the current playback state to the Bluetooth player, and triggers the Bluetooth player to perform playback control based on the current playback state. In this way, the current playback state of the terminal device is determined by the data length of the data to be transmitted received by the Bluetooth module, so that the terminal device can determine the current playback state when playing audio in any playback scenario, thereby triggering the Bluetooth player to perform corresponding playback control according to the current playback state determined by the terminal device.
[0123] Accordingly, an embodiment of the present application also provides a terminal device, which can be a terminal device such as a smart phone, a tablet computer, a laptop computer, a touch screen, a game console, a personal computer (PC), a personal digital assistant (PDA), etc. The control device to be played can be a display device such as a display, a projector, etc. As shown in Figure 3, Figure 3 is a structural schematic diagram of the terminal device provided in an embodiment of the present application. The terminal device 1000 includes a processor 401 with one or more processing cores, a memory 402 with one or more computer-readable storage media, and a computer program stored in the memory 402 and executable on the processor. The processor 401 is electrically connected to the memory 402. Those skilled in the art will understand that the computer device structure shown in the figure does not constitute a limitation on the computer device, and may include more or fewer components than shown, or combine certain components, or arrange components differently.
[0124] The processor 401 is the control center of the terminal device 1000. It uses various interfaces and lines to connect the various parts of the entire terminal device 1000. By running or loading software programs and / or modules stored in the memory 402, and calling data stored in the memory 402, it executes various functions of the terminal device 1000 and processes data, thereby monitoring the terminal device 1000 as a whole.
[0125] In the embodiment of the present application, the processor 401 in the terminal device 1000 loads instructions corresponding to one or more application processes into the memory 402 according to the following steps, and the processor 401 runs the application stored in the memory 402 to implement various functions:
[0126] Acquire the data to be transmitted received by the Bluetooth module at a preset time interval, and determine the data length of the data to be transmitted;
[0127] Determining a current playback state based on the data length of the data to be transmitted;
[0128] Receive a playback status acquisition request sent by the Bluetooth player, send the current playback status to the Bluetooth player, and trigger the Bluetooth player to perform playback control based on the current playback status.
[0129] In some implementations, the step of determining the current playback state based on the data length of the data to be transmitted includes:
[0130] Obtaining a target number of times that the data length of the data to be transmitted exceeds a preset data length within a preset statistical period;
[0131] Comparing the target number of times with the preset number of times to obtain a comparison result;
[0132] The current playback state is determined according to the comparison result.
[0133] In some implementations, the step of determining the current playback state based on the comparison result includes:
[0134] If the comparison result indicates that the target number of times reaches or exceeds the preset number of times, determining that the current playing state is the playing state;
[0135] If the comparison result indicates that the target number of times does not reach the preset number of times, it is determined that the current playing state is a non-playing state.
[0136] In some implementations, the step of receiving a playback status acquisition request sent by the Bluetooth player and sending the current playback status to the Bluetooth player includes:
[0137] receiving a playback status acquisition request sent by the Bluetooth player, and determining a historical statistical period before the preset statistical period;
[0138] Determine a historical playback status determined in the historical statistical period;
[0139] If the current playing state is different from the historical playing state, the current playing state is sent to the Bluetooth player.
[0140] In some embodiments, the method further comprises:
[0141] If the current play state is the same as the historical play state, the current play state is prohibited from being sent to the Bluetooth player, triggering the Bluetooth player to continue to perform play control according to the historical play state.
[0142] In some implementations, after the step of determining the current playback state based on the data length of the data to be transmitted, the method further includes:
[0143] receiving a pause playback request sent by the Bluetooth player, and determining whether the current playback state is a playback state;
[0144] If the current playback state is the playback state, obtaining the device number of the Bluetooth player;
[0145] A rejection condition is constructed based on the pause playback request and the device number.
[0146] In some implementations, after the step of constructing a rejection condition based on the pause playback request and the device number, the method further includes:
[0147] Receive a pause play request, and obtain a sending device number of a device that sends the pause play request;
[0148] If the sending device number is the same as the device number in the rejection condition, the request to pause playback is rejected.
[0149] The specific implementation of the above operations can be found in the previous embodiments and will not be repeated here.
[0150] Optionally, as shown in FIG3 , the terminal device 1000 further includes: a Bluetooth module 403, a radio frequency circuit 404, a direct connection module 405, and a power supply 406. The processor 401 is electrically connected to the Bluetooth module 403, the radio frequency circuit 404, the direct connection module 405, and the power supply 406, respectively. Those skilled in the art will appreciate that the terminal device structure shown in FIG3 does not limit the terminal device, and may include more or fewer components than shown, or combine certain components, or arrange the components differently.
[0151] The Bluetooth module 403 is used to establish a Bluetooth connection with the device to be played through the Bluetooth address of the device to be played stored in the terminal device. The direct connection module 405 includes a USB interface and / or a type-c interface configured for the terminal device to directly connect with the computer device or the device to be played.
[0152] The radio frequency circuit 404 may be used to transmit and receive radio frequency signals, so as to establish wireless communication with a network device or other computer device through wireless communication, and to transmit and receive signals between the network device or other computer device.
[0153] Power supply 406 is used to supply power to various components of terminal device 1000. Optionally, power supply 406 can be logically connected to processor 401 via a power management system, thereby enabling the power management system to manage charging, discharging, and power consumption. Power supply 406 can also include one or more DC or AC power supplies, a recharging system, a power failure detection circuit, a power converter or inverter, a power status indicator, and other arbitrary components.
[0154] Although not shown in FIG3 , the terminal device 1000 may further include a camera, a sensor, a wireless fidelity module, etc., which will not be described in detail here.
[0155] In the above embodiments, the description of each embodiment has its own focus. For parts that are not described in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.
[0156] As can be seen from the above, the terminal device provided in this embodiment obtains the data to be transmitted received by the Bluetooth module at preset time intervals to determine the data length of the data to be transmitted; determines the current playback status based on the data length of the data to be transmitted; receives a playback status acquisition request sent by the Bluetooth player, sends the current playback status to the Bluetooth player, and triggers the Bluetooth player to perform playback control based on the current playback status. In this way, by determining the current playback status of the terminal device based on the data length of the data to be transmitted received by the Bluetooth module, the terminal device can determine the current playback status when playing audio in any playback scenario, thereby triggering the Bluetooth player to perform corresponding playback control based on the current playback status determined by the terminal device.
[0157] Those skilled in the art will appreciate that all or part of the steps in the various methods of the above embodiments may be accomplished by instructions, or by controlling related hardware through instructions. The instructions may be stored in a computer-readable storage medium and loaded and executed by a processor.
[0158] To this end, an embodiment of the present application provides a computer-readable storage medium storing a plurality of computer programs, which can be loaded by a processor to execute the steps of any skill control method provided in the embodiment of the present application. For example, the computer program can execute the following steps:
[0159] The method includes obtaining the data to be transmitted received by the Bluetooth module at a preset time interval and determining the data length of the data to be transmitted; determining the current playback status based on the data length of the data to be transmitted; receiving a playback status acquisition request sent by the Bluetooth player, sending the current playback status to the Bluetooth player, and triggering the Bluetooth player to perform playback control based on the current playback status.
[0160] The specific implementation of the above operations can be found in the previous embodiments and will not be repeated here.
[0161] The storage medium may include a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, etc.
[0162] Since the computer program stored in the storage medium can execute the steps in any one of the playback control methods provided in the embodiments of the present application, the beneficial effects that can be achieved by any one of the playback control methods provided in the embodiments of the present application can be achieved. Please refer to the previous embodiments for details and will not be repeated here.
[0163] The above is a detailed introduction to a playback control method, device, computer-readable storage medium and terminal device provided in the embodiments of the present application. Specific examples are used in this article to illustrate the principles and implementation methods of the present application. The description of the above embodiments is only used to help understand the method of the present application and its core idea; at the same time, for technical personnel in this field, based on the ideas of the present application, there will be changes in the specific implementation methods and application scope. In summary, the content of this specification should not be understood as a limitation on the present application.
Claims
1. A playback control method, wherein: Applicable to terminal devices connected to Bluetooth players via Bluetooth modules, including: Acquire the data to be transmitted received by the Bluetooth module at a preset time interval, and determine the data length of the data to be transmitted; Determining a current playback state based on the data length of the data to be transmitted; Receive a playback status acquisition request sent by the Bluetooth player, send the current playback status to the Bluetooth player, and trigger the Bluetooth player to perform playback control based on the current playback status.
2. The playback control method according to claim 1, wherein: The step of determining the current playback state based on the data length of the data to be transmitted includes: Obtaining a target number of times that the data length of the data to be transmitted exceeds a preset data length within a preset statistical period; Comparing the target number of times with the preset number of times to obtain a comparison result; The current playing state is determined according to the comparison result.
3. The playback control method according to claim 2, wherein: The step of determining the current playback state according to the comparison result comprises: If the comparison result indicates that the target number of times reaches or exceeds the preset number of times, determining that the current playing state is the playing state; If the comparison result indicates that the target number of times does not reach the preset number of times, it is determined that the current playing state is a non-playing state.
4. The playback control method according to claim 2, wherein: The step of receiving a playback status acquisition request sent by the Bluetooth player and sending the current playback status to the Bluetooth player comprises: Receiving a playback status acquisition request sent by the Bluetooth player, and determining a historical statistical period before the preset statistical period; Determine the historical playback status determined in the historical statistical period; If the current playing state is different from the historical playing state, the current playing state is sent to the Bluetooth player.
5. The playback control method according to claim 4, wherein: The method further comprises: If the current play state is the same as the historical play state, the current play state is prohibited from being sent to the Bluetooth player, triggering the Bluetooth player to continue to perform play control according to the historical play state.
6. The playback control method according to claim 1, wherein: After the step of determining the current playback state based on the data length of the data to be transmitted, the method further includes: Receive a pause play request sent by the Bluetooth player, and determine whether the current play state is a play state; If the current playing state is the playing state, obtaining the device number of the Bluetooth player; Based on the pause playback request and the device number, a rejection condition is constructed.
7. The playback control method according to claim 6, wherein: After the step of constructing a rejection condition based on the pause playback request and the device number, the method further includes: Receive a request to pause playing, and obtain a sending device number of a device that sends the request to pause playing; If the sending device number is the same as the device number in the rejection condition, the request to pause playback is rejected.
8. The playback control method according to claim 6, wherein: The build rejection conditions include: If the pause play request initiated by the Bluetooth player is received multiple times within a specified time period, and the current play state is play each time the pause play request is received, a rejection condition is established.
9. The playback control method according to claim 1, wherein: The triggering the Bluetooth player to perform playback control based on the current playback state includes: When the Bluetooth player is triggered to obtain the current playing state from the terminal device as the playing state, The end device plays the data to be transmitted received.
10. The playback control method according to claim 9, wherein: The method further includes: when the Bluetooth player is triggered to obtain from the terminal device that the current playing state is a non-playing state, the Bluetooth player also synchronously stops playing.
11. A playback control device, wherein: Applicable to terminal devices connected to Bluetooth players via Bluetooth modules, including: A first determining module, configured to obtain the data to be transmitted received by the Bluetooth module at a preset time interval, and determine the data length of the data to be transmitted; A second determination module, used to determine a current playback state based on the data length of the data to be transmitted; The sending module is used to receive the playback status acquisition request sent by the Bluetooth player, send the current playback status to the Bluetooth player, and trigger the Bluetooth player to perform playback control based on the current playback status.
12. The playback control device according to claim 11, wherein: The second determining module includes: An acquisition submodule, used to acquire a target number of times that the data length of the data to be transmitted exceeds a preset data length within a preset statistical period; A comparison submodule, used for comparing the target number of times with the preset number of times to obtain a comparison result; The first determination submodule is used to determine the current playback state according to the comparison result.
13. The playback control device according to claim 12, wherein: The first determining submodule includes: A first determining unit, configured to determine that the current playback state is a playback state if the comparison result indicates that the target number of times reaches or exceeds the preset number of times; The second determining unit is configured to determine that the current playing state is a non-playing state if the comparison result indicates that the target number of times does not reach the preset number of times.
14. The playback control device according to claim 11, wherein: The sending module comprises: A second determining submodule is used to receive a playback status acquisition request sent by the Bluetooth player and determine a historical statistical period before the preset statistical period; A third determination submodule is used to determine the historical playback status determined in the historical statistical period; The sending submodule is used to send the current playing state to the Bluetooth player if the current playing state is different from the historical playing state.
15. The playback control device according to claim 14, wherein: The sending module further includes: The prohibition submodule is used to prohibit the current playing state from being sent to the Bluetooth player if the current playing state is the same as the historical playing state, so as to trigger the Bluetooth player to continue to perform playing control according to the historical playing state.
16. The playback control device according to claim 11, wherein: Also includes: A third determination module is used to receive a pause play request sent by the Bluetooth player and determine whether the current play state is a play state; A first acquisition module, configured to acquire a device number of the Bluetooth player if the current playback state is a playback state; A construction module is used to construct a rejection condition based on the pause playback request and the device number.
17. The playback control device according to claim 16, wherein: Also includes: A second acquisition module is used to receive a pause play request and acquire a sending device number of a device that sends the pause play request; A rejection module is used to reject the request to pause playback if the sending device number is the same as the device number in the rejection condition.
18. The playback control device according to claim 16, wherein: The construction module is used to construct a rejection condition if the pause play request initiated by the Bluetooth player is received multiple times within a specified time period, and the current play state is play each time the pause play request is received.
19. A computer-readable storage medium, wherein: The computer-readable storage medium stores a plurality of instructions, and the instructions are suitable for being loaded by a processor to execute the steps in the playback control method according to any one of claims 1 to 10.
20. A terminal device comprising a memory, a processor and a computer program stored in the memory and executable on the processor, wherein: When the processor executes the program, the steps in the playback control method according to any one of claims 1 to 10 are implemented.
Citation Information
Patent Citations
Audio playing apparatus and method, and digital television chip
CN101404741A
Player, play control method, play control device, electronic equipment and play system
CN108259998A
Audio and video playing control method and display device
CN112911392A
Playing control method and device, storage medium and terminal equipment
CN117498897A
Method and device for accelerating playback of a single-fragment video
US20180332316A1