Media file cropping method and related products
Patent Information
- Application Number
- CN202510336397.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-03-19
- Publication Date
- 2026-09-22
AI Technical Summary
[0003]鉴于以上问题,本公开提供一种媒体文件裁剪方法及相关产品,可解决获取符合偏好的媒体片段所需要的低效和繁琐操作问题
[0019] As described above, this method can efficiently locate users' preferences for media clips, enabling users to quickly obtain the media clips they want without having to repeatedly play media files to find their favorite clips or repeatedly adjust the progress bar to obtain their favorite clips. This solves the problem of inefficiency and cumbersome operation caused by manually dragging the progress bar to obtain media files that meet preferences, and improves the efficiency of trimming media files.
Smart Images

Figure CN122802733A_ABST
Abstract
Description
Technical Field
[0001] This disclosure relates to the media field, and in particular to a media file trimming method and related products. Background Technology
[0002] With the development of electronic devices, users frequently use them to play media files. During media playback, users may need to trim or edit media files when they hear or see a favorite segment. For example, when listening to music, a user might want to set a favorite segment as their ringtone. Similarly, when watching a video, a user might want to capture a favorite segment for editing or sharing. Currently, users can only select a media segment by dragging the playback progress bar to set its start and end times. However, this method is inefficient, cumbersome, and inconvenient, requiring repeated adjustments. Summary of the Invention
[0003] In view of the above problems, this disclosure provides a media file trimming method and related products, which can solve the problems of inefficient and cumbersome operations required to obtain media segments that meet preferences.
[0004] The first aspect of this disclosure provides a media file trimming method, in which a media file is played, and in response to a trimming instruction for the media file, at least one media segment of the media file is displayed, wherein the media segment includes a first media segment, the first media segment is matched with the playback progress of the media file, the first media segment is played, and in response to a selection instruction for a target media segment, a target media segment is obtained, wherein the target media segment is one or more of at least one media segment.
[0005] As described above, by presenting at least one media segment to the user and matching the corresponding media segment to the user based on the current playback progress of the media file, the terminal can promptly locate the user's preference for media segments, enabling the user to quickly obtain the desired media segment without the need for the user to repeatedly play the media file to find a favorite segment or repeatedly adjust the progress bar to obtain a favorite segment. This solves the problem of inefficiency and cumbersome operation caused by manually dragging the progress bar to obtain a media file that matches the user's preferences.
[0006] As one possible implementation of the first aspect, in this method, the media file is an audio file and the target media segment is a ringtone, or the media file is a video file and the target media segment is a target video segment.
[0007] As one possible implementation of the first aspect, in this method, the target media segment is a spliced media segment, wherein the spliced media segment includes multiple segments from at least one media segment.
[0008] As one possible implementation of the first aspect, obtaining the target media segment in response to a selection instruction for the target media segment includes: in response to a selection instruction for multiple media segments, splicing multiple media segments from at least one media segment into a spliced media segment, and determining the spliced media segment as the target media segment.
[0009] As described above, it can not only automatically segment media files and display at least one media segment, but also splice multiple media segments according to user needs, improving the flexibility of users in trimming media files, enhancing the fun, and further improving the user experience.
[0010] As one possible implementation of the first aspect, obtaining the target media segment in response to a selection instruction for the target media segment includes: determining the first media segment as the target media segment in response to the selection of the first media segment.
[0011] As one possible implementation of the first aspect, the target media segment is a media segment other than the first media segment. In response to the selection instruction for the target media segment, before obtaining the target media segment, the method further includes: in response to the playback instruction for the media segment other than the first media segment, playing the media segment other than the first media segment; in response to the selection instruction for the target media segment, obtaining the target media segment includes: in response to the selection of the media segment other than the first media segment, determining the media segment other than the first media segment as the target media segment.
[0012] As one possible implementation of the first aspect, playing a media file includes: sending a media file request in response to a playback instruction for the media file; receiving media resources, metadata, and media segment information of the media file, wherein the media segment information is used to indicate media segments; and playing the media file based on the media resources, or media resources and metadata.
[0013] As one possible implementation of the first aspect, in response to a trimming instruction for a media file, displaying at least one media segment of the media file includes: in response to a trimming instruction for a media file, displaying at least one media segment of the media file based on media segment information.
[0014] As one possible implementation of the first aspect, displaying at least one media segment of a media file in response to a trimming instruction for the media file includes: sending a request to obtain media segment information in response to the trimming instruction for the media file, wherein the media segment information is used to indicate the media segment; receiving the media segment information; and displaying at least one media segment of the media file based on the media segment information.
[0015] As one possible implementation of the first aspect, before playing the first media segment, the method further includes: obtaining the playback progress of the media file; and matching the media segment information and the playback progress to determine the first media segment.
[0016] As one possible implementation of the first aspect, it also includes: media segment information is obtained based on user profiles and media files.
[0017] As described above, the server can process media files according to user preferences to obtain media segments that match user preferences, further improving the efficiency of users trimming media files.
[0018] A second aspect of this disclosure provides a media file trimming method, in which: a media file is played on a first display interface of a terminal; in response to a first operation on the first display interface, a second display interface is displayed, wherein the first operation instructs the trimming of the media file, the second display interface includes at least one media segment of the media file, the media segment includes a first media segment, the first media segment is matched with the playback progress of the media file; the first media segment is played; and in response to a second operation on the second display interface, a target media segment is obtained, wherein the target media segment is one or more of at least one media segment.
[0019] As described above, this method can efficiently locate users' preferences for media clips, enabling users to quickly obtain the media clips they want without having to repeatedly play media files to find their favorite clips or repeatedly adjust the progress bar to obtain their favorite clips. This solves the problem of inefficiency and cumbersome operation caused by manually dragging the progress bar to obtain media files that meet preferences, and improves the efficiency of trimming media files.
[0020] One possible implementation of the second aspect includes: the media file being audio and the target media segment being a ringtone; or the media file being video and the target media segment being a target video segment.
[0021] As one possible implementation of the second aspect, the second operation includes: selecting a first media segment as the target media segment; or, selecting a media segment other than the first media segment as the target media segment; or, selecting a spliced media segment composed of multiple media segments from at least one media segment as the target media segment.
[0022] As one possible implementation of the second aspect, playing the first media segment is in response to a third operation on the first media segment.
[0023] As a possible implementation of the second aspect, the method further includes, before selecting a media segment other than the first media segment as the target media segment: in response to a third operation on the media segment other than the first media segment, playing the media segment other than the first media segment.
[0024] As described above, by displaying and playing multiple media clips to users, users can listen to or preview any media clip, providing them with a variety of media clips to choose from, thus improving the user experience.
[0025] As one possible implementation of the second aspect, the second display interface further includes at least one control, wherein the at least one control corresponds one-to-one with at least one media segment, and the control indicates the selection or playback of the corresponding media segment.
[0026] As one possible implementation of the second aspect, selection is achieved by manipulating at least one media segment, or selection is achieved by manipulating at least one control.
[0027] As one possible implementation of the second aspect, playback is achieved by manipulating at least one media segment, or by manipulating at least one control.
[0028] As a possible implementation of the second aspect, the method further includes: the second display interface also includes at least one popular media segment of the media file, wherein the at least one popular media segment is one or more of at least one media segment.
[0029] As described above, by displaying popular media clips to users, users are provided with a reference for selecting media clips, thus further enhancing the user experience.
[0030] One possible implementation of the second aspect includes: determining the first media segment based on the playback progress of the media file.
[0031] As one possible implementation of the second aspect, it includes: after playing the first media segment, it also includes: displaying the spliced media segment.
[0032] As described above, it can not only automatically segment media files and display at least one media segment, but also splice multiple media segments according to user needs, improving the flexibility of users in trimming media files, enhancing the fun, and further improving the user experience.
[0033] The third aspect of this disclosure provides a media file trimming method, in which: a media file request is received; based on the media file request, media resources, metadata, and media segment information of the media file are obtained, wherein the media segment information indicates at least one media segment of the media file, and the media segment information is used to display and play the media segment; and the media resources, metadata, and media segment information of the media file are sent.
[0034] As a possible implementation of the third aspect, media segment information is obtained based on user profiles and media files.
[0035] This disclosure provides a media file trimming method, in which: a media file request is received; media resources and metadata are obtained based on the media file request; the media resources and metadata of the media file are sent; a media segment information request is received, wherein the media segment information indicates at least one media segment of the media file, and the media segment information is used to display and play the media segment; media segment information is obtained based on the media segment information request; and the media segment information is sent.
[0036] As one possible implementation of the fourth aspect, media segment information is obtained based on user profiles and media files.
[0037] As a possible implementation of the fourth aspect, the media segment information request also includes the playback progress of the media file. Obtaining media segment information includes: obtaining media segment information based on the playback progress and the media file, wherein the media segment information includes first media segment information, which is used to indicate the first media segment, and the first media segment matches the playback progress of the media file.
[0038] The fifth aspect of this disclosure provides an apparatus for trimming a media file, comprising: a playback unit for playing a media file; a display unit for displaying at least one media segment of the media file in response to a trimming instruction for the media file, wherein the media segment includes a first media segment and the first media segment is matched with the playback progress of the media file; a playback unit for playing the first media segment; and a processing unit for obtaining a target media segment in response to a selection instruction for a target media segment, wherein the target media segment is one or more of at least one media segment.
[0039] A sixth aspect of this disclosure provides an apparatus for media file trimming, comprising: a playback unit for playing a media file on a first display interface of a terminal; a display unit for displaying a second display interface in response to a first operation on the first display interface, wherein the first operation instructs the trimming of the media file, the second display interface includes at least one media segment of the media file, the media segment including the first media segment, the first media segment being matched with the playback progress of the media file; a playback unit for playing the first media segment; and a processing unit for obtaining a target media segment in response to a second operation on the second display interface, wherein the target media segment is one or more of at least one media segment.
[0040] A seventh aspect of this disclosure provides a terminal comprising: one or more processors, and a memory, wherein the memory is configured to store one or more programs; the one or more processors are configured to run the one or more programs such that the computing device performs a media file trimming method as described in any one of the first to second aspects.
[0041] An eighth aspect of this disclosure provides a server comprising: one or more processors, and a memory, wherein the memory is configured to store one or more programs; the one or more processors are configured to run one or more programs such that a computing device performs a media file trimming method as described in any of the third to fourth aspects.
[0042] The ninth aspect of this disclosure provides a computer-readable storage medium for storing program code executed by a processor, the program code including a media file trimming method for implementing any one of the first to fourth aspects.
[0043] The tenth aspect of this disclosure provides a computer program product, including program code, which, when a computer runs the computer program product, causes the computer to perform a media file trimming method as described in any one of the first to fourth aspects.
[0044] These and other aspects of this disclosure will become more apparent in the description of the following embodiments(s). Attached Figure Description
[0045] Figure 1 This is a simplified schematic diagram of a media file trimming system provided in an embodiment of the present disclosure;
[0046] Figure 2 This is a schematic diagram of the structure of a terminal provided in an embodiment of the present disclosure;
[0047] Figure 3 A schematic diagram of the software structure of a terminal provided in an embodiment of this disclosure;
[0048] Figure 4This is a schematic flowchart of a media file trimming method provided in an embodiment of the present disclosure;
[0049] Figure 5 A schematic diagram illustrating an audio segment recognition method provided in an embodiment of this disclosure;
[0050] Figure 6 A schematic diagram illustrating the composition structure of audio segments in a common audio stream provided in this embodiment of the disclosure;
[0051] Figure 7 A schematic flowchart of another media file trimming method provided in this embodiment of the disclosure;
[0052] Figure 8 A schematic flowchart of another media file trimming method provided in this embodiment of the disclosure;
[0053] Figure 9 A schematic flowchart of another media file trimming method provided in this embodiment of the disclosure;
[0054] Figure 10 This is a schematic diagram of a media file playback interface provided in an embodiment of the present disclosure;
[0055] Figures 11a to 11b This is a schematic diagram of an audio trimming interface provided in an embodiment of the present disclosure;
[0056] Figures 12a to 12b A schematic diagram of the interface for matching the first audio segment with the audio playback progress provided in an embodiment of this disclosure;
[0057] Figure 13 This is a schematic diagram of another audio trimming interface provided in an embodiment of the present disclosure. Detailed Implementation
[0058] The terms "first, second, third, etc." or similar terms such as module A, module B, module C, etc., used in the specification and claims are only used to distinguish similar objects and do not represent a specific ordering of objects. It is understood that a specific order or sequence may be interchanged where permitted so that the embodiments of this disclosure described herein can be implemented in an order other than that illustrated or described herein.
[0059] In the following description, the labels of the steps involved, such as S110, S120, etc., are described only as an exemplary implementation. The order of the steps can be interchanged or performed simultaneously where permitted.
[0060] The term "comprising" as used in the specification and claims should not be construed as limiting itself to what follows; it does not exclude other elements or steps. Therefore, it should be interpreted as specifying the presence of the mentioned feature, integral, step, or component, but does not exclude the presence or addition of one or more other features, integrals, steps, or components, or groups thereof. Thus, the statement "device comprising means A and B" should not be limited to a device consisting solely of components A and B.
[0061] The terms "an embodiment" or "an embodiment" as used in this specification mean that a particular feature, structure, or characteristic described in conjunction with that embodiment is included in at least one embodiment of this disclosure. Therefore, the terms "in an embodiment" or "in an embodiment" appearing throughout this specification do not necessarily refer to the same embodiment, but may refer to the same embodiment. Furthermore, in one or more embodiments, the particular features, structures, or characteristics can be combined in any suitable manner, as will be apparent to those skilled in the art from this disclosure.
[0062] The terminology used herein is for the purpose of describing embodiments of this disclosure only and is not intended to limit this disclosure.
[0063] The embodiments of this disclosure will now be described in detail with reference to the accompanying drawings.
[0064] like Figure 1 The diagram shown is a simplified illustration of a media file trimming system provided in an embodiment of this disclosure. The media file trimming system 100 includes a terminal 101 and a server 102.
[0065] Terminal 101 can be a mobile phone, tablet computer, handheld computer, laptop computer, cellular phone, personal digital assistant (PDA), wearable device (such as wristband, smartwatch, smart glasses), in-vehicle device, game console, smart TV, or augmented reality (AR) / virtual reality (VR) device, etc. This embodiment does not impose any special limitations on the specific form of the terminal. In this embodiment, terminal 101 has the function of displaying and playing media files. The terminal can play media files through a client running on the terminal, or through the playback component of the terminal's operating system; this disclosure is not limited thereto. The client is an application running on the terminal, providing services to the user. This application includes applications pre-installed in the system, applications that need to be downloaded and installed, and lightweight applications that do not require installation (such as mini-programs, quick apps, or light apps), and can also be a web browser running on the terminal device. The client has the function of playing media files, such as a media playback application, a media application, an audio playback application, or an audio application, etc. The media application is an application developed and released by a media operation platform that can run independently on the terminal device. The media operation platform can be understood as the platform to which the media server belongs, or it can be understood as the media operation platform provided by the media server. This disclosure does not make any limitation.
[0066] The server side may include a single server or a cluster of multiple servers. Examples include network or cloud servers, application servers, backend servers, or combinations thereof.
[0067] The networks of terminal 101 and server 102 can communicate via cellular networks, such as communication networks supporting fourth-generation (4G) access technologies, such as Long Term Evolution (LTE) access technologies; or, the communication network can also be a communication network supporting fifth-generation (5G) access technologies, such as New Radio (NR) access technologies; or, the communication network can also be a communication network supporting third-generation (3G) access technologies, such as Universal Mobile Telecommunications System (UMTS) access technologies; or, the communication network can also be a communication network supporting multiple wireless technologies, such as a communication network supporting LTE and NR technologies; or, the communication network can also be adapted to future-oriented communication technologies, and this disclosure is not limited thereto.
[0068] like Figure 2The diagram shown is a structural schematic of a terminal provided in an embodiment of this disclosure. It should be understood that... Figure 2 The terminal 200 shown is merely an example, and the terminal 200 may have more or fewer components than those shown in the figure, may combine two or more components, or may have different component configurations. Figure 2 The various components shown can be implemented in hardware, software, or a combination of hardware and software, including one or more signal processing and / or application-specific integrated circuits.
[0069] This is a schematic diagram of the structure of a terminal provided in an embodiment of this disclosure. This terminal can be the terminal described above. It should be understood that... Figure 2 The terminal 200 shown is merely an example, and the terminal 200 may have more or fewer components than those shown in the figure, may combine two or more components, or may have different component configurations. Figure 2 The various components shown can be implemented in hardware, software, or a combination of hardware and software, including one or more signal processing and / or application-specific integrated circuits.
[0070] Terminal 200 includes one or more processors 201, communication bus 202, memory 203 and one or more communication interfaces 204.
[0071] The processor 201 is a general-purpose central processing unit (CPU), a natural network processor (NP), a microprocessor, or one or more integrated circuits for implementing the embodiments of this disclosure, such as an application-specific integrated circuit (ASIC), a programmable logic device (PLD), or a combination thereof. Optionally, the PLD is a complex programmable logic device (CPLD), a field-programmable gate array (FPGA), a generic array logic (GAL), or any combination thereof.
[0072] The communication bus 202 is used to transmit information between the aforementioned components. Optionally, the communication bus 202 may be divided into an address bus, a data bus, a control bus, etc. For ease of illustration, Figure 2 The bus is represented by a single thick line, but this does not mean that there is only one bus or one type of bus.
[0073] Optionally, the memory 203 may be a read-only memory (ROM), random access memory (RAM), electrically erasable programmable read-only memory (EEPROM), optical disc (including compact disc read-only memory (CD-ROM), compressed optical disc, laser disc, digital versatile optical disc, Blu-ray disc, etc.), magnetic disk storage medium, or other magnetic storage device, or any other medium capable of carrying or storing desired program code in the form of instructions or data structures that can be accessed by a computer, but not limited thereto. The memory 203 exists independently and is connected to the processor 201 via the communication bus 202, or the memory 203 is integrated with the processor 201.
[0074] Communication interface 204 uses any transceiver-like device for communicating with other devices or communication networks. Communication interface 204 includes a wired communication interface, and optionally, also includes a wireless communication interface. The wired communication interface is, for example, an Ethernet interface. Optionally, the Ethernet interface is an optical interface, an electrical interface, or a combination thereof. The wireless communication interface is a wireless local area network (WLAN) interface, a cellular network communication interface, or a combination thereof.
[0075] Optionally, in some embodiments, the terminal includes multiple processors, such as Figure 2 The processors 201 and 205 shown are illustrated. Each of these processors is a single-core processor or a multi-core processor. Optionally, a processor here refers to one or more devices, circuits, and / or processing cores used for processing data (such as computer program instructions).
[0076] In a specific implementation, as one embodiment, terminal 200 further includes an output device 206 and an input device 207. Output device 206 communicates with processor 201 and can display or play information in various ways. Output device 206 may include a speaker and a display screen. A speaker, also called a "loudspeaker," is used to convert audio electrical signals into sound signals. Terminal 200 can play audio through the speaker. In this embodiment, the speaker can be used to play audio according to instructions from processor 201. Input device 207 communicates with processor 201 and can receive user input in various ways. Input device 207 may include a receiver, microphone, mouse, keyboard, touchscreen device, or sensing device, etc.
[0077] In some embodiments, memory 203 is used to store program code 210 for executing the scheme of this disclosure, and processor 201 is capable of executing the program code 210 stored in memory 203. The program code includes one or more software modules, and the terminal can implement the media file trimming method provided in the embodiments of this disclosure through processor 201 and program code 210 in memory 203.
[0078] The software system of terminal 200 can adopt a layered architecture, event-driven architecture, microkernel architecture, microservice architecture, or cloud architecture. This disclosure uses the layered architecture Android system as an example to illustrate the software structure of terminal 200.
[0079] The technical solutions involved in the following embodiments can all be implemented in devices with the above-described hardware architecture.
[0080] like Figure 3 The diagram shown is a schematic representation of the software structure of a terminal provided in an embodiment of this disclosure.
[0081] like Figure 3 As shown, the layered architecture divides the software into several layers, each with a clear role and function. Layers communicate with each other through interfaces. In some embodiments, the system may include an application layer, an application framework layer, a system runtime library layer, and a kernel layer.
[0082] It should be noted that the embodiments disclosed herein use the Android system as an example. In other operating systems (such as HarmonyOS, iOS, etc.), as long as the functions implemented by each functional module are similar to those in the embodiments disclosed herein, the solution described herein can also be implemented.
[0083] The application layer can include a series of application packages. For example... Figure 3 As shown, the application package may include applications such as camera, gallery, calendar, call, music, SMS, audio playback, and media applications. In other words, the client on the terminal described in this disclosure can be a music, audio playback, or media application at the application layer.
[0084] The application framework layer provides application programming interfaces (APIs) and a programming framework for applications in the application layer. The application framework layer includes some predefined functions.
[0085] like Figure 3 As shown, the application framework layer may include a window manager, content provider, view system, resource manager, notification manager, etc.
[0086] The window manager is used to manage windowed applications. It can obtain the screen size, determine if a status bar is present, lock the screen, and capture the screen, among other things.
[0087] Content providers store and retrieve data, making that data accessible to applications. This data can include videos, images, audio, phone calls made and received, browsing history and bookmarks, phone books, and more.
[0088] A view system includes visual controls, such as controls for displaying video, images, and text. View systems can be used to build applications. An application interface can consist of one or more views. For example, the interface of an audio playback application and a media application may include controls for displaying media clip content, controls for displaying playback text, controls for displaying content such as media file cropping, etc.
[0089] The file explorer provides applications with various resources, such as localized strings, icons, images, layout files, video files, audio files, and so on.
[0090] The notification manager allows applications to display notifications in the status bar. These notifications can be used to deliver informational messages and can disappear automatically after a short pause, requiring no user interaction. Examples include notifications for completed downloads and message alerts. Notifications can also appear as icons or scrolling text in the top status bar, or as dialog boxes on the screen. Examples include displaying text messages in the status bar, emitting sounds, vibrating electronic devices, and flashing indicator lights.
[0091] The Android Runtime consists of core libraries and a virtual machine. The Android runtime is responsible for the scheduling and management of the Android system.
[0092] The core library consists of two parts: one part is the functionalities that need to be called by the Java language, and the other part is the Android core library.
[0093] The application layer and application framework layer run in a virtual machine. The virtual machine executes the Java files of the application layer and application framework layer as binary files. The virtual machine is used to perform functions such as object lifecycle management, stack management, thread management, security and exception management, and garbage collection.
[0094] System libraries can include multiple functional modules. For example: surface manager, media libraries, 3D graphics processing libraries (e.g., OpenGL ES), 2D graphics engines (e.g., SGL), etc.
[0095] The Surface Manager is used to manage the display subsystem and provides the blending of 2D and 3D layers for multiple applications.
[0096] The media library supports playback and recording of various common audio and video formats, as well as still image files. It supports multiple audio and video encoding formats, such as MPEG4, H.264, MP3, AAC, AMR, JPG, and PNG. The media library is used to manage and organize audio, video, and other media files, allowing applications to access and manipulate these files through standard APIs.
[0097] The 3D graphics processing library is used to implement 3D graphics drawing, image rendering, compositing, and layer processing.
[0098] A 2D graphics engine is a graphics engine for 2D drawing.
[0099] The kernel layer is the layer between hardware and software. The kernel layer includes at least display drivers, camera drivers, Wi-Fi drivers, audio drivers, and sensor drivers.
[0100] Understandable, Figure 3 The components included in the system framework layer, system library, and runtime layer shown do not constitute a specific limitation on terminal 200. In other embodiments of this disclosure, terminal 200 may include more or fewer components than shown, or combine some components, or split some components, or have different component arrangements.
[0101] Figure 4 This is a schematic flowchart illustrating a media file trimming method provided in an embodiment of this disclosure. Figure 4 As shown, the method may include:
[0102] S401, Play media files.
[0103] The terminal plays media files. Playback can be achieved through a client running on the terminal or through the terminal's system playback component; this disclosure is not limited to either. The client can be a media playback application, a media application, an audio playback application, or an audio application, etc. The terminal can play media files on a first display interface. The first display interface can be a playback interface.
[0104] In some embodiments, in response to a media file playback command, the terminal displays a playback interface and sends a media file request to the server. The server receives the media file request and obtains the media resources and metadata of the media file. The server sends the media resources and metadata to the terminal. The terminal receives the media resources and metadata of the media file and plays the media file based on the media resources, or the media resources and metadata. Here, media resources are the digital representation of the media file, i.e., the data of the media file itself. For example, when the media file is audio, the media resources are audio data or audio stream. As another example, when the media file is video, the media resources are video data or video stream. Metadata describes the attributes or content of the media file. The attribute information of the media file may include the media file duration, media file name, artist name, media file format, media file size, media file creation date, media file modification date, media file permission information, media file storage location, etc. The content information of the media file may include keywords or phrases related to the theme or content of the media file. For example, when the media file is audio, the metadata may be song duration, song title, album name, artist name, etc. For example, when the media file is a video, the metadata can be the video duration, video name, type, director or actor's name, etc.
[0105] In some other embodiments, in response to a playback command for a media file, the terminal obtains the media resources, or media resources and metadata, of the media file. The media resources and metadata of the media file are stored locally. The terminal plays the media file based on the media resources, or media resources and metadata. It should be understood that when the terminal responds to a playback command for a media file, it first checks whether the media resources and metadata of the media file exist in the terminal's storage space. If the media resources and metadata of the media file exist in the terminal's storage space, the terminal directly obtains the media resources and metadata of the media file from the storage space and plays the media file on the playback interface. If the media resources and metadata of the media file do not exist in the terminal, the terminal sends a media file request to the server.
[0106] S402, In response to a media file trimming instruction, display at least one media segment of the media file, wherein the media segment includes a first media segment, and the first media segment matches the playback progress of the media file.
[0107] The trimming command can be triggered by a user's first operation, which can be at least one of the following: gesture operation (e.g., touch operation or air gesture operation), sound operation, motion operation, bending operation (e.g., bending a folding screen), or key operation. In response to the trimming command for the media file, the terminal can display at least one media segment of the media file on a second display interface. A media segment is a portion extracted from the media file and has a specific start and end time. For example, when the media file is audio, the media segment is an audio segment; in specific application scenarios, the media segment can be a ringtone, sound effect, specific voice feedback, audio clips, etc. As another example, when the media file is video, the media segment is a video segment.
[0108] In some embodiments, in response to a trimming instruction for a media file, the terminal acquires media segment information and displays at least one media segment of the media file based on the media segment information. The media segment information describes the attributes or content of the media segment and is used to indicate the media segment. The attribute information of the media segment may include the type of the media segment, the name of the media segment, and the start and end times, size, format, creation / modification date, creator, permission information, and storage information of the media segment. The content information of the media segment may include keywords or phrases describing the theme or content of the media segment. The media segment information may be in JSON, XML, or other data formats that can indicate the media segment type and start and end times; this disclosure is not limited to these formats. The terminal reads the media segment name, start and end times from the media segment information and displays at least one media segment on the interface based on the above information. The terminal determines a first media segment that matches the current playback progress of the media file. Specifically, the terminal acquires the current playback time of the media file and the media segment information, wherein the media segment information includes the start and end times of the media segment. If the start and end times of the first media segment include the current playback time of the media file, the first media segment matches the playback progress of the media file, and the terminal determines the first media segment. The terminal may highlight the first media segment; this highlighting can be achieved through methods such as highlighting, bolding, or using different colors, and this disclosure is not limited to these methods.
[0109] In some other embodiments, the media segment information further includes first media segment information. In response to a trimming instruction for a media file, the terminal sends a request for media segment information to the server, wherein the request includes the current playback progress of the media file. The server obtains the media segment information based on the media file and the playback progress. The server sends the media segment information to the terminal. The terminal displays at least one media segment of the media file based on the media segment information, the media segment including the first media segment. The terminal highlights the first media segment based on the media segment information.
[0110] The media segment information obtained by the terminal can come from the server or from the local machine.
[0111] In some embodiments, the server can send media resources, metadata, and media segment information of a media file to the terminal based on a media file request. The terminal receives the media resources, metadata, and media segment information and caches the media segment information locally. The terminal can retrieve the media segment information in response to a trimming instruction for the media file.
[0112] In some other embodiments, the terminal may respond to a media file trimming instruction by sending a request for media segment information to the server. The server, in response to this request, sends the media segment information to the terminal.
[0113] In some other embodiments, the terminal may obtain media file fragment information in response to a media file trimming instruction. This media file fragment information is stored locally. The media fragment information may be generated by the terminal before receiving the trimming instruction, or it may be generated in response to the trimming instruction; this disclosure is not limited thereto.
[0114] In some embodiments, the server can obtain media segment information based on media files. Specifically, the server identifies media segments based on the media resources of the media file, generates media segment information, and thus obtains the media segment information. The server can identify media segments using a neural network model, which can be a recurrent neural network (RNN), convolutional neural network (CNN), Transformer, an improved Transformer, Mamba, etc., and this disclosure is not limited to these. Taking audio as an example, the neural network model can process the audio according to its structure to obtain audio segments. Taking video as an example, the neural network model can process the video according to its content to obtain video segments. For example, the neural network model can identify the video based on its plot to obtain multiple different video segments, each corresponding to a plot segment.
[0115] In one example, taking an audio media file as an example, the server receives a request for a media file and obtains the audio stream, metadata, and audio segment information. The audio stream includes at least one audio segment. The server can use a neural network model to identify the audio segments in the audio stream and obtain the audio segment information. Figure 5 This is a schematic diagram illustrating an audio segment recognition method provided in an embodiment of the present disclosure, such as... Figure 5 As shown, the audio stream is input into a neural network model. The neural network model identifies the chorus, instruments, and vocals of the audio, and records the start and end times of each. It should be understood that the recognition order can be adjusted as needed, and this disclosure is not limited thereto. In chorus recognition, chorus A, chorus B, and chorus C located at different playback positions are identified. In instrument recognition, the intro, interlude, and outro located at different playback positions are identified. In vocal recognition, verse A and verse B located at different playback positions are identified. The neural network outputs the identified audio segment information, which can be in JSON format. Figure 5 Taking the audio stream as an example, the output audio segment information is {"Intro":[0,29],"Verse A":[29,61],"Chorus A":[61,92],"Interlude":[92,108],"Verse B":[108,124],"Chorus B":[124,146],"Chorus C":[146,174],"Outro":[174,189]}. Optionally, the audio segment can also be in XML format, and the output audio segment information is <?xmlversion="1.0"encoding="UTF-8"?> <root><Prelude>0< / Prelude><Prelude>29< / Prelude><Verse A>29< / Verse A><Verse A>61< / Verse A><Chorus A>61< / Chorus A><Chorus A>92< / Chorus A><Interlude>92< / Interlude><Interlude>108< / Interlude><Verse B>108< / Verse B><Verse B>124< / Verse B><Chorus B>124< / Chorus B><Chorus B>146< / Chorus B><Chorus C>146< / Chorus C><Chorus C>174< / Chorus C><Outro>174< / Outro><Outro>189< / Outro>< / root> .
[0116] It should be understood that different audio streams consist of different audio segments; that is, the compositional structure of audio streams differs. For example, different audio streams may have different numbers and start / end times for choruses, verses, intros, interludes, and outros. Figure 6 The diagram shown is a schematic representation of the common audio stream segment composition structure provided in the embodiments of this disclosure.
[0117] Furthermore, the server can obtain media segments based on user profiles and media files, thereby obtaining media segment information. The user profile indicates the user's preferences for media segments. Optionally, the user profile may include historical information about the user's media segment editing and / or playback history. Specifically, the server can identify media segments based on the user profile and media resources of the media files. The server can input the user profile and media resources into a neural network model to obtain media segment information. Before sending the media segment information, the server includes a step of obtaining historical information about the user's media segment editing and / or playback history from the terminal. Optionally, the user profile may include user preference data for media segments. Before sending the media segment information, the server obtains historical information about the user's media segment editing and / or playback history from the terminal. The server can process the above information to obtain user preference data for media segments, such as the duration of preferred media segments, preferred media segment types, etc. The server can process the above information using neural network models, recommendation algorithms, or clustering algorithms; this disclosure is not limited to these. The server inputs preference data and media resources into the neural network model to generate media segment information, thereby obtaining the media segment information.
[0118] As described above, the server can process media files according to user preferences to obtain media segments that match user preferences, further improving the efficiency of users trimming media files.
[0119] In some other embodiments, the server can obtain media segment information based on media files and playback progress, or the server can obtain media segments based on media files, user profiles, and media files. The server obtains basic media segment information based on media files, and the specific steps are consistent with the steps in the above embodiments, as described in the corresponding embodiments above, and will not be repeated here. The server obtains basic media segment information based on media files and user profiles, and the specific steps are consistent with the steps in the above embodiments, as described in the corresponding embodiments above, and will not be repeated here. The server determines a first media segment that matches the playback progress of the current media file. Specifically, the server obtains the current playback time of the media file from the media segment information request, and obtains the start and end times of the media segment from the basic media segment information. If the time range of the start and end times of the first media segment includes the current playback time of the media file, the first media segment matches the playback progress of the media file, the server determines the first media segment, and generates the first media segment information. The server generates media segment information based on the first media segment information and the basic media segment information, so that the terminal can display the media segment according to the media segment information. The media segment includes the first media segment.
[0120] After obtaining the media segment information, the server sends the media segment information to the client. Optionally, the server stores the media segment information in a cache. Therefore, when the client requests the same media file, it can directly retrieve the media segment information from the cache without having to recalculate it.
[0121] In some other embodiments, the terminal can obtain media segment information based on media files, or it can obtain media segment information based on user profiles and media files. The process by which the terminal obtains media segment information based on media files, or media files and user profiles, is consistent with the processing steps on the server side; please refer to the corresponding steps on the server side, and they will not be repeated here.
[0122] Furthermore, the terminal displays at least one media segment of the media file, including: the terminal displays at least one popular media segment of the media file. The methods for displaying popular media segments include, but are not limited to, highlighting, marking (such as "popular" marking, star marking, flame marking, etc.), and this disclosure is not limited to these methods. Specifically, the server obtaining media segment information of the media file also includes: the server obtaining popular media segment identifiers of the media file. Optionally, the server can write the popular media segment identifiers into the media segment information to identify popular media segments within the media file. Figure 5 Taking an audio stream as an example, a popular audio segment is the interlude. The output audio segment information is {"Intro":[0,14],"Verse A":[14,35],"Chorus A":[35,52],"Interlude":[52,61],"Verse B":[61,80],"Chorus B":[84,110],"Chorus C":[110,125],"Outro":[125,140],"Popular Audio Segment":"Interlude"}. Popular media segments are those that are well-received by users. Popular media segments can be determined by calculating at least one of the following: click-through rate, usage rate, download rate, or number of positive comments. The higher the value of the click-through rate, usage rate, download rate, number of positive comments, or a combination thereof, the more popular the current media segment is. For example, by calculating the values of the click-through rate, usage rate, download rate, number of positive comments, or a combination thereof for multiple media segments, media segments with values higher than a threshold are identified as popular media segments. The threshold can be set according to requirements. For example, the click-through rate, usage rate, download rate, number of positive comments, or combinations thereof, of multiple media segments are calculated to determine the media segment with the highest value as the popular media segment. A popular media segment identifier is used to identify popular media segments. This identifier can be generated by the server after the popular media segments are identified, and it can be written into the media segment information as part of the media segment information to identify the popular media segment among multiple media segments.
[0123] S403, Play the first media clip.
[0124] Specifically, the terminal plays the first media segment based on the start and end times in the media segment information of the first media segment.
[0125] In some embodiments, when the terminal responds to a trimming instruction for a media file and displays at least one media segment, it plays the first media segment.
[0126] In some other embodiments, the terminal plays the first media segment in response to a user's playback command. Optionally, the terminal may trigger a playback command based on a user's operation on the first media segment to play the first media segment. Optionally, the terminal may also trigger a playback command based on a user's operation on a playback control to play the first media segment.
[0127] Further, after the terminal plays the first media segment, the process further includes: in response to a playback command for at least one media segment, the terminal plays the media segment. Optionally, the terminal may trigger the playback command based on a user's playback command for at least one media segment. Optionally, the terminal may trigger the playback command based on a user's voice command for at least one media segment. After the terminal plays the first media segment, the process may include the playback of the first media segment in progress or the end of playback of the first media segment. In response to a playback command for a media segment other than the first media segment, the media segment other than the first media segment is played. In response to a playback command for the first media segment, the first media segment is played.
[0128] Therefore, in addition to playing the media segment corresponding to the current playback progress, the terminal will also play other media segments. Users can listen to or preview any media segment, providing users with a variety of media segments to choose from, thus improving the user experience.
[0129] S404. In response to the selection instruction for the target media segment, the target media segment is obtained, wherein the target media segment is one or more of at least one media segment.
[0130] The target media segment is the first media segment, a media segment other than the first media segment, or a spliced media segment, wherein the spliced media segment includes multiple segments from at least one media segment.
[0131] The selection command for the target media segment can be triggered based on the user's operation on at least one media segment, or it can be triggered based on the user's voice command on at least one media segment.
[0132] In some embodiments, obtaining a target media segment in response to a selection instruction for a target media segment includes: in response to a selection instruction for a first media segment, the terminal determines the first media segment as the target media segment.
[0133] In some other embodiments, after the terminal plays the first media segment, in response to a playback instruction for a media segment other than the first media segment, the client plays the media segment other than the first media segment. Obtaining the target media segment in response to a selection instruction for a target media segment includes: in response to a selection instruction for a media segment other than the first media segment, the terminal determines the media segment other than the first media segment as the target media segment.
[0134] In some other embodiments, obtaining the target media segment in response to a selection instruction includes: in response to a selection instruction for multiple media segments, splicing multiple media segments from the at least one media segment into a spliced media segment, and determining the spliced media segment as the target media segment. Specifically, the terminal parses multiple media segments, arranges the media segments in sequence, and forms a spliced media segment with a continuous audio data stream, or a continuous video and audio data stream. The terminal can splice multiple media segments by calling a media splicing tool, such as the multimedia processing tool FFmpeg, Python's moviepy library, etc., and this disclosure is not limited thereto. The terminal displays the spliced media segment. Further, in response to a playback instruction for the spliced media segment, the client plays the spliced media segment.
[0135] Therefore, the media trimming method provided in this embodiment can not only automatically segment media files and display at least one media segment of the media file, but also splice multiple media segments according to user needs, improving the flexibility and fun of trimming media files and further enhancing the user experience.
[0136] In some embodiments, obtaining the target media segment by the terminal includes: the terminal trimming the media resource according to the target media segment information to generate the target media segment. Specifically, the terminal trims the media resource according to the start time and end time in the target media segment information to generate the target media segment.
[0137] In one example, assuming the media file is audio, when the user clicks "Set as Ringtone," the terminal uses the currently selected audio segment as the ringtone, i.e., the target audio segment. The terminal trims the audio stream based on the start and end times of this audio segment to obtain the target audio segment. Further, the terminal calls the system's Application Programming Interface (API) to set the target audio segment as the system's ringtone.
[0138] In another example, assuming the media file is a video, the target media segment is the target video segment. In response to the user's instruction to specify the target video segment, the terminal designates the current video segment as the target video segment. The terminal then trims the video stream based on the information of the current video segment to obtain the target video segment.
[0139] Therefore, the media file trimming method according to the embodiments of this disclosure can match the corresponding media segments according to the current playback progress of the media file and present them to the user. It can efficiently locate the user's preference for media segments, enabling the user to quickly obtain the desired media segments without the need for the user to repeatedly play the media file to find the favorite segments or repeatedly adjust the progress bar to obtain the favorite segments. This solves the problem of cumbersome and inefficient operation caused by manually dragging the progress bar to obtain media files that meet preferences.
[0140] Figure 7 This is a schematic flowchart illustrating another media file trimming method provided in this embodiment of the disclosure. Figure 7 As shown, the method may include:
[0141] S701. In response to a media file playback command, the terminal sends a media file request to the server.
[0142] In response to a media file playback command, the terminal sends a media file request to the server and displays the playback interface. The media file request includes a media file identifier. This identifier uniquely identifies the media file and can be used to locate, manage, or track the media file within the system or network. The media identifier can be a universally unique identifier (UUID), file ID, file hash value, copyright identification code, audio fingerprint, etc.
[0143] S702. The server obtains media resources, metadata, and media segment information based on media file requests.
[0144] The server responds to a media file request by obtaining media resources, metadata, and media segment information. Specifically, the server obtains the media file identifier from the media file request and retrieves the media resources, metadata, and media segment information of the media file based on the media file identifier. Specifically, the server searches for media segment information in the cache based on the media file identifier. If the media segment information is found, the server sends the media resources, metadata, and media segment information of the media file to the terminal. Optionally, the server can write the media segment information into the metadata. The server sends the media resources and metadata of the media file to the terminal, where the metadata includes the media segment information. It should be understood that the media segment information may also be sent as independent data without being written into the metadata. If the media segment information is not found, the server identifies the media segment based on the media resources of the media file, generates media segment information, and thus obtains the media segment information. The steps for the server to obtain media segment information are consistent with the process of obtaining media segment information in step S402 of the aforementioned embodiments, as described in the aforementioned embodiments, and will not be repeated here.
[0145] S703, The server sends media resources, metadata, and media segment information to the terminal, wherein the media segment information indicates at least one media segment of the media file.
[0146] S704: The terminal plays media files based on media resources or based on media resources and metadata.
[0147] Optionally, the terminal plays media files based on media resources. Alternatively, the terminal plays media files based on media resources and metadata. For example, the terminal obtains information such as the encoding format, title, artist, or subtitles of the media file from the metadata. The terminal decodes the media resource using the encoding format information and displays the title, artist, or subtitles on the terminal's playback interface (i.e., the first interface), thereby enabling the playback of the media file.
[0148] S705. In response to a media file trimming command, the terminal displays at least one media segment of the media file, wherein the media segment includes a first media segment, and the first media segment matches the playback progress of the media file.
[0149] The process of displaying at least one media segment can be found in the corresponding content of S402 in the aforementioned embodiment, and will not be repeated here.
[0150] S706, the terminal plays the first media segment.
[0151] The process of the terminal playing the first media segment can be found in the corresponding content of S403 in the aforementioned embodiment, and will not be repeated here.
[0152] S707. In response to the selection instruction for the target media segment, the target media segment is obtained, wherein the target media segment is one or more of at least one media segment.
[0153] The process of obtaining the target media segment can be found in the corresponding content of S404 in the aforementioned embodiment, and will not be repeated here.
[0154] Therefore, the media file trimming method according to the embodiments of this disclosure can match the corresponding media segments according to the current playback progress of the media file and present them to the user. It can efficiently locate the user's preference for media segments, enabling the user to quickly obtain the desired media segments without the need for the user to repeatedly play the media file to find the favorite segments or repeatedly adjust the progress bar to obtain the favorite segments. This solves the problem of cumbersome and inefficient operation caused by manually dragging the progress bar to obtain media files that meet preferences.
[0155] Figure 8 This is a schematic flowchart illustrating another media file trimming method provided in this embodiment of the disclosure. Figure 8 As shown, the method may include: S801, in response to a media file playback command, the terminal sends a media file request to the server.
[0156] The steps for the terminal to send a media file request to the server are the same as steps S701 in the aforementioned embodiment, as described in S701, and will not be repeated here.
[0157] S802. The server obtains media resources and metadata based on media file requests.
[0158] The server responds to media file requests by retrieving media resources and metadata. Specifically, the server obtains the media file identifier from the media file request and uses this identifier to retrieve the media resources and metadata of the media file.
[0159] S803, The server sends media resources and metadata to the terminal.
[0160] S804: The terminal plays media files based on media resources or based on media resources and metadata.
[0161] The steps for the terminal to play media files are the same as steps S703 in the aforementioned embodiment. Please refer to the description of S703, which will not be repeated here.
[0162] S805. In response to a media file trimming instruction, the terminal sends a media segment information request to the server, wherein the media segment request includes a media file identifier and the media segment information indicates at least one media segment of the media file.
[0163] S806. Based on the media segment information request, the server obtains the media segment information.
[0164] The server receives a media segment information request and retrieves the media file segment information based on the media file identifier. Specifically, the server searches for the media segment information in the storage space based on the media file identifier. If the media segment information is found, the server sends the media segment information to the terminal. If the media segment information is not found, the server retrieves the media resource based on the media file identifier. The server identifies the media file based on the media resource and generates the media segment information, thereby obtaining the media segment information. The steps for the server to obtain the media segment information are consistent with the process of obtaining the media segment information in step S402 of the aforementioned embodiments, as described in the aforementioned embodiments, and will not be repeated here. The server sends the media segment information to the terminal.
[0165] S807, The server sends media segment information to the terminal.
[0166] S808. The terminal displays at least one media segment of a media file based on media segment information, wherein the media segment includes a first media segment, and the first media segment matches the playback progress of the media file.
[0167] The process of displaying at least one media segment can be found in the corresponding content of S402 in the aforementioned embodiment, and will not be repeated here.
[0168] S809, the terminal plays the first media segment.
[0169] The process of the terminal playing the first media segment can be found in the corresponding content of S403 in the aforementioned embodiment, and will not be repeated here.
[0170] S810, in response to the selection instruction for the target media segment, obtain the target media segment, wherein the target media segment is one or more of at least one media segment.
[0171] The process of obtaining the target media segment can be found in the corresponding content of S404 in the aforementioned embodiment, and will not be repeated here.
[0172] Therefore, the media file trimming method according to the embodiments of this disclosure can match the corresponding media segments according to the current playback progress of the media file and present them to the user. It can efficiently locate the user's preference for media segments, enabling the user to quickly obtain the desired media segments without the need for the user to repeatedly play the media file to find the favorite segments or repeatedly adjust the progress bar to obtain the favorite segments. This solves the problem of cumbersome and inefficient operation caused by manually dragging the progress bar to obtain media files that meet preferences.
[0173] Figure 9 This is a schematic flowchart illustrating another media file trimming method provided in this embodiment of the disclosure. Figure 9 As shown, the method may include:
[0174] S901, Play media files on the first display interface of the terminal.
[0175] The media file can be audio or video, and this disclosure is not limited thereto. The first display interface can be the playback interface for playing the media file displayed on the terminal. The terminal plays the media file, which can be done through a client running on the terminal or through the playback component of the terminal's system, and this disclosure is not limited thereto. The client can be a media playback application, a media application, an audio playback application, or an audio application, etc. In specific implementations, the terminal may play the media file in response to an instruction from the terminal user, such as when the terminal user opens a media playback application, a media application, an audio playback application, or an audio application; or it may play the media file on the terminal's first display interface in response to an instruction from the server. The specific playback process may include, for example, the server transcoding and preprocessing the media file information, transmitting the media file to the terminal, and the terminal decoding and rendering the media file to achieve playback; or, the terminal playing a locally saved media file.
[0176] In one example, let's say the media file is audio. Figure 10 This is a schematic diagram of a media file playback interface provided in an embodiment of the present disclosure, such as... Figure 10 As shown, the first display interface is the audio playback interface.
[0177] In some embodiments, the terminal receives a user's playback operation for a media file. In response to this operation, the terminal displays a playback interface and sends a media file request to the server, wherein the media file request includes a media file identifier. The server receives the media file request and obtains the media resources and metadata of the media file based on the media file identifier. The server sends the media resources and metadata to the terminal. The terminal receives the media resources and metadata of the media file and plays the multimedia file based on the media resources, or plays the media file based on the media resources and metadata. In some embodiments, in response to a user's playback operation for a media file, the terminal displays a playback interface and sends a media file request to the server. The server receiving the media file request and obtaining the media resources and metadata of the media file based on the media file identifier further includes: the server obtaining media segment information of the media file based on the media file identifier, wherein the media file includes at least one media segment. The process of the server obtaining media segment information is consistent with the process of the server obtaining media segment information in S402 of the aforementioned embodiments; see the description of the corresponding steps in S402, which will not be repeated here.
[0178] In some other embodiments, the terminal receives a user's playback operation for a media file. In response to this operation, the terminal displays a playback interface and retrieves the media resources and metadata of the media file from the terminal. The terminal checks whether the media resources and metadata of the media file exist in its storage space. If the media resources and metadata of the media file exist in the terminal's storage space, the terminal retrieves the media resources and metadata of the media file from its storage space and plays the media file on the playback interface. If the media resources and metadata of the media file do not exist on the terminal, the terminal sends a media file request to the server, wherein the media file request includes a media file identifier. The server receives the media file request and retrieves the media resources and metadata of the media file based on the media file identifier. The server sends the media resources and metadata to the terminal. The terminal receives the media resources and metadata of the media file and plays the media file on the playback interface.
[0179] In some other embodiments, the terminal receives a user's playback command for a media file. In response to this command, the terminal displays a playback interface and plays the media file. The media file's media resources and metadata are stored locally. The terminal plays the media file based on the media resources, or media resources and metadata. It should be understood that when the terminal responds to a media file playback command, it first checks whether the media file's media resources and metadata exist in the terminal's storage space. If the media file's media resources and metadata exist in the terminal's storage space, the terminal directly retrieves the media file's media resources and metadata from the storage space and plays the media file on the playback interface. If the media file's media resources and metadata do not exist in the terminal, the terminal sends a media file request to the server.
[0180] S902. In response to a first operation on the first display interface, a second display interface is displayed, wherein the first operation instructs the media file to be trimmed, and the second display interface includes at least one media segment of the media file, the media segment including a first media segment, and the first media segment matching the playback progress of the media file.
[0181] The first operation is performed by the user and can be at least one of the following: gesture operation (e.g., touch operation or air gesture operation), sound operation, motion operation, bending operation (e.g., bending a folding screen), or key operation; this disclosure is not limited thereto. The first operation on the first display interface can be an operation on a clipping entry control on the first display interface, the clipping entry control indicating entry to the media file clipping. The second display interface can be a media file clipping interface. In one example, taking audio as an example, such as... Figure 10 As shown, the entry control for trimming is the "Ringtone" button. The first operation is for the user to click the "Ringtone" button in the audio playback interface. The second display interface is the audio ringtone creation interface, which is also the audio trimming interface, as shown below. Figure 11aAs shown, Figure 11a This is a schematic diagram of an audio trimming interface provided in an embodiment of the present disclosure.
[0182] In some embodiments, when a user performs a first operation, in response to the first operation, the terminal acquires media segment information and displays at least one media segment of the media file based on the media segment information. The media segment information acquired by the terminal can come from a server or from a local source.
[0183] In some embodiments, the server can send media resources, metadata, and media segment information of a media file to the terminal based on a media file request. The terminal receives the media resources, metadata, and media segment information and caches the media segment information locally. The terminal can retrieve the media segment information in response to a trimming instruction for the media file.
[0184] In some other embodiments, the terminal may, in response to a first operation on the first display interface, request the server to send media segment information. The server, in response to this request, sends the media segment information to the terminal.
[0185] In some other embodiments, the terminal may obtain media file fragment information in response to a first operation on the first display interface. The media file fragment information is stored locally. The media fragment information may be generated by the terminal before receiving a trimming instruction, or it may be generated in response to a trimming instruction; this disclosure is not limited thereto.
[0186] The process of generating media segment information by the server or terminal can be found in step S402 of the aforementioned embodiment, and will not be repeated here.
[0187] In some embodiments, the terminal reads the media segment name, start time, and end time from the media segment information, and displays at least one media segment on the interface based on the above information. The terminal determines a first media segment that matches the current playback progress of the media file. Specifically, the terminal obtains the current playback time of the media file and media segment information, wherein the media segment information includes the start time and end time of the media segment. If the time range of the start and end times of the first media segment includes the current playback time of the media file, the first media segment matches the playback progress of the media file, and the terminal obtains the first media segment. The terminal may highlight the first media segment; highlighting may employ methods such as highlighting, bolding, or using different colors, and this disclosure is not limited to these methods. Figure 11a As shown, the first media segment is "Chorus B", and the audio waveform corresponding to "Chorus B" is displayed in different colors.
[0188] In some embodiments, the second display interface displays at least one media segment. The user can select or play the media segment by interacting with it. Figure 11a As shown, the second display interface shows eight audio segments: intro, verse A, chorus A, interlude, verse B, chorus B, chorus C, and outro. Users can select or play any audio segment by clicking on it.
[0189] In some other embodiments, the second display interface further includes at least one control, wherein each control corresponds one-to-one with at least one media segment, and the control indicates the selection or playback of the corresponding media segment. The control may be a button control, a switch control, or a custom control, etc., and this disclosure is not limited thereto. Figure 11b As shown, Figure 11b This is a schematic diagram of another audio trimming interface provided in this embodiment of the present disclosure. The second display interface displays controls corresponding to eight audio segments: intro, verse A, chorus A, interlude, verse B, chorus B, chorus C, and outro. Users can select or play the corresponding audio segment by clicking any of the above controls.
[0190] Furthermore, the terminal displays at least one media segment of the media file, which also includes: the terminal displays at least one popular media segment of the media file. The methods for displaying popular media segments include, but are not limited to, highlighting, marking (such as "popular" marking, star marking, flame marking, etc.), and this disclosure is not limited to these methods.
[0191] In one example, taking an audio media file as an example, the audio playback interface is as follows: Figure 10 As shown, the first operation is for the user to click the "Ringtone" button in the audio playback interface. In response to this first operation, the terminal obtains the audio segment information and displays the audio trimming interface, which is also the ringtone trimming interface, as shown below. Figure 11a As shown. The audio segment information obtained by the terminal is {"Intro":[0,14],"Verse A":[14,35],"Chorus A":[35,52],"Interlude":[52,61],"Verse B":[61,80],"Chorus B":[84,110],"Chorus C":[110,125],"Outro":[125,140],"Popular Audio Segments":"Interlude"}. Based on the audio segment information, the audio trimming interface displays at least one audio segment, such as Figure 11aAs shown, there are eight audio segments: intro, verse A, chorus A, interlude, verse B, chorus B, chorus C, and outro. The interlude is a popular segment and is marked "Popular." The terminal obtains the current playback time and audio segment information. If the start and end times of the first audio segment include the current playback time, the first audio segment matches the audio playback progress. For example, as... Figure 12a As shown ( Figure 12a This is a schematic diagram of an interface for matching a first audio segment with audio playback progress, provided in an embodiment of this disclosure. The current playback time of the audio is 84 seconds. The terminal determines that the current playback progress belongs to the time range of chorus B [84, 110], and the terminal determines that chorus B is the first media segment. For example, as... Figure 12b As shown ( Figure 12b (This is a schematic diagram of an interface for matching a first audio segment with the audio playback progress provided in an embodiment of this disclosure). The current playback time of the audio is the 8th second. The terminal determines that the current playback progress belongs to the time range of the prelude [0,14], and the terminal determines that the prelude is the first media segment.
[0192] S903, Play the first media clip.
[0193] Specifically, the terminal plays the first media segment based on the start and end times in the media segment information of the first media segment.
[0194] In some embodiments, when the terminal displays a second display interface in response to a first operation on the first display interface, it plays a first media segment. That is, when the terminal switches from the first display interface to the second display interface for display, the first media segment is played automatically.
[0195] In some other embodiments, the terminal plays the first media segment in response to a user's operation on the second display interface. Optionally, the terminal may play the first media segment in response to a user's operation on the first media segment or a control corresponding to the first media segment. For example, as... Figure 11a As shown, when the terminal displays the second display interface, the first media clip "Chorus B" is highlighted. When the user clicks "Chorus B," the terminal plays "Chorus B." Optionally, the terminal can also respond to the user's operation of the playback control to play the first media clip, where the playback control is a control on the second display interface used to control the playback of the media clip. For example, as... Figure 11a As shown, the playback control is the "Listen to Ringtone" control. When the second display interface is displayed on the terminal, the first media segment "Chorus B" is highlighted. When the user clicks the "Listen to Ringtone" control, the terminal plays "Chorus B".
[0196] Furthermore, after the terminal plays the first media segment, it also includes: in response to a third operation on any one of the at least one control, the terminal plays the media segment corresponding to the control.
[0197] The third operation is performed by the user and can be at least one of the following: gesture operation (e.g., touch operation or air gesture operation), voice operation, motion operation, bending operation (e.g., bending a folding screen), or key operation; this disclosure is not limited thereto. The terminal may be in the process of playing the first media segment or at the end of playing the first media segment after the first media segment has finished playing.
[0198] In some embodiments, the third operation can be an operation on a media segment, whereby the user operates on any media segment, and the terminal plays the media segment. It should be understood that the third operation can be an operation on a media segment other than the first media segment, and in response to the third operation, the media segment other than the first media segment is played. The third operation can also be an operation on the first media segment, and in response to the third operation, the first media segment is played.
[0199] In one example, let's say the media file is audio. Figure 13 As shown ( Figure 13 This is a schematic diagram of an audio trimming interface provided in an embodiment of this disclosure. The terminal interface displays eight audio segments: intro, verse A, chorus A, interlude, verse B, chorus B, chorus C, and outro. After the terminal plays the first audio segment, the user can click on any audio segment to play the corresponding audio segment. Figure 13 Taking the interface shown as an example, the terminal is currently playing chorus B. When the user clicks on verse A, the terminal switches to playing verse A, and starts listening from the 14th second.
[0200] In another example, the user issues a voice command for any media segment, and the terminal plays that media segment. For example, the user issues the voice command "play the intro," and the terminal plays the intro.
[0201] In some other embodiments, the third operation may be an operation on a control corresponding to a media segment. The user operates on a control corresponding to any media segment, and the terminal plays the media segment corresponding to that control. It should be understood that the third operation may be an operation on a control corresponding to a media segment other than the first media segment, and in response to the third operation, the media segment other than the first media segment is played. Alternatively, the third operation may be an operation on a control corresponding to the first media segment, and in response to the third operation, the first media segment is played.
[0202] Therefore, in addition to playing the media segment corresponding to the current playback progress, the terminal will also play other media segments. Users can listen to or preview any media segment, providing users with a variety of media segments to choose from, thus improving the user experience.
[0203] S904. In response to a second operation on the second display interface, a target media segment is obtained, wherein the target media segment is one or more of at least one media segment.
[0204] The second operation can be at least one of gesture operation (e.g., touch operation or air gesture operation), voice operation, motion operation, bending operation (e.g., bending folding screen) or key operation, and this disclosure is not limited thereto.
[0205] The target media segment is the first media segment, a media segment other than the first media segment, or a spliced media segment, wherein the spliced media segment includes multiple segments from at least one media segment.
[0206] In some embodiments, in response to a second operation on a second display interface, a first media segment is determined to be a target media segment.
[0207] In some other embodiments, after the terminal plays the first media segment, in response to a third operation on a media segment other than the first media segment or a control corresponding to a media segment other than the first media segment, the media segment other than the first media segment is played. In response to a second operation on the second display interface, the media segment other than the first media segment is determined to be the target media segment.
[0208] In some other embodiments, obtaining the target media segment in response to a second operation on the second display interface includes: splicing multiple media segments from the at least one media segment into a spliced media segment, and determining the spliced media segment as the target media segment. Specifically, the second display interface includes a first display area for splicing media segments. The second operation may involve a user selecting multiple media segments from at least one media segment, moving the multiple media segments to the first display area, manipulating the arrangement order of the multiple media segments within the first display area, splicing the multiple media segments within the first display area, obtaining the spliced media segment, and thus obtaining the target media segment. The movement may be by dragging or by voice control, and this disclosure is not limited thereto. In response to the second operation on the multiple media segments, the terminal splices the multiple media segments into a single spliced media segment and displays the spliced media segment on the second display interface. Specifically, splicing the multiple media segments into a single spliced media segment involves the terminal connecting the media segments end-to-end according to their arrangement order to form a complete spliced media segment. For example, if multiple media segments are arranged from left to right, the terminal uses the first media segment on the left as the first segment of the spliced media segment and the last media segment on the right as the last segment, thus splicing the multiple media segments sequentially. The arrangement order can also be from top to bottom, and this disclosure is not limited to this. It should be understood that the arrangement order of the multiple media segments is determined by the user...Figure 11a Taking the displayed audio clips as an example, users can move the intro, verse A, and interlude to the first display area, and then splice them together to obtain a spliced media clip. Furthermore, in response to operations on the playback controls, the terminal plays the spliced media clip.
[0209] Therefore, the media trimming method provided in this embodiment can not only automatically segment media files and display at least one media segment of the media file, but also splice multiple media segments according to user needs, improving the flexibility and fun of trimming media files and further enhancing the user experience.
[0210] In some embodiments, determining the target media segment by the terminal includes: the terminal trimming media resources according to the target media segment information to generate the target media segment. Specifically, the terminal trims media resources according to the start time and end time in the target media segment information to generate the target media segment.
[0211] In one example, assuming the media file is audio and the target media segment is a ringtone, such as... Figure 11a As shown, when the user clicks "Set as Ringtone," the terminal sets the chorus B as the ringtone, i.e., the target audio segment. The terminal trims the audio stream according to the chorus B [84, 110] (i.e., the start time is 84 seconds and the end time is 110 seconds) to obtain the target audio segment. Further, the terminal calls the system's Application Programming Interface (API) to set the target audio segment as the system's ringtone.
[0212] In another example, assuming the media file is video, the target media segment is the target video segment. In response to the user's instruction to specify the target video segment, the terminal determines the current video segment as the target video segment. The client then trims the video stream based on the current video segment information to obtain the target video segment.
[0213] Therefore, the media file trimming method according to the embodiments of this disclosure can display at least one media segment of a media file, match the corresponding media segment to the user according to the current playback progress of the media file, and play it to the user. It can efficiently locate the user's preference for media segments, enabling the user to quickly obtain the desired media segment without the need for the user to repeatedly play the media file to find the favorite segment or repeatedly adjust the progress bar to obtain the favorite segment. It solves the problem of cumbersome, inconvenient and time-consuming operation caused by manually dragging the progress bar to obtain the media file that meets the preference.
[0214] This disclosure provides an apparatus for trimming media files. The media file trimming apparatus includes a playback unit, a display unit, and a processing unit. The playback unit is used to play a media file; the display unit is used to display at least one media segment of the media file in response to a trimming instruction for the media file, wherein the media segment includes a first media segment that matches the playback progress of the media file; the playback unit is also used to play the first media segment; the processing unit is used to obtain a target media segment in response to a selection instruction for a target media segment, wherein the target media segment is one or more of at least one media segment.
[0215] It should be noted that the steps performed by each unit in the terminal in this embodiment are the same as the steps (S401-S404) performed by the terminal in the previous embodiment. Therefore, the various implementation methods and technical effects can be referred to the media file trimming method performed by the terminal in the previous embodiment, and will not be repeated here.
[0216] The media file trimming device provided in this embodiment can be used by means of Figure 2 The architecture of the terminal 200 shown is used for implementation. Figure 2 As shown, the playback unit can perform the steps of its function, such as playing a media file, through the processor 201 and / or processor 205 in the terminal 200 and the speaker in the output device 207. The display unit can perform the steps of its function, such as displaying at least one media segment of a media file in response to a trimming instruction for the media file, through the processor 201 and / or processor 205 in the terminal 200 and the display screen in the output device 207. The processing unit can perform the steps of its function, such as obtaining a target media segment in response to a selection instruction for a target media segment.
[0217] This disclosure provides yet another media file trimming apparatus. The media file trimming apparatus includes a playback unit, a display unit, and a processing unit. The playback unit is used to play a media file on a first display interface of a terminal. The display unit is used to display a second display interface in response to a first operation on the first display interface, wherein the first operation instructs the trimming of the media file, and the second display interface includes at least one media segment of the media file, the media segment including a first media segment, the first media segment being matched with the playback progress of the media file. The playback unit is also used to play the first media segment. The processing unit is used to obtain a target media segment in response to a second operation on the second display interface, wherein the target media segment is one or more of at least one media segment.
[0218] It should be noted that the steps performed by each unit in the terminal in this embodiment are the same as the steps (S901-S904) performed by the terminal in the previous embodiment. Therefore, the various implementation methods and technical effects can be referred to the media file trimming method performed by the terminal in the previous embodiment, and will not be repeated here.
[0219] The media file trimming device provided in this embodiment can be used by means of Figure 2 The architecture of the terminal 200 shown is used for implementation. Figure 2 As shown, the playback unit can perform the steps of its function, such as playing a media file, through the processor 201 and / or processor 205 in the terminal 200 and the speaker in the output device 207. The display unit can perform the steps of its function, such as displaying a second display interface in response to a first operation on the first display interface, through the processor 201 and / or processor 205 in the terminal 200 and the display screen in the output device 207. The processing unit can perform the steps of its function, such as obtaining a target media segment in response to a second operation on the second display interface, through the processor 201 and / or processor 205 in the terminal 200.
[0220] This disclosure provides a terminal. The terminal includes one or more processors and one or more memories, wherein the memories store computer-readable code that, when executed by the one or more processors, can perform the methods as described in the above embodiments (S401-S404, S901-S904).
[0221] This disclosure also provides a server, which includes one or more processors and one or more memories, wherein the memories store computer-readable code that, when run by the one or more processors, can execute the methods as described in the above embodiments (S702, S703).
[0222] This disclosure provides yet another server, which includes one or more processors and one or more memories, wherein the memories store computer-readable code that, when executed by the one or more processors, can perform the methods of the above embodiments (S802, S803, S806, S807).
[0223] Those skilled in the art will recognize that the units and algorithm steps of the various examples described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this disclosure.
[0224] Those skilled in the art will understand that, for the sake of convenience and brevity, the specific working processes of the systems, devices, and units described above can be referred to the corresponding processes in the foregoing method embodiments, and will not be repeated here.
[0225] In the several embodiments provided in this disclosure, it should be understood that the disclosed systems, apparatuses, and methods can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative; for instance, the division of units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be through some interfaces; the indirect coupling or communication connection between apparatuses or units may be electrical, mechanical, or other forms.
[0226] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.
[0227] In addition, the functional units in the various embodiments of this disclosure can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit.
[0228] If the aforementioned functions are implemented as software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this disclosure, in essence, or the part that contributes to the prior art, or a portion of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of this disclosure. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.
[0229] This disclosure also provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, performs a method for trimming media files, including at least one of the schemes described in the above embodiments.
[0230] The computer storage medium of this disclosure can be any combination of one or more computer-readable media. The computer-readable medium can be a computer-readable signal medium or a computer-readable storage medium. For example, a computer-readable storage medium can be, but is not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination thereof. More specific examples of computer-readable storage media (a non-exhaustive list) include: an electrical connection having one or more wires, a portable computer disk, a hard disk, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage device, magnetic storage device, or any suitable combination thereof. In this document, a computer-readable storage medium can be any tangible medium that contains or stores a program that can be used by or in conjunction with an instruction execution system, apparatus, or device.
[0231] Computer-readable signal media may include data signals propagated in baseband or as part of a carrier wave, carrying computer-readable program code. Such propagated data signals may take various forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination thereof. Computer-readable signal media may also be any computer-readable medium other than computer-readable storage media, capable of sending, propagating, or transmitting programs for use by or in connection with an instruction execution system, apparatus, or device.
[0232] The program code contained on a computer-readable medium may be transmitted using any suitable medium, including, but not limited to, wireless, wire, optical fiber, RF, etc., or any suitable combination thereof.
[0233] Computer program code for performing the operations of this disclosure can be written in one or more programming languages or a combination thereof, including object-oriented programming languages such as Java, Smalltalk, and C++, and conventional procedural programming languages such as the "C" language or similar programming languages. The program code can be executed entirely on the user's computer, partially on the user's computer, as a standalone software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving remote computers, the remote computer can be connected to the user's computer via any type of network, including a local area network (LAN) or a wide area network (WAN), or it can be connected to an external computer (e.g., via the Internet using an Internet service provider).
[0234] This disclosure also provides a computer program product or computer program including computer instructions stored in a computer-readable storage medium. A processor of a computer device reads the computer instructions from the computer-readable storage medium and executes the computer instructions, causing the computer device to perform a method according to an embodiment of this disclosure.
[0235] It should be noted that the flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of systems, methods, and computer program products according to various embodiments of this disclosure. In this regard, each block in a flowchart or block diagram may represent a module, segment, or portion of code containing one or more executable instructions for implementing a specified logical function. It should also be noted that in some alternative implementations, the functions indicated in the blocks may occur in a different order than those indicated in the drawings. For example, two consecutively indicated blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each block in the block diagrams and / or flowcharts, and combinations of blocks in the block diagrams and / or flowcharts, can be implemented using a dedicated hardware-based system that performs the specified function or operation, or using a combination of dedicated hardware and computer instructions.
[0236] In general, the various exemplary embodiments of this disclosure can be implemented in hardware or dedicated circuitry, software, firmware, logic, or any combination thereof. Some aspects can be implemented in hardware, while others can be implemented in firmware or software that can be executed by a controller, microprocessor, or other computing device. When aspects of embodiments of this disclosure are illustrated or described as block diagrams, flowcharts, or using some other graphical representation, it will be understood that the blocks, apparatuses, systems, techniques, or methods described herein can be implemented as non-limiting examples in hardware, software, firmware, dedicated circuitry or logic, general-purpose hardware or controllers or other computing devices, or some combination thereof.
[0237] Note that the above are merely preferred embodiments and the technical principles employed in this disclosure. Those skilled in the art will understand that this disclosure is not limited to the specific embodiments described herein, and various obvious changes, readjustments, and substitutions can be made without departing from the scope of protection of this disclosure. Therefore, although this disclosure has been described in detail through the above embodiments, this disclosure is not limited to the above embodiments. Many other equivalent embodiments may be included without departing from the concept of this disclosure, all of which fall within the scope of protection of this disclosure.
Claims
1. A method for trimming media files, characterized in that, include: Play media files; In response to a trimming instruction for the media file, at least one media segment of the media file is displayed, wherein the media segment includes the first media segment, and the first media segment matches the playback progress of the media file; Play the first media segment; In response to a selection instruction for a target media segment, the target media segment is obtained, wherein the target media segment is one or more of the at least one media segment.
2. The method as described in claim 1, characterized in that, include: The media file is an audio file, and the target media segment is a ringtone; Alternatively, the media file may be a video, and the target media segment may be a target video segment.
3. The method according to any one of claims 1-2, characterized in that, The target media segment is a spliced media segment, wherein the spliced media segment includes multiple segments from the at least one media segment.
4. The method as described in claim 3, characterized in that, The process of obtaining the target media segment in response to a selection instruction for the target media segment includes: In response to a selection instruction for multiple media segments, multiple media segments from the at least one media segment are spliced together to form a spliced media segment, and the spliced media segment is determined as the target media segment.
5. The method as described in claim 3, characterized in that, The step of obtaining the target media segment in response to a selection instruction for the target media segment includes: determining the first media segment as the target media segment in response to the selection of the first media segment.
6. The method according to any one of claims 1-4, characterized in that, The target media segment is a media segment other than the first media segment, and the step of obtaining the target media segment in response to the selection instruction for the target media segment further includes: In response to a playback command for a media segment other than the first media segment, play the media segment other than the first media segment; The step of obtaining the target media segment in response to a selection instruction for the target media segment includes: in response to the selection of a media segment other than the first media segment, determining the media segment other than the first media segment as the target media segment.
7. The method according to any one of claims 1-4, characterized in that, The media file to be played includes: In response to a playback command for the media file, a media file request is sent; The system receives media resources, metadata, and media segment information of the media file, wherein the media segment information is used to indicate media segments. Play the media file based on the media resource, or the media resource and the metadata.
8. The method as described in claim 7, characterized in that, In response to a trimming instruction for the media file, displaying at least one media segment of the media file includes: In response to a trimming instruction for the media file, at least one media segment of the media file is displayed based on the media segment information.
9. The method according to any one of claims 1-4, characterized in that, In response to a trimming instruction for the media file, displaying at least one media segment of the media file includes: In response to a trimming instruction for the media file, a request to obtain media segment information is sent, wherein the media segment information is used to indicate media segments; Receive the media segment information; Display at least one media segment of the media file based on the media segment information.
10. The method according to any one of claims 7-9, characterized in that, Before playing the first media segment, it also includes: Get the playback progress of the media file; The first media segment is determined by matching the media segment information and the playback progress.
11. The method according to any one of claims 7-9, characterized in that, Also includes: The media segment information is obtained based on the user profile and the media file.
12. A method for trimming media files, characterized in that, include: Play the media file on the first display interface of the terminal; In response to a first operation on the first display interface, a second display interface is displayed, wherein the first operation instructs the media file to be trimmed, and the second display interface includes at least one media segment of the media file, the media segment including a first media segment, the first media segment being matched with the playback progress of the media file; Play the first media segment; In response to a second operation on the second display interface, a target media segment is obtained, wherein the target media segment is one or more of the at least one media segment.
13. The method as described in claim 12, characterized in that, include: The media file is an audio file, and the target media segment is a ringtone; Alternatively, the media file may be a video, and the target media segment may be a target video segment.
14. The method according to any one of claims 12-13, characterized in that, The second operation includes: Select the first media segment as the target media segment; or... Select a media segment other than the first media segment as the target media segment; or, The target media segment is selected as the spliced media segment consisting of multiple media segments from the at least one media segment.
15. The method as described in claim 12, characterized in that, Playing the first media segment is in response to a third operation on the first media segment.
16. The method as described in claim 14, characterized in that, The method further includes the following steps before selecting a media segment other than the first media segment as the target media segment: In response to a third operation on a media segment other than the first media segment, the media segment other than the first media segment is played.
17. The method as described in claim 14, characterized in that, The second display interface further includes at least one control, wherein the at least one control corresponds one-to-one with the at least one media segment, and the control indicates the selection or playback of the corresponding media segment.
18. The method as described in claim 17, characterized in that, The selection is achieved by manipulating the at least one media segment, or by manipulating the at least one control.
19. The method as described in claim 17, characterized in that, The playback is achieved by manipulating the at least one media segment, or by manipulating the at least one control.
20. The method according to any one of claims 12-19, characterized in that, include: The second display interface also includes at least one popular media segment of the media file, wherein the at least one popular media segment is one or more of the at least one media segment.
21. The method according to any one of claims 12-20, characterized in that, include: The first media segment is determined based on the playback progress of the media file.
22. The method as described in claim 14, characterized in that, After playing the first media clip, it also includes: The spliced media clips are displayed.
23. A method for trimming media files, characterized in that, include: Receive media file requests; In response to the media file request, obtain the media resources and metadata of the media file; Send the media resources and metadata of the media file; Receive the media segment information request, wherein the media segment information indicates at least one media segment of the media file; Obtain the media segment information; Send the media segment information.
24. The method as described in claim 23, characterized in that, Obtaining the media segment information includes: The media segment information is obtained based on the user profile and the media file.
25. The method as described in claim 23 or 24, characterized in that, The media segment information request also includes the playback progress of the media file, and obtaining the media segment information includes: The media segment information is obtained based on the playback progress and the media file, wherein the media segment information includes first media segment information, which is used to indicate the first media segment, and the first media segment matches the playback progress of the media file.
26. A media file trimming device, characterized in that, include: The playback unit is used to play media files; The display unit is configured to display at least one media segment of the media file in response to a trimming instruction for the media file, wherein the media segment includes the first media segment and the first media segment is matched with the playback progress of the media file; The playback unit is used to play the first media segment; A processing unit is configured to obtain the target media segment in response to a selection instruction for the target media segment, wherein the target media segment is one or more of the at least one media segment.
27. A media file trimming device, characterized in that, include: A playback unit is used to play the media file on the first display interface of the terminal; A display unit is configured to display a second display interface in response to a first operation on the first display interface, wherein the first operation instructs the media file to be trimmed, and the second display interface includes at least one media segment of the media file, the media segment including a first media segment, the first media segment being matched with the playback progress of the media file; The playback unit is used to play the first media segment; A processing unit is configured to obtain a target media segment in response to a second operation on the second display interface, wherein the target media segment is one or more of the at least one media segment.
28. A terminal, characterized in that, include: One or more processors, and a memory, wherein the memory is used to store one or more programs; The one or more processors are configured to run the one or more programs such that the computing device performs the method as described in any one of claims 1-22.
29. A server, characterized in that, include: One or more processors, a memory, wherein the memory is used to store one or more programs; the one or more processors are used to run the one or more programs such that the computing device performs the method as described in any one of claims 23-25.
30. A computer-readable storage medium, characterized in that, The computer-readable storage medium is used to store program code executed by a processor, the program code including instructions for implementing the method as described in any one of claims 1-25.
31. A computer program product, characterized in that, Includes program code that, when a computer runs the computer program product, causes the computer to perform the method as described in any one of claims 1-25.