An audio playing interface display method and device, electronic equipment and storage medium
By responding to audio data playback operations in the audio playback interface and controlling the virtual stylus to rotate to the target position, the problem of the virtual stylus being fixed and unable to display the playback progress in real time is solved, thus realizing the real-time display of audio playback progress and improving the user experience.
Patent Information
- Application Number
- CN202210915942.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-08-01
- Publication Date
- 2025-12-23
- Estimated Expiration
- 2042-08-01
AI Technical Summary
In existing audio playback interfaces, the virtual stylus is displayed in a fixed position, making it impossible to show the playback progress of audio data in real time.
By responding to audio data playback operations, the rotation angle of the virtual stylus is determined, and the virtual stylus is controlled to rotate to the target position within the stylus movement area of the virtual record, thereby realizing real-time display of audio playback progress.
It enables real-time display of audio playback progress in the audio playback interface, improving the user experience.
Smart Images

Figure CN115391591B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present disclosure relates to the technical field of image processing, and particularly relates to an audio playing interface display method and device, an electronic device and a storage medium. BACKGROUND
[0002] At present, when an audio playing interface is displayed, a virtual record and a virtual needle are usually arranged in a virtual record area of the audio playing interface.
[0003] In the related art, when audio data is played, the virtual needle is usually fixedly arranged at the same position of the virtual record. Therefore, the display method in the related art cannot display the playing progress of the audio data in real time during playing of the audio data. SUMMARY
[0004] The present disclosure provides an audio playing interface display method, device, electronic device and storage medium to display the playing progress of the audio data in real time.
[0005] The specific technical solutions provided by the present disclosure are as follows.
[0006] An audio playing interface display method, wherein an audio playing interface at least includes a virtual needle and a virtual record, and the method comprises:
[0007] In response to a playing operation on audio data, a rotation angle of the virtual needle is determined.
[0008] Based on the rotation angle, the virtual needle is controlled to rotate to a target position in a needle moving area of the virtual record.
[0009] An audio playing interface display device, wherein an audio playing interface at least includes a virtual needle and a virtual record, and the device comprises:
[0010] A determination module is configured to determine a rotation angle of the virtual needle in response to a playing operation on audio data.
[0011] A processing module is configured to control the virtual needle to rotate to a target position in a needle moving area of the virtual record based on the rotation angle.
[0012] An electronic device includes a memory, a processor and a computer program stored in the memory and executable on the processor, and the processor executes the program to implement the steps of the above-mentioned audio playing interface display method.
[0013] A computer readable storage medium has a computer program stored thereon, and the computer program is executable by a processor to implement the steps of the above-mentioned audio playing interface display method.
[0014] In the embodiments of the present disclosure, the audio playing interface includes a virtual needle and a virtual record, in response to a playing operation on audio data, a rotation angle of the virtual needle is determined, and the virtual needle is controlled to rotate to a target position in a needle moving area of the virtual record based on the rotation angle. In this way, the virtual needle rotates in real time with audio playing, so that the audio playing progress can be learned in real time based on the displayed virtual needle, and user experience is improved. BRIEF DESCRIPTION OF DRAWINGS
[0015] Figure 1 A flowchart of an audio playing interface display method in the embodiments of the present disclosure is shown;
[0016] Figure 2 A first diagram of virtual needle rotation in the embodiments of the present disclosure is shown;
[0017] Figure 3 A second diagram of virtual needle rotation in the embodiments of the present disclosure is shown;
[0018] Figure 4 A third diagram of virtual needle rotation in the embodiments of the present disclosure is shown;
[0019] Figure 5 A first color picking example diagram in the embodiments of the present disclosure is shown;
[0020] Figure 6 A second color picking example diagram in the embodiments of the present disclosure is shown;
[0021] Figure 7 A third color picking example diagram in the embodiments of the present disclosure is shown;
[0022] Figure 8 A first background diagram in the embodiments of the present disclosure is shown;
[0023] Figure 9 A second background diagram in the embodiments of the present disclosure is shown;
[0024] Figure 10 A waveform change diagram in the embodiments of the present disclosure is shown;
[0025] Figure 11 A third background diagram in the embodiments of the present disclosure is shown;
[0026] Figure 12 A transparent virtual record diagram in the embodiments of the present disclosure is shown;
[0027] Figure 13 A structural diagram of an audio playing interface display device provided by the embodiments of the present disclosure is shown;
[0028] Figure 14 A structural diagram of an electronic device in the embodiments of the present disclosure is shown. DETAILED DESCRIPTION
[0029] The principles and spirits of the present disclosure will be described below with reference to several exemplary embodiments. It should be understood that these embodiments are given only so that those skilled in the art can better understand and implement the present disclosure, and in no way limit the scope of the present disclosure. On the contrary, these embodiments are provided so that the present disclosure is more thorough and complete, and the scope of the present disclosure can be fully conveyed to those skilled in the art.
[0030] Those skilled in the art know that the embodiments of the present disclosure can be implemented as a system, device, apparatus, method or computer program product. Therefore, the present disclosure can be embodied in the form of entirely hardware, entirely software (including firmware, resident software, microcode, etc.), or a combination of hardware and software.
[0031] In this document, it should be understood that any number of elements in the drawings are used for illustration only and not limitation, and any naming is only for distinction and does not have any limiting meaning.
[0032] For the convenience of understanding, the terms involved in the embodiments of the present disclosure are explained as follows:
[0033] Transparent record: composed of a translucent circle in the middle of the audio playing interface and an album cover image.
[0034] Album cover image: picture in the middle of the transparent record circle.
[0035] HSV: H is hue, Hue = 0 represents red, Hue = 120 represents green, Hue = 240 represents blue, etc.; S is saturation, the value range is 0-100%, the larger the value, the more saturated the color; V is the lightness, which determines the lightness of the color in the color space, the higher the lightness, the brighter the color, the range is 0-100%, and the lightness of 0 represents pure black.
[0036] Overlay mode-brighten: two layers are mixed with each other, if the brightness of the current layer is brighter than the brightness of the corresponding position of the bottom layer, the color information of the current layer is displayed; if the brightness of the current layer is darker than the brightness of the corresponding position of the bottom layer, the color information of the bottom layer is displayed.
[0037] The principles and spirits of the present disclosure will be described below with reference to several representative embodiments of the present disclosure. SUMMARY
[0039] In the related art, a virtual record and a virtual needle are displayed in the audio playing interface, and in general, the virtual needle is usually fixedly displayed at the same position during the process of playing audio data, therefore, the audio playing interface display method in the related art cannot present the playing progress of the audio data in real time.
[0040] To solve the above problems, the embodiment of the present disclosure provides an audio playing interface display method, the audio playing interface includes a virtual needle and a virtual record, in response to a playing operation on audio data, a rotation angle of the virtual needle is determined, and the virtual needle is controlled to rotate to a target position in a needle moving area of the virtual record based on the rotation angle. In this way, during the playing of the audio data, the virtual needle is not always displayed fixedly at the same position, but the rotation of the virtual needle is controlled in real time according to the playing progress of the audio data, so that through the method in the embodiment of the present disclosure, the audio playing progress can be viewed in real time in the audio playing interface, thereby improving the user experience.
[0041] Overview of application scenarios
[0042] The method in the embodiment of the present disclosure can be applied to an audio playing scene. Specifically, in response to a playing operation on audio data, a rotation angle of a virtual needle is determined, and the virtual needle is controlled to rotate to a target position in a needle moving area of a virtual record based on the rotation angle, so that the playing progress of the audio data can be viewed in real time.
[0043] Exemplary method
[0044] The audio playing interface display method according to the exemplary embodiments of the present disclosure will be described below in combination with the above application scenarios. It should be noted that the above application scenarios are only shown for the purpose of facilitating the understanding of the spirit and principles of the present disclosure, and the embodiments of the present disclosure are not limited in this respect. On the contrary, the embodiments of the present disclosure can be applied to any applicable scenario.
[0045] Referring to Figure 1 FIG. 1 shows a flowchart of the audio playing interface display method in the embodiment of the present disclosure, which specifically includes the following steps.
[0046] S10: In response to a playing operation on audio data, a rotation angle of a virtual needle is determined.
[0047] In the embodiment of the present disclosure, in the audio playing interface, a playing operation on audio data is triggered, and when it is determined that the playing operation on the audio data is detected, in response to the playing operation on the audio data, a rotation angle of a virtual needle is determined.
[0048] In the embodiment of the present disclosure, the playing operation on the audio data may, for example, be a user click on a playing control displayed in the audio playing interface, or may, for example, be a user drag of a virtual playing progress control displayed in the audio playing interface.
[0049] Optionally, in the embodiment of the present disclosure, a possible implementation for determining the rotation angle of the virtual needle is provided, which specifically includes the following steps.
[0050] S101: Determine the playback duration ratio of the audio data.
[0051] Among them, the playback duration ratio represents the ratio between the current playback duration of the audio data and the total duration of the audio data.
[0052] In this embodiment of the disclosure, the current playback duration of the audio data is determined, and the total duration of the audio data is determined. Based on the current playback duration and the total duration of the audio data, the playback duration ratio of the audio data is determined.
[0053] Optionally, in this embodiment of the disclosure, the user can drag the virtual playback progress control to move forward or backward, determine the current playback duration, and determine the playback duration ratio based on the current playback duration, so that the rotation angle of the virtual stylus changes accordingly with the operation. The process of determining the playback duration ratio based on the virtual playback progress control in this embodiment of the disclosure is described below, specifically including:
[0054] S1011: Determine the current playback duration based on the current position of the virtual playback progress control.
[0055] In this embodiment of the disclosure, a playback progress bar is displayed in the audio playback interface. The current position of the virtual playback progress control on the playback progress bar is determined, and the current playback duration of the audio data is determined based on the determined current position.
[0056] S1012: Determine the proportion of audio data playback time based on the current playback duration and the total duration of the audio data.
[0057] In this embodiment of the disclosure, after determining the current playback duration, the ratio between the current playback duration and the total duration of the audio data is calculated, and the calculated ratio is used as the playback duration ratio of the audio data.
[0058] For example, see Figure 2 The diagram shows a first schematic of the virtual stylus rotation in this embodiment of the present disclosure. Assuming the total duration of the currently played audio data is 120 seconds and the current playback duration is 30 seconds, if the user drags the virtual timeline from 30 seconds to 60 seconds, the new current playback duration is determined to be 60 seconds. The playback duration ratio between the current playback duration of 60 seconds and the total duration of 120 seconds is calculated to be 0.5. Therefore, the rotation angle of the virtual stylus is 0.5 × 12 = 3°. That is, when the user drags the virtual timeline from 30 seconds to 60 seconds, the virtual stylus rotates from 3° to 6° in real time following the dragging operation.
[0059] Furthermore, in this embodiment of the present disclosure, the current unplayed duration of the audio data can be determined, and the ratio of the unplayed duration to the total playback duration of the audio data can be used to determine the playback duration ratio of the audio data.
[0060] S102: Determine the rotation angle of the virtual stylus based on the playback duration ratio.
[0061] In this embodiment of the disclosure, the total angle that the virtual stylus can rotate during audio playback is determined, and the rotation angle that the virtual stylus needs to rotate at present is determined based on the playback duration ratio and the total angle.
[0062] Optionally, in this embodiment of the present disclosure, when determining the rotation angle of the virtual stylus based on the playback duration ratio, the rotation angle of the virtual stylus can be determined based on the product between the playback duration ratio and the total angle.
[0063] S11: Based on the rotation angle, control the virtual stylus to rotate to the target position within the stylus movement area of the virtual record.
[0064] In this embodiment of the disclosure, since the virtual stylus is displayed within the stylus movement area of the virtual record, the virtual stylus is controlled to move from its current position to a target position within the stylus movement area based on the determined rotation angle. Therefore, the target position is the position corresponding to the current playback progress of the audio data.
[0065] Optionally, in this embodiment of the disclosure, a possible implementation for rotating the virtual stylus is provided, specifically including:
[0066] Based on the rotation angle, with one end of the virtual stylus as the anchor point, the virtual stylus is controlled to rotate from its current position to the target position within the stylus movement area of the virtual record.
[0067] In this embodiment of the disclosure, one end of the virtual stylus is used as the anchor point and the tail end is used as the moving point. When rotating the virtual stylus, the anchor point is used as the origin and the virtual stylus is rotated based on the rotation angle, so that the virtual stylus rotates from the current position to the target position within the stylus movement area of the virtual record.
[0068] For example, see Figure 3 As shown, this is a second schematic diagram of the virtual stylus rotation in an embodiment of this disclosure. With point A as the anchor point, when the audio data begins to play, the tail end of the virtual stylus points to the outer ring of the virtual record, that is, the outer ring of the stylus movement area. When the audio data playback ends, the tail end of the virtual stylus points to the inner ring of the record, that is, the inner ring of the stylus movement area. During the time it takes to play the complete audio data, the virtual stylus rotates 12° clockwise.
[0069] Furthermore, in this embodiment of the present disclosure, after pausing the playback of audio data, the virtual stylus can be controlled to rotate to a set position outside the stylus movement area. The following describes the scenario of controlling the rotation of the virtual stylus when pausing the playback of audio data in this embodiment of the present disclosure: In response to the pause playback operation of the audio data, the virtual stylus is controlled to rotate from its current position to a set position outside the stylus movement area.
[0070] In this embodiment of the disclosure, the user can trigger a pause playback operation for audio data in the audio playback interface. In response to the pause playback operation for audio data, the virtual stylus is controlled to rotate counterclockwise from its current position to a set position outside the stylus movement area. During the pause playback of audio data, the virtual stylus is controlled to remain fixed at the set position.
[0071] For example, see Figure 4 As shown, this is a third schematic diagram of the virtual stylus rotation in an embodiment of this disclosure. Assuming the total duration of the audio data is 120 seconds and the current playback duration is 60 seconds, the user triggers a pause playback operation at 60 seconds, and the virtual stylus rotates from its current position of 6° to -24° to reach a set position outside the stylus movement area.
[0072] In this embodiment of the disclosure, when triggering a pause playback operation for audio data, for example, clicking the playback control in the audio playback interface can trigger the pause playback operation for audio data, or double-clicking any position in the audio playback interface can trigger the pause playback operation for audio data. This embodiment of the disclosure does not impose any limitations on this.
[0073] Furthermore, in this embodiment of the present disclosure, if the playback operation for the audio data is triggered again after the audio data playback is paused, the virtual stylus can be controlled to rotate back to its current position. The following describes the scenario of controlling the rotation of the virtual stylus when the audio data is replayed in this embodiment of the present disclosure: In response to the playback operation for the audio data, the virtual stylus is controlled to rotate from the set position to the current position.
[0074] In this embodiment of the disclosure, the user can trigger a playback operation for audio data in the audio playback interface. In response to the playback operation for audio data, the virtual stylus is controlled to move clockwise from a set position outside the stylus movement area to the current position corresponding to the current playback duration.
[0075] For example, such as Figure 4 Assuming the total duration of the audio data is 120 seconds and the current playback duration is 60 seconds, if the user triggers the playback operation at this time, the audio data will continue to play from the 60-second mark, and the virtual stylus will return from -24° to its current position of 6°.
[0076] In the embodiments of the present disclosure, when the playing operation for the audio data is triggered, for example, the playing operation for the audio data can be triggered by clicking the play control in the audio playing interface, or the playing operation for the audio data can also be triggered by double-clicking any position of the audio playing interface, and the embodiments of the present disclosure do not limit this.
[0077] Further, in the embodiments of the present disclosure, the background color of the audio playing interface is unified with the color tone of the cover display area, and the background color of the audio playing interface is controlled to change in brightness.
[0078] Optionally, in the embodiments of the present disclosure, to achieve the background color of the audio playing interface being unified with the color tone of the cover display area and the background color of the audio playing interface being controlled to change in brightness, a possible implementation manner is provided, which specifically includes:
[0079] A1: determining the target color sampling points of the audio playing interface based on the color attribute information of the album cover image displayed in the cover display area.
[0080] In the embodiments of the present disclosure, the color corresponding to each target color sampling point is unified with the color tone of the cover display area.
[0081] In the embodiments of the present disclosure, the cover display area is included in the audio playing interface, the album cover image is displayed in the cover display area, the color attribute information of the album cover image is determined, and based on the determined color attribute information, the target color sampling points of the audio playing interface are determined from the candidate color sampling points included in the audio playing interface.
[0082] Optionally, in the embodiments of the present disclosure, to determine the target color sampling points of the audio playing interface, a possible implementation manner is provided, specifically, the target color sampling points can be determined from the candidate color sampling points of the album cover image by using the color extraction manner corresponding to the album cover image. The process of determining the target color sampling points in the embodiments of the present disclosure is described below, specifically including:
[0083] A11: determining the color extraction manner corresponding to the album cover image based on the color attribute information of the album cover image.
[0084] In the embodiments of the present disclosure, the color attribute information of the album cover image is determined, and based on the color attribute information of the album cover image and the corresponding relationship between each album cover image and each color extraction manner, the color extraction manner corresponding to the album cover image is determined.
[0085] A12: based on the color extraction manner, determining the target color sampling points satisfying each preset color extraction condition from the candidate color sampling points included in the album cover image.
[0086] The target color sampling point is used to determine a background color having color similarity with the album cover image.
[0087] In the embodiments of the present disclosure, based on the determined color extraction manner, target color sampling points satisfying each preset color extraction condition are determined from each candidate color sampling point included in the album cover image.
[0088] Optionally, when the color attribute information in the embodiments of the present disclosure includes a hue, the color extraction manner corresponding to the album cover image can be determined based on the hue. The process of determining the color extraction manner based on the hue in the embodiments of the present disclosure is described below, which can be divided into the following three cases.
[0089] The first case is that the hues are different.
[0090] Specifically, if the total number of candidate color sampling points in the same hue range among the candidate color sampling points included in the album cover image is not greater than a preset quantity threshold, it is determined that the color extraction manner corresponding to the album cover image is a multi-hue extraction manner.
[0091] In the embodiments of the present disclosure, first, the album cover image is obtained, the album cover image is blurred and mosaicked, the album cover image after processing is color sampled, and the hue range to which each candidate color sampling point included in the album cover image belongs is determined. Then, for each hue range, the following operations are performed: determining the total number of candidate color sampling points belonging to any one hue range, and if it is determined that each total number is not greater than a preset quantity threshold, it is determined that the color extraction manner corresponding to the album cover image is a multi-hue extraction manner, and then each target color sampling point can be determined from each candidate color sampling point based on the multi-hue extraction manner.
[0092] For example, assuming that the hues are red, green and blue respectively, the hue range corresponding to red is 0-120, the hue range corresponding to green is 120-240, and the hue range corresponding to blue is 240-360. The hue range to which each candidate color sampling point included in the album cover image belongs is determined, wherein the total number of candidate color sampling points belonging to the hue range corresponding to red is 34, the total number of candidate color sampling points belonging to the hue range corresponding to green is 23, and the total number of candidate color sampling points belonging to the hue range corresponding to blue is 11. In this embodiment, it is assumed that the preset quantity threshold is 35, it is determined that each total number is less than the quantity threshold 35, and it is determined that the color extraction manner corresponding to the album cover image is a multi-hue extraction manner.
[0093] The process of determining each target color sampling point based on the multi-hue extraction manner in the embodiments of the present disclosure is described below, which specifically includes:
[0094] A121-1: Select the candidate color point with the highest brightness among all candidate color points as the first target color point.
[0095] In this embodiment of the disclosure, since the color attribute information of each candidate color point includes brightness and saturation, based on the brightness corresponding to each candidate color point, the candidate color point with the highest brightness is determined from each candidate color point, and the candidate color point with the highest brightness is used as the first target color point of the album cover image.
[0096] For example, see Figure 5 As shown, this is a first color sampling example diagram in an embodiment of this disclosure. It is assumed that among all candidate color sampling points, the brightness of candidate color sampling point ① is 99%, which is the candidate color sampling point with the highest brightness. Therefore, candidate color sampling point ① is taken as the first target color sampling point of the album cover image.
[0097] A121-2: Select the candidate color point with the lowest brightness from all candidate color points as the second target color point.
[0098] In this embodiment of the disclosure, based on the brightness corresponding to each candidate color sampling point, the candidate color sampling point with the lowest brightness is determined from each candidate color sampling point, and the candidate color sampling point with the lowest brightness is used as the second target color sampling point of the album cover image.
[0099] For example, such as Figure 5 As shown, assuming that among the candidate color sampling points, the brightness of candidate color sampling point ④ is 26%, which is the candidate color sampling point with the lowest brightness, candidate color sampling point ④ is taken as the second target color sampling point for the album cover image.
[0100] A121-3: From the preset range of hues containing the largest number of candidate color points, determine the candidate color points whose sum of brightness and saturation values meets the preset value conditions, and obtain the third target color point and the fourth target color point.
[0101] In this embodiment of the disclosure, the hue range to which each candidate color point in the album cover image belongs is determined, and the following operations are performed for each hue range: the total number of candidate color points contained in any hue range is determined, and then, from each hue range, a preset number of hue ranges containing the largest total number of candidate color points are determined. For each preset number of hue ranges, the following operations are performed: the sum of the brightness and saturation values corresponding to each candidate color point belonging to any hue range is determined, and from each candidate color point belonging to that hue range, a third target color point and a fourth target color point whose sum of values satisfies a preset value condition are determined.
[0102] Optionally, in this embodiment of the disclosure, a possible implementation method for determining the third target color sampling point and the fourth target color sampling point is provided, specifically including:
[0103] A121-3-1: Determine the hue range to which each candidate color picking point belongs respectively, and obtain the number of candidate color picking points contained in each hue range.
[0104] In the embodiments of the present disclosure, the hue range to which each candidate color picking point belongs is determined respectively, and the following operations are performed respectively for each hue range: counting the number of candidate color picking points belonging to any one hue range.
[0105] A121-3-2: From each hue range, determine a first hue range and a second hue range with the largest number of candidate color picking points.
[0106] In the embodiments of the present disclosure, from each hue range, a first hue range containing the largest number of candidate color picking points and a second hue range containing the second largest number of candidate color picking points are determined.
[0107] For example, as shown in FIG. 12B, the number of candidate color picking points belonging to the hue range 120-240 (green to blue) is the largest, and the number of candidate color picking points belonging to the hue range 240-360 (0) (blue to red) is the second largest. Therefore, the hue range 120-240 (green to blue) is determined as the first hue range, and the hue range 240-360 (0) (blue to red) is determined as the second hue range. Figure 5
[0108] A121-3-3: The candidate color picking point with the highest sum of values of lightness and saturation in the first hue range is taken as the third target color picking point.
[0109] In the embodiments of the present disclosure, for each candidate color picking point belonging to the first hue range, the following operations are performed respectively: adding the value corresponding to the lightness and the value corresponding to the saturation of any one candidate color picking point to obtain the sum of values, thereby obtaining the sum of values corresponding to each candidate color picking point, determining the candidate color picking point with the highest sum of values from the candidate color picking points, and taking the determined candidate color picking point as the third target color picking point.
[0110] For example, as shown in FIG. 12B, the first hue range is determined as the hue 120-240, i.e., green to blue, and then the candidate color picking point with the highest sum of values of lightness and saturation from the candidate color picking points with the hue belonging to 120-240 is determined as candidate color picking point ②, which is taken as the third target color picking point. Figure 5
[0111] A121-3-4: The candidate color picking point with the highest sum of values of lightness and saturation in the second hue range is taken as the fourth target color picking point.
[0112] In the embodiments of the present disclosure, for each candidate color selection point belonging to the second hue range, the following operations are performed: adding the value corresponding to the lightness of any candidate color selection point and the value corresponding to the saturation, to obtain a total value, thereby obtaining the total value corresponding to each candidate color selection point, determining the candidate color selection point with the highest total value from the candidate color selection points, and taking the determined candidate color selection point as the fourth target color selection point.
[0113] For example, as shown in Figure 5 the second hue range is determined to be hue 240-360, i.e. blue to red, and then the candidate color selection point with the highest total value of lightness and saturation is determined to be candidate color selection point ③ from the candidate color selection points with hue belonging to 240-360, and candidate color selection point ③ is taken as the fourth target color selection point.
[0114] The second case is that the hue is the same.
[0115] Specifically, if it is determined that the total number is greater than the preset number threshold, it is determined that the color extraction mode corresponding to the album cover image is a single hue extraction mode.
[0116] In the embodiments of the present disclosure, if it is determined that the total number of candidate color selection points belonging to any hue range is greater than the preset number threshold, it is determined that the color extraction mode corresponding to the album cover image is a single hue extraction mode, and then each target color selection point can be determined from each candidate color selection point based on the single hue extraction mode.
[0117] For example, the total number of candidate color selection points belonging to the hue range corresponding to red is 88, the total number of candidate color selection points belonging to the hue range corresponding to green is 12, and the total number of candidate color selection points belonging to the hue range corresponding to blue is 11. In this embodiment, it is assumed that the preset number threshold is 70, it is determined that the total number of candidate color selection points belonging to the hue range corresponding to red is greater than the number threshold 70, and it is determined that the color extraction mode corresponding to the album cover image is a single hue extraction mode.
[0118] It should be noted that in the embodiments of the present disclosure, when the album cover image has no hue or only one color bias, i.e. more than 80% of the color values belong to the same hue range, it is determined that the color extraction mode of the album cover image is a single hue extraction mode.
[0119] The process of determining each target color selection point based on the single hue extraction mode in the embodiments of the present disclosure will be described below, which specifically includes:
[0120] A122-1: taking the candidate color selection point with the highest lightness from the candidate color selection points as the first target color selection point.
[0121] In the embodiments of the present disclosure, since the color attribute information of each candidate color picking point includes the lightness, the candidate color picking point with the highest lightness is determined from the candidate color picking points based on the lightness corresponding to each candidate color picking point, and the candidate color picking point with the highest lightness is taken as the first target color picking point of the album cover image.
[0122] For example, referring to FIG. 12A, which is a second color picking example in the embodiments of the present disclosure, the lightness corresponding to the candidate color picking point 1 is 62%, which is the highest among the lightnesses of the candidate color picking points, so the candidate color picking point 1 is taken as the first target color picking point of the album cover image, that is, the hue H of the first target color picking point is 196°, the saturation S is 7%, and the lightness V is 62%. Figure 6
[0123] A122-2: The candidate color picking point with the lowest lightness is taken as the second target color picking point from the candidate color picking points.
[0124] In the embodiments of the present disclosure, the candidate color picking point with the lowest lightness is determined from the candidate color picking points based on the lightness corresponding to each candidate color picking point, and the candidate color picking point with the lowest lightness is taken as the second target color picking point of the album cover image.
[0125] For example, referring to FIG. 12B, which is a second color picking example in the embodiments of the present disclosure, the lightness corresponding to the candidate color picking point 4 is 1%, which is the lowest among the lightnesses of the candidate color picking points, so the candidate color picking point 4 is taken as the second target color picking point of the album cover image, that is, the hue H of the second target color picking point is 0°, the saturation S is 0%, and the lightness V is 1%. Figure 6
[0126] A122-3: The lightness difference between the first target color picking point and the second target color picking point is determined.
[0127] In the embodiments of the present disclosure, the difference between the lightness corresponding to the first target color picking point and the lightness corresponding to the second target color picking point is calculated to obtain the lightness difference between the first target color picking point and the second target color picking point.
[0128] A122-4: The third target color picking point is determined from the candidate color picking points based on a first lightness product between the lightness difference and a preset first lightness coefficient.
[0129] In the embodiments of the present disclosure, the first lightness product between the lightness difference and the preset first lightness coefficient is calculated, and the candidate color picking point with the smallest difference in lightness from the first lightness product is determined from the candidate color picking points based on the first lightness product and the lightness corresponding to each candidate color picking point, and the determined candidate color picking point is taken as the third target color picking point.
[0130] For example, referring to FIG. 12C, which is a second color picking example in the embodiments of the present disclosure, the first lightness product between the lightness difference and the preset first lightness coefficient is calculated, and the candidate color picking point with the smallest difference in lightness from the first lightness product is determined from the candidate color picking points based on the first lightness product and the lightness corresponding to each candidate color picking point, and the determined candidate color picking point is taken as the third target color picking point. Figure 6 As shown in FIG. 6, the luminance difference between the first color sampling point and the second color sampling point is 62%-1%=61%, the first luminance product between the luminance difference and the preset first luminance coefficient is 61%*0.66=40.26%, and thus the luminance corresponding to the candidate color sampling point ② with the smallest luminance difference from the first luminance product 40.26% is 44%. The candidate color sampling point ② is taken as the third target color sampling point, the hue H of the third target color sampling point is 208°, the saturation S is 11%, and the luminance V is 44%.
[0131] A122-5: Based on a second luminance product between the luminance difference and a preset second luminance coefficient, the fourth target color sampling point is determined from the candidate color sampling points.
[0132] The first luminance coefficient is greater than the second luminance coefficient.
[0133] In the embodiments of the present disclosure, the second luminance product between the luminance difference and the preset second luminance coefficient is calculated, and based on the second luminance product and the luminance corresponding to each candidate color sampling point, the candidate color sampling point with the smallest luminance difference from the second luminance product is determined from the candidate color sampling points, and the determined candidate color sampling point is taken as the fourth target color sampling point.
[0134] For example, as shown in FIG. 6, Figure 6 The luminance difference between the first color sampling point and the second color sampling point is 61%, the second luminance product between the luminance difference and the preset second luminance coefficient is 61%*0.33=20.13%, and thus the luminance corresponding to the candidate color sampling point ③ with the smallest luminance difference from the second luminance product 20.13% is 23%. The candidate color sampling point ③ is taken as the fourth target color sampling point, the hue H of the fourth target color sampling point is 228°, the saturation S is 8%, and the luminance V is 23%.
[0135] The second case is a pure color.
[0136] Specifically, if it is determined that each candidate color sampling point contained in the album cover image is of the same hue, it is determined that the color extraction manner corresponding to the album cover image is a pure color extraction manner.
[0137] Optionally, in the embodiments of the present disclosure, if it is determined that each candidate color sampling point contained in the album cover image is of the same hue and the values corresponding to the hues are the same, it is determined that the color extraction manner corresponding to the album cover image is a pure color extraction manner.
[0138] A123-1: Based on a third luminance product between the luminance of any candidate color sampling point and a preset third luminance coefficient, the first target color sampling point and the second target color sampling point are obtained.
[0139] Among them, the brightness of the first target color point and the second target color point are the same.
[0140] In this embodiment of the disclosure, since all candidate color points contained in the album cover image belong to the same hue, a candidate color point is randomly selected from each candidate color point, and the product between the brightness of the candidate color point and the preset third brightness coefficient is calculated to obtain the third brightness product. Since the brightness corresponding to the first target color point and the second target color point is the same, it is determined that the brightness of the first target color point and the second target color point are both the third brightness product.
[0141] In this embodiment, the third brightness coefficient can be, for example, 1.2, and there is no limitation thereto.
[0142] For example, see Figure 7 The diagram shown is an example of the third color selection in this embodiment. The hue H of any candidate color selection point n is 210°, the saturation S is 50%, and the lightness v is 50%. Assuming the third lightness coefficient is 1.2, the product between the lightness of the candidate color selection point n and the third lightness coefficient is calculated, and the third lightness product is 50% × 1.2 = 60%. Therefore, the hue H of the first target color selection point and the second target color selection point are determined to be 210°, the saturation S is 50%, and the lightness v is 60%.
[0143] Furthermore, in this embodiment of the present disclosure, if it is determined that the third brightness product is less than a preset product threshold, then a preset minimum brightness is obtained, and based on the minimum brightness, a first target color sampling point and a second target color sampling point are obtained. That is, in this embodiment of the present disclosure, it is determined whether the third brightness product is less than a preset product threshold. If it is determined that the third brightness product is less than the preset product threshold, then the preset minimum brightness is used as the brightness of the first target color sampling point and the second target color sampling point. In this way, even if the candidate color sampling point n is pure black (H:0°S:0%V:0%), the first target color sampling point and the second target color sampling point can still have brightness.
[0144] For example, assuming that the third brightness product of 15% is less than the product threshold of 20%, then the minimum brightness of 20% is obtained, and the brightness of the first target color point and the second target color point is set to 20%, so that the brightness of the first target color point and the second target color point can always be kept above 20%.
[0145] A123-2: Based on the product of the lightness of any candidate color point and the preset fourth lightness coefficient, obtain the third target color point and the fourth target color point.
[0146] Among them, the third target color point and the fourth target color point have the same brightness, and the brightness coefficient of the third target is greater than that of the fourth target color point.
[0147] In the embodiments of the present disclosure, since each candidate color sampling point contained in the album cover image belongs to the same hue, a product between the lightness of an arbitrary selected candidate color sampling point and a fourth preset lightness coefficient is calculated to obtain a fourth lightness product. Since the lightness of the third target color sampling point and the fourth target color sampling point is the same, the lightness of the third target color sampling point and the fourth target color sampling point is determined to be the fourth lightness product.
[0148] For example, the fourth lightness coefficient in the embodiments of the present disclosure can be 0.8, which is not limited.
[0149] For example, as shown in FIG. 6, the hue H of the candidate color sampling point n is 210°, the saturation S is 50%, and the lightness v is 50%. Assuming that the fourth lightness coefficient is 0.8, the product between the lightness of the candidate color sampling point n and the fourth lightness coefficient is calculated to obtain a fourth lightness product of 50%*1.2=60%. Therefore, the hue H of the third target color sampling point and the fourth target color sampling point is determined to be 210°, the saturation S is 50%, and the lightness v is 40%. Figure 7
[0150] A2: determining the background color of the audio playing interface based on the target color sampling points.
[0151] In the embodiments of the present disclosure, the background color of the audio playing interface is determined based on the target color sampling points.
[0152] A3: controlling the background color to change in brightness based on the rhythm information of the audio data and the target color sampling points.
[0153] In the embodiments of the present disclosure, the rhythm information of the audio data is obtained, and the background color is controlled to change in brightness based on the rhythm information and the target color sampling points, so that the background color displayed on the audio playing interface and the album cover image are harmonious and unified, and the best visual effect is presented.
[0154] Optionally, in the embodiments of the present disclosure, a possible implementation for controlling the background color to change in brightness is provided, which specifically includes:
[0155] A31: setting the first target color sampling point, the second target color sampling point, the third target color sampling point and the fourth target color sampling point at corresponding target positions in the audio playing interface, respectively, and controlling the first target color sampling point, the second target color sampling point, the third target color sampling point and the fourth target color sampling point to move in a preset moving manner to generate a first dynamic background layer.
[0156] In this embodiment, a first target color sampling point is set at a first target position within the audio playback interface, a second target color sampling point is set at a second target position within the audio playback interface, a third target color sampling point is set at a third target position within the audio playback interface, and a fourth target color sampling point is set at a fourth target position within the audio playback interface. The first, second, third, and fourth target color sampling points are moved according to a preset moving speed, and a radial gradient transition is performed between the first, second, third, and fourth target color sampling points to generate a first dynamic background layer.
[0157] Optionally, in this embodiment of the disclosure, when setting the target color sampling point, the setting method of each target color sampling point can be determined based on the brightness of each candidate color sampling point, which can be divided into the following two cases:
[0158] The first scenario: The album cover image is too bright.
[0159] Specifically, if it is determined that the brightness of each candidate color sampling point is greater than the preset brightness threshold, then the first target color sampling point, the second target color sampling point, the third target color sampling point and the fourth target color sampling point are set at each vertex of the audio playback interface.
[0160] In this embodiment of the disclosure, it is determined whether the brightness of each candidate color sampling point is greater than a preset brightness threshold. If it is determined that the brightness of each candidate color sampling point is greater than the preset brightness threshold, then it is determined that the brightness of the album cover image is too bright. The first target color sampling point is set at the top left corner of the audio playback interface, the second target color sampling point is set at the bottom right corner of the audio playback interface, the third target color sampling point is set at the top right corner of the audio playback interface, and the fourth target color sampling point is set at the bottom left corner of the audio playback interface.
[0161] For example, see Figure 8 As shown, this is a schematic diagram of the first background in an embodiment of this disclosure. The first target color sampling point ① is set at point a on the audio playback interface, the second target color sampling point ④ is set at point d on the audio playback interface, the third target color sampling point ② is set at point b on the audio playback interface, and the fourth target color sampling point ③ is set at point c on the audio playback interface. The above four target color sampling points are radially gradually transitioned, and their positions are slowly moved one circle every 80 seconds.
[0162] The second scenario: The album cover image is too dark.
[0163] Specifically, if it is determined that the brightness of each candidate color sampling point is not greater than the brightness threshold, then the second target color sampling point, the third target color sampling point, and the fourth target color sampling point are set at each vertex of the audio playback interface.
[0164] In the embodiments of the present disclosure, it is determined whether the brightness of each candidate color picking point is greater than the preset brightness threshold value respectively, and if it is determined that the brightness of each candidate color picking point is not all greater than the preset brightness threshold value, it is determined that the brightness of the album cover image is dark, the second target color picking point is arranged at the top left corner vertex and the bottom right corner vertex of the audio playing interface, the third target color picking point is arranged at the top right corner vertex of the audio playing interface, and the fourth target color picking point is arranged at the bottom left corner vertex of the audio playing interface.
[0165] For example, referring to FIG. 2, which is a second background schematic diagram in the embodiments of the present disclosure, the second target color picking point ④ is arranged at the points a and d of the audio playing interface, the third target color picking point ② is arranged at the point b of the audio playing interface, the fourth target color picking point ③ is arranged at the point c of the audio playing interface, and radial gradient transition is performed between the above three target color picking points, and the position is slowly moved once every 80 seconds. Figure 9
[0166] A32: The first target color picking point, the second target color picking point, the third target color picking point and the fourth target color picking point are randomly arranged in the audio playing interface respectively, and the first target color picking point, the second target color picking point, the third target color picking point and the fourth target color picking point are controlled to move according to the rhythm information of the audio data, to generate the second dynamic background layer.
[0167] In the embodiments of the present disclosure, the color values of the first target color picking point, the second target color picking point, the third target color picking point and the fourth target color picking point are obtained, and the first target color picking point, the second target color picking point, the third target color picking point and the fourth target color picking point are randomly arranged in the audio playing interface respectively, and the above four target color picking points are controlled to move randomly in the audio playing interface, and the moving speed changes following the rhythm information of the audio data, to obtain the second dynamic background layer.
[0168] For example, a layer of four-color gradient is newly created, the color values of the first target color picking point, the second target color picking point, the third target color picking point and the fourth target color picking point are obtained, the first target color picking point is named as x, and the first target color picking point, the second target color picking point, the third target color picking point and the fourth target color picking point are randomly moved in the audio playing interface, and the moving speed changes according to the speed of the rhythm information of the audio data.
[0169] Further, in the embodiments of the present disclosure, the brightness of the first target color picking point can also be changed, and the specific process is as follows:
[0170] M1: determining the difference between the brightness of the first target color picking point and the preset minimum brightness value.
[0171] In the embodiments of the present disclosure, the brightness of the first target color picking point is subtracted by the minimum brightness value, to obtain the difference between the brightness of the first target color picking point and the preset minimum brightness value.
[0172] M2: Based on the rhythm information of the audio data, the brightness of the first target color point is changed accordingly within the range of the difference to the brightness of the first target color point.
[0173] In this embodiment of the disclosure, the brightness of the first target color point is varied within the range of the determined difference to the brightness of the first target color point, wherein the trend of brightness variation is determined with the rhythm information of the audio data.
[0174] For example, see Figure 10 The diagram shown is a waveform change diagram in an embodiment of this disclosure. In the audio playback interface, the first target color point is x, and the color value V of x is set to the value between the value of the first target color point minus 20% and the value of the first target color point, corresponding to the waveform height of the mapped audio data. During the playback of the audio data, the value of x changes accordingly with the rhythm information of the audio data. Figure 10 In the audio waveform, the brightness of x is 99%. Therefore, the color of x corresponding to the highest point of the audio waveform is [H:70°S:2%V:99%], and the color of x corresponding to the lowest point of the audio waveform is [H:70°S:2%V:79%].
[0175] A33: Overlay the first and second dynamic background layers to control the brightness and darkness of the background color of the audio playback interface.
[0176] In this embodiment of the disclosure, after the first dynamic background layer and the second dynamic background layer are superimposed, the superposition mode is set to brighten, thereby controlling the background color of the audio playback interface to change in brightness.
[0177] See Figure 11 As shown, this is a schematic diagram of the third background in an embodiment of this disclosure. The overlay mode of the first dynamic background layer and the second dynamic background layer is set to brighten, resulting in a flowing gradient background, that is, the background color changes in brightness.
[0178] Furthermore, in this embodiment of the present disclosure, in order to avoid the background of the audio playback interface being too bright and affecting the viewing of the audio playback interface, a black layer with preset transparency can also be created on the audio playback interface.
[0179] It should be noted that the transparency of the newly created black layer can be, for example, 35%, and this disclosure does not limit this aspect.
[0180] Furthermore, in this embodiment of the disclosure, a virtual record with preset transparency can also be displayed, for example, see [reference]. Figure 12As shown in the figure, the transparent virtual record in the embodiment of the present disclosure is a schematic diagram of a virtual record in the middle of the audio playing interface. The conventional album cover image and the black record outer circle are replaced by the album cover image and the virtual record with a preset transparency. In this way, the virtual record with the preset transparency can make the audio playing interface appear transparent and light, and the semi-transparent style can make the background flow change more fully displayed.
[0181] It should be noted that the preset transparency in the embodiment of the present disclosure may be 60%, for example, and is not limited thereto.
[0182] In the embodiment of the present disclosure, by controlling the rotation angle of the virtual record needle to follow the real-time rotation of the audio data playing, the audio playing progress can be viewed in real time from the audio playing interface. In addition, by the method in the embodiment of the present disclosure, the dynamic gradient background and the album cover image tone can be unified and the visual perception can be coordinated, and the background color can be changed according to the rhythm of the audio data.
[0183] Exemplary device
[0184] After introducing the method of the exemplary embodiment of the present disclosure, the audio playing interface display device of the exemplary embodiment of the present disclosure is introduced.
[0185] As Figure 13 shown, it is a structural schematic diagram of the audio playing interface display device provided by the embodiment of the present disclosure. In one embodiment, the audio playing interface at least includes a virtual record needle and a virtual record, and the audio playing interface display device 130 includes a determination module 1301, a processing module 1302 and a control module 1303.
[0186] The determination module 1301 is configured to determine the rotation angle of the virtual record needle in response to a playing operation of the audio data.
[0187] The processing module 1302 is configured to control the virtual record needle to rotate to a target position in the record needle moving area of the virtual record based on the rotation angle.
[0188] Optionally, when determining the rotation angle of the virtual record needle, the determination module 1301 is further configured to:
[0189] determine a playing time length ratio of the audio data, wherein the playing time length ratio represents a ratio between a current playing time length of the audio data and a total time length of the audio data;
[0190] determine the rotation angle of the virtual record needle based on the playing time length ratio.
[0191] Optionally, the processing module 1302 is further configured to:
[0192] based on the rotation angle, taking one end of the virtual needle as an anchor point, controlling the virtual needle to rotate from a current position to a target position in a needle moving area of the virtual record.
[0193] Optionally, when determining the playback duration ratio of the audio data, the determining module 1301 is further configured to:
[0194] based on the current position of the virtual playback progress control, determining a current playback duration;
[0195] based on the current playback duration and a total duration of the audio data, determining a playback duration ratio of the audio data.
[0196] Optionally, the processing module 1302 is further configured to:
[0197] in response to a pause playback operation for the audio data, controlling the virtual needle to rotate from the current position to a set position outside the needle moving area.
[0198] Optionally, the processing module 1302 is further configured to:
[0199] in response to a playback operation for the audio data, controlling the virtual needle to rotate from the set position to the current position.
[0200] Optionally, the virtual record further comprises a cover display area, and the apparatus further comprises:
[0201] a control module 1303 configured to: unify a background color of the audio playback interface with a color tone of the cover display area, and control the background color of the audio playback interface to change in brightness.
[0202] Optionally, the control module 1303 is further configured to:
[0203] based on color attribute information of an album cover image displayed in the cover display area, determining each target color point of the audio playback interface, wherein the color corresponding to each target color point is unified with the color tone of the cover display area;
[0204] based on the each target color point, determining the background color of the audio playback interface;
[0205] based on rhythm information of the audio data and the each target color point, controlling the background color to change in brightness.
[0206] Optionally, when determining the each target color point of the audio playback interface based on the color attribute information of the album cover image displayed in the cover display area, the control module 1303 is further configured to:
[0207] determine a color extraction mode corresponding to the album cover image based on the color attribute information of the album cover image;
[0208] determine target color sampling points satisfying each preset color extraction condition from each candidate color sampling point included in the album cover image based on the color extraction mode, wherein the target color sampling points are used to determine a background color having color similarity with the album cover image.
[0209] Optionally, the color attribute information at least includes hue, and the control module 1303 is further configured to:
[0210] if it is determined that the total number of candidate color sampling points in the same hue range in each candidate color sampling point included in the album cover image is not greater than a preset quantity threshold, determine that the color extraction mode corresponding to the album cover image is a multi-hue extraction mode;
[0211] if it is determined that the total number is greater than the preset quantity threshold, determine that the color extraction mode corresponding to the album cover image is a single-hue extraction mode;
[0212] if it is determined that each candidate color sampling point included in the album cover image is the same hue, determine that the color extraction mode corresponding to the album cover image is a pure color extraction mode.
[0213] Optionally, the color extraction mode is a multi-hue extraction mode, the color attribute information further includes lightness and saturation, and the control module 1303 is further configured to:
[0214] take the candidate color sampling point with the highest lightness in the candidate color sampling points as a first target color sampling point;
[0215] take the candidate color sampling point with the lowest lightness in the candidate color sampling points as a second target color sampling point;
[0216] determine candidate color sampling points whose numerical sum of lightness and saturation satisfies a preset numerical condition from a preset number of hue ranges including the most candidate color sampling points, to obtain a third target color sampling point and a fourth target color sampling point.
[0217] Optionally, when the candidate color sampling points whose numerical sum of lightness and saturation satisfies a preset numerical condition are determined from a preset number of hue ranges including the most candidate color sampling points to obtain a third target color sampling point and a fourth target color sampling point, the control module 1303 is further configured to:
[0218] determine a hue range to which each candidate color point belongs, and obtain a quantity of candidate color points contained in each hue range;
[0219] determine a first hue range and a second hue range with the largest quantity from the hue ranges;
[0220] determine a candidate color point with the highest sum of lightness and saturation in the first hue range as a third target color point;
[0221] determine a candidate color point with the highest sum of lightness and saturation in the second hue range as a fourth target color point.
[0222] Optionally, the color extraction mode is a single-hue extraction mode, and the color attribute information further includes lightness. When the target color points satisfying the preset color extraction conditions are determined from the candidate color points contained in the album cover image based on the color extraction mode, the control module 1303 is further configured to:
[0223] determine a candidate color point with the highest lightness from the candidate color points as a first target color point;
[0224] determine a candidate color point with the lowest lightness from the candidate color points as a second target color point;
[0225] determine a lightness difference between the first target color point and the second target color point;
[0226] determine a third target color point from the candidate color points based on a first lightness product between the lightness difference and a preset first lightness coefficient;
[0227] determine a fourth target color point from the candidate color points based on a second lightness product between the lightness difference and a preset second lightness coefficient, wherein the first lightness coefficient is greater than the second lightness coefficient.
[0228] Optionally, the color extraction mode is a pure color extraction mode, and the color attribute information further includes lightness. When the target color points satisfying the preset color extraction conditions are determined from the candidate color points contained in the album cover image based on the color extraction mode, the control module 1303 is further configured to:
[0229] obtain a first target color point and a second target color point based on a third lightness product between the lightness of any candidate color point and a preset third lightness coefficient, wherein the first target color point and the second target color point have the same lightness;
[0230] obtain a third target color point and a fourth target color point based on a fourth lightness product between the lightness of the arbitrary candidate color point and a fourth lightness coefficient, wherein the third target color point and the fourth target color point have the same lightness, and the third lightness coefficient is greater than the fourth lightness coefficient.
[0231] Optionally, when obtaining the first target color point and the second target color point, the control module 1303 is further configured to:
[0232] If it is determined that the third lightness product is less than a preset product threshold, obtain a preset minimum lightness.
[0233] Obtain the first target color point and the second target color point based on the minimum lightness.
[0234] Optionally, when controlling the background color to change in brightness based on the rhythm information of the audio data and the target color points, the control module 1303 is further configured to:
[0235] respectively set the first target color point, the second target color point, the third target color point, and the fourth target color point at corresponding target positions in the audio playing interface, and control the first target color point, the second target color point, the third target color point, and the fourth target color point to move in a preset moving manner to generate a first dynamic background layer.
[0236] respectively randomly set the first target color point, the second target color point, the third target color point, and the fourth target color point in the audio playing interface, and control the first target color point, the second target color point, the third target color point, and the fourth target color point to move according to the rhythm information of the audio data to generate a second dynamic background layer.
[0237] Superimpose the first dynamic background layer and the second dynamic background layer to control the background color of the audio playing interface to change in brightness.
[0238] Optionally, when respectively setting the first target color point, the second target color point, the third target color point, and the fourth target color point at corresponding target positions in the audio playing interface, the control module 1303 is further configured to:
[0239] If it is determined that the lightness of each candidate color point is greater than a preset lightness threshold, respectively set the first target color point, the second target color point, the third target color point, and the fourth target color point at each vertex of the audio playing interface.
[0240] If it is determined that the luminance of each candidate color picking point is not greater than the luminance threshold value, the second target color picking point, the third target color picking point and the fourth target color picking point are respectively arranged at each vertex of the audio playing interface.
[0241] Optionally, after the first target color picking point, the second target color picking point, the third target color picking point and the fourth target color picking point are respectively randomly arranged in the audio playing interface, the control module 1303 is further configured to:
[0242] determine a difference between the luminance of the first target color picking point and a preset minimum luminance value;
[0243] based on the rhythm information of the audio data, the luminance of the first target color picking point is changed within the difference and the luminance of the first target color picking point.
[0244] Optionally, the control module 1303 is further configured to:
[0245] create a black layer with a preset transparency on the audio playing interface.
[0246] Optionally, the control module 1303 is further configured to:
[0247] display a virtual record with a preset transparency.
[0248] The audio playing interface display device provided by the embodiments of the present disclosure adopts the same inventive concept as the audio playing interface display method described above, and can achieve the same beneficial effects, which will not be described here.
[0249] Based on the same inventive concept as the audio playing interface display method described above, the embodiments of the present disclosure further provide an electronic device. As shown in Figure 14 the electronic device 140 can include a processor 1401 and a memory 1402.
[0250] The processor 1401 can be a general processor, such as a central processing unit (CPU), a digital signal processor (DSP), an application specific integrated circuit (ASIC), a field programmable gate array (FPGA) or other programmable logic device, a discrete gate or transistor logic, a discrete hardware component, and can implement or execute the methods, steps and logical block diagrams disclosed in the embodiments of the present disclosure. The general processor can be a microprocessor or any conventional processor. The steps of the method disclosed in combination with the embodiments of the present disclosure can be directly embodied as hardware processor execution or executed by a combination of hardware and software modules in the processor.
[0251] The memory 1402 is a non-volatile computer readable storage medium, which can be used to store non-volatile software programs, non-volatile computer executable programs and modules. The memory can include at least one type of storage medium, such as flash memory, hard disk, multimedia card, card type memory, random access memory (RAM), static random access memory (SRAM), programmable read only memory (PROM), read only memory (ROM), electrically erasable programmable read only memory (EEPROM), magnetic storage, magnetic disk, optical disk, etc. The memory is any other medium capable of carrying or storing desired program code in the form of instructions or data structures and accessible by a computer, but is not limited thereto. The memory 1402 in the embodiments of the present disclosure can also be a circuit or any other device capable of realizing the storage function, used for storing program instructions and / or data.
[0252] Exemplary program product
[0253] The embodiments of the present disclosure provide a computer readable storage medium for storing computer program instructions for the above-mentioned electronic device, which includes a program for executing the audio playing interface display method in any example embodiment of the present disclosure.
[0254] The computer storage medium can be any available medium or data storage that can be accessed by a computer and includes both volatile and non-volatile media, removable and non-removable media. By way of example, and not limitation, computer storage media can be implemented in connection with "10055" magnetic systems, magnetic tape, magnetic disk storage, "10055" optical storage, memory, such as semiconductor or solid state memory, expanded memory, such as flash memory or other memory technology, or "10055" electrical, optical, chemical or other systems that are suitable for storing data.
[0255] In some possible embodiments, various aspects of the present disclosure can also be implemented as a computer program product, which includes a program code that causes a server device to perform the steps of the audio playing interface display method according to various exemplary embodiments of the present disclosure described in the above "Exemplary Methods" section of the present specification when the computer program product is run on the server device.
[0256] The computer program product can take any combination of one or more computer-readable media. The computer-readable medium can be a computer-readable signal medium or a computer-readable storage medium. The computer-readable storage medium can be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any suitable combination of the above. More specific examples (a non-exhaustive list) of the computer-readable storage medium include an electrical connection having one or more wires, a portable disc, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above.
[0257] The computer program product for an instant messaging application according to the embodiments of the present disclosure can take a portable compact disc read-only memory (CD-ROM) and include a program code, and can be run on a server device. However, the program product of the present disclosure is not limited thereto, and in the present document, the computer-readable storage medium can be any tangible medium containing or storing a program that can be used by or in conjunction with an instruction execution system, apparatus, or device.
[0258] The computer-readable signal medium can include a data signal that is propagated in baseband or that is propagated as part of a carrier wave. Such propagated data signals can take a wide variety of forms, including but not limited to electro-magnetic signals, optical signals, or any suitable combination thereof. The computer-readable signal medium can also be any computer-readable medium that is not a storage medium and that can communicate, propagate, or transport programming for use by or in connection with an instruction execution system, apparatus, or device.
[0259] The program code embodied on the computer readable medium can be transmitted using any appropriate medium, including but not limited to wireless, wired, optical fiber cable, RF, etc., or any suitable combination of the foregoing.
[0260] Program code implementing the methods of the present disclosure can be written in any combination of one or more programming languages, including an object oriented programming language such as Java, C++, or the like, and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code can execute entirely on the user's computing device, partly on the user's computing device, as a stand-alone software package, partly on the user's computing device and partly on a remote computing device or entirely on the remote computing device or server. In the latter scenario, the remote computing device can be connected to the user's computing device through any type of network, including a local area network (LAN) or a wide area network (WAN), or the connection can be made to an external computing device, such as through the Internet using an Internet Service Provider.
[0261] It should be noted that, although several units or sub-units of the apparatus are mentioned in the above detailed description, such division is merely exemplary and not mandatory. In practice, according to an embodiment of the present disclosure, features and functions of two or more units described above can be embodied in one unit. Conversely, features and functions of one unit described above can be further divided into units for embodiment.
[0262] Moreover, while operations of the methods of the present disclosure are described in a particular order in the drawings, this is not required or implied, and the desired results can be achieved without performing all of the operations shown, or performing the operations in the particular order shown. Additionally or alternatively, certain steps can be omitted, combined, performed in a different order, and / or split into multiple steps.
[0263] While the principles and spirit of the present disclosure have been described with reference to several specific embodiments, it is to be understood that the present disclosure is not limited to the specific embodiments disclosed and that the division of aspects is not meant to imply that features from one aspect cannot be combined with features from another aspect to advantage. The present disclosure is intended to cover various modifications and equivalent arrangements included within the spirit and scope of the claims.
Claims
1. An audio playback interface presentation method, characterized by, The audio playing interface at least includes a virtual needle and a virtual record, and the method comprises: In response to a playing operation on the audio data, a rotation angle of the virtual needle is determined; Based on the rotation angle, the virtual needle is controlled to rotate to a target position in a needle moving area of the virtual record; The virtual record further includes a cover display area; based on color attribute information of an album cover image displayed in the cover display area, target color sampling points of the audio playing interface are determined, wherein the colors corresponding to the target color sampling points are unified with the color tone of the cover display area; based on the target color sampling points, a background color of the audio playing interface is determined; wherein the target color sampling points include a first target color sampling point, a second target color sampling point, a third target color sampling point, and a fourth target color sampling point; the first target color sampling point, the second target color sampling point, the third target color sampling point, and the fourth target color sampling point are respectively arranged at corresponding target positions in the audio playing interface, and are controlled to move in a preset moving manner, to generate a first dynamic background layer; the first target color sampling point, the second target color sampling point, the third target color sampling point, and the fourth target color sampling point are respectively randomly arranged in the audio playing interface, and are controlled to move according to rhythm information of the audio data, to generate a second dynamic background layer; the first dynamic background layer and the second dynamic background layer are superimposed, to control the background color of the audio playing interface to change in brightness.
2. The method of claim 1, wherein, The determination of the rotation angle of the virtual needle comprises: A playing duration ratio of the audio data is determined, wherein the playing duration ratio represents a ratio between a current playing duration of the audio data and a total duration of the audio data; Based on the playing duration ratio, the rotation angle of the virtual needle is determined.
3. The method of claim 1, wherein, Based on the rotation angle, the virtual needle is controlled to rotate to a target position in a needle moving area of the virtual record, comprising: Based on the rotation angle, with one end of the virtual needle as an anchor point, the virtual needle is controlled to rotate from a current position to a target position in the needle moving area of the virtual record.
4. The method of claim 2, wherein, The determination of the playing duration ratio of the audio data comprises: A current playing duration is determined based on a current position of a virtual playing progress control; Based on the current playing duration and a total duration of the audio data, the playing duration ratio of the audio data is determined.
5. The method of claim 1, wherein, The method further comprises: In response to a pause playing operation on the audio data, the virtual needle is controlled to rotate from a current position to a set position outside the needle moving area.
6. The method of claim 5, wherein, The method further comprises: In response to a playing operation on the audio data, the virtual needle is controlled to rotate from the set position to the current position.
7. The method of claim 1, wherein, The color attribute information of the album cover image displayed in the cover display area is used to determine target color sampling points of the audio playing interface, including: Based on the color attribute information of the album cover image, a color extraction mode corresponding to the album cover image is determined; Based on the color extraction mode, target color sampling points meeting preset color extraction conditions are determined from each candidate color sampling point included in the album cover image, wherein the target color sampling points are used to determine a background color having color similarity with the album cover image.
8. The method of claim 7, wherein, The color attribute information at least includes hue, and the color extraction mode corresponding to the album cover image is determined based on the color attribute information of the album cover image, including: If the total number of candidate color sampling points in the same hue range in each candidate color sampling point included in the album cover image is not greater than a preset quantity threshold, it is determined that the color extraction mode corresponding to the album cover image is a multi-hue extraction mode; If the total number is greater than the preset quantity threshold, it is determined that the color extraction mode corresponding to the album cover image is a single-hue extraction mode; If each candidate color sampling point included in the album cover image is the same hue, it is determined that the color extraction mode corresponding to the album cover image is a pure color extraction mode.
9. The method of claim 8, wherein, The color extraction mode is a multi-hue extraction mode, the color attribute information further includes lightness and saturation, and the target color sampling points meeting the preset color extraction conditions are determined from each candidate color sampling point included in the album cover image based on the color extraction mode, including: The candidate color sampling point with the highest lightness in the candidate color sampling points is taken as a first target color sampling point; The candidate color sampling point with the lowest lightness in the candidate color sampling points is taken as a second target color sampling point; The candidate color sampling points whose lightness and saturation value sums meet preset value conditions are determined from the preset number of hue ranges containing the most candidate color sampling points, to obtain third and fourth target color sampling points.
10. The method of claim 9, wherein, The candidate color sampling points whose lightness and saturation value sums meet preset value conditions are determined from the preset number of hue ranges containing the most candidate color sampling points, to obtain third and fourth target color sampling points, including: Hue ranges to which each candidate color sampling point belongs are determined, to obtain the number of candidate color sampling points included in each hue range; The first and second hue ranges with the most candidate color sampling points are determined from the hue ranges; The candidate color sampling point with the highest lightness and saturation value sum in the first hue range is taken as a third target color sampling point; The candidate color sampling point with the highest lightness and saturation value sum in the second hue range is taken as a fourth target color sampling point.
11. The method of claim 8, wherein, The color extraction mode is a single-hue extraction mode, the color attribute information further includes lightness, and the target color sampling points meeting the preset color extraction conditions are determined from each candidate color sampling point included in the album cover image based on the color extraction mode, including: determining a candidate color point with the highest lightness as a first target color point from the candidate color points; determining a candidate color point with the lowest lightness as a second target color point from the candidate color points; determining a lightness difference between the first target color point and the second target color point; determining a third target color point from the candidate color points based on a first lightness product between the lightness difference and a preset first lightness coefficient; determining a fourth target color point from the candidate color points based on a second lightness product between the lightness difference and a preset second lightness coefficient, wherein the first lightness coefficient is greater than the second lightness coefficient.
12. The method of claim 8, wherein, The color extraction mode is a solid color extraction mode, and the color attribute information further includes lightness. The target color points satisfying the preset color extraction conditions are determined from the candidate color points included in the album cover image based on the color extraction mode, including: obtaining a first target color point and a second target color point based on a third lightness product between the lightness of any candidate color point and a preset third lightness coefficient, wherein the first target color point and the second target color point have the same lightness; obtaining a third target color point and a fourth target color point based on a fourth lightness product between the lightness of the any candidate color point and a preset fourth lightness coefficient, wherein the third target color point and the fourth target color point have the same lightness, and the third lightness coefficient is greater than the fourth lightness coefficient.
13. The method of claim 12, wherein, The first target color point and the second target color point are obtained by: if it is determined that the third lightness product is less than a preset product threshold, obtaining a preset lowest lightness; obtaining the first target color point and the second target color point based on the lowest lightness.
14. The method according to any one of claims 7 to 13, wherein, The first target color point, the second target color point, the third target color point and the fourth target color point are respectively arranged at corresponding target positions in the audio playing interface, including: if it is determined that the lightness of each candidate color point is greater than a preset lightness threshold, the first target color point, the second target color point, the third target color point and the fourth target color point are respectively arranged at each vertex of the audio playing interface; if it is determined that the lightness of each candidate color point is not greater than the lightness threshold, the second target color point, the third target color point and the fourth target color point are respectively arranged at each vertex of the audio playing interface.
15. The method of any one of claims 1-13, wherein, After the first target color point, the second target color point, the third target color point and the fourth target color point are randomly arranged in the audio playing interface, the method further includes: determining a difference between the lightness of the first target color point and a preset lowest lightness value; based on the rhythm information of the audio data, the lightness of the first target color point is changed within the difference and the lightness of the first target color point.
16. The method of any one of claims 1-13, wherein, The method further includes: creating a black layer with a preset transparency on the audio playing interface.
17. The method of claim 1, wherein, The method further includes: displaying a virtual record with a preset transparency.
18. An audio playback interface presentation device, comprising: An audio playing interface includes at least a virtual stylus and a virtual record, and the device includes: A determination module configured to determine a rotation angle of the virtual stylus in response to a playing operation of audio data; A processing module configured to control the virtual stylus to rotate to a target position in a stylus moving area of the virtual record based on the rotation angle. The virtual record further includes a cover display area, and the device further includes: A control module configured to determine target color sampling points of the audio playing interface based on color attribute information of an album cover image displayed in the cover display area, wherein the colors corresponding to the target color sampling points are consistent with the color tone of the cover display area; determine a background color of the audio playing interface based on the target color sampling points; wherein the target color sampling points include a first target color sampling point, a second target color sampling point, a third target color sampling point, and a fourth target color sampling point; set the first target color sampling point, the second target color sampling point, the third target color sampling point, and the fourth target color sampling point at corresponding target positions in the audio playing interface, respectively, and control the first target color sampling point, the second target color sampling point, the third target color sampling point, and the fourth target color sampling point to move in a preset moving manner to generate a first dynamic background layer; randomly set the first target color sampling point, the second target color sampling point, the third target color sampling point, and the fourth target color sampling point in the audio playing interface, respectively, and control the first target color sampling point, the second target color sampling point, the third target color sampling point, and the fourth target color sampling point to move according to rhythm information of the audio data to generate a second dynamic background layer; and superimpose the first dynamic background layer and the second dynamic background layer to control the background color of the audio playing interface to change in brightness.
19. The apparatus of claim 18, wherein, When determining the rotation angle of the virtual stylus, the determination module is configured to: Determine a playing duration ratio of the audio data, wherein the playing duration ratio represents a ratio between a current playing duration of the audio data and a total duration of the audio data; Determine the rotation angle of the virtual stylus based on the playing duration ratio.
20. The apparatus of claim 18, wherein, When controlling the virtual stylus to rotate to a target position in a stylus moving area of the virtual record based on the rotation angle, the processing module is configured to: Based on the rotation angle, control the virtual stylus to rotate from a current position to a target position in the stylus moving area of the virtual record with one end of the virtual stylus as an anchor point.
21. The apparatus of claim 19, wherein, When determining the playing duration ratio of the audio data, the determination module is configured to: Determine a current playing duration based on a current position of a virtual playing progress control; Determine the playing duration ratio of the audio data based on the current playing duration and a total duration of the audio data.
22. The apparatus of claim 18, wherein, The processing module is further configured to: In response to a pause playing operation of the audio data, control the virtual stylus to rotate from a current position to a set position outside the stylus moving area.
23. The apparatus of claim 22, wherein, The processing module is further configured to: In response to a play operation for the audio data, the virtual stylus is controlled to rotate from the set position to the current position.
24. The apparatus of claim 18, wherein, In a process of determining the target color sampling points of the audio playing interface based on the color attribute information of the album cover image displayed in the cover display area, the control module is further configured to: determine a color extraction mode corresponding to the album cover image based on the color attribute information of the album cover image; determine the target color sampling points from the candidate color sampling points in the album cover image based on the color extraction mode, wherein the target color sampling points are used to determine the background color having color similarity with the album cover image.
25. The apparatus of claim 24, wherein, The color attribute information at least includes hue, and in a process of determining the color extraction mode corresponding to the album cover image based on the color attribute information of the album cover image, the control module is further configured to: if it is determined that the total number of the candidate color sampling points in the same hue range in the candidate color sampling points in the album cover image is not greater than a preset quantity threshold, determine that the color extraction mode corresponding to the album cover image is a multi-hue extraction mode; if it is determined that the total number is greater than the preset quantity threshold, determine that the color extraction mode corresponding to the album cover image is a single-hue extraction mode; if it is determined that all the candidate color sampling points in the album cover image are the same hue, determine that the color extraction mode corresponding to the album cover image is a pure color extraction mode.
26. The apparatus of claim 25, wherein, The color extraction mode is a multi-hue extraction mode, the color attribute information further includes lightness and saturation, and in a process of determining the target color sampling points from the candidate color sampling points in the album cover image based on the color extraction mode, the control module is further configured to: take the candidate color sampling point with the highest lightness as a first target color sampling point; take the candidate color sampling point with the lowest lightness as a second target color sampling point; determine the candidate color sampling points from the preset number of hue ranges containing the largest number of candidate color sampling points, and obtain third target color sampling points and fourth target color sampling points, respectively, based on the condition that the sum of the values of the lightness and the saturation satisfies a preset value condition.
27. The apparatus of claim 26, wherein, In a process of determining the third target color sampling points and the fourth target color sampling points from the preset number of hue ranges containing the largest number of candidate color sampling points, respectively, based on the condition that the sum of the values of the lightness and the saturation satisfies a preset value condition, the control module is further configured to: determine the hue ranges to which the candidate color sampling points belong, respectively, and obtain the number of the candidate color sampling points contained in each hue range; determine a first hue range and a second hue range with the largest number of candidate color sampling points from the hue ranges; take the candidate color sampling point with the highest sum of the values of the lightness and the saturation in the first hue range as the third target color sampling point; take the candidate color sampling point with the highest sum of the values of the lightness and the saturation in the second hue range as the fourth target color sampling point.
28. The apparatus of claim 25, wherein, The color extraction mode is a single hue extraction mode, the color attribute information further comprises a lightness, and when the target color sampling points satisfying the preset color extraction conditions are determined from the candidate color sampling points included in the album cover image based on the color extraction mode, the control module is further configured to: take the candidate color sampling point with the highest lightness as a first target color sampling point; take the candidate color sampling point with the lowest lightness as a second target color sampling point; determine a lightness difference between the first target color sampling point and the second target color sampling point; determine a third target color sampling point from the candidate color sampling points based on a first lightness product between the lightness difference and a preset first lightness coefficient; determine a fourth target color sampling point from the candidate color sampling points based on a second lightness product between the lightness difference and a preset second lightness coefficient, wherein the first lightness coefficient is greater than the second lightness coefficient.
29. The apparatus of claim 25, wherein, The color extraction mode is a pure color extraction mode, the color attribute information further comprises a lightness, and when the target color sampling points satisfying the preset color extraction conditions are determined from the candidate color sampling points included in the album cover image based on the color extraction mode, the control module is further configured to: obtain a first target color sampling point and a second target color sampling point based on a third lightness product between the lightness of any candidate color sampling point and a preset third lightness coefficient, wherein the first target color sampling point and the second target color sampling point have the same lightness; obtain a third target color sampling point and a fourth target color sampling point based on a fourth lightness product between the lightness of the any candidate color sampling point and a preset fourth lightness coefficient, wherein the third target color sampling point and the fourth target color sampling point have the same lightness, and the third lightness coefficient is greater than the fourth lightness coefficient.
30. The apparatus of claim 29, wherein, When the first target color sampling point and the second target color sampling point are obtained, the control module is configured to: if it is determined that the third lightness product is less than a preset product threshold, obtain a preset lowest lightness; obtain the first target color sampling point and the second target color sampling point based on the lowest lightness.
31. The apparatus of any one of claims 24-30, wherein, When the first target color sampling point, the second target color sampling point, the third target color sampling point and the fourth target color sampling point are respectively arranged at the corresponding target positions in the audio playing interface, the control module is further configured to: if it is determined that the lightness of each candidate color sampling point is greater than a preset lightness threshold, the first target color sampling point, the second target color sampling point, the third target color sampling point and the fourth target color sampling point are respectively arranged at each vertex of the audio playing interface; if it is determined that the lightness of each candidate color sampling point is not greater than the lightness threshold, the second target color sampling point, the third target color sampling point and the fourth target color sampling point are respectively arranged at each vertex of the audio playing interface.
32. The apparatus of any one of claims 18-30, wherein, After the first target color sampling point, the second target color sampling point, the third target color sampling point and the fourth target color sampling point are randomly arranged in the audio playing interface, the control module is further configured to: determine a difference between the lightness of the first target color taking point and a preset minimum lightness value; based on the rhythm information of the audio data, change the lightness of the first target color taking point within the difference to the lightness of the first target color taking point.
33. The apparatus of any one of claims 18-30, wherein, The control module in the device is further configured to: create a black layer with a preset transparency on the audio playing interface.
34. The apparatus of claim 18, wherein, The control module is further configured to: display a virtual record with a preset transparency.
35. An electronic device comprising a memory, a processor, and a computer program stored on the memory and executable on the processor, wherein the computer program comprises instructions for: The processor implements the steps of the method in any one of claims 1-17 when executing the program.
36. A computer readable storage medium having stored thereon a computer program, characterized in that: The computer program implements the steps of the method in any one of claims 1-17 when executed by the processor.
Citation Information
Patent Citations
Dynamic color determination for user interface components of a video player
CN108353212A
Interface display method and device and storage medium
CN110609649A
Play control method and device, electronic equipment and computer readable storage medium
CN112035686A
Audio processing method and device
CN113590076A