WO2020134892A1 - 一种媒体文件裁剪的方法、电子设备和服务器 - Google Patents
一种媒体文件裁剪的方法、电子设备和服务器 Download PDFInfo
- Publication number
- WO2020134892A1 WO2020134892A1 PCT/CN2019/122518 CN2019122518W WO2020134892A1 WO 2020134892 A1 WO2020134892 A1 WO 2020134892A1 CN 2019122518 W CN2019122518 W CN 2019122518W WO 2020134892 A1 WO2020134892 A1 WO 2020134892A1
- Authority
- WO
- WIPO (PCT)
- Prior art keywords
- cropping
- electronic device
- file
- media file
- server
- Prior art date
Links
- 238000000034 method Methods 0.000 title claims abstract description 59
- 238000005520 cutting process Methods 0.000 claims description 48
- 230000008569 process Effects 0.000 claims description 14
- 230000000694 effects Effects 0.000 abstract description 5
- 238000004891 communication Methods 0.000 description 43
- 230000006854 communication Effects 0.000 description 43
- 230000006870 function Effects 0.000 description 37
- 238000012545 processing Methods 0.000 description 30
- 238000010586 diagram Methods 0.000 description 22
- 238000007726 management method Methods 0.000 description 22
- 238000010295 mobile communication Methods 0.000 description 14
- 230000005236 sound signal Effects 0.000 description 13
- 210000000988 bone and bone Anatomy 0.000 description 10
- 238000005516 engineering process Methods 0.000 description 9
- 230000003993 interaction Effects 0.000 description 9
- 101100247669 Quaranfil virus (isolate QrfV/Tick/Afghanistan/EG_T_377/1968) PB1 gene Proteins 0.000 description 7
- 101150025928 Segment-1 gene Proteins 0.000 description 7
- 101100242902 Thogoto virus (isolate SiAr 126) Segment 1 gene Proteins 0.000 description 7
- 238000004590 computer program Methods 0.000 description 5
- 230000003287 optical effect Effects 0.000 description 5
- 230000004044 response Effects 0.000 description 5
- 229920001621 AMOLED Polymers 0.000 description 4
- 230000001133 acceleration Effects 0.000 description 4
- 238000001514 detection method Methods 0.000 description 4
- 238000013528 artificial neural network Methods 0.000 description 3
- 230000008859 change Effects 0.000 description 3
- 230000033001 locomotion Effects 0.000 description 3
- 230000000007 visual effect Effects 0.000 description 3
- 230000002159 abnormal effect Effects 0.000 description 2
- 238000010009 beating Methods 0.000 description 2
- 230000036772 blood pressure Effects 0.000 description 2
- 230000001413 cellular effect Effects 0.000 description 2
- 238000013500 data storage Methods 0.000 description 2
- 230000014509 gene expression Effects 0.000 description 2
- 230000004048 modification Effects 0.000 description 2
- 238000012986 modification Methods 0.000 description 2
- 230000002093 peripheral effect Effects 0.000 description 2
- 238000009877 rendering Methods 0.000 description 2
- 239000004065 semiconductor Substances 0.000 description 2
- 238000012546 transfer Methods 0.000 description 2
- 101100242901 Quaranfil virus (isolate QrfV/Tick/Afghanistan/EG_T_377/1968) PB2 gene Proteins 0.000 description 1
- 101150082826 Segment-2 gene Proteins 0.000 description 1
- 101100194052 Thogoto virus (isolate SiAr 126) Segment 2 gene Proteins 0.000 description 1
- 230000006978 adaptation Effects 0.000 description 1
- 230000003416 augmentation Effects 0.000 description 1
- 230000007175 bidirectional communication Effects 0.000 description 1
- 230000002457 bidirectional effect Effects 0.000 description 1
- 238000013529 biological neural network Methods 0.000 description 1
- 230000005540 biological transmission Effects 0.000 description 1
- 230000015572 biosynthetic process Effects 0.000 description 1
- 210000004556 brain Anatomy 0.000 description 1
- 238000004422 calculation algorithm Methods 0.000 description 1
- 238000004364 calculation method Methods 0.000 description 1
- 238000006243 chemical reaction Methods 0.000 description 1
- 230000000295 complement effect Effects 0.000 description 1
- 239000004020 conductor Substances 0.000 description 1
- HAORKNGNJCEJBX-UHFFFAOYSA-N cyprodinil Chemical group N=1C(C)=CC(C2CC2)=NC=1NC1=CC=CC=C1 HAORKNGNJCEJBX-UHFFFAOYSA-N 0.000 description 1
- 238000011161 development Methods 0.000 description 1
- 239000000284 extract Substances 0.000 description 1
- 230000004927 fusion Effects 0.000 description 1
- 230000005484 gravity Effects 0.000 description 1
- 230000003862 health status Effects 0.000 description 1
- 230000001939 inductive effect Effects 0.000 description 1
- 239000010985 leather Substances 0.000 description 1
- 239000004973 liquid crystal related substance Substances 0.000 description 1
- 230000007774 longterm Effects 0.000 description 1
- 210000002569 neuron Anatomy 0.000 description 1
- 239000013307 optical fiber Substances 0.000 description 1
- 238000007639 printing Methods 0.000 description 1
- 238000003672 processing method Methods 0.000 description 1
- 239000002096 quantum dot Substances 0.000 description 1
- 230000005855 radiation Effects 0.000 description 1
- 230000009467 reduction Effects 0.000 description 1
- 230000001172 regenerating effect Effects 0.000 description 1
- 238000005070 sampling Methods 0.000 description 1
- 238000013515 script Methods 0.000 description 1
- 238000000926 separation method Methods 0.000 description 1
- 230000003238 somatosensory effect Effects 0.000 description 1
- 230000006641 stabilisation Effects 0.000 description 1
- 238000011105 stabilization Methods 0.000 description 1
- 230000001360 synchronised effect Effects 0.000 description 1
- 238000003786 synthesis reaction Methods 0.000 description 1
- JLGLQAWTXXGVEM-UHFFFAOYSA-N triethylene glycol monomethyl ether Chemical compound COCCOCCOCCO JLGLQAWTXXGVEM-UHFFFAOYSA-N 0.000 description 1
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F1/00—Details not covered by groups G06F3/00 - G06F13/00 and G06F21/00
- G06F1/26—Power supply means, e.g. regulation thereof
- G06F1/32—Means for saving power
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F3/00—Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
- G06F3/01—Input arrangements or combined input and output arrangements for interaction between user and computer
- G06F3/048—Interaction techniques based on graphical user interfaces [GUI]
- G06F3/0484—Interaction techniques based on graphical user interfaces [GUI] for the control of specific functions or operations, e.g. selecting or manipulating an object, an image or a displayed text element, setting a parameter value or selecting a range
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N21/00—Selective content distribution, e.g. interactive television or video on demand [VOD]
- H04N21/40—Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
- H04N21/43—Processing of content or additional data, e.g. demultiplexing additional data from a digital video stream; Elementary client operations, e.g. monitoring of home network or synchronising decoder's clock; Client middleware
- H04N21/431—Generation of visual interfaces for content selection or interaction; Content or additional data rendering
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N21/00—Selective content distribution, e.g. interactive television or video on demand [VOD]
- H04N21/40—Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
- H04N21/43—Processing of content or additional data, e.g. demultiplexing additional data from a digital video stream; Elementary client operations, e.g. monitoring of home network or synchronising decoder's clock; Client middleware
- H04N21/44—Processing of video elementary streams, e.g. splicing a video clip retrieved from local storage with an incoming video stream or rendering scenes according to encoded video stream scene graphs
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N21/00—Selective content distribution, e.g. interactive television or video on demand [VOD]
- H04N21/40—Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
- H04N21/43—Processing of content or additional data, e.g. demultiplexing additional data from a digital video stream; Elementary client operations, e.g. monitoring of home network or synchronising decoder's clock; Client middleware
- H04N21/44—Processing of video elementary streams, e.g. splicing a video clip retrieved from local storage with an incoming video stream or rendering scenes according to encoded video stream scene graphs
- H04N21/4402—Processing of video elementary streams, e.g. splicing a video clip retrieved from local storage with an incoming video stream or rendering scenes according to encoded video stream scene graphs involving reformatting operations of video signals for household redistribution, storage or real-time display
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N21/00—Selective content distribution, e.g. interactive television or video on demand [VOD]
- H04N21/40—Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
- H04N21/47—End-user applications
- H04N21/472—End-user interface for requesting content, additional data or services; End-user interface for interacting with content, e.g. for content reservation or setting reminders, for requesting event notification, for manipulating displayed content
Definitions
- the present invention relates to the field of media, and in particular to a method for cutting media files, an electronic device, and a server.
- Streaming media is a kind of media that is transmitted while broadcasting, and is also a kind of multimedia.
- Side-by-side broadcasting means that when a media provider transmits media on the network, users continuously receive and watch or listen to the transmitted media.
- the popularity of smart phones has made streaming media services a common content service. Users can watch video content and listen to audio content based on streaming media technology.
- Existing technology implements media cropping.
- an electronic device downloads a complete media file to the local of the electronic device, and the electronic device clips the media file through an application program installed on the electronic device. Clipping of the media file.
- This way of media cropping is very computationally intensive and consumes a lot of power, and it takes a long time to implement the cropping operation.
- the application program on the terminal device also needs to do some new development adaptation, and the media file can be edited only after the application upgrade.
- Embodiments of the present invention provide a method for cutting media files, an electronic device, and a server. Compared with the prior art, the power consumption of the terminal side cutting is smaller and the cutting time is shorter.
- an embodiment of the present invention provides a method for media file cropping, which includes: an electronic device acquiring a media file identifier and cropping parameters, and sending a cropping request to a server according to the cropping parameters.
- the electronic device receives the cropping result information returned by the server.
- the electronic device generates a crop file based on the crop result information and the media file.
- the acquiring, by the electronic device, the media file identification and cropping parameters includes: receiving, by the electronic device, a user operation, acquiring the media file identification and cropping parameters.
- the cropping parameters include at least two of the following parameters: cropping start time, cropping end time, and cropping duration.
- the cropping result information includes byte positions of the start frame and the end frame of the clip to be cut in the media file.
- the cropping result information further includes file header information of the cropping file.
- the file header information is modified by the server.
- the electronic device displays a cropping setting interface, and receives a user operation through the cropping setting interface to obtain cropping parameters.
- the electronic device displays a crop file operation interface, and the crop file operation interface is used to control the crop file.
- the electronic device cuts the media file through music playback software or video playback software.
- the operation interface is displayed through the electronic device, and the user can set the cropping parameters through the setting interface and select the operation on the cropped file, which improves the user experience and saves the resource consumption of the electronic device, and Power consumption.
- an embodiment of the present invention provides an electronic device that implements media file clipping.
- the electronic device includes: a display screen, a processor, and a memory, where the memory is used to store programs; and the processor is used to call The program causes the electronic device to perform the media file cropping method of the first aspect described above.
- an embodiment of the present invention provides a computer-readable storage medium, including instructions that, when run on a computer, cause the computer to perform the media file cropping method of the first aspect described above.
- an embodiment of the present invention provides a method for media file cropping, including: a server receiving a media file cropping request sent by an electronic device, the cropping request including the media file identification and cropping parameters; Acquiring the media file according to the media file identifier, and processing the media file according to the cropping parameter to obtain cropping result information; to the electronic device, the cropping result information, the cropping result information is used to enable the The electronic device generates a crop file.
- the server finds the media file through the identification, which can make the search process more convenient.
- the cropping parameters include at least two of the following parameters: cropping start time, cropping end time, and cropping duration.
- the cropping result information includes byte positions of the start frame and the end frame of the clip to be cut in the media file.
- the cropping result information further includes file header information of the cropping file.
- the server modifies the file header information.
- an embodiment of the present invention provides a server for media file cropping.
- the electronic device includes: a processor and a memory, where the memory is used to store a program; and the processor is used to call the program so that The server executes the media file cropping method as described in the fourth aspect above.
- an embodiment of the present invention provides a computer-readable storage medium, including instructions that, when run on a computer, cause the computer to perform the media file cropping method of the fourth aspect.
- the media file is analyzed and processed by the server to obtain the cropping result, and the electronic device generates a cropping file according to the cropping result. It reduces the resource occupation of electronic devices and improves the processing efficiency of media files.
- the electronic device can display an operation interface, and the user can set the cutting parameters through the setting interface and select the operation on the cutting file, which improves the user experience, saves the resource occupation of the electronic device, and consumes power.
- FIG. 1A is a schematic diagram of a structure of an electronic device provided by an embodiment of the present invention.
- 1B is a schematic diagram of a software structure of an electronic device provided by an embodiment of the present invention.
- FIG. 2 is a schematic structural diagram of a media cropping system in an embodiment of the present invention.
- FIG. 3 is a schematic structural diagram of a server in an embodiment of the present invention.
- FIG. 4 is a schematic structural diagram of another server in an embodiment of the present invention.
- FIG. 5 is a schematic diagram of a first application interface of a music player in an embodiment of the present invention.
- FIG. 6 is a schematic diagram of a second application interface of a music player in an embodiment of the present invention.
- FIG. 7 is a schematic diagram of a third application interface of a music player in an embodiment of the present invention.
- FIG. 8 is a schematic diagram of a fourth application interface of a music player in an embodiment of the present invention.
- FIG. 9 is a schematic structural diagram of a media file in an embodiment of the present invention.
- FIG. 10 is a schematic structural diagram of a cropped file in an embodiment of the present invention.
- FIG. 11 is a schematic diagram of media content of a media file in an embodiment of the present invention.
- FIG. 12 is a schematic diagram of media content of a cropped file in an embodiment of the present invention.
- the electronic device may be a portable electronic device that also contains other functions such as personal digital assistant and/or music player functions, such as a mobile phone, a tablet computer, and a wearable electronic device with wireless communication function (such as a smart watch) Wait.
- portable electronic devices include, but are not limited to Or portable electronic devices of other operating systems.
- the above portable electronic device may also be other portable electronic devices, such as a laptop computer with a touch-sensitive surface or a touch panel. It should also be understood that in some other embodiments, the above electronic device may not be a portable electronic device, but a desktop computer with a touch-sensitive surface or a touch panel.
- UI user interface
- the term “user interface (UI)” in the specification, claims, and drawings of this application is a media interface for interaction and information exchange between applications or operating systems and users, which implements the internal form of information And users can accept the conversion between forms.
- the user interface of the application is source code written in a specific computer language such as java and extensible markup language (XML).
- the interface source code is parsed and rendered on the terminal device, and finally presented as content that can be recognized by the user.
- Controls also called widgets
- Typical controls include toolbars, menu bars, text boxes, buttons, and scroll bars. (scrollbar), pictures and text.
- the attributes and contents of the controls in the interface are defined by tags or nodes.
- XML uses ⁇ Textview>, ⁇ ImgView>, ⁇ VideoView> and other nodes to specify the controls contained in the interface.
- a node corresponds to a control or attribute in the interface, and the node is rendered as user-visible content after being parsed and rendered.
- applications such as hybrid applications (hybrid application) interface usually also contains web pages.
- a web page, also known as a page, can be understood as a special control embedded in the application interface.
- the web page is source code written in a specific computer language, such as hypertext markup language (hypertext markup language, HTML), cascading styles Tables (cascading styles, CSS), java scripts (JavaScript, JS), etc.
- web page source code can be loaded and displayed as user-recognizable content by the browser or a web page display component similar to the browser function.
- the specific content contained in a web page is also defined by tags or nodes in the source code of the web page. For example, HTML defines the elements and attributes of the web page through ⁇ p>, ⁇ img>, ⁇ video>, and ⁇ canvas>.
- GUI graphics user interface
- User interface It can be an icon, window, control and other interface elements displayed on the display screen of the electronic device, where the control can include icons, buttons, menus, tabs, text boxes, dialog boxes, status bars, navigation bars, widgets, etc. Visual interface elements.
- the technical solution of the embodiment of the present invention is different from that in the prior art in which media cutting is performed by an electronic device.
- media cutting is put into processing. Through processing to achieve media clipping, the power consumption of the electronic device for media clipping is saved. Due to the strong computing power of processing, the overall media cutting time will also be reduced.
- the electronic device may discover the server through cellular mobile communication network technology or wide area network technology.
- the server can provide the electronic device with a list of devices connected to the server, so that the electronic device can discover the Other devices.
- the other devices may be servers discovered by the electronic device.
- FIG. 1A shows a schematic structural diagram of the electronic device 100.
- the electronic device 100 may include a processor 110, an external memory interface 120, an internal memory 121, a universal serial bus (USB) interface 130, a charging management module 140, a power management module 141, a battery 142, an antenna 1, an antenna 2 , Mobile communication module 150, wireless communication module 160, audio module 170, speaker 170A, receiver 170B, microphone 170C, headphone jack 170D, sensor module 180, key 190, motor 191, indicator 192, camera 193, display 194, and Subscriber identification module (SIM) card interface 195, etc.
- SIM Subscriber identification module
- the sensor module 180 may include a pressure sensor 180A, a gyro sensor 180B, an air pressure sensor 180C, a magnetic sensor 180D, an acceleration sensor 180E, a distance sensor 180F, a proximity light sensor 180G, a fingerprint sensor 180H, a temperature sensor 180J, a touch sensor 180K, and ambient light Sensor 180L, bone conduction sensor 180M, etc.
- the structure illustrated in the embodiment of the present invention does not constitute a specific limitation on the electronic device 100.
- the electronic device 100 may include more or fewer components than shown, or combine certain components, or split certain components, or arrange different components.
- the illustrated components can be implemented in hardware, software, or a combination of software and hardware.
- the processor 110 may include one or more processing units.
- the processor 110 may include an application processor (application processor, AP), a modem processor, a graphics processor (graphics processing unit, GPU), and an image signal processor. (image)signal processor (ISP), controller, memory, video codec, digital signal processor (DSP), baseband processor, and/or neural-network processing unit (NPU) Wait.
- the different processing units may be independent devices or may be integrated in one or more processors.
- the electronic device 100 may also include one or more processors 110.
- the controller may be the nerve center and command center of the electronic device 100.
- the controller can generate the operation control signal according to the instruction operation code and the timing signal to complete the control of instruction fetch and execution.
- the processor 110 may also be provided with a memory for storing instructions and data.
- the memory in the processor 110 is a cache memory.
- the memory may store instructions or data that the processor 110 has just used or recycled. If the processor 110 needs to use the instruction or data again, it can be directly called from the memory. The repeated access is avoided, and the waiting time of the processor 110 is reduced, thereby improving the efficiency of the electronic device 100.
- the processor 110 may include one or more interfaces.
- Interfaces may include built-in integrated circuit (inter-integrated circuit, I2C) interface, integrated circuit built-in audio (inter-integrated circuit, sound, I2S) interface, pulse code modulation (pulse code modulation (PCM) interface, universal asynchronous transceiver (universal asynchronous receiver/transmitter, UART) interface, mobile industry processor interface (MIPI), general-purpose input/output (GPIO) interface, user identification module (subscriber identity module, SIM) interface, And/or universal serial bus (USB) interface, etc.
- I2C built-in integrated circuit
- I2S integrated circuit built-in audio
- PCM pulse code modulation
- MIPI mobile industry processor interface
- GPIO general-purpose input/output
- SIM subscriber identity module
- USB universal serial bus
- the I2C interface is a bidirectional synchronous serial bus, including a serial data line (serial data line, SDA) and a serial clock line (derail clock line, SCL).
- the processor 110 may include multiple sets of I2C buses.
- the processor 110 may be coupled to the touch sensor 180K, charger, flash, camera 193, etc., respectively through different I2C bus interfaces.
- the processor 110 may couple the touch sensor 180K through the I2C interface, so that the processor 110 and the touch sensor 180K communicate through the I2C bus interface, and realize the touch function of the electronic device 100.
- the I2S interface can be used for audio communication.
- the processor 110 may include multiple sets of I2S buses.
- the processor 110 may be coupled with the audio module 170 through an I2S bus to implement communication between the processor 110 and the audio module 170.
- the audio module 170 can transmit audio signals to the wireless communication module 160 through the I2S interface, to realize the function of answering the phone call through the Bluetooth headset.
- the PCM interface can also be used for audio communication, sampling, quantizing and encoding analog signals.
- the audio module 170 and the wireless communication module 160 may be coupled through a PCM bus interface.
- the audio module 170 can also transmit audio signals to the wireless communication module 160 through the PCM interface to implement the function of answering the phone call through the Bluetooth headset. Both the I2S interface and the PCM interface can be used for audio communication.
- the UART interface is a universal serial data bus used for asynchronous communication.
- the bus may be a bidirectional communication bus. It converts the data to be transmitted between serial communication and parallel communication.
- the UART interface is generally used to connect the processor 110 and the wireless communication module 160.
- the processor 110 communicates with the Bluetooth module in the wireless communication module 160 through the UART interface to implement the Bluetooth function.
- the audio module 170 can transmit audio signals to the wireless communication module 160 through the UART interface, so as to realize the function of playing music through the Bluetooth headset.
- the MIPI interface can be used to connect the processor 110 to peripheral devices such as the display screen 194 and the camera 193.
- MIPI interface includes camera serial interface (camera serial interface, CSI), display serial interface (display serial interface, DSI) and so on.
- the processor 110 and the camera 193 communicate through a CSI interface to implement the shooting function of the electronic device 100.
- the processor 110 and the display screen 194 communicate through the DSI interface to realize the display function of the electronic device 100.
- the GPIO interface can be configured via software.
- the GPIO interface can be configured as a control signal or a data signal.
- the GPIO interface may be used to connect the processor 110 to the camera 193, the display screen 194, the wireless communication module 160, the audio module 170, the sensor module 180, and the like.
- GPIO interface can also be configured as I2C interface, I2S interface, UART interface, MIPI interface, etc.
- the USB interface 130 is an interface that conforms to the USB standard specifications, and may specifically be a Mini USB interface, a Micro USB interface, a USB Type C interface, etc.
- the USB interface 130 can be used to connect a charger to charge the electronic device 100, and can also be used to transfer data between the electronic device 100 and peripheral devices. It can also be used to connect headphones and play audio through the headphones.
- the interface can also be used to connect other electronic devices, such as AR devices.
- the interface connection relationship between the modules illustrated in the embodiments of the present invention is only a schematic description, and does not constitute a limitation on the structure of the electronic device 100.
- the electronic device 100 may also use different interface connection methods in the foregoing embodiments, or a combination of multiple interface connection methods.
- the charging management module 140 is used to receive charging input from the charger.
- the charger can be a wireless charger or a wired charger.
- the charging management module 140 may receive the charging input of the wired charger through the USB interface 130.
- the charging management module 140 may receive wireless charging input through the wireless charging coil of the electronic device 100. While the charging management module 140 charges the battery 142, it can also supply power to the electronic device through the power management module 141.
- the power management module 141 is used to connect the battery 142, the charging management module 140 and the processor 110.
- the power management module 141 receives input from the battery 142 and/or the charging management module 140, and supplies power to the processor 110, internal memory 121, external memory, display screen 194, camera 193, wireless communication module 160, and the like.
- the power management module 141 can also be used to monitor battery capacity, battery cycle times, battery health status (leakage, impedance) and other parameters.
- the power management module 141 may also be disposed in the processor 110.
- the power management module 141 and the charging management module 140 may also be set in the same device.
- the wireless communication function of the electronic device 100 can be realized by the antenna 1, the antenna 2, the mobile communication module 150, the wireless communication module 160, the modem processor, and the baseband processor.
- Antenna 1 and antenna 2 are used to transmit and receive electromagnetic wave signals.
- Each antenna in the electronic device 100 may be used to cover a single or multiple communication frequency bands. Different antennas can also be reused to improve antenna utilization.
- the antenna 1 can be multiplexed as a diversity antenna of a wireless local area network. In other embodiments, the antenna may be used in conjunction with a tuning switch.
- the mobile communication module 150 may provide a wireless communication solution including 2G/3G/4G/5G and the like applied to the electronic device 100.
- the mobile communication module 150 may include at least one filter, switch, power amplifier, low noise amplifier (LNA), and the like.
- the mobile communication module 150 can receive the electromagnetic wave from the antenna 1 and filter, amplify, etc. the received electromagnetic wave, and transmit it to the modem processor for demodulation.
- the mobile communication module 150 can also amplify the signal modulated by the modulation and demodulation processor and convert it to electromagnetic wave radiation through the antenna 1.
- at least part of the functional modules of the mobile communication module 150 may be provided in the processor 110.
- at least part of the functional modules of the mobile communication module 150 and at least part of the modules of the processor 110 may be provided in the same device.
- the modem processor may include a modulator and a demodulator.
- the modulator is used to modulate the low-frequency baseband signal to be transmitted into a high-frequency signal.
- the demodulator is used to demodulate the received electromagnetic wave signal into a low-frequency baseband signal.
- the demodulator then transmits the demodulated low-frequency baseband signal to the baseband processor for processing.
- the low-frequency baseband signal is processed by the baseband processor and then passed to the application processor.
- the application processor outputs a sound signal through an audio device (not limited to a speaker 170A, a receiver 170B, etc.), or displays an image or video through a display screen 194.
- the modem processor may be an independent device.
- the modem processor may be independent of the processor 110, and may be set in the same device as the mobile communication module 150 or other functional modules.
- the wireless communication module 160 can provide wireless local area networks (wireless local area networks, WLAN) (such as wireless fidelity (Wi-Fi) networks), Bluetooth (bluetooth, BT), and global navigation satellites that are applied to the electronic device 100 Wireless communication solutions such as global navigation (satellite system, GNSS), frequency modulation (FM), near field communication (NFC), infrared technology (infrared, IR), etc.
- the wireless communication module 160 may be one or more devices integrating at least one communication processing module.
- the wireless communication module 160 receives the electromagnetic wave via the antenna 2, frequency-modulates and filters the electromagnetic wave signal, and sends the processed signal to the processor 110.
- the wireless communication module 160 can also receive the signal to be transmitted from the processor 110, frequency-modulate it, amplify it, and convert it to electromagnetic waves through the antenna 2 to radiate it out.
- the wireless communication module 160 may include a Bluetooth module, a Wi-Fi module, and the like.
- the antenna 1 of the electronic device 100 and the mobile communication module 150 are coupled, and the antenna 2 and the wireless communication module 160 are coupled so that the electronic device 100 can communicate with the network and other devices through wireless communication technology.
- the wireless communication technology may include a global mobile communication system (global system for mobile communications, GSM), general packet radio service (general packet radio service, GPRS), code division multiple access (code division multiple access, CDMA), broadband Wideband code division multiple access (WCDMA), time-division code division multiple access (TD-SCDMA), long-term evolution (LTE), BT, GNSS, WLAN, NFC , FM, and/or IR technology, etc.
- the GNSS may include a global positioning system (GPS), a global navigation satellite system (GLONASS), a beidou navigation system (BDS), and a quasi-zenith satellite system (quasi -zenith satellite system (QZSS) and/or satellite-based augmentation system (SBAS).
- GPS global positioning system
- GLONASS global navigation satellite system
- BDS beidou navigation system
- QZSS quasi-zenith satellite system
- SBAS satellite-based augmentation system
- the Bluetooth (BT) module and the WLAN module included in the wireless communication module 160 can transmit signals to detect or scan devices near the electronic device 100, so that the electronic device 100 can discover nearby devices using wireless communication technologies such as Bluetooth or WLAN , And establish a wireless communication connection with nearby devices, and share data to nearby devices through the above connection.
- the Bluetooth (BT) module can provide one or more Bluetooth communication solutions including classic Bluetooth (Bluetooth 2.1) or Bluetooth low energy (BLE).
- the WLAN module can provide one or more WLAN communication solutions including Wi-Fi direct, Wi-Fi LAN or Wi-Fi AP.
- the wireless communication solution provided by the mobile communication module 150 can enable the electronic device to communicate with devices (such as servers) in the network
- the WLAN wireless communication solution provided by the wireless communication module 160 can also enable the electronic device It can communicate with devices (such as servers) in the network, and can communicate with processing devices through the devices (such as servers) in the network. In this way, the electronic device can discover the processing device and transmit data to the processing device.
- the electronic device 100 can realize a display function through a GPU, a display screen 194, and an application processor.
- the GPU is a microprocessor for image processing, connecting the display screen 194 and the application processor.
- the GPU is used to perform mathematical and geometric calculations, and is used for graphics rendering.
- the processor 110 may include one or more GPUs that execute instructions to generate or change display information.
- the display screen 194 is used to display images, videos and the like.
- the display screen 194 includes a display panel.
- the display panel can use a liquid crystal display (LCD), organic light-emitting diode (OLED), active matrix organic light-emitting diode or active matrix organic light-emitting diode (active-matrix organic light-emitting diode) emitting diode, AMOLED, flexible light-emitting diode (FLED), Miniled, MicroLed, Micro-oLed, quantum dot light emitting diode (QLED), etc.
- the electronic device 100 may include 1 or N display screens 194, where N is a positive integer greater than 1.
- the electronic device 100 can realize a shooting function through an ISP, a camera 193, a video codec, a GPU, a display screen 194, an application processor, and the like.
- the ISP processes the data fed back by the camera 193. For example, when taking a picture, the shutter is opened, and light is transmitted to the photosensitive element of the camera through the lens, and the optical signal is converted into an electrical signal. The photosensitive element of the camera transmits the electrical signal to the ISP for processing and converts it into an image visible to the naked eye. ISP can also optimize the algorithm of image noise, brightness and skin color. ISP can also optimize the exposure, color temperature and other parameters of the shooting scene. In some embodiments, the ISP may be set in the camera 193.
- the camera 193 is used to capture still images or videos.
- the object generates an optical image through the lens and projects it onto the photosensitive element.
- the photosensitive element may be a charge coupled device (charge coupled device, CCD) or a complementary metal-oxide-semiconductor (CMOS) phototransistor.
- CCD charge coupled device
- CMOS complementary metal-oxide-semiconductor
- the photosensitive element converts the optical signal into an electrical signal, and then transmits the electrical signal to the ISP to convert it into a digital image signal.
- the ISP outputs the digital image signal to the DSP for processing.
- DSP converts digital image signals into standard RGB, YUV and other format image signals.
- the electronic device 100 may include 1 or N cameras 193, where N is a positive integer greater than 1.
- the digital signal processor is used to process digital signals. In addition to digital image signals, it can also process other digital signals. For example, when the electronic device 100 is selected at a frequency point, the digital signal processor is used to perform Fourier transform on the energy at the frequency point.
- the video codec is used to compress or decompress digital video.
- the electronic device 100 may support one or more video codecs. In this way, the electronic device 100 can play or record videos in various encoding formats, for example: moving picture experts group (MPEG)-1, MPEG-2, MPEG-3, MPEG-4, etc.
- MPEG moving picture experts group
- NPU is a neural-network (NN) computing processor.
- NN neural-network
- the NPU can realize applications such as intelligent recognition of the electronic device 100, such as image recognition, face recognition, voice recognition, and text understanding.
- the external memory interface 120 can be used to connect an external memory card, such as a Micro SD card, to expand the storage capacity of the electronic device 100.
- the external memory card communicates with the processor 110 through the external memory interface 120 to realize the data storage function. For example, save music, photos, videos and other data in an external memory card.
- the internal memory 121 may be used to store one or more computer programs including instructions.
- the processor 110 may execute the above instructions stored in the internal memory 121, so that the electronic device 100 executes the media cropping method, various functional applications, and data processing provided in some embodiments of the present application.
- the internal memory 121 may include a storage program area and a storage data area.
- the storage program area can store the operating system; the storage program area can also store one or more application programs (such as gallery, contacts, etc.) and so on.
- the storage data area may store data (such as photos, contacts, etc.) created during use of the electronic device 100.
- the internal memory 121 may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one magnetic disk storage device, a flash memory device, a universal flash memory (universal flash storage, UFS), and so on.
- a non-volatile memory such as at least one magnetic disk storage device, a flash memory device, a universal flash memory (universal flash storage, UFS), and so on.
- the electronic device 100 may implement audio functions through an audio module 170, a speaker 170A, a receiver 170B, a microphone 170C, a headphone interface 170D, and an application processor. For example, music playback, recording, etc.
- the audio module 170 is used to convert digital audio information into analog audio signal output, and also used to convert analog audio input into digital audio signal.
- the audio module 170 can also be used to encode and decode audio signals.
- the audio module 170 may be disposed in the processor 110, or some functional modules of the audio module 170 may be disposed in the processor 110.
- the speaker 170A also called “speaker” is used to convert audio electrical signals into sound signals.
- the electronic device 100 can listen to music through the speaker 170A, or listen to a hands-free call.
- the receiver 170B also known as "handset" is used to convert audio electrical signals into sound signals.
- the voice can be received by bringing the receiver 170B close to the ear.
- the microphone 170C also known as “microphone”, “microphone”, is used to convert sound signals into electrical signals.
- the user can make a sound by approaching the microphone 170C through the human mouth, and input the sound signal to the microphone 170C.
- the electronic device 100 may be provided with at least one microphone 170C. In other embodiments, the electronic device 100 may be provided with two microphones 170C. In addition to collecting sound signals, it may also implement a noise reduction function. In other embodiments, the electronic device 100 may also be provided with three, four, or more microphones 170C to collect sound signals, reduce noise, identify sound sources, and implement directional recording functions.
- the headset interface 170D is used to connect wired headsets.
- the earphone interface 170D may be a USB interface 130, or a 3.5mm open mobile electronic device (open mobile terminal) platform (OMTP) standard interface, and the American Telecommunications Industry Association (cellular telecommunications industry association of the United States, CTIA) standard interface.
- OMTP open mobile electronic device
- CTIA American Telecommunications Industry Association
- the pressure sensor 180A is used to sense the pressure signal and can convert the pressure signal into an electrical signal.
- the pressure sensor 180A may be provided on the display screen 194.
- the capacitive pressure sensor may be a parallel plate including at least two conductive materials. When force is applied to the pressure sensor 180A, the capacitance between the electrodes changes.
- the electronic device 100 determines the strength of the pressure according to the change in capacitance.
- the electronic device 100 detects the intensity of the touch operation according to the pressure sensor 180A.
- the electronic device 100 may also calculate the touched position based on the detection signal of the pressure sensor 180A.
- touch operations that act on the same touch position but have different touch operation intensities may correspond to different operation instructions. For example, when a touch operation with a touch operation intensity less than the first pressure threshold acts on the short message application icon, an instruction to view the short message is executed. When a touch operation with a touch operation intensity greater than or equal to the first pressure threshold acts on the short message application icon, an instruction to create a new short message is executed.
- the gyro sensor 180B may be used to determine the movement posture of the electronic device 100. In some embodiments, the angular velocity of the electronic device 100 around three axes (ie, x, y, and z axes) may be determined by the gyro sensor 180B.
- the gyro sensor 180B can be used for image stabilization. Exemplarily, when the shutter is pressed, the gyro sensor 180B detects the jitter angle of the electronic device 100, calculates the distance that the lens module needs to compensate based on the angle, and allows the lens to counteract the jitter of the electronic device 100 through reverse movement to achieve anti-shake.
- the gyro sensor 180B can also be used for navigation and somatosensory game scenes.
- the air pressure sensor 180C is used to measure air pressure.
- the electronic device 100 calculates the altitude based on the air pressure value measured by the air pressure sensor 180C to assist positioning and navigation.
- the magnetic sensor 180D includes a Hall sensor.
- the electronic device 100 can detect the opening and closing of the flip holster using the magnetic sensor 180D.
- the electronic device 100 may detect the opening and closing of the clamshell according to the magnetic sensor 180D.
- characteristics such as automatic unlocking of the flip cover are set.
- the acceleration sensor 180E can detect the magnitude of acceleration of the electronic device 100 in various directions (generally three axes). When the electronic device 100 is stationary, the magnitude and direction of gravity can be detected. It can also be used to recognize the posture of electronic devices, and can be used in horizontal and vertical screen switching, pedometer and other applications.
- the distance sensor 180F is used to measure the distance.
- the electronic device 100 can measure the distance by infrared or laser. In some embodiments, when shooting scenes, the electronic device 100 may use the distance sensor 180F to measure distance to achieve fast focusing.
- the proximity light sensor 180G may include, for example, a light emitting diode (LED) and a light detector, such as a photodiode.
- the light emitting diode may be an infrared light emitting diode.
- the electronic device 100 emits infrared light outward through the light emitting diode.
- the electronic device 100 uses a photodiode to detect infrared reflected light from nearby objects. When sufficient reflected light is detected, it may be determined that there is an object near the electronic device 100. When insufficient reflected light is detected, the electronic device 100 may determine that there is no object near the electronic device 100.
- the electronic device 100 can use the proximity light sensor 180G to detect that the user holds the electronic device 100 close to the ear to talk, so as to automatically turn off the screen to save power.
- the proximity light sensor 180G can also be used in leather case mode, pocket mode automatically unlocks and locks the screen.
- the ambient light sensor 180L is used to sense the brightness of ambient light.
- the electronic device 100 can adaptively adjust the brightness of the display screen 194 according to the perceived brightness of the ambient light.
- the ambient light sensor 180L can also be used to automatically adjust the white balance when taking pictures.
- the ambient light sensor 180L can also cooperate with the proximity light sensor 180G to detect whether the electronic device 100 is in a pocket to prevent accidental touch.
- the fingerprint sensor 180H is used to collect fingerprints.
- the electronic device 100 can use the collected fingerprint characteristics to realize fingerprint unlocking, access to application lock, fingerprint photo taking, fingerprint answering call, and the like.
- the temperature sensor 180J is used to detect the temperature.
- the electronic device 100 uses the temperature detected by the temperature sensor 180J to execute a temperature processing strategy. For example, when the temperature reported by the temperature sensor 180J exceeds a threshold, the electronic device 100 performs to reduce the performance of the processor located near the temperature sensor 180J in order to reduce power consumption and implement thermal protection.
- the electronic device 100 when the temperature is lower than another threshold, the electronic device 100 heats the battery 142 to avoid abnormal shutdown of the electronic device 100 due to low temperature.
- the electronic device 100 when the temperature is below another threshold, the electronic device 100 performs boosting on the output voltage of the battery 142 to avoid abnormal shutdown due to low temperature.
- the touch sensor 180K can also be called a touch panel or a touch-sensitive surface.
- the touch sensor 180K may be disposed on the display screen 194, and the touch sensor 180K and the display screen 194 constitute a touch screen, also called a "touch screen”.
- the touch sensor 180K is used to detect a touch operation acting on or near it.
- the touch sensor can pass the detected touch operation to the application processor to determine the type of touch event.
- the visual output related to the touch operation can be provided through the display screen 194.
- the touch sensor 180K may also be disposed on the surface of the electronic device 100, which is different from the location where the display screen 194 is located.
- the bone conduction sensor 180M can acquire vibration signals.
- the bone conduction sensor 180M can acquire the vibration signal of the vibrating bone mass of the human voice.
- the bone conduction sensor 180M can also contact the pulse of the human body and receive a blood pressure beating signal.
- the bone conduction sensor 180M may also be provided in the earphone and combined into a bone conduction earphone.
- the audio module 170 may parse out the voice signal based on the vibration signal of the vibrating bone block of the voice part acquired by the bone conduction sensor 180M to realize the voice function.
- the application processor may analyze the heart rate information based on the blood pressure beating signal acquired by the bone conduction sensor 180M to implement the heart rate detection function.
- the key 190 includes a power-on key, a volume key, and the like.
- the key 190 may be a mechanical key. It can also be a touch button.
- the electronic device 100 can receive key input and generate key signal input related to user settings and function control of the electronic device 100.
- the motor 191 may generate a vibration prompt.
- the motor 191 can be used for vibration notification of incoming calls and can also be used for touch vibration feedback.
- touch operations applied to different applications may correspond to different vibration feedback effects.
- the motor 191 can also correspond to different vibration feedback effects.
- Different application scenarios for example: time reminder, receiving information, alarm clock, game, etc.
- Touch vibration feedback effect can also support customization.
- the indicator 192 can be an indicator light, which can be used to indicate the charging state, the amount of power change, and can also be used to indicate messages, missed calls, notifications, and the like.
- the SIM card interface 195 is used to connect a SIM card.
- the SIM card can be inserted into or removed from the SIM card interface 195 to achieve contact and separation with the electronic device 100.
- the electronic device 100 may support 1 or N SIM card interfaces, where N is a positive integer greater than 1.
- the SIM card interface 195 can support Nano SIM cards, Micro SIM cards, SIM cards, etc.
- the same SIM card interface 195 can insert multiple cards at the same time. The types of the multiple cards may be the same or different.
- the SIM card interface 195 can also be compatible with different types of SIM cards.
- the SIM card interface 195 can also be compatible with external memory cards.
- the electronic device 100 interacts with the network through a SIM card to realize functions such as call and data communication.
- the electronic device 100 uses eSIM, that is, an embedded SIM card.
- the eSIM card can be embedded in the electronic device 100 and cannot be separated from the electronic device 100.
- the electronic device 100 exemplarily shown in FIG. 1A may display various user interfaces described in the following embodiments through the display screen 194.
- the electronic device 100 can detect a touch operation in each user interface through the touch sensor 180K, for example, a click operation in each user interface (such as a touch operation on an icon, a double-click operation), and, for example, an upward or in each user interface. Swipe down, or perform a gesture of drawing a circle, and so on.
- the electronic device 100 may detect a motion gesture performed by the user holding the electronic device 100, such as shaking the electronic device, through the gyro sensor 180B, the acceleration sensor 180E, or the like.
- the electronic device 100 can detect non-touch gesture operations through the camera 193 (eg, 3D camera, depth camera).
- the software system of the electronic device 100 may adopt a layered architecture, event-driven architecture, micro-core architecture, micro-service architecture, or cloud architecture.
- the embodiment of the present invention takes the Android system with a layered architecture as an example to exemplarily explain the software structure of the electronic device 100.
- FIG. 1B is a block diagram of the software structure of the electronic device 100 according to an embodiment of the present invention.
- the layered architecture divides the software into several layers, and each layer has a clear role and division of labor.
- the layers communicate with each other through a software interface.
- the Android system is divided into four layers, from top to bottom are the application layer, the application framework layer, the Android runtime and the system library, and the kernel layer.
- the application layer may include a series of application packages.
- the application package may include applications such as camera, gallery, calendar, call, map, navigation, WLAN, Bluetooth, music, video, and short message.
- the application framework layer provides an application programming interface (application programming interface) and programming framework for applications at the application layer.
- the application framework layer includes some predefined functions.
- the application framework layer may include a window manager, a content provider, a view system, a phone manager, a resource manager, a notification manager, and so on.
- the window manager is used to manage window programs.
- the window manager can obtain the size of the display screen, determine whether there is a status bar, lock the screen, intercept the screen, etc.
- Content providers are used to store and retrieve data, and make these data accessible to applications.
- the data may include videos, images, audio, calls made and received, browsing history and bookmarks, phonebooks, etc.
- the view system includes visual controls, such as controls for displaying text and controls for displaying pictures.
- the view system can be used to build applications.
- the display interface can be composed of one or more views.
- a display interface including an SMS notification icon may include a view to display text and a view to display pictures.
- the phone manager is used to provide the communication function of the electronic device 100. For example, the management of the call status (including connection, hang up, etc.).
- the resource manager provides various resources for the application, such as localized strings, icons, pictures, layout files, video files, and so on.
- the notification manager enables applications to display notification information in the status bar, which can be used to convey notification-type messages, and can disappear automatically after a short stay without user interaction.
- the notification manager is used to notify the completion of downloading, message reminders, etc.
- the notification manager can also be a notification that appears in the status bar at the top of the system in the form of a chart or scroll bar text, such as a notification of an application running in the background, or a notification that appears on the screen in the form of a dialog window.
- the text message is displayed in the status bar, a prompt sound is emitted, the electronic device vibrates, and the indicator light flashes.
- Android Runtime includes core library and virtual machine. Android runtime is responsible for the scheduling and management of the Android system.
- the core library contains two parts: one part is the function function that Java language needs to call, and the other part is the core library of Android.
- the application layer and the application framework layer run in the virtual machine.
- the virtual machine executes the java files of the application layer and the application framework layer into 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.
- the system library may include multiple functional modules. For example: surface manager (surface manager), media library (Media library), 3D graphics processing library (for example: OpenGL ES), 2D graphics engine (for example: SGL), etc.
- surface manager surface manager
- media library Media library
- 3D graphics processing library for example: OpenGL ES
- 2D graphics engine for example: SGL
- the surface manager is used to manage the display subsystem and provides the fusion of 2D and 3D layers for multiple applications.
- the media library supports a variety of commonly used audio, video format playback and recording, and still image files.
- the media library can support multiple audio and video encoding formats, such as: MPEG4, H.264, MP3, AAC, AMR, JPG, PNG, etc.
- the 3D graphics processing library is used to realize 3D graphics drawing, image rendering, synthesis, and layer processing.
- the 2D graphics engine is a drawing engine for 2D drawing.
- the kernel layer is the layer between hardware and software.
- the kernel layer contains at least the display driver, camera driver, audio driver, and sensor driver.
- the software system shown in Figure 1B involves the presentation of applications that use sharing capabilities (such as a gallery, file manager), an instant sharing module that provides sharing capabilities, a print service (print service) and a print spooler (print background service) that provide print capabilities , And the application framework layer provide printing framework, WLAN services, Bluetooth services, and the core and the bottom layer provide WLAN Bluetooth capabilities and basic communication protocols.
- sharing capabilities such as a gallery, file manager
- instant sharing module that provides sharing capabilities
- print service print service
- print spooler print background service
- the following describes the workflow of the software and hardware of the electronic device 100 in combination with capturing a photographing scene.
- the corresponding hardware interrupt is sent to the kernel layer.
- the kernel layer processes touch operations into original input events (including touch coordinates, time stamps and other information of touch operations).
- the original input event is stored in the kernel layer.
- the application framework layer obtains the original input event from the kernel layer, and identifies the control corresponding to the input event. Taking the control corresponding to the touch operation as a camera application icon as an example, the camera application calls the interface of the application framework layer to start the camera application, and then starts the camera driver by calling the kernel layer, and captures a still image or video through the camera 193.
- the cropping system includes an electronic device 100 and a server 202.
- the user operates the display screen of the electronic device 100, selects the media file A, and sends a request message to the cloud server to request the media file A to be cropped.
- the request message may include file information of the media file A.
- the server crops the corresponding media content according to the file information, and sends the cropping result to the electronic device.
- the cropping result may include cropped summary information.
- the electronic device 100 regenerates the crop file B according to the cropping result returned by the server 202 and the media file A.
- the cropping system of the embodiment of the present invention can reduce the resource occupation of media files by electronic devices, reduce the power consumption of the electronic devices for cutting media files, and improve the efficiency and speed of cutting media files.
- the server may be a cloud server, or an online server, etc., which has a clipping function.
- the file information of the media content in the request message may include at least one of the following information: media file identification and cropping parameters.
- the cropping parameters may include at least one of the following parameters: start time of cropping, end time of cropping, duration of cropping, and so on.
- the cropping parameter may be set by default, or may be set by a user's operation, or related parameters may be intelligently identified and generated by the electronic device or related software.
- the summary information may include at least one file segment information in order, and the starting position and end position information of each segment in the original media file A.
- the electronic device may implement the cropping function through an application installed on the electronic device.
- a cutting software C may be installed on the electronic device, the cutting software C may be used to select a media file A to be cut, and the cutting software C may send a cutting request to the cloud server.
- the cropping software can also provide a cropping setting interface, through which the media file to be cropped can be selected, and cropping parameters for the media file can be set. For example, a user may select a media file to be cropped through the cropping setting interface, and set a cropping start time and/or cropping end time.
- the cropping software function may be independently developed, or may be implemented through an existing music player or video player.
- the display screen 194 in the electronic device 100 displays the cutting software C installed on the electronic device 100.
- the touch sensor 180K of the electronic device 100 receives the operation input by the user and executes the corresponding instruction.
- the touch sensor 180K may receive a user's operation of clicking the cropping software C, and in response to the operation, start the cropping software C.
- the display screen 194 displays the interface of the cutting software C. Enter the cropping setting interface of the cropping software C. Through the cropping setting interface of the cropping software C, the user can select the local media file A to be cropped and set the relevant cropping parameters.
- the cropping software C sends a cropping request to the server according to the user's selection.
- the electronic device 100 receives the cropping summary information returned by the server processing, and regenerates the cropping file B according to the summary information and the local original media file A.
- the internal memory 121 of the electronic device 100 may save the cropped file B.
- the user can directly play the cropped file B, or can share the cropped file B, or perform other operations on the cropped file B, for example, setting the cropped file B as a ringtone.
- the cropping software C can also automatically identify the highlights in the media file A to obtain cropping parameters. For example, a few video streams at the moment of a goal, or a climax or chorus part in an audio stream, without requiring the user to manually set.
- the electronic device 100 may implement the cutting function of the cutting software C through a cutting module.
- the cropping function may include one or more of the following functions: identifying a media file identifier, obtaining a cropping request, sending a cropping request, identifying cropping summary information, and generating a cropping file function based on the cropping summary information.
- the server may implement a media file clipping function through multiple server devices.
- the server 300 may include a media cropping server 1021 and a media server 1022.
- the media cropping server 1021 receives the cropping request sent by the electronic device to crop the media file A, and the media cropping server 1021 identifies the media file identifier and the cropping parameter in the cropping request.
- the cropping parameter may include a start time, an end time, or a length of time for cropping.
- the media cropping server 1021 sends the media file identifier to the media server 1022 to obtain the media file corresponding to the media file identifier.
- the media server 1022 sends the media file corresponding to the media file identifier to the media cropping server 1021.
- the media cropping server 1021 crops the media file according to the cropping parameters, and sends the generated cropping result to the electronic device.
- the cropping result information may include starting position and ending position information of the original media file A.
- the relative position information of each file segment marks the start byte position, end byte position, etc. in the media file A.
- the cropping result may include cropping summary information.
- the cropping result information/crop summary information may include byte positions of the start frame and the end frame of the clip to be cut in the media file.
- the media cropping server 1021 may include an interaction module 1025 and a cropping processing module 1026.
- the interaction module 1025 is used to interact with the electronic device or the media server 1022.
- the cropping processing module 1026 is configured to perform cropping processing on the media file A returned by the media server 1022 according to the cropping request, generate the cropping result, and return the cropping result to the interaction module 1025 to The electronic device.
- the media server 1022 may include an interaction module 1028 and a matching module 1029.
- the interaction module 1028 is used to interact with the media cropping server 1021.
- the matching module 1029 is configured to match the corresponding media file according to the media file identifier sent by the media cropping server 1021 received by the interaction module 1028, and send the media file to the media through the interaction module 1028.
- Media cropping server 1021 is configured to match the corresponding media file according to the media file identifier sent by the media cropping server 1021 received by the interaction module 1028, and send the media file to the media through the interaction module 1028.
- the server 400 may include: a processor 10213, a memory 10214, and a transceiver 10215.
- the processor 10213 can realize media cutting.
- the transceiver 10215 may receive a cropping request sent by the electronic device 100, where the cropping request includes the media file identification and cropping parameters.
- the processor 10213 is configured to obtain a corresponding media file according to the media file identifier in the cropping request, and process the media file according to the cropping parameter to obtain cropping result information.
- the transceiver 10215 is used to send the cropping result information to the electronic device.
- the memory 10214 may be used to store cropping requests, cropping parameters, media content to be cropped, or media content after cropping.
- the embodiment of the invention realizes the cutting of the media file through the server, reduces the time for the electronic device to realize the media cutting and the power consumption generated by the cutting, and improves the processing efficiency of the media file.
- the embodiment of the present invention implements the cutting of media files through the server, which not only supports cutting more types of media files, but also the server can be developed. achieve. Applications on electronic devices do not need to be developed and upgraded, making media file cutting easier and easier.
- the server sends the cutting result to the electronic device.
- the electronic device generates a cropped file according to the cropping result. Compared with directly sending the cropped media file to the electronic device, the solution of the embodiment of the present invention can save resource consumption between the electronic device and the server.
- FIG. 5 it is a schematic diagram of the first application interface 500 of the music player in the electronic device 100 according to an embodiment of the present invention.
- the first application interface 500 includes a first area 501 and a second area 502.
- the first area 501 displays the playlist cover of the music player.
- the second area 502 displays a list of tracks in the playlist of the player. As shown in FIG. 5, track 1, track 2, track 3, ..., track N are displayed on the music player interface.
- the user browses the content of the first application interface of the music player and likes track 2 very much, hoping to intercept the climax part of the track 2 as a ringtone of an electronic device.
- the second application interface 600 may include at least one of the following parts: a first part 601, a second part, and a third part.
- the first part 701 is album cover information
- the second part may include a playback progress bar 602
- the third part includes control options.
- the control options may be at least one control option or option icon: download 603, crop 604, share 605, favorite 606, fast forward play/next control key 608, fast rewind play/previous control key 607.
- the third application interface 700 includes a crop setting interface.
- the third application interface 700 includes crop setting items.
- the crop setting item is used for setting crop parameters.
- the crop setting item may include a crop control bar, and the user may select to input a crop start time and an end time by moving the start key 701 and the end key 702 on the crop control bar.
- the cutting start time is: 1 minute and 27 seconds
- the cutting end time is: 2 minutes and 02 seconds.
- the cutting time is: 35 seconds.
- the third application interface 700 may further include crop control items.
- the cropping control item may be a "start cropping" button 703. The user clicks on the "start cropping" button 703, the music player obtains the file identification and cropping parameters of track 2, and sends a cropping request to the server.
- the third application interface of the music player may further include album cover information 704.
- the server receives the file identifier of the track 2 in the crop request, and obtains the corresponding file of the track according to the file identifier. After acquiring the track 2 file, the server crops the track 2 file, and sends the cropping result to the music player.
- the music player reassembles a new media file according to the track 2 and the cutting result to generate a cutting file.
- the music player may prompt the user on the application interface. As shown in Figure 8, the user is prompted to save the crop file.
- the fourth application interface 800 shown in FIG. 8 may further include an audition button 802, or a ringtone button 803, or album information 801.
- the embodiment of the present invention does not limit the information for prompting the user, and can prompt the user to complete the cropping, or prompt the user to operate the cropped file, or prompt the user to save the cropped file, etc. Through the prompt interface, the user can choose to play the cropped file, or set the cropped file to ring tone and other operations.
- the operation interface is displayed through the electronic device, and the user can set the cropping parameters through the setting interface and select the operation on the cropped file, which improves the user experience and saves the resource consumption of the electronic device, and Power consumption.
- an example of a method for cropping the media file by the server is as follows.
- the playing time of the media file is 150 seconds, and its content includes C0, C1, C2, C3, C4, C5, C6...C150.
- C0 is the media file header information, usually describing the name of the work, artist name, etc.
- C1, C2, C3, C4, C5, C6...C150 respectively represent the media content per second.
- the offsets X0, X1 represent the start and end points of C0 bytes in the media file.
- X1 indicates the end point of C0, but it is not included in the content of C0.
- X1 is the starting point of C1 and is included in the content of C1.
- X2 indicates the end point of C1, but it is not included in the content of C1.
- X1, X2, X3, X4, X5, X6...Xn respectively represent the starting point and end point of bytes of each piece of content in C1, C2, C3, C4, C5, C6...Cn in the media file.
- n is a positive integer less than or equal to 150.
- the playing time of the media file when the playing time of the media file is m seconds, its content may be C0, C1, C2, C3, C4, C5, C6...Cm.
- m is a positive integer.
- the playing time of the track 2 is 150 seconds.
- the electronic device successfully caches the track 2.
- the user may choose to crop the track 2.
- the user sets the cropping parameters as follows: 1 minute 27 seconds-2 minute 02 seconds. Indicates that the user wishes to crop the media content of this time period.
- the electronic device After the user clicks the "start cropping" button, the electronic device obtains the file identification and cropping parameters of track 2 according to the user's operation. The electronic device initiates a crop request to the server.
- the cropping request may include the file identification of the track 2, the cropping request time: 1 minute and 27 s, and the cropping time is 35 seconds.
- the cropping request may also include the file identifier of the track 2, the cropping start time: 1 minute and 27 seconds, and the cropping end time: 2 minutes and 02 seconds.
- the embodiments of the present invention do not limit specific cutting parameters, and the cutting parameters may be used for cutting purposes.
- the server performs processing according to the received clipping request, obtains a clipping result, and returns the clipping result to the electronic device.
- An example of returning the cropping result is as follows:
- Part 0 Start at offset X’0 and end at offset X’1.
- Part 1 The content is ⁇ CC ⁇ , the content of this part is optional.
- the server can modify the file header information through this part. For example, after the original song name, add the "Climax Edition" name suffix.
- Part 2 Start at offset X87 and end at offset X122.
- X'0, X'1, X87, and X122 respectively represent the offset from the byte position of the original track 2 file.
- the content ⁇ CC ⁇ in the first part is file header information edited by the server. Assume that the length of CC is Z. Z is a positive integer. For example, the song title of the track 2 is modified.
- the content in segment1 points to the content ⁇ CC ⁇ , and the content of ⁇ CC ⁇ is the header information of the media file edited by the server.
- the content is similar to 0x54 0x49 0x54 0x32 0x00 0x00 0x00 0x00 0x0A 0x00 0x00 0x03 0x78 0x78 0x28 0x30 0x7E 0x32 0x73 0x29 0x00.
- This part of the content is some media file header information that has changed from the original media file, for example, the ID3 tag information of the mp3 file.
- the above segment0 and segment1 constitute a file header of the cropped file.
- the segment1 part is an optional byte.
- the server may modify the information of the file header of the cropped file through segment1.
- the server may carry the modification information through the segment1 field and return it to the electronic device.
- the name of the song of the track 2 is: "nunchaku”
- the name of the cropped file after modification is: "nunchaku color ring version”.
- the parameter X'1 in the segment0 is less than or equal to X1.
- the server does not modify the file header information of the track 2, nor returns the content of segment1.
- the electronic device After receiving the cropping result returned by the server, the electronic device generates a cropping file according to the cropping result.
- the process of the electronic device regenerating the crop file is described with reference to FIG. 10. 10 is a schematic diagram of the structure of the cropped file.
- the electronic device calculates the file information of the cropped file according to the track 2 and the cropping result: the start and end points of C'0 are X'0 and X'1, respectively, and the length of ⁇ CC ⁇ is Z, C87- The start and end points corresponding to the content of C121 are X87 and X122, respectively. X87 and X122 are offsets from the byte position of the original track 2 file.
- the electronic device extracts the X’0 to X’1 content in the original track 2, the content corresponding to ⁇ cc ⁇ and the content corresponding to X87 to X122 according to the offset, and regenerates the crop file.
- the contents corresponding to X87 to X122 are the parts of C87, C88...C121 in the original track 2.
- the user interface of the music player may be used to prompt the user that the crop file has been generated.
- the electronic device may prompt the user to save, audition, set a ringtone, or perform other operations on the cropped file.
- the media file is analyzed and processed by the server to obtain the cropping result, and the electronic device generates a cropping file according to the cropping result. It reduces the resource occupation of electronic devices and improves the processing efficiency of media files.
- the electronic device can display an operation interface, and the user can set the cutting parameters through the setting interface and select the operation on the cutting file, which improves the user experience, saves the resource occupation of the electronic device, and consumes power.
- FIG. 11 is a schematic diagram of media files in an embodiment of the present invention.
- the media file is an MP3 file.
- the media content includes: ID3V2, content from 0 to 1 second, content from 1 to 2 seconds, and content from 2 to 3 seconds.
- ID3 is generally located within a few bytes at the beginning or end of an mp3 file, with information about the mp3's singer, title, album name, year, style, etc. This information is called ID3 information, which is divided into Two versions, v1 and v2. Among them: The ID3 of the v1 version is 128 bytes at the end of the mp3 file, starting with the three characters of TAG, followed by the song information.
- the v2 version is generally located at the beginning of mp3, and can store large amounts of information such as lyrics and pictures of the album.
- ID3 tag is the additional information of the songs in the MP3 music file. It can attach the artist, author and other categories of information in the MP3 to facilitate the management of many music.
- the content of ID3V2 includes the content of the header fields whose file contents are h1 to h10 and 0x54 to 0x00.
- the 0 to 1 second includes the media content of p11 to p13.
- the first to second seconds include media content from p21 to p26.
- Media content from p31 to p37 is included in the second to third seconds.
- h1 to h10 does not mean that the content is only 10 bytes, just an example, the actual size may be larger than this.
- the file header of the cropped media returned by the server is added with 0x28, 0x30, 0x7E, 0x32, 0x73, and 0x29 in the middle of the last 0x78 and 0x00 in ID3V2 in FIG.
- the contents of these newly added header files represent: the newly added contents of the file title.
- the original file title is xx, modified to xx (0-2s); the newly added content of the file title, that is, these few characters represent 0 to 2 seconds.
- the cropped content is the content of 0 to 1 second and 1 to 2 seconds, that is, the content of p11 to p26.
- the embodiment of the present invention reduces the time for the electronic device to realize the media cutting and the power consumption generated by the cutting by implementing the cutting of the media file on the server.
- the embodiment of the present invention implements the cutting of media files in the server, which can achieve the cutting of almost all media files, making the cutting of media files simpler and easier.
- the cropped cropping result is sent to the electronic device, and the electronic device reassembles the cropped file.
- the solution of the embodiment of the present invention can save the bandwidth between the electronic device and the server.
- the term “when” may be interpreted to mean “if" or “after” or “in response to determination" or “in response to detection".
- the phrases “at the time of determination” or “if detected (the stated condition or event)” may be interpreted to mean “if determined" or “in response to determination" or “detected (The stated condition or event)” or “in response to the detection (the stated condition or event)”.
- the computer program product includes one or more computer instructions.
- the computer may be a general-purpose computer, a dedicated computer, a computer network, or other programmable devices.
- the computer instructions may be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another computer-readable storage medium, for example, the computer instructions may be from a website site, computer, server or data center Transmission to another website, computer, server or data center via wired (such as coaxial cable, optical fiber, digital subscriber line) or wireless (such as infrared, wireless, microwave, etc.).
- the computer-readable storage medium may be any available medium that can be accessed by a computer or a data storage device including a server, a data center, and the like integrated with one or more available media.
- the usable medium may be a magnetic medium (for example, a floppy disk, a hard disk, a magnetic tape), an optical medium (for example, DVD), or a semiconductor medium (for example, a solid-state hard disk), or the like.
- the program may be stored in a computer-readable storage medium, and when the program is executed , May include the processes of the foregoing method embodiments.
- the foregoing storage media include various media that can store program codes, such as ROM or random storage memory RAM, magnetic disks, or optical disks.
Landscapes
- Engineering & Computer Science (AREA)
- Multimedia (AREA)
- Signal Processing (AREA)
- Theoretical Computer Science (AREA)
- General Engineering & Computer Science (AREA)
- Human Computer Interaction (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Databases & Information Systems (AREA)
- Telephone Function (AREA)
Abstract
本发明实施例公开了一媒体文件裁剪的方法,包括:电子设备获取媒体文件标识和裁剪参数,根据所述裁剪参数向服务器发送裁剪请求;所述电子设备接收所述服务器返回的裁剪结果信息;所述电子设备根据所述裁剪结果信息,以及所述媒体文件,生成裁剪文件。相比现有技术,本发明实施例能实现终端侧裁剪的功耗较小,裁剪时间较短的效果。
Description
本申请要求在2018年12月29日提交中国国家知识产权局、申请号为201811653372.9、发明名称为“一种媒体文件裁剪的方法、电子设备和服务器”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。
本发明涉及媒体领域,尤其涉及一种媒体文件裁剪的方法、电子设备和服务器。
目前,用户常常使用电子设备播放媒体文件。当用户听到喜欢的媒体文件,需要处理喜欢的媒体文件的片段时,用户需要借助其他处理媒体文件的工具来处理媒体文件。例如,用户在观看视频内容、或者收听音频内容时,用户对所述视频内容、或所述音频内容的部分内容有进行裁剪的需求。例如,获取一部影片中的精彩片段进行分享,或者获取歌曲中的高潮部分设置为铃音等。
流媒体,是边传边播的媒体,也是多媒体的一种。边传边播是指媒体提供商在网络上传输媒体的时候,用户不断地接收并观看或收听被传输的媒体。智能手机的流行让流媒体服务成为常见的内容服务,用户可以基于流媒体技术收看视频内容、收听音频内容。
现有技术实现媒体裁剪,通常是电子设备将完整的媒体文件下载到所述电子设备本地,所述电子设备通过安装在所述电子设备上的应用程序对所述媒体文件进行裁剪,以实现对所述媒体文件的裁剪。这种方式的媒体的裁剪非常耗费计算资源,而且功耗较大,实现裁剪操作的时间也比较长。当媒体文件为新的媒体格式时,所述终端设备上的应用程序还需要做一些新的开发适配,需要进行应用升级后才可以对所述媒体文件进行编辑。
发明内容
本发明实施例提供一种媒体文件裁剪的方法、电子设备和服务器,相比现有技术,能实现终端侧裁剪的功耗较小,裁剪时间较短的效果。
第一方面,本发明实施例提供了一种媒体文件裁剪的方法,包括:电子设备获取媒体文件标识和裁剪参数,根据所述裁剪参数向服务器发送裁剪请求。所述电子设备接收所述服务器返回的裁剪结果信息。所述电子设备根据所述裁剪结果信息,以及所述媒体文件,生成裁剪文件。
在一种可能的实现方式中,所述电子设备获取媒体文件标识和裁剪参数包括:所述电子设备接收用户操作,获取媒体文件标识和裁剪参数。
在一种可能的实现方式中,所述裁剪参数包括至少两个以下参数:裁剪的开始时间、裁剪的结束时间、裁剪时长。
在一种可能的实现方式中,所述裁剪结果信息包括待裁剪片段的起始帧和结束帧在所述 媒体文件中的字节位置。
在一种可能的实现方式中,所述裁剪结果信息还包括所述裁剪文件的文件头信息。
在一种可能的实现方式中,所述文件头信息被所述服务器修改。
在一种可能的实现方式中,所述电子设备显示裁剪设置界面,接收用户通过所述裁剪设置界面的操作,获取裁剪参数。
在一种可能的实现方式中,所述电子设备显示裁剪文件操作界面,所述裁剪文件操作界面用于对所述裁剪文件进行控制。
在一种可能的实现方式中,保存所述裁剪文件;或,试听所述裁剪文件;或,将所述裁剪文件设置为铃音。
在一种可能的实现方式中,所述电子设备通过音乐播放软件,或者,视频播放软件对所述媒体文件进行裁剪。
本发明实施例提供的媒体裁剪的方法,通过所述电子设备显示操作界面,用户可以通过设置界面设置裁剪参数,以及选择对裁剪文件的操作,提高了用户体验,节约电子设备的资源占用,以及功耗。
第二方面,本发明实施例提供了一种实现媒体文件裁剪的电子设备,所述电子设备包括:显示屏,处理器和存储器,其中,所述存储器用于存储程序;所述处理器用于调用所述程序使得所述电子设备执行上述第一方面的媒体文件裁剪方法。
第三方面,本发明实施例提供了一种计算机可读存储介质,包括指令,当其在计算机上运行时,使得所述计算机执行上述第一方面的媒体文件裁剪方法。
第四方面,本发明实施例提供了一种媒体文件裁剪的方法,包括:服务器接收电子设备发送的媒体文件裁剪请求,所述裁剪请求包括所述媒体文件标识和裁剪参数;所述服务器根据所述所述媒体文件标识获取所述媒体文件,根据所述裁剪参数对所述媒体文件进行处理,得到裁剪结果信息;向所述电子设备所述裁剪结果信息,所述裁剪结果信息用于使得所述电子设备生成裁剪文件。本实施例中服务器通过标识找到媒体文件,能使得查找过程更方便的进行。
在一种可能的实现方式中,所述裁剪参数包括至少两个以下参数:裁剪的开始时间、裁剪的结束时间、裁剪时长。
在一种可能的实现方式中,所述裁剪结果信息包括待裁剪片段的起始帧和结束帧在所述媒体文件中的字节位置。
在一种可能的实现方式中,所述裁剪结果信息还包括所述裁剪文件的文件头信息。
在一种可能的实现方式中,所述服务器修改所述文件头信息。
第五方面,本发明实施例提供了一种实现媒体文件裁剪的服务器,所述电子设备包括:处理器和存储器,其中,所述存储器用于存储程序;所述处理器用于调用所述程序使得所述服务器执行如上述第四方面的媒体文件裁剪方法。
第六方面,本发明实施例提供了一种计算机可读存储介质,包括指令,当其在计算机上运行时,使得所述计算机执行上述第四方面的媒体文件裁剪方法。
本发明实施例提供的媒体裁剪的方法、电子设备和服务器,通过服务器对媒体文件进行分析处理,获取所述裁剪结果,所述电子设备根据裁剪结果生成裁剪文件。减少了电子设备的资源占用,提高了媒体文件的处理效率。并且所述电子设备可以显示操作界面,用户可以通过设置界面设置裁剪参数,以及选择对裁剪文件的操作,提高了用户体验,节约电子设备的资源占用,以及功耗。
为了更清楚地说明本发明实施例或现有技术中的技术方案,下面将对实施例或现有技术描述中所需要使用的附图作简单地介绍。
图1A为本发明实施例提供的电子设备的结构的示意图;
图1B为本发明实施例提供的电子设备的软件结构的示意图;
图2是本发明实施例中的媒体裁剪***结构示意图;
图3是本发明实施例中的服务器的结构示意图;
图4是本发明实施例中另一服务器的结构示意图;
图5是本发明实施例中音乐播放器第一应用界面示意图;
图6是本发明实施例中音乐播放器第二应用界面示意图;
图7是本发明实施例中音乐播放器第三应用界面示意图;
图8是本发明实施例中音乐播放器第四应用界面示意图;
图9是本发明实施例中媒体文件的结构示意图;
图10是本发明实施例中裁剪文件的结构示意图;
图11是本发明实施例中媒体文件的媒体内容的示意图;
图12是本发明实施例中裁剪文件的媒体内容的示意图。
本申请以下实施例中所使用的术语只是为了描述特定实施例的目的,而并非旨在作为对本申请的限制。如在本申请的说明书和所附权利要求书中所使用的那样,单数表达形式“一个”、“一种”、“所述”、“上述”、“该”和“这一”旨在也包括复数表达形式,除非其上下文中明确地有相反指示。还应当理解,本申请中使用的术语“和/或”是指并包含一个或多个所列出项目的任何或所有可能组合。
以下介绍了电子设备、用于这样的电子设备的用户界面、和用于使用这样的电子设备的实施例。在一些实施例中,电子设备可以是还包含其它功能诸如个人数字助理和/或音乐播放器功能的便携式电子设备,诸如手机、平板电脑、具备无线通讯功能的可穿戴电子设备(如智能手表)等。便携式电子设备的示例性实施例包括但不限于搭载
或者其它操作***的便携式电子设备。上述便携式电子设备也可以是其它便携式电子设备,诸如具有触敏表面或触控面板的膝上型计算机(Laptop)等。还应当理解的是,在其他一些实施例中,上述电子设备也可以不是便携式电子设备,而是具有触敏表面或触控面板的台式计算机。
本申请的说明书和权利要求书及附图中的术语“用户界面(user interface,UI)”,是应用程序或操作***与用户之间进行交互和信息交换的介质接口,它实现信息的内部形式与用户可以接受形式之间的转换。应用程序的用户界面是通过java、可扩展标记语言(extensible markup language,XML)等特定计算机语言编写的源代码,界面源代码在终端设备上经过解析,渲染,最终呈现为用户可以识别的内容,比如图片、文字、按钮等控件。控件(control)也称为部件(widget),是用户界面的基本元素,典型的控件有工具栏(toolbar)、菜单栏(menu bar)、文本框(text box)、按钮(button)、滚动条(scrollbar)、图片和文本。界面中的控件的属性和内容是通过标签或者节点来定义的,比如XML通过<Textview>、<ImgView>、<VideoView>等节点来规定界面所包含的控件。一个节点对应界面中一个控件或属性,节点经过解析和渲染之后呈现为用户可视的内容。此外,很多应用程序,比如混合应用(hybrid application)的界面中通常还包含有网页。网页,也称为页面,可以理解为内嵌在应用程序界面中的一个特殊的控件,网页是通过特定计算机语言编写的源代码,例如超文本标记语言(hyper text markup language,HTML),层叠样式表(cascading style sheets,CSS),java脚本(JavaScript,JS)等,网页源代码可以由浏览器或与浏览器功能类似的网页显示组件加载和显示为用户可识别的内容。网页所包含的具体内容也是通过网页源代码中的标签或者节点来定义的,比如HTML通过<p>、<img>、<video>、<canvas>来定义网页的元素和属性。
用户界面常用的表现形式是图形用户界面(graphic user interface,GUI),是指采用图形方式显示的与计算机操作相关的用
户界面。它可以是在电子设备的显示屏中显示的一个图标、窗口、控件等界面元素,其中控件可以包括图标、按钮、菜单、选项卡、文本框、对话框、状态栏、导航栏、Widget等可视的界面元素。
本发明实施例的技术方案,和现有技术中将媒体的裁剪由电子设备实现不同,本发明实施例将媒体剪裁放到处理实现。通过处理实现媒体的裁剪,节约了电子设备实现媒体裁剪的功耗。由于处理的计算能力强,整体媒体裁剪的时间也将变少。
在一些实施例中,开启上述功能后,电子设备可以通过蜂窝移动通信网络技术或广域网技术发现服务器。对于发现服务器的具体实现,在一些实施例中,当电子设备连接至网络中的服务器之后,该服务器可以向该电子设备提供连接至该服务器的其他设备的设备清单,这样电子设备便可以发现该其他设备,该其他设备可以为该电子设备发现的服务器。
首先介绍本申请以下实施例中提供的示例性电子设备100。
图1A示出了电子设备100的结构示意图。
电子设备100可以包括处理器110,外部存储器接口120,内部存储器121,通用串行总线(universal serial bus,USB)接口130,充电管理模块140,电源管理模块141,电池142,天线1,天线2,移动通信模块150,无线通信模块160,音频模块170,扬声器170A,受话器170B,麦克风170C,耳机接口170D,传感器模块180,按键190,马达191,指示器192,摄像头193,显示屏194,以及用户标识模块(subscriber identification module,SIM)卡接口195等。其中传感器模块180可以包括压力传感器180A,陀螺仪传感器180B,气压传感器180C,磁传感器180D,加速度传感器180E,距离传感器180F,接近光传感器180G,指纹传感器180H,温度传感器180J,触摸传感器180K,环境光传感器180L,骨传导传感器180M等。
可以理解的是,本发明实施例示意的结构并不构成对电子设备100的具体限定。在本申请另一些实施例中,电子设备100可以包括比图示更多或更少的部件,或者组合某些部件,或者拆分某些部件,或者不同的部件布置。图示的部件可以以硬件,软件或软件和硬件的组合实现。
处理器110可以包括一个或多个处理单元,例如:处理器110可以包括应用处理器(application processor,AP),调制解调处理器,图形处理器(graphics processing unit,GPU),图像信号处理器(image signal processor,ISP),控制器,存储器,视频编解码器,数字信号处理器(digital signal processor,DSP),基带处理器,和/或神经网络处理器(neural-network processing unit,NPU)等。其中,不同的处理单元可以是独立的器件,也可以集成在一个或多个处理器中。在一些实施例中,电子设备100也可以包括一个或多个处理器110。
其中,控制器可以是电子设备100的神经中枢和指挥中心。控制器可以根据指令操作码和时序信号,产生操作控制信号,完成取指令和执行指令的控制。
处理器110中还可以设置存储器,用于存储指令和数据。在一些实施例中,处理器110中的存储器为高速缓冲存储器。该存储器可以保存处理器110刚用过或循环使用的指令或数据。如果处理器110需要再次使用该指令或数据,可从所述存储器中直接调用。避免了重复存取,减少了处理器110的等待时间,因而提高了电子设备100的效率。
在一些实施例中,处理器110可以包括一个或多个接口。接口可以包括内置集成电路(inter-integrated circuit,I2C)接口,集成电路内置音频(inter-integrated circuit sound,I2S)接口,脉冲编码调制(pulse code modulation,PCM)接口,通用异步收发传输器(universal asynchronous receiver/transmitter,UART)接口,移动产业处理器接口(mobile industry processor interface,MIPI),通用输入输出(general-purpose input/output,GPIO)接口,用户标识模块(subscriber identity module,SIM)接口,和/或通用串行总线(universal serial bus,USB)接口等。
I2C接口是一种双向同步串行总线,包括一根串行数据线(serial data line,SDA)和一根串行时钟线(derail clock line,SCL)。在一些实施例中,处理器110可以包含多组I2C总线。处理器110可以通过不同的I2C总线接口分别耦合触摸传感器180K,充电器,闪光灯,摄像头193等。例如:处理器110可以通过I2C接口耦合触摸传感器180K,使处理器110与触摸传感器180K通过I2C总线接口通信,实现电子设备100的触摸功能。
I2S接口可以用于音频通信。在一些实施例中,处理器110可以包含多组I2S总线。处理器110可以通过I2S总线与音频模块170耦合,实现处理器110与音频模块170之间的通信。在一些实施例中,音频模块170可以通过I2S接口向无线通信模块160传递音频信号,实现通过蓝牙耳机接听电话的功能。
PCM接口也可以用于音频通信,将模拟信号抽样,量化和编码。在一些实施例中,音频模块170与无线通信模块160可以通过PCM总线接口耦合。在一些实施例中,音频模块170也可以通过PCM接口向无线通信模块160传递音频信号,实现通过蓝牙耳机接听电话的功能。所述I2S接口和所述PCM接口都可以用于音频通信。
UART接口是一种通用串行数据总线,用于异步通信。该总线可以为双向通信总线。它将要传输的数据在串行通信与并行通信之间转换。在一些实施例中,UART接口通常被用于连接处理器110与无线通信模块160。例如:处理器110通过UART接口与无线通信模块160中的 蓝牙模块通信,实现蓝牙功能。在一些实施例中,音频模块170可以通过UART接口向无线通信模块160传递音频信号,实现通过蓝牙耳机播放音乐的功能。
MIPI接口可以被用于连接处理器110与显示屏194,摄像头193等***器件。MIPI接口包括摄像头串行接口(camera serial interface,CSI),显示屏串行接口(display serial interface,DSI)等。在一些实施例中,处理器110和摄像头193通过CSI接口通信,实现电子设备100的拍摄功能。处理器110和显示屏194通过DSI接口通信,实现电子设备100的显示功能。
GPIO接口可以通过软件配置。GPIO接口可以被配置为控制信号,也可被配置为数据信号。在一些实施例中,GPIO接口可以用于连接处理器110与摄像头193,显示屏194,无线通信模块160,音频模块170,传感器模块180等。GPIO接口还可以被配置为I2C接口,I2S接口,UART接口,MIPI接口等。
USB接口130是符合USB标准规范的接口,具体可以是Mini USB接口,Micro USB接口,USB Type C接口等。USB接口130可以用于连接充电器为电子设备100充电,也可以用于电子设备100与***设备之间传输数据。也可以用于连接耳机,通过耳机播放音频。该接口还可以用于连接其他电子设备,例如AR设备等。
可以理解的是,本发明实施例示意的各模块间的接口连接关系,只是示意性说明,并不构成对电子设备100的结构限定。在另一些实施例中,电子设备100也可以采用上述实施例中不同的接口连接方式,或多种接口连接方式的组合。
充电管理模块140用于从充电器接收充电输入。其中,充电器可以是无线充电器,也可以是有线充电器。在一些有线充电的实施例中,充电管理模块140可以通过USB接口130接收有线充电器的充电输入。在一些无线充电的实施例中,充电管理模块140可以通过电子设备100的无线充电线圈接收无线充电输入。充电管理模块140为电池142充电的同时,还可以通过电源管理模块141为电子设备供电。
电源管理模块141用于连接电池142,充电管理模块140与处理器110。电源管理模块141接收电池142和/或充电管理模块140的输入,为处理器110,内部存储器121,外部存储器,显示屏194,摄像头193,和无线通信模块160等供电。电源管理模块141还可以用于监测电池容量,电池循环次数,电池健康状态(漏电,阻抗)等参数。在其他一些实施例中,电源管理模块141也可以设置于处理器110中。在另一些实施例中,电源管理模块141和充电管理模块140也可以设置于同一个器件中。
电子设备100的无线通信功能可以通过天线1,天线2,移动通信模块150,无线通信模块160,调制解调处理器以及基带处理器等实现。
天线1和天线2用于发射和接收电磁波信号。电子设备100中的每个天线可用于覆盖单个或多个通信频带。不同的天线还可以复用,以提高天线的利用率。例如:可以将天线1复用为无线局域网的分集天线。在另外一些实施例中,天线可以和调谐开关结合使用。
移动通信模块150可以提供应用在电子设备100上的包括2G/3G/4G/5G等无线通信的解决方案。移动通信模块150可以包括至少一个滤波器,开关,功率放大器,低噪声放大器(low noise amplifier,LNA)等。移动通信模块150可以由天线1接收电磁波,并对接收的电磁波进行滤波,放大等处理,传送至调制解调处理器进行解调。移动通信模块150还可以对经调制解调处理器调制后的信号放大,经天线1转为电磁波辐射出去。在一些实施例中,移动通信模块150的至少部分功能模块可以被设置于处理器110中。在一些实施例中,移动通信 模块150的至少部分功能模块可以与处理器110的至少部分模块被设置在同一个器件中。
调制解调处理器可以包括调制器和解调器。其中,调制器用于将待发送的低频基带信号调制成中高频信号。解调器用于将接收的电磁波信号解调为低频基带信号。随后解调器将解调得到的低频基带信号传送至基带处理器处理。低频基带信号经基带处理器处理后,被传递给应用处理器。应用处理器通过音频设备(不限于扬声器170A,受话器170B等)输出声音信号,或通过显示屏194显示图像或视频。在一些实施例中,调制解调处理器可以是独立的器件。在另一些实施例中,调制解调处理器可以独立于处理器110,与移动通信模块150或其他功能模块设置在同一个器件中。
无线通信模块160可以提供应用在电子设备100上的包括无线局域网(wireless local area networks,WLAN)(如无线保真(wireless fidelity,Wi-Fi)网络),蓝牙(bluetooth,BT),全球导航卫星***(global navigation satellite system,GNSS),调频(frequency modulation,FM),近距离无线通信技术(near field communication,NFC),红外技术(infrared,IR)等无线通信的解决方案。无线通信模块160可以是集成至少一个通信处理模块的一个或多个器件。无线通信模块160经由天线2接收电磁波,将电磁波信号调频以及滤波处理,将处理后的信号发送到处理器110。无线通信模块160还可以从处理器110接收待发送的信号,对其进行调频,放大,经天线2转为电磁波辐射出去。示例性地,无线通信模块160可以包括蓝牙模块、Wi-Fi模块等。
在一些实施例中,电子设备100的天线1和移动通信模块150耦合,天线2和无线通信模块160耦合,使得电子设备100可以通过无线通信技术与网络以及其他设备通信。所述无线通信技术可以包括全球移动通讯***(global system for mobile communications,GSM),通用分组无线服务(general packet radio service,GPRS),码分多址接入(code division multiple access,CDMA),宽带码分多址(wideband code division multiple access,WCDMA),时分码分多址(time-division code division multiple access,TD-SCDMA),长期演进(long term evolution,LTE),BT,GNSS,WLAN,NFC,FM,和/或IR技术等。所述GNSS可以包括全球卫星定位***(global positioning system,GPS),全球导航卫星***(global navigation satellite system,GLONASS),北斗卫星导航***(beidou navigation satellite system,BDS),准天顶卫星***(quasi-zenith satellite system,QZSS)和/或星基增强***(satellite based augmentation systems,SBAS)。
在一些实施例中,无线通信模块160中包括的蓝牙(BT)模块、WLAN模块可以发射信号来探测或扫描电子设备100附近设备,使得电子设备100可以使用蓝牙或WLAN等无线通信技术发现附近设备,并与附近设备建立无线通信连接,并通过上述连接分享数据至附近设备。其中,蓝牙(BT)模块可以提供包括经典蓝牙(蓝牙2.1)或蓝牙低功耗(Bluetooth low energy,BLE)中一项或多项蓝牙通信的解决方案。WLAN模块可以提供包括Wi-Fi direct、Wi-Fi LAN或Wi-Fi softAP中一项或多项WLAN通信的解决方案。
在一些实施例中,移动通信模块150提供的无线通信的解决方案可使得电子设备可以与网络中的设备(如服务器)通信,无线通信模块160提供的WLAN无线通信的解决方案也可使得电子设备可以与网络中的设备(如服务器)通信,并可以通过网络中的该设备(如服务器)与处理设备通信。这样,电子设备便可以发现处理设备、传输数据至处理设备。
电子设备100通过GPU,显示屏194,以及应用处理器等可以实现显示功能。GPU为图像处理的微处理器,连接显示屏194和应用处理器。GPU用于执行数学和几何计算,用于图形 渲染。处理器110可包括一个或多个GPU,其执行指令以生成或改变显示信息。
显示屏194用于显示图像,视频等。显示屏194包括显示面板。显示面板可以采用液晶显示屏(liquid crystal display,LCD),有机发光二极管(organic light-emitting diode,OLED),有源矩阵有机发光二极体或主动矩阵有机发光二极体(active-matrix organic light emitting diode的,AMOLED),柔性发光二极管(flex light-emitting diode,FLED),Miniled,MicroLed,Micro-oLed,量子点发光二极管(quantum dot light emitting diodes,QLED)等。在一些实施例中,电子设备100可以包括1个或N个显示屏194,N为大于1的正整数。
电子设备100可以通过ISP,摄像头193,视频编解码器,GPU,显示屏194以及应用处理器等实现拍摄功能。
ISP用于处理摄像头193反馈的数据。例如,拍照时,打开快门,光线通过镜头被传递到摄像头感光元件上,光信号转换为电信号,摄像头感光元件将所述电信号传递给ISP处理,转化为肉眼可见的图像。ISP还可以对图像的噪点,亮度,肤色进行算法优化。ISP还可以对拍摄场景的曝光,色温等参数优化。在一些实施例中,ISP可以设置在摄像头193中。
摄像头193用于捕获静态图像或视频。物体通过镜头生成光学图像投射到感光元件。感光元件可以是电荷耦合器件(charge coupled device,CCD)或互补金属氧化物半导体(complementary metal-oxide-semiconductor,CMOS)光电晶体管。感光元件把光信号转换成电信号,之后将电信号传递给ISP转换成数字图像信号。ISP将数字图像信号输出到DSP加工处理。DSP将数字图像信号转换成标准的RGB,YUV等格式的图像信号。在一些实施例中,电子设备100可以包括1个或N个摄像头193,N为大于1的正整数。
数字信号处理器用于处理数字信号,除了可以处理数字图像信号,还可以处理其他数字信号。例如,当电子设备100在频点选择时,数字信号处理器用于对频点能量进行傅里叶变换等。
视频编解码器用于对数字视频压缩或解压缩。电子设备100可以支持一种或多种视频编解码器。这样,电子设备100可以播放或录制多种编码格式的视频,例如:动态图像专家组(moving picture experts group,MPEG)-1,MPEG-2,MPEG-3,MPEG-4等。
NPU为神经网络(neural-network,NN)计算处理器,通过借鉴生物神经网络结构,例如借鉴人脑神经元之间传递模式,对输入信息快速处理,还可以不断的自学习。通过NPU可以实现电子设备100的智能认知等应用,例如:图像识别,人脸识别,语音识别,文本理解等。
外部存储器接口120可以用于连接外部存储卡,例如Micro SD卡,实现扩展电子设备100的存储能力。外部存储卡通过外部存储器接口120与处理器110通信,实现数据存储功能。例如将音乐、照片、视频等数据保存在外部存储卡中。
内部存储器121可以用于存储一个或多个计算机程序,该一个或多个计算机程序包括指令。处理器110可以通过运行存储在内部存储器121的上述指令,从而使得电子设备100执行本申请一些实施例中所提供的媒体裁剪的方法,以及各种功能应用以及数据处理等。内部存储器121可以包括存储程序区和存储数据区。其中,存储程序区可存储操作***;该存储程序区还可以存储一个或多个应用程序(比如图库、联系人等)等。存储数据区可存储电子设备100使用过程中所创建的数据(比如照片,联系人等)。此外,内部存储器121可以包括高速随机存取存储器,还可以包括非易失性存储器,例如至少一个磁盘存储器件,闪存器件,通用闪存存储器(universal flash storage,UFS)等。
电子设备100可以通过音频模块170,扬声器170A,受话器170B,麦克风170C,耳机 接口170D,以及应用处理器等实现音频功能。例如音乐播放,录音等。
音频模块170用于将数字音频信息转换成模拟音频信号输出,也用于将模拟音频输入转换为数字音频信号。音频模块170还可以用于对音频信号编码和解码。在一些实施例中,音频模块170可以设置于处理器110中,或将音频模块170的部分功能模块设置于处理器110中。
扬声器170A,也称“喇叭”,用于将音频电信号转换为声音信号。电子设备100可以通过扬声器170A收听音乐,或收听免提通话。
受话器170B,也称“听筒”,用于将音频电信号转换成声音信号。当电子设备100接听电话或语音信息时,可以通过将受话器170B靠近人耳接听语音。
麦克风170C,也称“话筒”,“传声器”,用于将声音信号转换为电信号。当拨打电话或发送语音信息时,用户可以通过人嘴靠近麦克风170C发声,将声音信号输入到麦克风170C。电子设备100可以设置至少一个麦克风170C。在另一些实施例中,电子设备100可以设置两个麦克风170C,除了采集声音信号,还可以实现降噪功能。在另一些实施例中,电子设备100还可以设置三个,四个或更多麦克风170C,实现采集声音信号,降噪,还可以识别声音来源,实现定向录音功能等。
耳机接口170D用于连接有线耳机。耳机接口170D可以是USB接口130,也可以是3.5mm的开放移动电子设备平台(open mobile terminal platform,OMTP)标准接口,美国蜂窝电信工业协会(cellular telecommunications industry association of the USA,CTIA)标准接口。
压力传感器180A用于感受压力信号,可以将压力信号转换成电信号。在一些实施例中,压力传感器180A可以设置于显示屏194。压力传感器180A的种类很多,如电阻式压力传感器,电感式压力传感器,电容式压力传感器等。电容式压力传感器可以是包括至少两个具有导电材料的平行板。当有力作用于压力传感器180A,电极之间的电容改变。电子设备100根据电容的变化确定压力的强度。当有触摸操作作用于显示屏194,电子设备100根据压力传感器180A检测所述触摸操作强度。电子设备100也可以根据压力传感器180A的检测信号计算触摸的位置。在一些实施例中,作用于相同触摸位置,但不同触摸操作强度的触摸操作,可以对应不同的操作指令。例如:当有触摸操作强度小于第一压力阈值的触摸操作作用于短消息应用图标时,执行查看短消息的指令。当有触摸操作强度大于或等于第一压力阈值的触摸操作作用于短消息应用图标时,执行新建短消息的指令。
陀螺仪传感器180B可以用于确定电子设备100的运动姿态。在一些实施例中,可以通过陀螺仪传感器180B确定电子设备100围绕三个轴(即,x,y和z轴)的角速度。陀螺仪传感器180B可以用于拍摄防抖。示例性的,当按下快门,陀螺仪传感器180B检测电子设备100抖动的角度,根据角度计算出镜头模组需要补偿的距离,让镜头通过反向运动抵消电子设备100的抖动,实现防抖。陀螺仪传感器180B还可以用于导航,体感游戏场景。
气压传感器180C用于测量气压。在一些实施例中,电子设备100通过气压传感器180C测得的气压值计算海拔高度,辅助定位和导航。
磁传感器180D包括霍尔传感器。电子设备100可以利用磁传感器180D检测翻盖皮套的开合。在一些实施例中,当电子设备100是翻盖机时,电子设备100可以根据磁传感器180D检测翻盖的开合。进而根据检测到的皮套的开合状态或翻盖的开合状态,设置翻盖自动解锁等特性。
加速度传感器180E可检测电子设备100在各个方向上(一般为三轴)加速度的大小。当电子设备100静止时可检测出重力的大小及方向。还可以用于识别电子设备姿态,应用于横竖屏切换,计步器等应用。
距离传感器180F,用于测量距离。电子设备100可以通过红外或激光测量距离。在一些实施例中,拍摄场景,电子设备100可以利用距离传感器180F测距以实现快速对焦。
接近光传感器180G可以包括例如发光二极管(LED)和光检测器,例如光电二极管。发光二极管可以是红外发光二极管。电子设备100通过发光二极管向外发射红外光。电子设备100使用光电二极管检测来自附近物体的红外反射光。当检测到充分的反射光时,可以确定电子设备100附近有物体。当检测到不充分的反射光时,电子设备100可以确定电子设备100附近没有物体。电子设备100可以利用接近光传感器180G检测用户手持电子设备100贴近耳朵通话,以便自动熄灭屏幕达到省电的目的。接近光传感器180G也可用于皮套模式,口袋模式自动解锁与锁屏。
环境光传感器180L用于感知环境光亮度。电子设备100可以根据感知的环境光亮度自适应调节显示屏194亮度。环境光传感器180L也可用于拍照时自动调节白平衡。环境光传感器180L还可以与接近光传感器180G配合,检测电子设备100是否在口袋里,以防误触。
指纹传感器180H用于采集指纹。电子设备100可以利用采集的指纹特性实现指纹解锁,访问应用锁,指纹拍照,指纹接听来电等。
温度传感器180J用于检测温度。在一些实施例中,电子设备100利用温度传感器180J检测的温度,执行温度处理策略。例如,当温度传感器180J上报的温度超过阈值,电子设备100执行降低位于温度传感器180J附近的处理器的性能,以便降低功耗实施热保护。在另一些实施例中,当温度低于另一阈值时,电子设备100对电池142加热,以避免低温导致电子设备100异常关机。在其他一些实施例中,当温度低于又一阈值时,电子设备100对电池142的输出电压执行升压,以避免低温导致的异常关机。
触摸传感器180K,也可称触控面板或触敏表面。触摸传感器180K可以设置于显示屏194,由触摸传感器180K与显示屏194组成触摸屏,也称“触控屏”。触摸传感器180K用于检测作用于其上或附近的触摸操作。触摸传感器可以将检测到的触摸操作传递给应用处理器,以确定触摸事件类型。可以通过显示屏194提供与触摸操作相关的视觉输出。在另一些实施例中,触摸传感器180K也可以设置于电子设备100的表面,与显示屏194所处的位置不同。
骨传导传感器180M可以获取振动信号。在一些实施例中,骨传导传感器180M可以获取人体声部振动骨块的振动信号。骨传导传感器180M也可以接触人体脉搏,接收血压跳动信号。在一些实施例中,骨传导传感器180M也可以设置于耳机中,结合成骨传导耳机。音频模块170可以基于所述骨传导传感器180M获取的声部振动骨块的振动信号,解析出语音信号,实现语音功能。应用处理器可以基于所述骨传导传感器180M获取的血压跳动信号解析心率信息,实现心率检测功能。
按键190包括开机键,音量键等。按键190可以是机械按键。也可以是触摸式按键。电子设备100可以接收按键输入,产生与电子设备100的用户设置以及功能控制有关的键信号输入。
马达191可以产生振动提示。马达191可以用于来电振动提示,也可以用于触摸振动反馈。例如,作用于不同应用(例如拍照,音频播放等)的触摸操作,可以对应不同的振动反馈效果。作用于显示屏194不同区域的触摸操作,马达191也可对应不同的振动反馈效果。不 同的应用场景(例如:时间提醒,接收信息,闹钟,游戏等)也可以对应不同的振动反馈效果。触摸振动反馈效果还可以支持自定义。
指示器192可以是指示灯,可以用于指示充电状态,电量变化,也可以用于指示消息,未接来电,通知等。
SIM卡接口195用于连接SIM卡。SIM卡可以通过***SIM卡接口195,或从SIM卡接口195拔出,实现和电子设备100的接触和分离。电子设备100可以支持1个或N个SIM卡接口,N为大于1的正整数。SIM卡接口195可以支持Nano SIM卡,Micro SIM卡,SIM卡等。同一个SIM卡接口195可以同时***多张卡。所述多张卡的类型可以相同,也可以不同。SIM卡接口195也可以兼容不同类型的SIM卡。SIM卡接口195也可以兼容外部存储卡。电子设备100通过SIM卡和网络交互,实现通话以及数据通信等功能。在一些实施例中,电子设备100采用eSIM,即:嵌入式SIM卡。eSIM卡可以嵌在电子设备100中,不能和电子设备100分离。
图1A示例性所示的电子设备100可以通过显示屏194显示以下各个实施例中所描述的各个用户界面。电子设备100可以通过触摸传感器180K在各个用户界面中检测触控操作,例如在各个用户界面中的点击操作(如在图标上的触摸操作、双击操作),又例如在各个用户界面中的向上或向下的滑动操作,或执行画圆圈手势的操作,等等。在一些实施例中,电子设备100可以通过陀螺仪传感器180B、加速度传感器180E等检测用户手持电子设备100执行的运动手势,例如晃动电子设备。在一些实施例中,电子设备100可以通过摄像头193(如3D摄像头、深度摄像头)检测非触控的手势操作。
电子设备100的软件***可以采用分层架构,事件驱动架构,微核架构,微服务架构,或云架构。本发明实施例以分层架构的Android***为例,示例性说明电子设备100的软件结构。
图1B是本发明实施例的电子设备100的软件结构框图。
分层架构将软件分成若干个层,每一层都有清晰的角色和分工。层与层之间通过软件接口通信。在一些实施例中,将Android***分为四层,从上至下分别为应用程序层,应用程序框架层,安卓运行时(Android runtime)和***库,以及内核层。
应用程序层可以包括一系列应用程序包。
如图1B所示,应用程序包可以包括相机,图库,日历,通话,地图,导航,WLAN,蓝牙,音乐,视频,短信息等应用程序。
应用程序框架层为应用程序层的应用程序提供应用编程接口(application programming interface,API)和编程框架。应用程序框架层包括一些预先定义的函数。
如图1B所示,应用程序框架层可以包括窗口管理器,内容提供器,视图***,电话管理器,资源管理器,通知管理器等。
窗口管理器用于管理窗口程序。窗口管理器可以获取显示屏大小,判断是否有状态栏,锁定屏幕,截取屏幕等。
内容提供器用来存放和获取数据,并使这些数据可以被应用程序访问。所述数据可以包括视频,图像,音频,拨打和接听的电话,浏览历史和书签,电话簿等。
视图***包括可视控件,例如显示文字的控件,显示图片的控件等。视图***可用于构建应用程序。显示界面可以由一个或多个视图组成的。例如,包括短信通知图标的显示界面,可以包括显示文字的视图以及显示图片的视图。
电话管理器用于提供电子设备100的通信功能。例如通话状态的管理(包括接通,挂断等)。
资源管理器为应用程序提供各种资源,比如本地化字符串,图标,图片,布局文件,视频文件等等。
通知管理器使应用程序可以在状态栏中显示通知信息,可以用于传达告知类型的消息,可以短暂停留后自动消失,无需用户交互。比如通知管理器被用于告知下载完成,消息提醒等。通知管理器还可以是以图表或者滚动条文本形式出现在***顶部状态栏的通知,例如后台运行的应用程序的通知,还可以是以对话窗口形式出现在屏幕上的通知。例如在状态栏提示文本信息,发出提示音,电子设备振动,指示灯闪烁等。
Android Runtime包括核心库和虚拟机。Android runtime负责安卓***的调度和管理。
核心库包含两部分:一部分是java语言需要调用的功能函数,另一部分是安卓的核心库。
应用程序层和应用程序框架层运行在虚拟机中。虚拟机将应用程序层和应用程序框架层的java文件执行为二进制文件。虚拟机用于执行对象生命周期的管理,堆栈管理,线程管理,安全和异常的管理,以及垃圾回收等功能。
***库可以包括多个功能模块。例如:表面管理器(surface manager),媒体库(Media Libraries),三维图形处理库(例如:OpenGL ES),2D图形引擎(例如:SGL)等。
表面管理器用于对显示子***进行管理,并且为多个应用程序提供了2D和3D图层的融合。
媒体库支持多种常用的音频,视频格式回放和录制,以及静态图像文件等。媒体库可以支持多种音视频编码格式,例如:MPEG4,H.264,MP3,AAC,AMR,JPG,PNG等。
三维图形处理库用于实现三维图形绘图,图像渲染,合成,和图层处理等。
2D图形引擎是2D绘图的绘图引擎。
内核层是硬件和软件之间的层。内核层至少包含显示驱动,摄像头驱动,音频驱动,传感器驱动。
图1B所示的软件***涉及到使用分享能力的应用呈现(如图库,文件管理器),提供分享能力的即时分享模块,提供打印能力的打印服务(print service)和打印后台服务(print spooler),以及应用框架层提供打印框架、WLAN服务、蓝牙服务,以及内核和底层提供WLAN蓝牙能力和基本通信协议。
下面结合捕获拍照场景,示例性说明电子设备100软件以及硬件的工作流程。
当触摸传感器180K接收到触摸操作,相应的硬件中断被发给内核层。内核层将触摸操作加工成原始输入事件(包括触摸坐标,触摸操作的时间戳等信息)。原始输入事件被存储在内核层。应用程序框架层从内核层获取原始输入事件,识别该输入事件所对应的控件。以该触摸操作所对应的控件为相机应用图标的控件为例,相机应用调用应用框架层的接口,启动相机应用,进而通过调用内核层启动摄像头驱动,通过摄像头193捕获静态图像或视频。
如图2所示为本发明实施例提供的一种用于媒体裁剪***,所述裁剪***包括电子设备100和服务器202。用户操作电子设备100的显示屏,选定媒体文件A,向所述云服务器发送请求裁剪所述媒体文件A请求消息。所述请求消息可以包括所述媒体文件A的文件信息。所述服务器接收所述请求消息后,根据所述文件信息对相应的媒体内容进行裁剪,并将裁剪结果发送给所述电子设备。所述裁剪结果可以包括裁剪的摘要信息。所述电子设备100根据所 述服务器202返回的所述裁剪结果,以及所述媒体文件A重新生成裁剪文件B。
通过本发明实施例的裁剪***可以减少电子设备进行媒体文件裁剪的资源占用,降低所述电子设备对媒体文件进行裁剪的功耗,提升对媒体文件裁剪的效率和速度。
本发明实施例中,所述服务器可以为云服务器,或在线服务器等具有裁剪功能的服务器。
在本发明的实施例中,所述请求消息中的媒体内容的文件信息可以包括至少一种以下信息:媒体文件标识、裁剪参数。所述裁剪参数可以包括至少以下一种参数:裁剪的开始时间、裁剪的结束时间、裁剪时长等。
本发明实施例中,所述裁剪参数可以默认设置,也可以通过用户的操作进行设置,也可以由所述电子设备或者相关软件智能识别生成相关参数。
在本发明的实施例中,所述摘要信息可以包括有序的至少一个文件片段信息,以及每个片段在所述原媒体文件A的起始位置及结束位置信息。
在本发明的实施例中,所述电子设备可以通过安装在所述电子设备上的应用实现所述裁剪功能。例如,电子设备上可以安装裁剪软件C,通过所述裁剪软件C选定需要裁剪的媒体文件A,并通过所述裁剪软件C向所述云服务器发送裁剪请求。所述裁剪软件还可以提供裁剪设置界面,通过所述裁剪设置界面可以选择需要裁剪的媒体文件,并设置对所述媒体文件的裁剪参数。例如,用户可以通过所述裁剪设置界面选择需要裁剪的媒体文件,并且设置裁剪的开始时间和/或裁剪的结束时间等。
本发明实施例中,所述裁剪软件功能可以独立开发,也可以通过现有的音乐播放器,或者视频播放器实现。
本发明实施例中,结合图1A的电子设备100对裁剪所述媒体文件A的处理方法进行说明。所述电子设备100中的显示屏194显示所述电子设备100上安装的裁剪软件C。所述电子设备100的触摸传感器180K接收用户输入的操作,并执行相应的指令。所述触摸传感器180K可以接收用户的点击所述裁剪软件C的操作,响应于所述操作,启动所述裁剪软件C。所述显示屏194显示所述裁剪软件C的界面。进入所述裁剪软件C的裁剪设置界面,通过所述裁剪软件C的裁剪设置界面,用户可以选择需要进行裁剪的本地媒体文件A,并设置相关的裁剪参数。所述裁剪软件C根据用户的选择向所述服务器发送裁剪请求。所述电子设备100接收所述服务器处理返回的裁剪摘要信息,根据所述摘要信息和本地的原媒体文件A进行重新生成裁剪文件B。所述电子设备100的内部存储器121可以保存所述裁剪文件B。用户可以直接播放所述裁剪文件B,或者可以分享所述裁剪文件B,或者对所述裁剪文件B进行其他操作,例如将所述所述裁剪文件B设置为铃音。
本发明实施例中,所述裁剪软件C也可以自动识别媒体文件A中的精彩部分获取裁剪参数。例如,某一进球瞬间的几帧视频流,或者,某一音频流中的高潮部分或副歌部分,而不需要用户手动设置。
本发明实施例中,所述电子设备100可以通过裁剪模块实现所述裁剪软件C的裁剪功能。所述裁剪功能可以包括以下一种或多种功能:识别媒体文件标识,获取裁剪请求,发送裁剪请求,识别裁剪摘要信息,以及根据裁剪摘要信息生成裁剪文件功能等。
本发明实施例中,所述服务器可以通过多个服务器设备实现媒体文件的裁剪功能。
在本发明的实施例中,如图3所示服务器结构示意图,所述服务器300可以包括媒体裁剪服务器1021和媒体服务器1022。所述媒体裁剪服务器1021接收到所述电子设备发送的裁剪所述媒体文件A的所述裁剪请求,所述媒体裁剪服务器1021识别出所述裁剪请求中的媒体文件 标识和裁剪参数。所述裁剪参数可以包括裁剪的开始时间、结束时间、或裁剪时长。所述媒体裁剪服务器1021将媒体文件标识发送到所述媒体服务器1022,以获取所述媒体文件标识对应的媒体文件。所述媒体服务器1022将与所述媒体文件标识对应的媒体文件发送给所述媒体裁剪服务器1021。所述媒体裁剪服务器1021根据所述裁剪参数对所述媒体文件进行裁剪,并将生成的裁剪结果发送给所述电子设备。所述裁剪结果信息可以包括裁剪所述原媒体文件A的起始位置及结束位置信息。其中,每个文件片段的相对位置信息标记在所述媒体文件A中的开始字节位置、结束字节位置等。
本发明实施例中,所述裁剪结果可以包括裁剪摘要信息。所述裁剪结果信息/裁剪摘要信息可以包括待裁剪片段的起始帧和结束帧在所述媒体文件中的字节位置。
如图3所示的结构示意图,所述媒体裁剪服务器1021可以包括交互模块1025,裁剪处理模块1026。所述交互模块1025用于与所述电子设备或所述媒体服务器1022进行交互。所述裁剪处理模块1026用于根据所述裁剪请求对所述媒体服务器1022返回的所述媒体文件A进行裁剪处理,生成所述裁剪结果,并通过所述交互模块1025将所述裁剪结果返回给所述电子设备。
如图3所示的结构示意图,所述媒体服务器1022可以包括交互模块1028和匹配模块1029。所述交互模块1028用于与所述媒体裁剪服务器1021交互。所述匹配模块1029用于根据所述交互模块1028接收的所述媒体裁剪服务器1021发送的所述媒体文件标识匹配相应的媒体文件,并通过所述交互模块1028将所述媒体文件发送给所述媒体裁剪服务器1021。
如图4所示,本发明另一实施例中,所述服务器400可以包括:处理器10213、存储器10214和收发器10215。
其中,所述处理器10213可以实现媒体的裁剪。所述收发器10215可以接收电子设备100发送的裁剪请求,所述裁剪请求包括所述媒体文件标识和裁剪参数。所述处理器10213用于根据所述裁剪请求中的媒体文件标识获取对应的媒体文件,根据所述裁剪参数对所述媒体文件进行处理,得到裁剪结果信息。所述收发器10215用于将所述裁剪结果信息发送给所述电子设备。所述存储器10214可以用于储存裁剪请求、裁剪参数、待裁剪的媒体内容、或裁剪后的媒体内容等。
本发明实施例通过服务器实现对媒体文件的裁剪,减少了电子设备实现媒体裁剪的时间和裁剪产生的功耗,提高了媒体文件的处理效率。
在本发明实施例中,由于电子设备无法识别所有的媒体文件类型,故本发明实施例将媒体文件的裁剪通过服务器实现,不仅支持对更多类型的媒体文件进行裁剪,而且服务器进行开发即可实现。电子设备上的应用不需要进行开发和升级,使得媒体文件的裁剪更简单易行。所述服务器实现裁剪处理后,将裁剪结果发送给所述电子设备。所述电子设备根据所述裁剪结果生成裁剪文件,比起直接将裁剪后的媒体文件发送给电子设备,本发明实施例的方案更能节约电子设备和服务器之间的资源占用。
以音乐媒体文件裁剪为例,结合图5,图6,图7,以及图8对本发明实施例中裁剪方法进行说明。
如图5所示,为本发明实施例中所述电子设备100中音乐播放器的第一应用界面500示意图。所述第一应用界面500包括第一区域501和第二区域502。所述第一区域501显示所述音乐播放器的播放列表封面。所述第二区域502显示所述播放器的播放清单中的曲目列表。如图5所示,在所述音乐播放器界面显示了曲目1,曲目2,曲目3,……,曲目N。
用户浏览所述音乐播放器所述第一应用界面的内容,非常喜欢曲目2,希望截取所述曲目2的高潮部分作为电子设备的铃音。用户在所述第一应用界面500上点击曲目2,所述音乐播放器显示第二应用界面600,如图6所示。所述第二应用界面600可以包括至少一个以下部分:第一部分601,第二部分,以及第三部分。所述第一部分701为唱片封面信息,所述第二部分可以包括播放进度条602,所述第三部分包括控制选项。所述控制选项可以至少一项控制选项或选项图标:下载603,裁剪604,分享605,收藏606,快进播放/下一首控制键608,快退播放/上一首控制键607。用户在所述第二应用界面点击裁剪604选项图标,所述音乐播放器显示第三应用界面700。如图7所示,所述第三应用界面700包括裁剪设置界面。所述第三应用界面700包括裁剪设置项。所述裁剪设置项用于设置裁剪参数。如图7所示,示例性的,所述裁剪设置项可以包括裁剪控制条,用户可以通过移动所述裁剪控制条上的起始键701和终止键702选择输入裁剪起始时间和结束时间。如图7所示,裁剪起始时间为:1分27秒,裁剪结束时间为:2分02秒。裁剪时长为:35秒。所述第三应用界面700还可以包括裁剪控制项。如图7所示,所述裁剪控制项可以为“开始裁剪”按键703。用户点击所述“开始裁剪”按键703,所述音乐播放器获取曲目2的文件标识和裁剪参数,向服务器发送裁剪请求。
本发明实施例中,如图7所示,所述音乐播放器的所述第三应用界面还可以包括唱片封面信息704。
本发明实施例中,所述服务器接收所述裁剪请求中的所述曲目2的文件标识,根据所述文件标识获取对应的所述曲目的文件。所述服务器获取所述曲目2文件后,对所述曲目2文件进行裁剪,并将裁剪结果发给所述音乐播放器。
所述音乐播放器根据所述曲目2,以及裁剪结果,重新组装新的媒体文件,生成裁剪文件。所述音乐播放器可以在应用界面上提示用户。如图8所示,提示用户已经保存裁剪文件。如图8所示的第四应用界面800上还可以包括试听按键802,或者,设置为铃声按键803,或者唱片信息801。本发明实施例不限制提示用户的信息,可以提示用户裁剪完成,或者,提示用户可以对裁剪文件进行操作,或者,提示用户保存所述裁剪文件等。通过提示界面,用户可以选择播放所述裁剪文件,或者,将所述裁剪文件设置为铃音等操作。
本发明实施例提供的媒体裁剪的方法,通过所述电子设备显示操作界面,用户可以通过设置界面设置裁剪参数,以及选择对裁剪文件的操作,提高了用户体验,节约电子设备的资源占用,以及功耗。
结合图9,对所述服务器对所述媒体文件的裁剪方法举例说明如下。
图9是本发明实施例中媒体文件的结构示意图。例如,所述媒体文件的播放时长为150秒,其内容包括C0,C1,C2,C3,C4,C5,C6…C150。C0为媒体文件头信息,通常描述作品名称、艺人姓名等内容。C1,C2,C3,C4,C5,C6…C150分别表示每一秒时间的媒体内容。偏移量X0,X1表示C0在媒体文件中的字节起始点和结束点。X1表示C0的结束点,但并不包括在C0的内容之内。X1是C1的起始点,并且被包括在C1的内容中。X2表示C1的结束点,但并不包括在C1的内容之内。类似的,X1,X2,X3,X4,X5,X6…Xn分别表示C1,C2,C3,C4,C5,C6…Cn每一段内容在媒体文件中的字节起始点和结束点。对于所述媒体文件中,所述n为小于等于150的正整数。
本发明实施例中,示例性的,当所述媒体文件播放时长为m秒,则其内容可以为C0,C1,C2,C3,C4,C5,C6…Cm。m为正整数。
如图5和图6所示,以所述媒体文件为曲目2为例,所述曲目2的播放时长为150秒。 用户播放曲目2后,所述电子设备成功缓存所述曲目2。或者,用户成功下载所述曲目2后,用户可以选择对所述曲目2进行裁剪。
如图7所示,用户设置裁剪参数为:1分27秒-2分02秒。表示用户希望裁剪这个时间段的媒体内容。
用户点击“开始裁剪”按键后,所述电子设备根据用户的操作获取曲目2的文件标识和裁剪参数。所述电子设备向所述服务器发起裁剪请求。所述裁剪请求可以包括所述曲目2的文件标识、裁剪请求时间:1分27s,裁剪时长35秒。
本发明实施例中,所述裁剪请求也可以包括所述曲目2的文件标识、裁剪起始时间:1分27秒、裁剪结束时间:2分02秒。本发明实施例并不限定具体的裁剪参数,所述裁剪参数能实现裁剪目的即可。
所述服务器根据接收的裁剪请求进行处理,得到裁剪结果,并将所述裁剪结果返回所述电子设备。返回所述裁剪结果示例如下:
segment0:start=X’0,end=X’1;
segment1:content={CC};
segment2:start=X87,end=X122。
上述裁剪结果中的参数含义说明如下:
第0部分:起始于偏移量X’0,结束于偏移量X’1。
第1部分:内容为{CC},该部分内容为可选。服务器可以通过该部分对文件头的信息进行修改。例如,在原始的歌曲名称后,增加“高潮版”名称后缀。
第2部分:起始于偏移量X87,结束于偏移量X122。
本发明实施例中,X’0、X’1、X87和X122分别表示相对于原曲目2文件字节位置的偏移量。
所述第1部分的内容{CC}为所述服务器编辑的文件头信息。假设CC的长度为Z。Z为正整数。例如,对所述曲目2的歌曲名称进行修改。segment1中的content指向的内容{CC},{CC}的内容就是所述服务器编辑媒体文件的头信息。通过16进制表示示例,内容是类似0x54 0x49 0x54 0x32 0x00 0x00 0x00 0x0A 0x00 0x00 0x03 0x78 0x78 0x28 0x30 0x7E 0x32 0x73 0x29 0x00的样式。这部分内容是相对于原始媒体文件发生变化的一些媒体文件头信息,例如,mp3文件的ID3 tag信息。
本发明实施例中,上述segment0和segment1组成所述裁剪文件的文件头。segment1部分为可选字节。服务器可以通过segment1对所述裁剪文件的文件头的信息进行修改。所述服务器可以通过所述segment1字段承载修改信息,返回给所述电子设备。例如,所述曲目2的歌曲名称为:《双截棍》,修改后所述裁剪文件的名称为:《双截棍彩铃版》。
本发明实施例中,通常所述segment0中的参数X’1小于或等于X1。当X’1等于X1时,则所述服务器不修改所述曲目2的文件头信息,也不会返回segment1的内容。
所述电子设备接收所述服务器返回的裁剪结果后,根据所述裁剪结果生成裁剪文件。所述电子设备重新生成裁剪文件的过程结合图10进行说明。图10为所述裁剪文件的结构示意图。
所述电子设备根据所述曲目2和裁剪结果计算出所述裁剪文件的文件信息:C’0的起始点和结束点分别为X’0和X’1,{CC}长度为Z,C87-C121部分的内容对应的起始点和结束点分别为X87和X122。X87和X122是相对于原始曲目2文件字节位置的偏移量。
所述电子设备根据偏移量,提取原曲目2中的X’0到X’1内容,{cc}对’应的内容,以及X87到X122对应的内容,重新生成所述裁剪文件。所述X87到X122对应的内容为原曲目2中的C87,C88…C121的部分。
所述电子设备生成所述裁剪文件后,可以通过音乐播放器的应用界面将提示用户裁剪文件已经生成。所述电子设备可以提示用户保存、试听、设置铃音、或者对所述裁剪文件进行其他操作。
本发明实施例提供的媒体裁剪的方法、电子设备和服务器,通过服务器对媒体文件进行分析处理,获取所述裁剪结果,所述电子设备根据裁剪结果生成裁剪文件。减少了电子设备的资源占用,提高了媒体文件的处理效率。并且所述电子设备可以显示操作界面,用户可以通过设置界面设置裁剪参数,以及选择对裁剪文件的操作,提高了用户体验,节约电子设备的资源占用,以及功耗。
如图11为本发明实施例中媒体文件的示意图。如图11所示,所述媒体文件为MP3文件。该媒体内容包括:ID3V2,第0到1秒的内容,第1到2秒的内容,以及第2到3秒的内容。ID3,一般是位于一个mp3文件的开头或末尾的若干字节内,附加了关于该mp3的歌手,标题,专辑名称,年代,风格等信息,该信息就被称为ID3信息,ID3信息分为两个版本,v1和v2版。其中:v1版的ID3在mp3文件的末尾128字节,以TAG三个字符开头,后面跟上歌曲信息。v2版一般位于mp3的开头,可以存储歌词,该专辑的图片等大容量的信息。ID3标签是MP3音乐档案中的歌曲附加讯息,它能够在MP3中附加曲子的演出者、作者以及其它类别资讯,方便众多乐曲的管理。
如图11所示,ID3V2的内容包括文件内容为h1到h10以及0x54到0x00的头域内容。第0到1秒包括p11到p13的媒体内容。第1到2秒包括p21到p26的媒体内容。第2到3秒包括p31到p37的媒体内容。需要说明的是,h1到h10并不表示该内容只有10个字节,只是一个示例,实际大小可能会比这个大。
如图12所示,所述服务器返回的裁剪后的媒体的文件头在图11中的ID3V2中的最后的0x78和0x00中间增加了0x28、0x30、0x7E、0x32、0x73和0x29。这些新增的头文件内容代表:文件标题新增的内容。例如原来的文件标题是xx,修改为xx(0-2s);文件标题新增的内容,即这几个字符就表示0到2秒。裁剪的内容为0到1秒和1到2秒的内容,即p11到p26的内容。
本发明实施例通过在服务器实现对媒体文件的裁剪,减少了电子设备实现媒体裁剪的时间和裁剪产生的功耗。
此外,由于电子设备无法识别所有的媒体文件类型,故本发明实施例将媒体文件的裁剪放到服务器中实现,可以实现几乎所有媒体文件的裁剪,使得媒体文件的裁剪更简单易行。
并且,在所述服务器实现裁剪后,是将裁剪后的裁剪结果发送给电子设备,由电子设备实现裁剪文件的重新组装。比起直接将裁剪后的媒体文件发送给电子设备,本发明实施例的方案更能节约电子设备和服务器之间的带宽。
上述实施例中所用,根据上下文,术语“当…时”可以被解释为意思是“如果…”或“在…后”或“响应于确定…”或“响应于检测到…”。类似地,根据上下文,短语“在确定…时”或“如果检测到(所陈述的条件或事件)”可以被解释为意思是“如果确定…”或“响应于确定…”或“在检测到(所陈述的条件或事件)时”或“响应于检测到(所陈述的条件或事 件)”。
在上述实施例中,可以全部或部分地通过软件、硬件、固件或者其任意组合来实现。当使用软件实现时,可以全部或部分地以计算机程序产品的形式实现。所述计算机程序产品包括一个或多个计算机指令。在计算机上加载和执行所述计算机程序指令时,全部或部分地产生按照本申请实施例所述的流程或功能。所述计算机可以是通用计算机、专用计算机、计算机网络、或者其他可编程装置。所述计算机指令可以存储在计算机可读存储介质中,或者从一个计算机可读存储介质向另一个计算机可读存储介质传输,例如,所述计算机指令可以从一个网站站点、计算机、服务器或数据中心通过有线(例如同轴电缆、光纤、数字用户线)或无线(例如红外、无线、微波等)方式向另一个网站站点、计算机、服务器或数据中心进行传输。所述计算机可读存储介质可以是计算机能够存取的任何可用介质或者是包含一个或多个可用介质集成的服务器、数据中心等数据存储设备。所述可用介质可以是磁性介质,(例如,软盘、硬盘、磁带)、光介质(例如DVD)、或者半导体介质(例如固态硬盘)等。
本领域普通技术人员可以理解实现上述实施例方法中的全部或部分流程,该流程可以由计算机程序来指令相关的硬件完成,该程序可存储于计算机可读取存储介质中,该程序在执行时,可包括如上述各方法实施例的流程。而前述的存储介质包括:ROM或随机存储记忆体RAM、磁碟或者光盘等各种可存储程序代码的介质。
Claims (19)
- 一种媒体文件裁剪的方法,其特征在于,包括:电子设备获取媒体文件标识和裁剪参数,根据所述裁剪参数向服务器发送裁剪请求;所述电子设备接收所述服务器返回的裁剪结果信息;所述电子设备根据所述裁剪结果信息,以及所述媒体文件,生成裁剪文件。
- 根据权利要求2所述的方法,其特征在于,所述电子设备获取媒体文件标识和裁剪参数包括:所述电子设备接收用户操作,获取媒体文件标识和裁剪参数。
- 根据权利要求1或2所述的方法,其特征在于,所述裁剪参数包括至少两个以下参数:裁剪的开始时间、裁剪的结束时间、裁剪时长。
- 根据权利要求1-3任一项所述的方法,其特征在于,所述裁剪结果信息包括待裁剪片段的起始帧和结束帧在所述媒体文件中的字节位置。
- 根据权利要求1-4任一项所述的方法,其特征在于,所述裁剪结果信息还包括所述裁剪文件的文件头信息。
- 根据权利要求5所述的方法,其特征在于,所述文件头信息被所述服务器修改。
- 根据权利要求1-6任一项所述的方法,其特征在于,所述方法还包括:所述电子设备显示裁剪设置界面,接收用户通过所述裁剪设置界面的操作,获取裁剪参数。
- 根据权利要求1-7任一项所述的方法,其特征在于,所述方法还包括:所述电子设备显示裁剪文件操作界面,所述裁剪文件操作界面用于对所述裁剪文件进行控制。
- 根据权利要求1-8任一项所述的方法,其特征在于,所述方法还包括:保存所述裁剪文件;或,试听所述裁剪文件;或,将所述裁剪文件设置为铃音。
- 根据权利要求1-9任一项所述的方法,其特征在于,所述电子设备通过音乐播放软件,或者,视频播放软件对所述媒体文件进行裁剪。
- 一种实现媒体文件裁剪的电子设备,其特征在于,所述电子设备包括:显示屏,处理器和存储器,其中,所述存储器用于存储程序;所述处理器用于调用所述程序使得所述电子设备执行如权利要求1-10中任一项所述的方法。
- 一种计算机可读存储介质,包括指令,其特征在于,当其在计算机上运行时,使得所述计算机执行如权利要求1-10任一所述的方法。
- 一种媒体文件裁剪的方法,其特征在于,包括:服务器接收电子设备发送的媒体文件裁剪请求,所述裁剪请求包括所述媒体文件标识和裁剪参数;所述服务器根据所述所述媒体文件标识获取所述媒体文件,根据所述裁剪参数对所述媒 体文件进行处理,得到裁剪结果信息;向所述电子设备所述裁剪结果信息,所述裁剪结果信息用于使得所述电子设备生成裁剪文件。
- 根据权利要求13所述的方法,其特征在于,所述裁剪参数包括至少两个以下参数:裁剪的开始时间、裁剪的结束时间、裁剪时长。
- 根据权利要求13或14所述的方法,其特征在于,所述裁剪结果信息包括待裁剪片段的起始帧和结束帧在所述媒体文件中的字节位置。
- 根据权利要求13-15任一项所述的方法,其特征在于,所述裁剪结果信息还包括所述裁剪文件的文件头信息。
- 根据权利要求16所述的方法,其特征在于,所述服务器修改所述文件头信息。
- 一种实现媒体文件裁剪的服务器,其特征在于,所述电子设备包括:处理器和存储器,其中,所述存储器用于存储程序;所述处理器用于调用所述程序使得所述服务器执行如权利要求13-17中任一项所述的方法。
- 一种计算机可读存储介质,包括指令,其特征在于,当其在计算机上运行时,使得所述计算机执行如权利要求13-17任一所述的方法。
Applications Claiming Priority (2)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201811653372.9A CN109819306B (zh) | 2018-12-29 | 2018-12-29 | 一种媒体文件裁剪的方法、电子设备和服务器 |
CN201811653372.9 | 2018-12-29 |
Publications (1)
Publication Number | Publication Date |
---|---|
WO2020134892A1 true WO2020134892A1 (zh) | 2020-07-02 |
Family
ID=66603982
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
PCT/CN2019/122518 WO2020134892A1 (zh) | 2018-12-29 | 2019-12-03 | 一种媒体文件裁剪的方法、电子设备和服务器 |
Country Status (2)
Country | Link |
---|---|
CN (1) | CN109819306B (zh) |
WO (1) | WO2020134892A1 (zh) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
WO2023072083A1 (zh) * | 2021-10-29 | 2023-05-04 | 维沃移动通信有限公司 | 文件处理的方法和电子设备 |
Families Citing this family (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN109819306B (zh) * | 2018-12-29 | 2022-11-04 | 花瓣云科技有限公司 | 一种媒体文件裁剪的方法、电子设备和服务器 |
CN112118062B (zh) * | 2019-06-19 | 2022-12-30 | 荣耀终端有限公司 | 一种多终端的多媒体数据通信方法和*** |
CN110650255B (zh) * | 2019-08-15 | 2021-12-07 | 咪咕文化科技有限公司 | 彩铃编辑的方法、装置、彩铃编辑单元及存储介质 |
CN110909180B (zh) * | 2019-10-23 | 2022-08-02 | 维沃移动通信有限公司 | 一种媒体文件的处理方法及电子设备 |
Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US6965723B1 (en) * | 1997-11-11 | 2005-11-15 | Grass Valley Group, Inc. | Non-linear video edit system |
CN101287107A (zh) * | 2008-05-29 | 2008-10-15 | 腾讯科技(深圳)有限公司 | 媒体文件的点播方法、***和设备 |
CN102203761A (zh) * | 2008-10-31 | 2011-09-28 | 微软公司 | 数字媒体的动态分段 |
CN103686250A (zh) * | 2013-12-24 | 2014-03-26 | 深圳市龙视传媒有限公司 | 一种分享媒体文件片段的方法及相关设备 |
CN105141973A (zh) * | 2015-09-01 | 2015-12-09 | 北京暴风科技股份有限公司 | 多分段的媒体文件拼接方法和*** |
CN109819306A (zh) * | 2018-12-29 | 2019-05-28 | 华为技术有限公司 | 一种媒体文件裁剪的方法、电子设备和服务器 |
Family Cites Families (23)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US6895557B1 (en) * | 1999-07-21 | 2005-05-17 | Ipix Corporation | Web-based media submission tool |
JP4332089B2 (ja) * | 2004-08-19 | 2009-09-16 | ソニー株式会社 | 再生装置、再生方法および再生プログラム、ならびに、記録媒体 |
CN101217638B (zh) * | 2007-12-28 | 2012-10-24 | 深圳市迅雷网络技术有限公司 | 视频文件分段下载的方法、***及装置 |
US8209733B2 (en) * | 2008-05-28 | 2012-06-26 | Broadcom Corporation | Edge device that enables efficient delivery of video to handheld device |
CN101521745B (zh) * | 2009-04-14 | 2011-04-13 | 王广生 | 一组多镜头光心重合式全方位摄像装置及全景摄像、转播的方法 |
CN102193943B (zh) * | 2010-03-12 | 2013-10-30 | 腾讯科技(深圳)有限公司 | 向用户提供媒体数据的方法和装置 |
CN103531218B (zh) * | 2013-04-17 | 2017-03-08 | Tcl集团股份有限公司 | 一种在线多媒体文件编辑方法及*** |
CN103428527A (zh) * | 2013-08-08 | 2013-12-04 | 北京宽客网络技术有限公司 | 数据源实时媒体流转换方法和续点切换播放方法 |
CN104023248A (zh) * | 2014-06-25 | 2014-09-03 | 北京奇艺世纪科技有限公司 | 一种视频画面截取方法及装置 |
CN104602102B (zh) * | 2014-07-24 | 2018-06-01 | 腾讯科技(北京)有限公司 | 视频截取内容的传输响应方法、装置、服务器和*** |
CN104883625B (zh) * | 2015-06-12 | 2018-03-09 | 腾讯科技(北京)有限公司 | 信息展示方法、终端设备、服务器和*** |
CN106612469A (zh) * | 2015-10-23 | 2017-05-03 | 北京国双科技有限公司 | 一种视频分享方法及装置 |
US20170148488A1 (en) * | 2015-11-20 | 2017-05-25 | Mediatek Inc. | Video data processing system and associated method for analyzing and summarizing recorded video data |
CN105763960B (zh) * | 2016-03-01 | 2019-01-01 | 聚好看科技股份有限公司 | 一种网络视频播放的方法和装置 |
CN106161985B (zh) * | 2016-07-05 | 2019-08-27 | 宁波菊风***软件有限公司 | 一种浸入式视频会议的实现方法 |
CN107666396B (zh) * | 2016-07-29 | 2021-02-12 | 杭州华为企业通信技术有限公司 | 一种多终端会议处理方法及装置 |
CN107809678B (zh) * | 2016-09-09 | 2020-09-08 | 阿里巴巴集团控股有限公司 | 多媒体文件的处理方法、装置和设备 |
CN106454154A (zh) * | 2016-11-24 | 2017-02-22 | Tcl数码科技(深圳)有限责任公司 | 一种电视墙拼接方法及*** |
CN107155065A (zh) * | 2017-06-28 | 2017-09-12 | 哈尔滨市舍科技有限公司 | 一种虚拟拍照装置及方法 |
CN107872639A (zh) * | 2017-11-14 | 2018-04-03 | 维沃移动通信有限公司 | 通信视频的传输方法、装置和移动终端 |
CN108540866A (zh) * | 2018-04-13 | 2018-09-14 | 北京显约科技有限公司 | 一种视频拼接显示下的视频多路输出***及方法 |
CN109089157B (zh) * | 2018-06-15 | 2021-12-07 | 广州华多网络科技有限公司 | 视频画面的裁剪方法、显示设备以及装置 |
CN108984380A (zh) * | 2018-07-12 | 2018-12-11 | 郑州云海信息技术有限公司 | 一种基于Linux***的服务器测试方法、装置及介质 |
-
2018
- 2018-12-29 CN CN201811653372.9A patent/CN109819306B/zh active Active
-
2019
- 2019-12-03 WO PCT/CN2019/122518 patent/WO2020134892A1/zh active Application Filing
Patent Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US6965723B1 (en) * | 1997-11-11 | 2005-11-15 | Grass Valley Group, Inc. | Non-linear video edit system |
CN101287107A (zh) * | 2008-05-29 | 2008-10-15 | 腾讯科技(深圳)有限公司 | 媒体文件的点播方法、***和设备 |
CN102203761A (zh) * | 2008-10-31 | 2011-09-28 | 微软公司 | 数字媒体的动态分段 |
CN103686250A (zh) * | 2013-12-24 | 2014-03-26 | 深圳市龙视传媒有限公司 | 一种分享媒体文件片段的方法及相关设备 |
CN105141973A (zh) * | 2015-09-01 | 2015-12-09 | 北京暴风科技股份有限公司 | 多分段的媒体文件拼接方法和*** |
CN109819306A (zh) * | 2018-12-29 | 2019-05-28 | 华为技术有限公司 | 一种媒体文件裁剪的方法、电子设备和服务器 |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
WO2023072083A1 (zh) * | 2021-10-29 | 2023-05-04 | 维沃移动通信有限公司 | 文件处理的方法和电子设备 |
Also Published As
Publication number | Publication date |
---|---|
CN109819306B (zh) | 2022-11-04 |
CN109819306A (zh) | 2019-05-28 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
WO2021013158A1 (zh) | 显示方法及相关装置 | |
WO2020103764A1 (zh) | 一种语音控制方法及电子设备 | |
WO2021139768A1 (zh) | 跨设备任务处理的交互方法、电子设备及存储介质 | |
WO2020259452A1 (zh) | 一种移动终端的全屏显示方法及设备 | |
WO2020108356A1 (zh) | 一种应用显示方法及电子设备 | |
WO2021103981A1 (zh) | 分屏显示的处理方法、装置及电子设备 | |
WO2021000881A1 (zh) | 一种分屏方法及电子设备 | |
WO2020134869A1 (zh) | 电子设备的操作方法和电子设备 | |
WO2021082835A1 (zh) | 启动功能的方法及电子设备 | |
WO2020078299A1 (zh) | 一种处理视频文件的方法及电子设备 | |
WO2021000804A1 (zh) | 锁定状态下的显示方法及装置 | |
WO2020134892A1 (zh) | 一种媒体文件裁剪的方法、电子设备和服务器 | |
WO2021000839A1 (zh) | 一种分屏方法及电子设备 | |
JP7268275B2 (ja) | 着信があるときに電子デバイス上に映像を提示するための方法、および電子デバイス | |
WO2022184173A1 (zh) | 一种卡片组件的显示方法、图形用户界面及相关装置 | |
WO2021159746A1 (zh) | 文件共享方法、***及相关设备 | |
WO2022068819A1 (zh) | 一种界面显示方法及相关装置 | |
WO2021258814A1 (zh) | 视频合成方法、装置、电子设备及存储介质 | |
WO2021249318A1 (zh) | 一种投屏方法和终端 | |
WO2020238759A1 (zh) | 一种界面显示方法和电子设备 | |
WO2021190524A1 (zh) | 截屏处理的方法、图形用户接口及终端 | |
WO2022179275A1 (zh) | 终端应用控制的方法、终端设备及芯片*** | |
WO2020239001A1 (zh) | 一种哼唱识别方法及相关设备 | |
WO2022042637A1 (zh) | 一种蓝牙数据传输方法及相关装置 | |
WO2023015963A1 (zh) | 管理文件的方法、电子设备和计算机可读存储介质 |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
121 | Ep: the epo has been informed by wipo that ep was designated in this application |
Ref document number: 19902751 Country of ref document: EP Kind code of ref document: A1 |
|
NENP | Non-entry into the national phase |
Ref country code: DE |
|
122 | Ep: pct application non-entry in european phase |
Ref document number: 19902751 Country of ref document: EP Kind code of ref document: A1 |