CN109032492B - Song cutting method and device - Google Patents

Song cutting method and device Download PDF

Info

Publication number
CN109032492B
CN109032492B CN201810846280.6A CN201810846280A CN109032492B CN 109032492 B CN109032492 B CN 109032492B CN 201810846280 A CN201810846280 A CN 201810846280A CN 109032492 B CN109032492 B CN 109032492B
Authority
CN
China
Prior art keywords
song
image
theme color
display interface
image control
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201810846280.6A
Other languages
Chinese (zh)
Other versions
CN109032492A (en
Inventor
王伟
张晓光
陈定伟
李伟
孙观楠
周戈
韩延杰
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Tencent Music Entertainment Technology Shenzhen Co Ltd
Original Assignee
Tencent Music Entertainment Technology Shenzhen Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Tencent Music Entertainment Technology Shenzhen Co Ltd filed Critical Tencent Music Entertainment Technology Shenzhen Co Ltd
Priority to CN201810846280.6A priority Critical patent/CN109032492B/en
Publication of CN109032492A publication Critical patent/CN109032492A/en
Application granted granted Critical
Publication of CN109032492B publication Critical patent/CN109032492B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/01Input arrangements or combined input and output arrangements for interaction between user and computer
    • G06F3/048Interaction techniques based on graphical user interfaces [GUI]
    • G06F3/0487Interaction techniques based on graphical user interfaces [GUI] using specific features provided by the input device, e.g. functions controlled by the rotation of a mouse with dual sensing arrangements, or of the nature of the input device, e.g. tap gestures based on pressure sensed by a digitiser
    • G06F3/0488Interaction techniques based on graphical user interfaces [GUI] using specific features provided by the input device, e.g. functions controlled by the rotation of a mouse with dual sensing arrangements, or of the nature of the input device, e.g. tap gestures based on pressure sensed by a digitiser using a touch-screen or digitiser, e.g. input of commands through traced gestures
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/01Input arrangements or combined input and output arrangements for interaction between user and computer
    • G06F3/048Interaction techniques based on graphical user interfaces [GUI]
    • G06F3/0484Interaction techniques based on graphical user interfaces [GUI] for the control of specific functions or operations, e.g. selecting or manipulating an object, an image or a displayed text element, setting a parameter value or selecting a range

Landscapes

  • Engineering & Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Human Computer Interaction (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Controls And Circuits For Display Device (AREA)
  • User Interface Of Digital Computer (AREA)

Abstract

The invention discloses a method and a device for cutting songs, and belongs to the technical field of terminals. The method comprises the following steps: the method comprises the steps of obtaining sliding operation acting on a display interface of a first song, wherein an information display area of the first song comprises a theme color transition layer and a theme color display layer located below the theme color transition layer; determining a second song and a second theme color according to the moving direction of the display interface of the first song, wherein the second theme color is the theme color of a second image of the second song; switching a first theme color displayed by the theme color display layer to a second theme color, wherein the first theme color is the theme color of a first image of a first song; and setting the transparency value of the first theme color transition layer according to the displacement of the display interface of the first song, and switching the first song into the second song when the second image is completely moved into the current display interface. The invention realizes the transition effect of movement of the display interface and theme color in the song cutting process, enriches the song cutting display forms and increases the flexibility.

Description

Song cutting method and device
Technical Field
The invention relates to the technical field of terminals, in particular to a song cutting method and a song cutting device.
Background
At present, a user generally installs a music application in a mobile phone to meet the demand of listening to songs of the user. Moreover, music applications generally have a song switching function, and a user can conveniently switch a currently played song to a previous song or a next song.
In the related art, a method for switching songs by gestures is provided, when a user wants to switch songs, a sliding operation can be executed on a song display interface, and quick switching is realized by the sliding operation. Specifically, in the process of playing the current song by the intelligent terminal, if an operation of sliding to the left is detected on the display interface of the current song, the current song is switched to the next song of the current song, and the display interface of the next song is displayed, and if an operation of sliding to the right is detected on the display interface of the current song, the current song is switched to the previous song of the current song, and the display interface of the previous song is displayed.
However, the switching mode of the song-cutting mode is single, and the flexibility is low.
Disclosure of Invention
The embodiment of the invention provides a song cutting method and device, which can be used for solving the problems of single song cutting form and low flexibility in the related technology. The technical scheme is as follows:
in a first aspect, a method for cutting songs is provided, and the method is applied to an intelligent terminal, the intelligent terminal includes a display interface of songs, the display interface includes images and information display areas of the songs, and the method includes:
the method comprises the steps of obtaining sliding operation acting on a display interface of a first song, wherein the sliding operation controls the moving direction of the display interface of the first song, and an information display area of the first song comprises a theme color transition layer and a theme color display layer located below the theme color transition layer;
determining a second song and a second theme color according to the moving direction of the display interface of the first song, wherein the second theme color is the theme color of a second image of the second song;
switching a first theme color displayed by the theme color display layer to the second theme color, wherein the first theme color is a theme color of a first image of the first song;
setting a transparency value of the first theme color transition layer according to the displacement of the display interface of the first song, wherein the larger the displacement of the display interface of the first song is, the smaller the transparency value of the first theme color transition layer is;
and when the second image is completely moved into the current display interface, switching the first song into the second song.
Optionally, the sliding operation controls a moving direction of the first image of the first song, and after the obtaining of the sliding operation on the display interface of the first song, the method further includes:
and controlling the first image to gradually move out of the display interface of the first song and controlling the second image to gradually move in according to the sliding operation.
Optionally, the display interface of the first song further includes a map-cutting layer, where the map-cutting layer is used to display image controls corresponding to songs in a song list one to one, and the image controls include images corresponding to the songs;
the controlling the first image to gradually move out of the display interface of the first song and the controlling the second image to gradually move in according to the sliding operation comprises:
determining the displacement of the first image control according to the sliding operation;
determining the offset rate of the first image control according to the displacement of the first image control and the display width of the display interface of the first song;
determining the offset of the first image according to the displacement and the offset rate of the first image control;
and respectively moving the first image out of the display interface and moving the second image in according to the offset of the first image.
Optionally, the determining a shift rate of the first image control according to the displacement of the first image control and the display width of the display interface of the first song includes:
when the sliding direction of the sliding operation is leftward, and the displacement of the first image control is greater than zero and smaller than the display width of the display interface of the first song, determining the offset rate of the first image control according to the ratio of the displacement of the first image control to the display width of the display interface of the first song;
when the sliding direction of the sliding operation is leftward and the displacement of the first image control is equal to the display width of the display interface of the first song, determining a first preset value as the offset rate of the first image control;
correspondingly, the determining the offset of the first image according to the displacement and the offset rate of the first image control includes:
determining a product between a shift rate of the first image control and a displacement of the first image control as a shift amount of the first image.
Optionally, the determining a shift rate of the first image control according to the displacement of the first image control and the display width of the display interface of the first song includes:
when the sliding direction of the sliding operation is rightward, and the displacement of the first image control is larger than zero and smaller than the display width of the display interface of the first song, determining the offset rate of the first image control according to the ratio of a first difference value to the display width of the display interface of the first song, wherein the first difference value is the difference value between the display width of the display interface of the first song and the displacement of the first image control;
when the sliding direction of the sliding operation is rightward and the displacement of the first image control is equal to the display width of the display interface of the first song, determining a second preset value as the offset rate of the first image;
correspondingly, the determining the offset of the first image according to the displacement and the offset rate of the first image control includes:
and determining the product of a second difference value and the displacement of the first image control as the offset of the first image, wherein the second difference value is the difference value between a first preset value and the offset rate of the first image control.
Optionally, the setting the transparency value of the first theme color transition layer according to the displacement of the display interface of the first song includes:
and setting the transparency value of the theme color transition layer according to the offset rate of the first image control.
Optionally, the setting the transparency value of the theme color transition layer according to the offset rate of the first image control includes:
when the sliding direction of the sliding operation is towards the left, setting the transparency value of the theme color transition layer as a difference value between a first preset value and the offset rate of the first image control;
and when the sliding direction of the sliding operation is towards the right, setting the transparency value of the theme color transition layer as the offset rate of the first image control.
Optionally, before setting the transparency value of the theme color transition layer according to the shift rate of the first image control, the method further includes:
obtaining the variable quantity of the transparency value of the theme color transition layer;
and when the variation of the transparency value of the theme color transition layer is smaller than or equal to a third preset value, executing the step of setting the transparency value of the theme color transition layer according to the offset rate of the first image control.
Optionally, after obtaining the variation of the transparency value of the theme color transition layer, the method further includes:
and when the variation of the transparency value of the theme color transition layer is larger than a third preset value, setting the transparency value of the theme color transition layer as an initial value.
Optionally, the determining a second song according to the moving direction of the display interface of the first song includes:
when the moving direction of the display interface of the first song is towards the left, determining a next song of the first song as the second song;
and when the moving direction of the display interface of the first song is towards the right, determining the last song of the first song as the second song.
Optionally, the determining the second theme color includes:
when the second theme color is stored in the local storage space, acquiring the second theme color from the local storage space;
when the second theme color is not stored in the local storage space, acquiring the second image; determining the number of pixel points corresponding to each pixel value interval in a plurality of pixel value intervals, wherein the number of the pixel points corresponding to each pixel value interval refers to the number of the pixel points of which the pixel values are located in each pixel value interval in the pixel points included in the second image; determining a pixel value average value of a plurality of pixel points of which pixel values are located in a second pixel value interval in the pixel points included in the second image, wherein the second pixel value interval refers to the pixel value interval with the largest number of corresponding pixel points in the pixel value intervals; and determining the second theme color according to the pixel value mean value.
In a second aspect, an apparatus for cutting a song is provided, and the apparatus is applied to an intelligent terminal, the intelligent terminal includes a display interface of a song, the display interface includes an image and an information display area of the song, and the apparatus includes:
the device comprises a first acquisition module, a second acquisition module and a display module, wherein the first acquisition module is used for acquiring sliding operation acting on a display interface of a first song, the sliding operation controls the moving direction of the display interface of the first song, and an information display area of the first song comprises a theme color transition layer and a theme color display layer positioned below the theme color transition layer;
the determining module is used for determining a second song and a second theme color according to the moving direction of the display interface of the first song, wherein the second theme color is the theme color of a second image of the second song;
a first switching module, configured to switch a first theme color displayed by the theme color display layer to the second theme color, where the first theme color is a theme color of a first image of the first song;
a first setting module, configured to set a transparency value of the first theme color transition layer according to displacement of the display interface of the first song, where the larger the displacement of the display interface of the first song is, the smaller the transparency value of the first theme color transition layer is;
and the second switching module is used for switching the first song into the second song when the second image is completely moved into the current display interface.
Optionally, the sliding operation controls a moving direction of the first image of the first song, and the apparatus further includes:
and the control module is used for controlling the first image to gradually move out of the display interface of the first song and controlling the second image to gradually move in according to the sliding operation.
Optionally, the display interface of the first song further includes a map-cutting layer, where the map-cutting layer is used to display image controls corresponding to songs in a song list one to one, and the image controls include images corresponding to the songs;
the control module includes:
the first determining unit is used for determining the displacement of the first image control according to the sliding operation;
the second determining unit is used for determining the offset rate of the first image control according to the displacement of the first image control and the display width of the display interface;
a third determining unit, configured to determine an offset of the first image according to the displacement and the offset rate of the first image control;
and the moving unit is used for respectively moving the first image out of the display interface and moving the second image in according to the offset of the first image.
Optionally, the second determining unit is configured to:
when the sliding direction of the sliding operation is leftward, and the displacement of the first image control is larger than zero and smaller than the display width of the display interface, determining the offset rate of the first image control according to the ratio of the displacement of the first image control to the display width of the display interface;
when the sliding direction of the sliding operation is leftward and the displacement of the first image control is equal to the display width of the display interface, determining a first preset value as the offset rate of the first image control;
accordingly, the third determination unit is configured to:
determining a product between a shift rate of the first image control and a displacement of the first image control as a shift amount of the first image.
Optionally, the second determining unit is configured to:
when the sliding direction of the sliding operation is rightward and the displacement of the first image control is larger than zero and smaller than the display width of the display interface, determining the offset rate of the first image control according to the ratio of a first difference value to the display width of the display interface, wherein the first difference value is the difference value between the display width of the display interface and the displacement of the first image control;
when the sliding direction of the sliding operation is rightward and the displacement of the first image control is equal to the display width of the display interface, determining a second preset value as the offset rate of the first image;
accordingly, the third determination unit is configured to:
and determining the product of a second difference value and the displacement of the first image control as the offset of the first image, wherein the second difference value is the difference value between a first preset value and the offset rate of the first image control.
Optionally, the first setting module includes:
and the setting unit is used for setting the transparency value of the theme color transition layer according to the offset rate of the first image control.
Optionally, the setting unit is configured to:
when the sliding direction of the sliding operation is towards the left, setting the transparency value of the theme color transition layer as a difference value between a first preset value and the offset rate of the first image control;
and when the sliding direction of the sliding operation is towards the right, setting the transparency value of the theme color transition layer as the offset rate of the first image control.
Optionally, the apparatus further comprises:
the second obtaining module is used for obtaining the variable quantity of the transparency value of the theme color transition layer;
and the triggering module is used for triggering the first setting module to set the transparency value of the theme color transition layer according to the offset rate of the first image control when the variation of the transparency value of the theme color transition layer is smaller than or equal to a third preset value.
Optionally, the apparatus further comprises:
and the second setting module is used for setting the transparency value of the theme color transition layer as an initial value when the variation of the transparency value of the theme color transition layer is larger than a third preset value.
Optionally, the determining module is configured to:
when the moving direction of the display interface of the first song is towards the left, determining a next song of the first song as the second song;
and when the moving direction of the display interface of the first song is towards the right, determining the last song of the first song as the second song.
Optionally, the determining module includes:
the first obtaining unit is used for obtaining the second theme color from the local storage space when the second theme color is stored in the local storage space;
the second obtaining unit is used for obtaining the second image when the second theme color is not stored in the local storage space; determining the number of pixel points corresponding to each pixel value interval in a plurality of pixel value intervals, wherein the number of the pixel points corresponding to each pixel value interval refers to the number of the pixel points of which the pixel values are located in each pixel value interval in the pixel points included in the second image; determining a pixel value average value of a plurality of pixel points of which pixel values are located in a second pixel value interval in the pixel points included in the second image, wherein the second pixel value interval refers to the pixel value interval with the largest number of corresponding pixel points in the pixel value intervals; and determining the second theme color according to the pixel value mean value.
In a third aspect, there is provided a song cutting apparatus, comprising:
a processor;
a memory for storing processor-executable instructions;
wherein the processor is configured to perform the steps of any one of the above-mentioned methods of cutting songs.
In a fourth aspect, a computer-readable storage medium is provided, the computer-readable storage medium having instructions stored thereon, wherein the instructions, when executed by a processor, implement the steps of any of the above-mentioned methods for cutting songs.
The technical scheme provided by the embodiment of the invention has the following beneficial effects:
in the embodiment of the invention, the intelligent terminal comprises a display interface of a song, the display interface of the song comprises an image of the song and an information display area, the information display area comprises a theme color display layer and a theme color transition layer below the theme color display layer, when the sliding operation acting on the display interface of the first song is acquired and is used for controlling the moving direction of the display interface of the first song, the theme colors of the second song and the second song can be determined according to the moving direction of the display interface of the first song, the first theme color displayed on the theme color display layer is switched to the second theme color, the transparency value of the first theme color transition layer is set according to the displacement of the display interface of the first song, and when the second image of the second song is completely moved into the current display interface, the first song is switched to the second song. By switching the theme color of the first image displayed by the theme color transition layer to the theme color of the second image and changing the transparency value of the theme color transition layer according to the displacement of the display interface of the first song, the theme color of the information display area can be gradually transited to the theme color of the next image. Therefore, the switching form of the image and the theme color in the song cutting process is enriched, the song cutting display effect is improved, and the flexibility is increased.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the drawings needed to be used in the description of the embodiments will be briefly introduced below, and it is obvious that the drawings in the following description are only some embodiments of the present invention, and it is obvious for those skilled in the art to obtain other drawings based on these drawings without creative efforts.
FIG. 1 is a schematic diagram of a display interface for a first song provided by an embodiment of the invention;
FIG. 2 is a schematic diagram of another display interface for a first song provided by an embodiment of the invention;
FIG. 3 is a flowchart of a method for cutting songs according to an embodiment of the present invention;
FIG. 4 is a flowchart of another method for cutting songs according to an embodiment of the present invention;
FIG. 5 is a schematic diagram of a display interface for a first song provided by an embodiment of the invention;
FIG. 6 is a schematic diagram of a display interface for a first song provided by an embodiment of the invention;
FIG. 7 is a flowchart illustrating an exemplary method for implementing an erasure effect for an image according to an embodiment of the present invention;
FIG. 8 is a schematic diagram of a display interface for a first song provided by an embodiment of the invention;
FIG. 9 is a schematic diagram of a display interface for a first song provided by an embodiment of the invention;
FIG. 10 is a flow chart of implementing a transition effect for a theme color according to an embodiment of the present invention;
fig. 11 is a schematic structural diagram of a song cutting device according to an embodiment of the present invention;
fig. 12 is a block diagram of an intelligent terminal 1200 according to an embodiment of the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the present invention more apparent, embodiments of the present invention will be described in detail with reference to the accompanying drawings.
Before explaining the embodiments of the present invention in detail, an environment for implementing the embodiments of the present invention will be described.
The song cutting method provided by the embodiment of the invention is applied to the intelligent terminal, and the intelligent terminal can be a mobile phone, a tablet personal computer or a computer. Moreover, the intelligent terminal has a song playing function and supports gesture song switching, namely, when the sliding operation is detected on the display interface based on the current song, the current song can be switched to the previous song or the next song according to the sliding direction. Furthermore, the intelligent terminal can play songs through the installed music application, and the method for cutting songs provided by the embodiment of the invention is realized.
In an embodiment of the present invention, the display interface of the song may include an image of the song and an information display area, the image of the song may be an album image of the song, and the information display area of the song may be used to display lyrics of the song or other song information.
Fig. 1 is a schematic diagram of a display interface of a first song according to an embodiment of the present invention, and as shown in fig. 1, the display interface includes a first image 11 and an information display area 12.
The first image 11 refers to an image of the first song, and may specifically be an album drawing of the first song, such as an album cover of the first song, a photo of a singer, or an MV screenshot. Moreover, in the song switching process, the display interface of the first song can be gradually switched to the display interface of the second song. Specifically, during the song cutting process, the first image 11 can be gradually moved out from the display interface, and the second image can be gradually moved in along with the movement of the first image 11, so that the gradual erasing effect of the images is realized. The second image is an image of a second song to be switched.
The information display area 12 is used for displaying related information of the first song, such as lyrics of the first song, song introduction or comment information of the first song, and the information display area 12 has a background color, in the playing process of the first song, the background color of the information display area 12 is a first theme color of the first image 11, and in the song cutting process, the background color of the information display area 12 can be gradually transited to a second theme color of the second image, so that the dynamic and smooth song cutting effect is realized.
It should be noted that the first image 11 and the information display area 12 respectively occupy different areas of the display interface, and fig. 1 only illustrates that the first image 11 occupies an upper area of the display interface and the information display area 12 occupies a lower area of the display interface, but in practical applications, the first image 11 may occupy a lower area of the display interface and the information display area 12 may occupy an upper area of the display interface, or may be laid out in other manners, which is not limited in the embodiment of the present invention.
Specifically, the display interface of the first song is constituted by a plurality of display layers on which the first image 11 and the information display area 12 can be realized. Fig. 2 is a schematic diagram of another display interface of a first song according to an embodiment of the present invention, and as shown in fig. 2, the display interface includes a switching layer 21, a theme color transition layer 22, and a theme color display layer 23, where the theme color transition layer 22 is located below the switching layer 21, and the theme color display layer 23 is located below the theme color transition layer 22.
The switching layer 21 is used for displaying images of songs, and realizing circular scrolling among the images according to the sliding operation. Specifically, the system is provided with an image control list, the image control list includes image controls corresponding to songs in the song list one by one, the image controls include information such as images corresponding to the songs, and the switching layer 21 can display the images corresponding to the songs by displaying the image controls in the image control list, and implement circular scrolling of the images. For example, taking a first song with a previous song and a next song as an example, switching layer 21 may implement a circular scrolling between the image of the previous song, the image of the first song, and the image of the next song.
Among them, the theme color transition layer 22 and the theme color display layer 23 are used to realize the transition effect of the background color of the information display area 12. Specifically, the theme color display layer 23 is used to display a first theme color during the playing of a first song and a second theme color during the song cutting. The theme color transition layer 22 is used for dynamically changing the transparency value of the theme color transition layer 22 according to the moving distance of the first image in the song cutting process, and the larger the moving distance of the first image is, the lower the transparency value of the theme color transition layer 22 is. Since the transparency value is inversely proportional to the transparency state, the greater the moving distance of the first image, the lower the transparency value of the theme color transition layer 22 and the higher the transparency of the theme color transition layer 22. Since the theme color transition layer 22 is located above the theme color display layer 23, the higher the transparency of the theme color transition layer 22 is, the clearer the second theme color displayed by the theme color display layer 23 is, and the background color of the information display area 12 can be gradually transited from the first theme color to the second theme color by changing the transparency of the theme color transition layer 22.
Fig. 3 is a flowchart of a method for cutting songs, according to an embodiment of the present invention, where the method is used in an intelligent terminal, the intelligent terminal includes a display interface of songs, and the display interface includes images of the songs and an information display area. Referring to fig. 3, the method comprises the steps of:
step 301: and acquiring sliding operation acting on a display interface of the first song, wherein the sliding operation controls the moving direction of the display interface of the first song, and an information display area of the first song comprises a theme color transition layer and a theme color display layer positioned below the theme color transition layer.
Step 302: and determining a second song and a second theme color according to the moving direction of the display interface of the first song, wherein the second theme color is the theme color of a second image of the second song.
Step 303: and switching the first theme color displayed by the theme color display layer to the second theme color, wherein the first theme color is the theme color of the first image of the first song.
Step 304: and setting the transparency value of the first theme color transition layer according to the displacement of the display interface of the first song, wherein the larger the displacement of the display interface of the first song is, the smaller the transparency value of the first theme color transition layer is.
Step 305: and when the second image is completely moved into the current display interface, switching the first song into the second song.
In the embodiment of the invention, the intelligent terminal comprises a display interface of a song, the display interface of the song comprises an image of the song and an information display area, the information display area comprises a theme color display layer and a theme color transition layer below the theme color display layer, when the sliding operation acting on the display interface of the first song is acquired and is used for controlling the moving direction of the display interface of the first song, the theme colors of the second song and the second song can be determined according to the moving direction of the display interface of the first song, the first theme color displayed on the theme color display layer is switched to the second theme color, the transparency value of the first theme color transition layer is set according to the displacement of the display interface of the first song, and when the second image of the second song is completely moved into the current display interface, the first song is switched to the second song. By switching the theme color of the first image displayed by the theme color transition layer to the theme color of the second image and changing the transparency value of the theme color transition layer according to the displacement of the display interface of the first song, the theme color of the information display area can be gradually transited to the theme color of the next image. Therefore, the switching form of the image and the theme color in the song cutting process is enriched, the song cutting display effect is improved, and the flexibility is increased.
Optionally, the sliding operation controls a moving direction of the first image of the first song, and after the obtaining of the sliding operation on the display interface of the first song, the method further includes:
and controlling the first image to gradually move out of the display interface of the first song and controlling the second image to gradually move in according to the sliding operation.
Optionally, the display interface of the first song further includes a map cutting layer, the map cutting layer is configured to display image controls corresponding to songs in the song list one by one, and the image controls include images corresponding to the songs;
the controlling the first image to gradually move out of the display interface of the first song and the controlling the second image to gradually move in according to the sliding operation includes:
determining the displacement of the first image control according to the sliding operation;
determining the offset rate of the first image control according to the displacement of the first image control and the display width of the display interface of the first song;
determining the offset of the first image according to the displacement and the offset rate of the first image control;
and respectively moving the first image out of the display interface and moving the second image in according to the offset of the first image.
Optionally, the determining a shift rate of the first image control according to the displacement of the first image control and the display width of the display interface of the first song includes:
when the sliding direction of the sliding operation is leftward, and the displacement of the first image control is greater than zero and smaller than the display width of the display interface of the first song, determining the offset rate of the first image control according to the ratio of the displacement of the first image control to the display width of the display interface of the first song;
when the sliding direction of the sliding operation is leftward and the displacement of the first image control is equal to the display width of the display interface of the first song, determining a first preset value as the offset rate of the first image control;
accordingly, the determining the offset of the first image according to the displacement and the offset rate of the first image control includes:
determining a product between the offset rate of the first image control and the displacement of the first image control as the offset of the first image.
Optionally, the determining a shift rate of the first image control according to the displacement of the first image control and the display width of the display interface of the first song includes:
when the sliding direction of the sliding operation is rightward, and the displacement of the first image control is larger than zero and smaller than the display width of the display interface of the first song, determining the offset rate of the first image control according to the ratio of a first difference value to the display width of the display interface of the first song, wherein the first difference value is the difference value between the display width of the display interface of the first song and the displacement of the first image control;
when the sliding direction of the sliding operation is rightward and the displacement of the first image control is equal to the display width of the display interface of the first song, determining a second preset value as the offset rate of the first image;
accordingly, the determining the offset of the first image according to the displacement and the offset rate of the first image control includes:
and determining the product of a second difference value and the displacement of the first image control as the offset of the first image, wherein the second difference value is the difference value between a first preset value and the offset rate of the first image control.
Optionally, the setting the transparency value of the first theme color transition layer according to the displacement of the display interface of the first song includes:
and setting the transparency value of the theme color transition layer according to the offset rate of the first image control.
Optionally, the setting the transparency value of the theme color transition layer according to the offset rate of the first image control includes:
when the sliding direction of the sliding operation is towards the left, setting the transparency value of the theme color transition layer as a difference value between a first preset value and the offset rate of the first image control;
when the sliding direction of the sliding operation is towards the right, the transparency value of the theme color transition layer is set to the offset rate of the first image control.
Optionally, before setting the transparency value of the theme color transition layer according to the shift rate of the first image control, the method further includes:
obtaining the variable quantity of the transparency value of the theme color transition layer;
and when the variation of the transparency value of the theme color transition layer is smaller than or equal to a third preset value, executing the step of setting the transparency value of the theme color transition layer according to the offset rate of the first image control.
Optionally, after obtaining the variation of the transparency value of the theme color transition layer, the method further includes:
and when the variation of the transparency value of the theme color transition layer is larger than a third preset value, setting the transparency value of the theme color transition layer as an initial value.
Optionally, the determining the second song according to the moving direction of the display interface of the first song includes:
when the moving direction of the display interface of the first song is towards the left, determining the next song of the first song as the second song;
and when the moving direction of the display interface of the first song is towards the right, determining the last song of the first song as the second song.
Optionally, the determining the second theme color comprises:
when the second theme color is stored in the local storage space, the second theme color is acquired from the local storage space;
when the second theme color is not stored in the local storage space, acquiring the second image; determining the number of pixel points corresponding to each pixel value interval in a plurality of pixel value intervals, wherein the number of the pixel points corresponding to each pixel value interval refers to the number of the pixel points of which the pixel values are located in each pixel value interval in the pixel points included in the second image; determining the average value of pixel values of a plurality of pixel points of which the pixel values are located in a second pixel value interval in the pixel points included in the second image, wherein the second pixel value interval refers to the pixel value interval with the largest number of corresponding pixel points in the pixel value intervals; and determining the second theme color according to the pixel value mean value.
All the above optional technical solutions can be combined arbitrarily to form an optional embodiment of the present invention, which is not described in detail herein.
Fig. 4 is a flowchart of another song cutting method provided in an embodiment of the present invention, and the method is used in an intelligent terminal. Referring to fig. 4, the method includes the steps of:
step 401: the display interface of the first song is displayed, the display interface of the first song comprises a first image and an information display area, the information display area comprises a theme color transition layer and a theme color display layer located below the theme color transition layer, and the first image is an image of the first song.
In the process of displaying the display interface of the first song, the intelligent terminal may play the first song, that is, the first song may be a song currently played by the intelligent terminal. Specifically, the intelligent terminal may display a display interface of the first song according to the song playing instruction, or may display the display interface of the first song according to the list order in the process of playing the song list.
The first image may be an album drawing of the first song, such as an album cover of the first song or a photo of a singer. The information display area is used for displaying related information of the first song, such as lyrics, song introduction or comments and the like of the first song, and comprises a theme color transition layer and a theme color display layer, wherein the theme color display layer is positioned below the theme color transition layer, and information to be displayed in the information display area can be displayed on the theme color transition layer. In addition, the information display area has a background color, and the background color of the information display area is a first theme color in the playing process of the first song. The first theme color is the theme color of the first image, that is, the color value of the first theme color is the average value of the pixel values of the target pixels with the pixel values close to each other and the largest number in the first image.
In one embodiment, the display interface of the first song comprises a switching layer, a theme color transition layer and a theme color display layer, the switching layer occupies a first display area of the display interface, the theme color transition layer and the theme color display layer occupy a second display area of the display interface, and the theme color display layer is below the theme color transition layer. The first image is displayed on the cutout layer, and the information on the information display area is displayed on the theme color transition layer.
For example, as shown in fig. 2, the song cutting layer occupies the upper area of the display interface, the theme color transition layer and the theme color display layer occupy the whole display interface, and the song cutting layer is above the theme color transition layer and the theme color display layer is below the theme color transition layer. In the playing process of the first song, a first image is displayed on the song cutting layer, and lyrics of the first song are displayed on the theme color transition layer. And the transparency value of the theme color transition layer is the minimum transparency value, namely the transparency of the theme color transition layer is the maximum, and the background color of the theme color display layer is the first theme color, so that the background color of the lyrics of the first song is the first theme color.
Fig. 5 is a schematic diagram of a display interface of a further first song provided in an embodiment of the present invention, and as shown in fig. 5, the display interface includes an upper first image and a lower information display area, and the information display area is used for displaying lyrics of the first song.
In the related art, the display interface of the first song generally comprises the first image or the lyrics, and the interface layout is single.
Step 402: and acquiring a sliding operation acting on the display interface of the first song, wherein the sliding operation controls the moving direction of the display interface of the first song.
In the embodiment of the invention, the intelligent terminal supports gesture song cutting, and when the first song is played, a user can execute sliding operation on the display interface of the first song by using fingers so as to trigger song cutting through the sliding operation. And the intelligent terminal can detect and acquire the sliding operation acting on the display interface of the first song, so as to control the moving direction of the display interface of the first song according to the sliding operation and switch the currently played first song into the second song. The sliding operation may be a sliding operation performed on the first image or a sliding operation performed on the information display area, which is not limited in the embodiment of the present invention.
Specifically, when the user's finger slides to the left on the display interface, that is, the sliding direction of the sliding operation is reversed to the left, the display interface of the first song may be controlled to move to the left, and when the user's finger slides to the right on the display interface, that is, the sliding direction of the sliding operation is reversed to the right, the display interface of the first song may be controlled to move to the right.
Further, the sliding operation may also be used to control the moving direction of the first image, that is, the display interface acting on the first song is only used to control the movement of the first image in the display interface, and the information display area is not moved. Specifically, when the sliding of the sliding operation is reversed to the left, the first image may be controlled to move to the left, and when the sliding direction of the sliding operation is to the right, the first image may be controlled to move to the right.
Step 403: and determining a second song and a second theme color according to the moving direction of the display interface of the first song, wherein the second theme color is the theme color of the second image.
In the embodiment of the present invention, when a sliding operation acting on a display interface of a first song is detected, a second song to be switched needs to be determined according to the sliding operation, and a theme color of an image of the second song is acquired as a second theme color.
Specifically, determining the second song according to the moving direction of the display interface of the first song includes: when the moving direction of the display interface of the first song is towards the left, determining the next song of the first song as a second song; and when the moving direction of the display interface of the first song is towards the right, determining the last song of the first song as the second song. Of course, the arrangement may be reversed, which is not limited in the embodiment of the present invention.
Specifically, determining the second theme color includes: judging whether a second theme color is stored in a local storage space, and acquiring the second theme color from the local storage space when the second theme color is stored in the local storage space; when the local storage space does not store the second theme color, the second image may be obtained first, and then the second theme color is determined according to the second image.
Wherein acquiring the second image comprises: and acquiring the second image from the second image control in the image space list, or acquiring the second image from a local storage space, or downloading the second image from a network.
Wherein determining the second theme color from the second image comprises: determining the number of pixel points corresponding to each pixel value interval in a plurality of pixel value intervals, wherein the number of the pixel points corresponding to each pixel value interval refers to the number of the pixel points of which the pixel values are located in each pixel value interval in the pixel points included in the second image; determining the average value of pixel values of a plurality of pixel points of which the pixel values are located in a second pixel value interval in the pixel points included in the second image, wherein the second pixel value interval refers to the pixel value interval with the largest number of corresponding pixel points in the pixel value intervals; and determining the second theme color according to the pixel value mean value. The pixel value intervals are obtained by dividing the whole pixel value interval allowed by the pixel points in advance.
That is, the target pixel points with similar pixel values and the largest number in the second image are determined, then the pixel point average value of the target pixel points is determined, and the pixel point average value of the target pixel points is determined as the theme color value of the second theme color.
In another embodiment, when the second theme color is not stored in the local storage space, or the second theme color cannot be determined according to the second image, the target theme color stored in advance may also be determined as the second main body color, which is not limited in the embodiment of the present invention.
Step 404: and switching the first theme color displayed by the theme color display layer into the second theme color, wherein the first theme color is the theme color of the first image.
When the first song is played, the theme color display layer displays the theme color of the first image, namely, the background color of the information display area is the first theme color, once a sliding operation is detected on the basis of the display interface of the first song, the first theme color displayed by the theme color display layer can be switched to the theme color of the second image, and then the transition effect of the theme color is realized by combining the transparency value of the theme color transition layer.
Step 405: and according to the sliding operation, controlling the display interface of the first song to move out of the current display screen, and controlling the display interface of the second song to move in towards the current display screen.
Specifically, according to the sliding operation, controlling the display interface of the first song to move out of the current display screen, and controlling the display interface of the second song to move in towards the current display screen includes: and according to the sliding operation, controlling the first image to gradually move out of the display interface of the first song and controlling the second image to gradually move in.
The second image is an image of a second song, the second song is a song to be switched determined according to the sliding operation, and the second song can be a next song or a previous song of the first song. For example, when the sliding direction of the sliding operation is to the left, the second song is the next song of the first song; when the sliding direction of the sliding operation is rightward, the second song is the last song of the first song. Of course, the arrangement may be reversed, which is not limited in the embodiment of the present invention.
In the embodiment of the invention, in the song cutting process, the circular rolling of the images is also supported, that is, the current first image can be controlled to gradually move out of the display interface according to the sliding operation, so that the first image presents the effect of gradually erasing from the display interface, and the second image is controlled to gradually move in the display interface, so that the second image presents the effect of gradually moving in. For example, referring to fig. 6, the first image may be gradually shifted out to the left and the second image, i.e., the image of the next song, may be gradually shifted in according to a sliding operation applied to the display interface of the first song.
Specifically, the display interface of the first song may further include a map cutting layer, where the map cutting layer is configured to display image controls in the image control list, and according to the sliding operation, the operation of controlling the first image to gradually move out of the display interface and the operation of controlling the second image to gradually move in may include: determining the displacement of the first image control according to the sliding operation; determining the offset rate of the first image control according to the displacement of the first image control and the display width of the display interface; determining the offset of the first image according to the displacement and the offset rate of the first image control; and respectively moving the first image out of the display interface and moving the second image in according to the offset of the first image.
The image control list comprises image controls in one-to-one correspondence with songs in a currently played song list, each image control comprises an image corresponding to a song, and the first image control refers to an image control comprising a first image. That is, the display interface can realize the circular scrolling display of the images through the map cutting layer and the image control list. For example, taking the example that the intelligent terminal supports an Android (Android) system as an example, the image control list may be a cycleview provided by the Android system. In one embodiment, the circular scrolling of the images can be realized by rewriting the image control list provided by the system, in the realization process, the length of the list can be set to the maximum value of Integer, such as 7FFFFFFF (2147483647), when the image control list is initialized, and the reference position is adjusted to the middle of the image control list, and the effect of sliding the images is mainly realized by dynamically planning the coordinate positions of the left, middle and right three images by acquiring the sliding distance in real time. The left, middle and right images refer to the previous image, the image of the current song and the next image.
Specifically, according to the sliding operation, determining the displacement of the first image control comprises: and detecting the sliding distance of the sliding operation, and determining the displacement of the first image control according to the preset corresponding relation between the sliding distance and the control displacement. The sliding distance refers to a distance that a finger of a user slides on the display interface of the first song, and in practical application, the larger the sliding distance is, the larger the displacement of the first image control is.
That is, in the embodiment of the present invention, the sliding distance of the sliding operation may be detected in real time, and the position of the first image control is correspondingly moved according to the sliding distance. And the intelligent terminal stores the corresponding relation between the sliding distance and the control displacement in advance, can determine the displacement of the first image control according to the sliding distance of the sliding operation and the corresponding relation between the sliding distance and the control displacement in real time, then moves the first image control out of the display interface according to the displacement of the first image control, and moves the second image control into the display interface. The second image control refers to an image control including a second image in the image control list.
In one embodiment, the displacement of the first image control may be defined as a distance of a left boundary of the first image control from a left border of the display screen, and the displacement of the first image control is defined as a negative value if the left boundary of the first image control is located on the left side of the left border of the display screen, and the displacement of the first image control is defined as a positive value if the left boundary of the first image control is located on the right side of the left border of the display screen. Therefore, the song cutting direction can be judged according to the positive and negative of the displacement of the first image control after the displacement of the first image control is determined. For example, when the displacement of the first image control is a negative value, the song cutting direction is determined to be the direction for switching to the next song, and when the displacement of the first image control is a positive value, the song cutting direction is determined to be the direction for switching to the previous song.
Specifically, according to the displacement of the first image control and the display width of the display interface, determining the offset rate of the first image control includes the following two implementation manners:
the first implementation mode comprises the following steps:when the absolute value of the displacement of the first image control is larger than zero and smaller than the display width of the display interface, determining the offset rate of the first image control according to the ratio of the absolute value of the displacement of the first image control to the display width of the display interface; and when the absolute value of the displacement of the first image control is equal to the display width of the display interface, determining the first preset value as the offset rate of the first image control.
The first preset value is a preset maximum offset rate, for example, when the offset rate of the first image control is between 0 and 1, the first preset value may be 1. Determining the offset rate of the first image control according to the ratio between the absolute value of the displacement of the first image control and the display width of the display interface comprises: and determining the ratio of the absolute value of the displacement of the first image control to the display width of the display interface as the offset rate of the first image control. Or, performing data conversion on the ratio of the absolute value of the displacement of the first image control to the display width of the display interface, and determining the converted data as the offset rate of the first image control.
For example, If the displacement of the first image control is Left, the display Width of the display interface is Width, and the offset rate of the first image control is rate, when 0 ≦ Left ≦ Width, rate ≦ Left ≦ If/Width; when | Left | ═ Width, rate is 1. If is, data conversion is performed on | Left |/Width, so that the data format of | Left |/Width is converted into the data format of rate.
Further, before determining Left, the sliding direction of the sliding operation may be determined, and If the sliding direction is leftward and 0 ≦ Left ≦ Width, rate ≦ Left ≦ If/Width; if the sliding direction is to the Left and | Left ═ Width, rate is 1; if the sliding direction is rightward and | Left | ≦ Width of 0 ≦ Left ≦ Width, then rate ≦ Left × If/Width; if the sliding direction is rightward and | Left | ═ Width, rate is 1.
It should be noted that, in the first implementation manner, no matter whether the sliding direction of the sliding operation is to the left or to the right, the same manner is adopted to determine the offset rate of the first image control, and the algorithm is relatively simple and convenient to apply.
The second implementation mode comprises the following steps:the following two determination manners are included according to the difference of the slide operation direction.
1) When the sliding direction of the sliding operation is leftward, and the displacement of the first image control is larger than zero and smaller than the display width of the display interface, determining the offset rate of the first image control according to the ratio of the displacement of the first image control to the display width of the display interface; and when the sliding direction of the sliding operation is leftward and the displacement of the first image control is equal to the display width of the display interface, determining a first preset value as the offset rate of the first image control.
The first preset value is a preset maximum offset rate, for example, when the offset rate of the first image control is between 0 and 1, the first preset value may be 1. Determining the offset rate of the first image control according to the ratio between the absolute value of the displacement of the first image control and the display width of the display interface comprises: and determining the ratio of the absolute value of the displacement of the first image control to the display width of the display interface as the offset rate of the first image control. Or, performing data conversion on the ratio of the absolute value of the displacement of the first image control to the display width of the display interface, and determining the converted data as the offset rate of the first image control.
It should be noted that the displacements described in the second implementation manner all refer to the magnitude of the displacement, and do not include the direction of the displacement. Further, considering the direction of the displacement, when the displacement direction is towards the Left, the displacement of the first image control is defined as a negative value, when the displacement direction is towards the right, the displacement of the first image control is defined as a positive value, assuming that the displacement of the first image control is Left, the display Width of the display interface is Width, and the displacement rate of the first image control is rate, when the sliding direction of the sliding operation is towards the Left, and-Width < Left < 0, the rate is-Left If/Width; when Left is-Width, rate is 1. Wherein If refers to data conversion of-Left/Width, so as to convert the data format of-Left/Width into the data format required by rate.
2) When the sliding direction of the sliding operation is rightward and the absolute value of the displacement of the first image control is larger than zero and smaller than the display width of the display interface, determining the offset rate of the first image control according to the ratio of a first difference value and the display width of the display interface, wherein the first difference value is the difference value between the display width of the display interface and the displacement of the first image control; and when the sliding direction of the sliding operation is rightward and the displacement of the first image control is equal to the display width of the display interface, determining a second preset value as the offset rate of the first image.
The second preset value is a preset minimum offset rate, for example, when the offset rate of the first image control is between 0 and 1, the first preset value may be 0. Determining the offset rate of the first image control according to the ratio of the first difference value to the display width of the display interface comprises: and determining the ratio of the first difference value to the display width of the display interface as the offset rate of the first image control. Or, performing data conversion on the ratio of the first difference to the display width of the display interface, and determining the converted data as the offset rate of the first image control.
It should be noted that the displacements described in the second implementation manner all refer to the magnitude of the displacement, and do not include the direction of the displacement. Further, considering the direction of the displacement, when the displacement direction is towards the Left, the displacement of the first image control is defined as a negative value, when the displacement direction is towards the right, the displacement of the first image control is defined as a positive value, assuming that the displacement of the first image control is Left, the display Width of the display interface is Width, the displacement rate of the first image control is rate, when the sliding direction of the sliding operation is towards the right, and 0 < Left < Width, the rate is (Width-Left) × If/Width; when Left is Width, rate is 0. Wherein If means to perform data conversion on (Width-Left)/Width so as to convert the data format of (Width-Left)/Width into the data format required by rate.
It should be noted that, in the second implementation manner, two different manners are adopted to determine the offset rate of the first image control according to the difference of the sliding direction of the sliding operation, so that the accuracy is higher.
Specifically, determining the offset of the first image according to the displacement and the offset rate of the first image control includes the following two implementation manners:
the first implementation mode comprises the following steps:if the offset rate of the first image control is determined by using the first implementation manner, determining the product of the offset rate of the first image control and the displacement of the first image control as the offset of the first image.
For example, assuming that the displacement of the first image control is Left and the offset rate of the first image control is rate, the offset of the first image is rate Left.
The second implementation mode comprises the following steps:if the offset rate of the first image control is determined by using the second implementation manner, when the sliding direction of the sliding operation is towards the left, determining the offset of the first image as the product of the offset rate of the first image control and the displacement of the first image control, and when the sliding direction of the sliding operation is towards the right, determining the offset of the first image as the product of the second difference value and the displacement of the first image control, where the second difference value is the difference value between the first preset value and the offset rate of the first image control.
For example, assuming that the displacement of the first image control is Left, the offset rate of the first image control is rate, and the first preset value is 1, when the sliding direction of the sliding operation is to the Left, the offset of the first image is rate Left, and when the sliding direction of the sliding operation is to the right, the offset of the first image is (1-rate) Left.
In an embodiment, if the image control list is a cycler View provided by an Android system, a scroll monitoring object may be registered in a cycler View Pager, where the scroll monitoring object is used to monitor displacement of the first image control, then control movement of the first image according to the displacement of the first image control, and determine a song cutting direction. In one possible implementation, after the displacement of the first image control is monitored, the process may be executed according to the flowchart shown in fig. 7, so as to achieve the gradual erasing effect of the first image.
It should be noted that, in the embodiment of the present invention, the offset of the first image is determined according to the displacement and the offset rate of the first image control, and then the first image is moved out of the display interface and the second image is moved in according to the offset of the first image, respectively, so that the effect of gradually moving the first image out of the display interface and gradually moving the second image in, i.e., gradually erasing the first image is achieved, thereby improving the display effect of cutting songs, and further improving the user experience.
Step 406: and setting the transparency value of the theme color transition layer according to the displacement of the display interface of the first song, wherein the larger the displacement of the display interface of the first song is, the smaller the transparency value of the theme color transition layer is.
It should be noted that the transparency value of the theme color transition layer is inversely proportional to the transparency state thereof, and the greater the transparency value, the lower the transparency. For example, the transparency value of the theme color transition layer may be set between 0 and 1, and when the transparency value is 0, the theme color transition layer is completely transparent, and when the transparency value is 1, the theme color transition layer is completely opaque.
Specifically, setting the transparency value of the theme color transition layer according to the displacement of the display interface of the first song includes: and setting the transparency value of the theme color transition layer according to the displacement of the first image.
That is, as the displacement of the first image increases, the transparency value of the theme color transition layer decreases, and the transparency increases, so that the second theme color displayed on the theme color display layer below the first theme color transition layer can be clearer and clearer, and the background color of the information display area can be gradually transitioned into the second theme color. As shown in fig. 6, 8 and 9, the theme color of the first album is black and the theme color of the second image is yellow, and as the displacement of the first image increases, the background color of the information display area will gradually transition from the dark yellow shown in fig. 6 to the light yellow shown in fig. 8 until the background color of the information display area becomes completely yellow when the first image is completely removed as shown in fig. 9.
Specifically, setting the transparency value of the theme color transition layer according to the displacement of the first image includes: and setting the transparency value of the theme color transition layer according to the offset rate of the first image control.
Specifically, setting the transparency value of the theme color transition layer according to the offset rate of the first image control may include the following two implementations:
the first implementation mode comprises the following steps: when the migration rate of the first image control is determined in step 405 according to the first implementation manner, the transparency value of the theme color transition layer is set to be the difference value between the first preset value and the migration rate of the first image control.
For example, assuming that the first preset value is 1 and the offset rate of the first image control is rate, the transparency value of the theme color transition layer is 1-rate.
The second implementation mode comprises the following steps: when the migration rate of the first image control is determined in step 405 in the second implementation manner and the sliding direction of the sliding operation is leftward, setting the transparency value of the theme color transition layer as a difference value between the first preset value and the migration rate of the first image control; when the shift rate of the first image control is determined in step 405 using the second implementation manner and the sliding direction of the sliding operation is rightward, the transparency value of the theme color transition layer is set to the shift rate of the first image control.
For example, assuming that the first preset value is 1 and the offset rate of the first image control is rate, when the sliding direction of the sliding operation is to the left, the transparency value of the theme color transition layer is 1-rate, and when the sliding direction of the sliding operation is to the right, the transparency value of the theme color transition layer is rate.
Further, in order to avoid abrupt change of the transparency value of the theme color transition layer in the process of the user performing the sliding operation back and forth, before the transparency of the theme color transition layer is set according to the offset rate of the first image control, the variation of the transparency value of the theme color transition layer may be obtained first; and when the variation of the transparency value of the theme color transition layer is larger than the third preset value, setting the transparency of the theme color transition layer as an initial value.
The change amount of the transparency value of the theme color transition layer is a difference value between a currently determined transparency value and a transparency value of the last set theme color transition layer, and the currently determined transparency value is the transparency value of the theme color transition layer currently determined according to the offset rate of the first image control. The third preset value is a preset variation threshold, for example, the third preset value may be 0.8 or 0.9.
Further, after the transparency value of the theme color transition layer is reset, the reset transparency value of the theme color transition layer may be stored, so that the change amount of the transparency value of the theme color transition layer is determined again according to the reset transparency value of the theme color transition layer and the transparency value of the theme color transition layer determined again later.
In a possible implementation manner, after the variation of the transparency value of the theme color transition layer is obtained, the process may be executed according to the flowchart shown in fig. 10, so as to implement the transition effect of the theme color.
Step 407: and when the second image is completely moved into the current display interface, switching the first song into the second song.
When the second image is completely moved into the current display interface, the first image is completely moved out of the current display interface, at this time, the first song can be switched into the second song, and the display interface of the second song is displayed, so that the switching of the songs is completed. The display interface of the second song comprises a second image and an information display area, and the background color of the information display area is a second theme color and is used for displaying the related information of the second song.
For example, as shown in fig. 9, when the second image is completely moved into the display interface, the previously played first song "daughter's mood" is switched to the second song "Outlaws Of Love", and the lyrics Of "daughter's mood" are switched to the lyrics Of "Outlaws Of Love" in the information display area.
In the embodiment of the invention, the intelligent terminal comprises a display interface of a song, the display interface of the song comprises an image of the song and an information display area, the information display area comprises a theme color display layer and a theme color transition layer below the theme color display layer, when the sliding operation acting on the display interface of the first song is acquired and is used for controlling the moving direction of the display interface of the first song, the theme colors of the second song and the second song can be determined according to the moving direction of the display interface of the first song, the first theme color displayed on the theme color display layer is switched to the second theme color, the transparency value of the first theme color transition layer is set according to the displacement of the display interface of the first song, and when the second image of the second song is completely moved into the current display interface, the first song is switched to the second song. By switching the theme color of the first image displayed by the theme color transition layer to the theme color of the second image and changing the transparency value of the theme color transition layer according to the displacement of the display interface of the first song, the theme color of the information display area can be gradually transited to the theme color of the next image. Therefore, the switching form of the image and the theme color in the song cutting process is enriched, the song cutting display effect is improved, and the flexibility is increased.
Fig. 11 is a schematic structural diagram of a device for cutting songs, according to an embodiment of the present invention, where the device is applied to an intelligent terminal, the intelligent terminal includes a display interface of songs, and the display interface includes images of the songs and an information display area. As shown in fig. 11, the apparatus includes: a first obtaining module 1101, a determining module 1102, a first switching module 1103, a first setting module 1104 and a second switching module 1105.
A first obtaining module 1101, configured to obtain a sliding operation applied to a display interface of a first song, where the sliding operation controls a moving direction of the display interface of the first song, and an information display area of the first song includes a theme color transition layer and a theme color display layer located below the theme color transition layer;
a determining module 1102, configured to determine a second song and a second theme color according to a moving direction of the display interface of the first song, where the second theme color is a theme color of a second image of the second song;
a first switching module 1103, configured to switch a first theme color displayed by the theme color display layer to the second theme color, where the first theme color is a theme color of a first image of the first song;
a first setting module 1104, configured to set a transparency value of the first theme color transition layer according to a displacement of the display interface of the first song, where the larger the displacement of the display interface of the first song is, the smaller the transparency value of the first theme color transition layer is;
a second switching module 1105, configured to switch the first song to the second song when the second image is completely moved into the current display interface.
Optionally, the sliding operation controls a moving direction of the first image of the first song, and the apparatus further includes:
and the control module is used for controlling the first image to gradually move out of the display interface of the first song and controlling the second image to gradually move in according to the sliding operation.
Optionally, the display interface of the first song further includes a map-cutting layer, where the map-cutting layer is used to display image controls corresponding to songs in a song list one to one, and the image controls include images corresponding to the songs;
the control module includes:
the first determining unit is used for determining the displacement of the first image control according to the sliding operation;
the second determining unit is used for determining the offset rate of the first image control according to the displacement of the first image control and the display width of the display interface;
a third determining unit, configured to determine an offset of the first image according to the displacement and the offset rate of the first image control;
and the moving unit is used for respectively moving the first image out of the display interface and moving the second image in according to the offset of the first image.
Optionally, the second determining unit is configured to:
when the sliding direction of the sliding operation is leftward, and the displacement of the first image control is larger than zero and smaller than the display width of the display interface, determining the offset rate of the first image control according to the ratio of the displacement of the first image control to the display width of the display interface;
when the sliding direction of the sliding operation is leftward and the displacement of the first image control is equal to the display width of the display interface, determining a first preset value as the offset rate of the first image control;
accordingly, the third determination unit is configured to:
determining a product between a shift rate of the first image control and a displacement of the first image control as a shift amount of the first image.
Optionally, the second determining unit is configured to:
when the sliding direction of the sliding operation is rightward and the displacement of the first image control is larger than zero and smaller than the display width of the display interface, determining the offset rate of the first image control according to the ratio of a first difference value to the display width of the display interface, wherein the first difference value is the difference value between the display width of the display interface and the displacement of the first image control;
when the sliding direction of the sliding operation is rightward and the displacement of the first image control is equal to the display width of the display interface, determining a second preset value as the offset rate of the first image;
accordingly, the third determination unit is configured to:
and determining the product of a second difference value and the displacement of the first image control as the offset of the first image, wherein the second difference value is the difference value between a first preset value and the offset rate of the first image control.
Optionally, the first setting module includes:
and the setting unit is used for setting the transparency value of the theme color transition layer according to the offset rate of the first image control.
Optionally, the setting unit is configured to:
when the sliding direction of the sliding operation is towards the left, setting the transparency value of the theme color transition layer as a difference value between a first preset value and the offset rate of the first image control;
and when the sliding direction of the sliding operation is towards the right, setting the transparency value of the theme color transition layer as the offset rate of the first image control.
Optionally, the apparatus further comprises:
the second obtaining module is used for obtaining the variable quantity of the transparency value of the theme color transition layer;
and the triggering module is used for triggering the first setting module to set the transparency value of the theme color transition layer according to the offset rate of the first image control when the variation of the transparency value of the theme color transition layer is smaller than or equal to a third preset value.
Optionally, the apparatus further comprises:
and the second setting module is used for setting the transparency value of the theme color transition layer as an initial value when the variation of the transparency value of the theme color transition layer is larger than a third preset value.
Optionally, the determining module is configured to:
when the moving direction of the display interface of the first song is towards the left, determining a next song of the first song as the second song;
and when the moving direction of the display interface of the first song is towards the right, determining the last song of the first song as the second song.
Optionally, the determining module includes:
the first obtaining unit is used for obtaining the second theme color from the local storage space when the second theme color is stored in the local storage space;
the second obtaining unit is used for obtaining the second image when the second theme color is not stored in the local storage space; determining the number of pixel points corresponding to each pixel value interval in a plurality of pixel value intervals, wherein the number of the pixel points corresponding to each pixel value interval refers to the number of the pixel points of which the pixel values are located in each pixel value interval in the pixel points included in the second image; determining a pixel value average value of a plurality of pixel points of which pixel values are located in a second pixel value interval in the pixel points included in the second image, wherein the second pixel value interval refers to the pixel value interval with the largest number of corresponding pixel points in the pixel value intervals; and determining the second theme color according to the pixel value mean value.
In the embodiment of the invention, the intelligent terminal comprises a display interface of a song, the display interface of the song comprises an image of the song and an information display area, the information display area comprises a theme color display layer and a theme color transition layer below the theme color display layer, when the sliding operation acting on the display interface of the first song is acquired and is used for controlling the moving direction of the display interface of the first song, the theme colors of the second song and the second song can be determined according to the moving direction of the display interface of the first song, the first theme color displayed on the theme color display layer is switched to the second theme color, the transparency value of the first theme color transition layer is set according to the displacement of the display interface of the first song, and when the second image of the second song is completely moved into the current display interface, the first song is switched to the second song. By switching the theme color of the first image displayed by the theme color transition layer to the theme color of the second image and changing the transparency value of the theme color transition layer according to the displacement of the display interface of the first song, the theme color of the information display area can be gradually transited to the theme color of the next image. Therefore, the switching form of the image and the theme color in the song cutting process is enriched, the song cutting display effect is improved, and the flexibility is increased.
It should be noted that: when the song cutting device provided by the embodiment is used for cutting songs, the division of the functional modules is only used for illustration, and in practical application, the function distribution can be completed by different functional modules according to needs, that is, the internal structure of the device is divided into different functional modules so as to complete all or part of the functions described above. In addition, the device for cutting songs and the method for cutting songs provided by the embodiment belong to the same concept, and the specific implementation process is detailed in the method embodiment and is not described again.
Fig. 12 is a block diagram of an intelligent terminal 1200 according to an embodiment of the present invention. The intelligent terminal 1200 may be: a smart phone, a tablet computer, an MP3 player (Moving Picture Experts Group Audio Layer III, motion video Experts compression standard Audio Layer 3), an MP4 player (Moving Picture Experts Group Audio Layer IV, motion video Experts compression standard Audio Layer 4), a notebook computer, or a desktop computer. The smart terminal 1200 may also be referred to by other names such as user equipment, portable smart terminal, laptop smart terminal, desktop smart terminal, and the like.
In general, the smart terminal 1200 includes: a processor 1201 and a memory 1202.
The processor 1201 may include one or more processing cores, such as a 4-core processor, an 8-core processor, or the like. The processor 1201 may be implemented in at least one hardware form of a DSP (Digital Signal Processing), an FPGA (Field-Programmable Gate Array), and a PLA (Programmable Logic Array). The processor 1201 may also include a main processor and a coprocessor, where the main processor is a processor for processing data in an awake state, and is also called a Central Processing Unit (CPU); a coprocessor is a low power processor for processing data in a standby state. In some embodiments, the processor 1201 may be integrated with a GPU (Graphics Processing Unit) that is responsible for rendering and drawing content that the display screen needs to display. In some embodiments, the processor 1201 may further include an AI (Artificial Intelligence) processor for processing a computing operation related to machine learning.
Memory 1202 may include one or more computer-readable storage media, which may be non-transitory. Memory 1202 may also include high-speed random access memory, as well as non-volatile memory, such as one or more magnetic disk storage devices, flash memory storage devices. In some embodiments, a non-transitory computer readable storage medium in memory 1202 is used to store at least one instruction for execution by processor 1201 to implement a method of cutting songs as provided by method embodiments herein.
In some embodiments, the smart terminal 1200 may further include: a peripheral interface 1203 and at least one peripheral. The processor 1201, memory 1202, and peripheral interface 1203 may be connected by a bus or signal line. Various peripheral devices may be connected to peripheral interface 1203 via a bus, signal line, or circuit board. Specifically, the peripheral device includes: at least one of radio frequency circuitry 1204, touch display 1205, camera 1206, audio circuitry 1207, pointing component 1208, and power source 1209.
The peripheral interface 1203 may be used to connect at least one peripheral associated with I/O (Input/Output) to the processor 1201 and the memory 1202. In some embodiments, the processor 1201, memory 1202, and peripheral interface 1203 are integrated on the same chip or circuit board; in some other embodiments, any one or two of the processor 1201, the memory 1202 and the peripheral device interface 1203 may be implemented on a separate chip or circuit board, which is not limited in this embodiment.
The Radio Frequency circuit 1204 is used for receiving and transmitting RF (Radio Frequency) signals, also called electromagnetic signals. The radio frequency circuit 1204 communicates with a communication network and other communication devices by electromagnetic signals. The radio frequency circuit 1204 converts an electric signal into an electromagnetic signal to transmit, or converts a received electromagnetic signal into an electric signal. Optionally, the radio frequency circuit 1204 comprises: an antenna system, an RF transceiver, one or more amplifiers, a tuner, an oscillator, a digital signal processor, a codec chipset, a subscriber identity module card, and so forth. The radio frequency circuit 1204 may communicate with other intelligent terminals via at least one wireless communication protocol. The wireless communication protocols include, but are not limited to: metropolitan area networks, various generation mobile communication networks (2G, 3G, 4G, and 5G), Wireless local area networks, and/or WiFi (Wireless Fidelity) networks. In some embodiments, the rf circuit 1204 may further include NFC (Near Field Communication) related circuits, which are not limited in this application.
The display screen 1205 is used to display a UI (User Interface). The UI may include graphics, text, icons, video, and any combination thereof. When the display screen 1205 is a touch display screen, the display screen 1205 also has the ability to acquire touch signals on or over the surface of the display screen 1205. The touch signal may be input to the processor 1201 as a control signal for processing. At this point, the display 1205 may also be used to provide virtual buttons and/or a virtual keyboard, also referred to as soft buttons and/or a soft keyboard. In some embodiments, the display 1205 may be one, and a front panel of the smart terminal 1200 is provided; in other embodiments, the number of the display screens 1205 can be at least two, and the display screens are respectively disposed on different surfaces of the intelligent terminal 1200 or are in a folding design; in still other embodiments, the display 1205 may be a flexible display disposed on a curved surface or on a folded surface of the smart terminal 1200. Even further, the display screen 1205 may be arranged in a non-rectangular irregular figure, i.e., a shaped screen. The Display panel 1205 can be made of LCD (Liquid Crystal Display), OLED (Organic Light-Emitting Diode), or other materials.
Camera assembly 1206 is used to capture images or video. Optionally, camera assembly 1206 includes a front camera and a rear camera. Generally, a front camera is arranged on a front panel of the intelligent terminal, and a rear camera is arranged on the back of the intelligent terminal. In some embodiments, the number of the rear cameras is at least two, and each rear camera is any one of a main camera, a depth-of-field camera, a wide-angle camera and a telephoto camera, so that the main camera and the depth-of-field camera are fused to realize a background blurring function, and the main camera and the wide-angle camera are fused to realize panoramic shooting and VR (Virtual Reality) shooting functions or other fusion shooting functions. In some embodiments, camera assembly 1206 may also include a flash. The flash lamp can be a monochrome temperature flash lamp or a bicolor temperature flash lamp. The double-color-temperature flash lamp is a combination of a warm-light flash lamp and a cold-light flash lamp, and can be used for light compensation at different color temperatures.
The audio circuitry 1207 may include a microphone and a speaker. The microphone is used for collecting sound waves of a user and the environment, converting the sound waves into electric signals, and inputting the electric signals into the processor 1201 for processing or inputting the electric signals into the radio frequency circuit 1204 to achieve voice communication. For the purpose of stereo sound collection or noise reduction, a plurality of microphones may be respectively disposed at different portions of the smart terminal 1200. The microphone may also be an array microphone or an omni-directional pick-up microphone. The speaker is used to convert electrical signals from the processor 1201 or the radio frequency circuit 1204 into sound waves. The loudspeaker can be a traditional film loudspeaker or a piezoelectric ceramic loudspeaker. When the speaker is a piezoelectric ceramic speaker, the speaker can be used for purposes such as converting an electric signal into a sound wave audible to a human being, or converting an electric signal into a sound wave inaudible to a human being to measure a distance. In some embodiments, the audio circuitry 1207 may also include a headphone jack.
The positioning component 1208 is used to locate the current geographic Location of the smart terminal 1200 to implement navigation or LBS (Location Based Service). The Positioning component 1208 can be a Positioning component based on the united states GPS (Global Positioning System), the chinese beidou System, the russian graves System, or the european union galileo System.
The power source 1209 is used to supply power to various components in the smart terminal 1200. The power source 1209 may be alternating current, direct current, disposable or rechargeable. When the power source 1209 includes a rechargeable battery, the rechargeable battery may support wired or wireless charging. The rechargeable battery may also be used to support fast charge technology.
In some embodiments, the smart terminal 1200 further includes one or more sensors 1210. The one or more sensors 1210 include, but are not limited to: acceleration sensor 1211, gyro sensor 1212, pressure sensor 1213, fingerprint sensor 1214, optical sensor 1215, and proximity sensor 1216.
The acceleration sensor 1211 may detect magnitudes of accelerations on three coordinate axes of the coordinate system established with the smart terminal 1200. For example, the acceleration sensor 1211 may be used to detect components of the gravitational acceleration in three coordinate axes. The processor 1201 may control the touch display 1205 to display the user interface in a landscape view or a portrait view according to the gravitational acceleration signal collected by the acceleration sensor 1211. The acceleration sensor 1211 may also be used for acquisition of motion data of a game or a user.
The gyro sensor 1212 may detect a body direction and a rotation angle of the smart terminal 1200, and the gyro sensor 1212 may cooperate with the acceleration sensor 1211 to collect a 3D motion of the user on the smart terminal 1200. The processor 1201 can implement the following functions according to the data collected by the gyro sensor 1212: motion sensing (such as changing the UI according to a user's tilting operation), image stabilization at the time of photographing, game control, and inertial navigation.
The pressure sensor 1213 may be disposed on a side bezel of the smart terminal 1200 and/or a lower layer of the touch display 1205. When the pressure sensor 1213 is disposed on the side frame of the intelligent terminal 1200, the holding signal of the user to the intelligent terminal 1200 can be detected, and the processor 1201 performs left-right hand recognition or quick operation according to the holding signal acquired by the pressure sensor 1213. When the pressure sensor 1213 is disposed at a lower layer of the touch display screen 1205, the processor 1201 controls the operability control on the UI interface according to the pressure operation of the user on the touch display screen 1205. The operability control comprises at least one of a button control, a scroll bar control, an icon control and a menu control.
The fingerprint sensor 1214 is used for collecting a fingerprint of the user, and the processor 1201 identifies the user according to the fingerprint collected by the fingerprint sensor 1214, or the fingerprint sensor 1214 identifies the user according to the collected fingerprint. When the user identity is identified as a trusted identity, the processor 1201 authorizes the user to perform relevant sensitive operations, including unlocking a screen, viewing encrypted information, downloading software, paying, changing settings, and the like. The fingerprint sensor 1214 may be disposed on the front, back, or side of the smart terminal 1200. When a physical button or a vendor Logo is provided on the smart terminal 1200, the fingerprint sensor 1214 may be integrated with the physical button or the vendor Logo.
The optical sensor 1215 is used to collect the ambient light intensity. In one embodiment, the processor 1201 may control the display brightness of the touch display 1205 according to the ambient light intensity collected by the optical sensor 1215. Specifically, when the ambient light intensity is high, the display brightness of the touch display panel 1205 is increased; when the ambient light intensity is low, the display brightness of the touch display panel 1205 is turned down. In another embodiment, processor 1201 may also dynamically adjust the camera head 1206 shooting parameters based on the ambient light intensity collected by optical sensor 1215.
The proximity sensor 1216, also called a distance sensor, is generally disposed on the front panel of the smart terminal 1200. The proximity sensor 1216 is used to collect a distance between the user and the front surface of the smart terminal 1200. In one embodiment, when the proximity sensor 1216 detects that the distance between the user and the front surface of the smart terminal 1200 gradually decreases, the processor 1201 controls the touch display 1205 to switch from the bright screen state to the dark screen state; when the proximity sensor 1216 detects that the distance between the user and the front surface of the smart terminal 1200 gradually becomes larger, the processor 1201 controls the touch display 1205 to switch from the screen-on state to the screen-on state.
Those skilled in the art will appreciate that the configuration shown in fig. 12 is not intended to be limiting and may include more or fewer components than those shown, or some components may be combined, or a different arrangement of components may be used.
It will be understood by those skilled in the art that all or part of the steps for implementing the above embodiments may be implemented by hardware, or may be implemented by a program instructing relevant hardware, where the program may be stored in a computer-readable storage medium, and the above-mentioned storage medium may be a read-only memory, a magnetic disk or an optical disk, etc.
The above description is only for the purpose of illustrating the preferred embodiments of the present invention and is not to be construed as limiting the invention, and any modifications, equivalents, improvements and the like that fall within the spirit and principle of the present invention are intended to be included therein.

Claims (24)

1. A song cutting method is applied to an intelligent terminal, the intelligent terminal comprises a display interface of a song, the display interface comprises an image and an information display area of the song, and the method comprises the following steps:
the method comprises the steps of obtaining sliding operation acting on a display interface of a first song, wherein the sliding operation controls the moving direction of the display interface of the first song, and an information display area of the first song comprises a theme color transition layer and a theme color display layer located below the theme color transition layer;
determining a second song and a second theme color according to the moving direction of the display interface of the first song, wherein the second theme color is the theme color of a second image of the second song;
switching a first theme color displayed by the theme color display layer to the second theme color, wherein the first theme color is a theme color of a first image of the first song;
setting a transparency value of the first theme color transition layer according to the displacement of the display interface of the first song, wherein the larger the displacement of the display interface of the first song is, the smaller the transparency value of the first theme color transition layer is;
and when the second image is completely moved into the current display interface, switching the first song into the second song.
2. The method of claim 1, wherein the sliding operation controls a direction of movement of the first image of the first song, and wherein the obtaining of the sliding operation on the display interface of the first song is followed by:
and controlling the first image to gradually move out of the display interface of the first song and controlling the second image to gradually move in according to the sliding operation.
3. The method of claim 2, wherein the display interface for the first song further comprises a switching layer for displaying image controls corresponding one-to-one to the songs in the song list, the image controls including images corresponding to the songs;
the controlling the first image to gradually move out of the display interface of the first song and the controlling the second image to gradually move in according to the sliding operation comprises:
determining the displacement of the first image control according to the sliding operation;
determining the offset rate of the first image control according to the displacement of the first image control and the display width of the display interface of the first song;
determining the offset of the first image according to the displacement and the offset rate of the first image control;
and respectively moving the first image out of the display interface and moving the second image in according to the offset of the first image.
4. The method of claim 3, wherein determining the offset rate of the first image control based on the displacement of the first image control and the display width of the display interface of the first song comprises:
when the sliding direction of the sliding operation is leftward, and the displacement of the first image control is greater than zero and smaller than the display width of the display interface of the first song, determining the offset rate of the first image control according to the ratio of the displacement of the first image control to the display width of the display interface of the first song;
when the sliding direction of the sliding operation is leftward and the displacement of the first image control is equal to the display width of the display interface of the first song, determining a first preset value as the offset rate of the first image control;
correspondingly, the determining the offset of the first image according to the displacement and the offset rate of the first image control includes:
determining a product between a shift rate of the first image control and a displacement of the first image control as a shift amount of the first image.
5. The method of claim 3, wherein determining the offset rate of the first image control based on the displacement of the first image control and the display width of the display interface of the first song comprises:
when the sliding direction of the sliding operation is rightward, and the displacement of the first image control is larger than zero and smaller than the display width of the display interface of the first song, determining the offset rate of the first image control according to the ratio of a first difference value to the display width of the display interface of the first song, wherein the first difference value is the difference value between the display width of the display interface of the first song and the displacement of the first image control;
when the sliding direction of the sliding operation is rightward and the displacement of the first image control is equal to the display width of the display interface of the first song, determining a second preset value as the offset rate of the first image;
correspondingly, the determining the offset of the first image according to the displacement and the offset rate of the first image control includes:
and determining the product of a second difference value and the displacement of the first image control as the offset of the first image, wherein the second difference value is the difference value between a first preset value and the offset rate of the first image control.
6. The method of claim 3, wherein setting the transparency value of the first theme color transition layer according to the displacement of the display interface of the first song comprises:
and setting the transparency value of the theme color transition layer according to the offset rate of the first image control.
7. The method of claim 6, wherein setting the transparency value of the theme color transition layer according to the offset rate of the first image control comprises:
when the sliding direction of the sliding operation is towards the left, setting the transparency value of the theme color transition layer as a difference value between a first preset value and the offset rate of the first image control;
and when the sliding direction of the sliding operation is towards the right, setting the transparency value of the theme color transition layer as the offset rate of the first image control.
8. The method of claim 6, wherein before setting the transparency value of the theme color transition layer according to the offset rate of the first image control, further comprising:
obtaining the variable quantity of the transparency value of the theme color transition layer;
and when the variation of the transparency value of the theme color transition layer is smaller than or equal to a third preset value, executing the step of setting the transparency value of the theme color transition layer according to the offset rate of the first image control.
9. The method of claim 8, wherein after obtaining the change in the transparency value of the theme color transition layer, further comprising:
and when the variation of the transparency value of the theme color transition layer is larger than a third preset value, setting the transparency value of the theme color transition layer as an initial value.
10. The method of any of claims 1-9, wherein determining the second song based on the direction of movement of the display interface of the first song comprises:
when the moving direction of the display interface of the first song is towards the left, determining a next song of the first song as the second song;
and when the moving direction of the display interface of the first song is towards the right, determining the last song of the first song as the second song.
11. The method of any of claims 1-9, wherein the determining the second theme color comprises:
when the second theme color is stored in the local storage space, acquiring the second theme color from the local storage space;
when the second theme color is not stored in the local storage space, acquiring the second image; determining the number of pixel points corresponding to each pixel value interval in a plurality of pixel value intervals, wherein the number of the pixel points corresponding to each pixel value interval refers to the number of the pixel points of which the pixel values are located in each pixel value interval in the pixel points included in the second image; determining a pixel value average value of a plurality of pixel points of which pixel values are located in a second pixel value interval in the pixel points included in the second image, wherein the second pixel value interval refers to the pixel value interval with the largest number of corresponding pixel points in the pixel value intervals; and determining the second theme color according to the pixel value mean value.
12. The device for cutting the songs is applied to an intelligent terminal, the intelligent terminal comprises a display interface of the songs, the display interface comprises images and an information display area of the songs, and the device comprises:
the device comprises a first acquisition module, a second acquisition module and a display module, wherein the first acquisition module is used for acquiring sliding operation acting on a display interface of a first song, the sliding operation controls the moving direction of the display interface of the first song, and an information display area of the first song comprises a theme color transition layer and a theme color display layer positioned below the theme color transition layer;
the determining module is used for determining a second song and a second theme color according to the moving direction of the display interface of the first song, wherein the second theme color is the theme color of a second image of the second song;
a first switching module, configured to switch a first theme color displayed by the theme color display layer to the second theme color, where the first theme color is a theme color of a first image of the first song;
a first setting module, configured to set a transparency value of the first theme color transition layer according to displacement of the display interface of the first song, where the larger the displacement of the display interface of the first song is, the smaller the transparency value of the first theme color transition layer is;
and the second switching module is used for switching the first song into the second song when the second image is completely moved into the current display interface.
13. The apparatus of claim 12, wherein the sliding operation controls a direction of movement of a first image of the first song, the apparatus further comprising:
and the control module is used for controlling the first image to gradually move out of the display interface of the first song and controlling the second image to gradually move in according to the sliding operation.
14. The apparatus of claim 13, wherein the display interface for the first song further comprises a switching layer to display image controls corresponding one-to-one to songs in a list of songs, an image control comprising an image of a corresponding song;
the control module includes:
the first determining unit is used for determining the displacement of the first image control according to the sliding operation;
the second determining unit is used for determining the offset rate of the first image control according to the displacement of the first image control and the display width of the display interface;
a third determining unit, configured to determine an offset of the first image according to the displacement and the offset rate of the first image control;
and the moving unit is used for respectively moving the first image out of the display interface and moving the second image in according to the offset of the first image.
15. The apparatus of claim 14, wherein the second determining unit is to:
when the sliding direction of the sliding operation is leftward, and the displacement of the first image control is larger than zero and smaller than the display width of the display interface, determining the offset rate of the first image control according to the ratio of the displacement of the first image control to the display width of the display interface;
when the sliding direction of the sliding operation is leftward and the displacement of the first image control is equal to the display width of the display interface, determining a first preset value as the offset rate of the first image control;
accordingly, the third determination unit is configured to:
determining a product between a shift rate of the first image control and a displacement of the first image control as a shift amount of the first image.
16. The apparatus of claim 14, wherein the second determining unit is to:
when the sliding direction of the sliding operation is rightward and the displacement of the first image control is larger than zero and smaller than the display width of the display interface, determining the offset rate of the first image control according to the ratio of a first difference value to the display width of the display interface, wherein the first difference value is the difference value between the display width of the display interface and the displacement of the first image control;
when the sliding direction of the sliding operation is rightward and the displacement of the first image control is equal to the display width of the display interface, determining a second preset value as the offset rate of the first image;
accordingly, the third determination unit is configured to:
and determining the product of a second difference value and the displacement of the first image control as the offset of the first image, wherein the second difference value is the difference value between a first preset value and the offset rate of the first image control.
17. The apparatus of claim 14, wherein the first setup module comprises:
and the setting unit is used for setting the transparency value of the theme color transition layer according to the offset rate of the first image control.
18. The apparatus of claim 17, wherein the setting unit is to:
when the sliding direction of the sliding operation is towards the left, setting the transparency value of the theme color transition layer as a difference value between a first preset value and the offset rate of the first image control;
and when the sliding direction of the sliding operation is towards the right, setting the transparency value of the theme color transition layer as the offset rate of the first image control.
19. The apparatus of claim 17, wherein the apparatus further comprises:
the second obtaining module is used for obtaining the variable quantity of the transparency value of the theme color transition layer;
and the triggering module is used for triggering the first setting module to set the transparency value of the theme color transition layer according to the offset rate of the first image control when the variation of the transparency value of the theme color transition layer is smaller than or equal to a third preset value.
20. The apparatus of claim 19, wherein the apparatus further comprises:
and the second setting module is used for setting the transparency value of the theme color transition layer as an initial value when the variation of the transparency value of the theme color transition layer is larger than a third preset value.
21. The apparatus of any of claims 12-20, wherein the determination module is to:
when the moving direction of the display interface of the first song is towards the left, determining a next song of the first song as the second song;
and when the moving direction of the display interface of the first song is towards the right, determining the last song of the first song as the second song.
22. The apparatus of any of claims 12-20, wherein the determining module comprises:
the first obtaining unit is used for obtaining the second theme color from the local storage space when the second theme color is stored in the local storage space;
the second obtaining unit is used for obtaining the second image when the second theme color is not stored in the local storage space; determining the number of pixel points corresponding to each pixel value interval in a plurality of pixel value intervals, wherein the number of the pixel points corresponding to each pixel value interval refers to the number of the pixel points of which the pixel values are located in each pixel value interval in the pixel points included in the second image; determining a pixel value average value of a plurality of pixel points of which pixel values are located in a second pixel value interval in the pixel points included in the second image, wherein the second pixel value interval refers to the pixel value interval with the largest number of corresponding pixel points in the pixel value intervals; and determining the second theme color according to the pixel value mean value.
23. A song cutting apparatus, comprising:
a processor;
a memory for storing processor-executable instructions;
wherein the processor is configured to perform the steps of any of the methods of claims 1-11.
24. A computer-readable storage medium having instructions stored thereon, wherein the instructions, when executed by a processor, implement the steps of any of the methods of claims 1-11.
CN201810846280.6A 2018-07-27 2018-07-27 Song cutting method and device Active CN109032492B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201810846280.6A CN109032492B (en) 2018-07-27 2018-07-27 Song cutting method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810846280.6A CN109032492B (en) 2018-07-27 2018-07-27 Song cutting method and device

Publications (2)

Publication Number Publication Date
CN109032492A CN109032492A (en) 2018-12-18
CN109032492B true CN109032492B (en) 2020-09-15

Family

ID=64647228

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810846280.6A Active CN109032492B (en) 2018-07-27 2018-07-27 Song cutting method and device

Country Status (1)

Country Link
CN (1) CN109032492B (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109561338B (en) * 2018-12-28 2022-08-09 福建星网视易信息系统有限公司 Interface seamless switching display method and storage medium of song-ordering system
CN111292393A (en) * 2020-01-22 2020-06-16 北京达佳互联信息技术有限公司 Image processing method, image processing device, electronic equipment and storage medium

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102301736A (en) * 2011-07-06 2011-12-28 华为技术有限公司 Method, device and mobile terminal for switching video display contents
CN102737676A (en) * 2011-04-05 2012-10-17 索尼公司 Music playback device, music playback method, program, and data creation device
CN106648399A (en) * 2015-11-02 2017-05-10 广州市动景计算机科技有限公司 Interface display processing method, apparatus and device

Family Cites Families (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102385473A (en) * 2010-09-02 2012-03-21 腾讯科技(深圳)有限公司 Page switching method and device
CN102736827A (en) * 2011-04-12 2012-10-17 上海三旗通信科技股份有限公司 Realizing method of mobile terminal for supporting 3D flipping record cover
KR101728227B1 (en) * 2015-06-24 2017-04-18 윤원석 System and method for setting play program of music file
CN105100444A (en) * 2015-06-29 2015-11-25 小米科技有限责任公司 Information display method and device
CN106997265B (en) * 2016-01-26 2020-11-10 腾讯科技(深圳)有限公司 Method and device for setting background excessive color
CN106055191A (en) * 2016-04-19 2016-10-26 乐视控股(北京)有限公司 Terminal equipment and interface display method for same
CN106250042A (en) * 2016-07-29 2016-12-21 北京顺源开华科技有限公司 The method that exits, device and the electronic equipment of user interface
CN106383660A (en) * 2016-09-30 2017-02-08 维沃移动通信有限公司 Audio file operating and controlling method, and mobile terminal

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102737676A (en) * 2011-04-05 2012-10-17 索尼公司 Music playback device, music playback method, program, and data creation device
CN102301736A (en) * 2011-07-06 2011-12-28 华为技术有限公司 Method, device and mobile terminal for switching video display contents
CN106648399A (en) * 2015-11-02 2017-05-10 广州市动景计算机科技有限公司 Interface display processing method, apparatus and device

Also Published As

Publication number Publication date
CN109032492A (en) 2018-12-18

Similar Documents

Publication Publication Date Title
CN110602321B (en) Application program switching method and device, electronic device and storage medium
CN108965922B (en) Video cover generation method and device and storage medium
CN108391171B (en) Video playing control method and device, and terminal
CN108268187A (en) The display methods and device of intelligent terminal
CN108449641B (en) Method, device, computer equipment and storage medium for playing media stream
CN109862412B (en) Method and device for video co-shooting and storage medium
CN109922356B (en) Video recommendation method and device and computer-readable storage medium
CN111083526B (en) Video transition method and device, computer equipment and storage medium
CN110868636B (en) Video material intercepting method and device, storage medium and terminal
CN110288689B (en) Method and device for rendering electronic map
CN110225390B (en) Video preview method, device, terminal and computer readable storage medium
CN112667835A (en) Work processing method and device, electronic equipment and storage medium
CN108172176B (en) Page refreshing method and device for ink screen
CN110868642B (en) Video playing method, device and storage medium
CN113467682B (en) Method, device, terminal and storage medium for controlling movement of map covering
CN110769120A (en) Method, device, equipment and storage medium for message reminding
CN109032492B (en) Song cutting method and device
CN112230910A (en) Page generation method, device, equipment and storage medium of embedded program
CN111158575B (en) Method, device and equipment for terminal to execute processing and storage medium
CN113160031A (en) Image processing method, image processing device, electronic equipment and storage medium
CN110191236B (en) Song playing queue management method and device, terminal equipment and storage medium
CN111370096A (en) Interactive interface display method, device, equipment and storage medium
CN110992268B (en) Background setting method, device, terminal and storage medium
CN111464829B (en) Method, device and equipment for switching media data and storage medium
CN111369434B (en) Method, device, equipment and storage medium for generating spliced video covers

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant