WO2020134892A1 - Media file clipping method, electronic device, and server - Google Patents

Media file clipping method, electronic device, and server Download PDF

Info

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
Application number
PCT/CN2019/122518
Other languages
French (fr)
Chinese (zh)
Inventor
韩卫正
Original Assignee
华为技术有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 华为技术有限公司 filed Critical 华为技术有限公司
Publication of WO2020134892A1 publication Critical patent/WO2020134892A1/en

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F1/00Details not covered by groups G06F3/00 - G06F13/00 and G06F21/00
    • G06F1/26Power supply means, e.g. regulation thereof
    • G06F1/32Means for saving power
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/01Input arrangements or combined input and output arrangements for interaction between user and computer
    • G06F3/048Interaction techniques based on graphical user interfaces [GUI]
    • G06F3/0484Interaction techniques based on graphical user interfaces [GUI] for the control of specific functions or operations, e.g. selecting or manipulating an object, an image or a displayed text element, setting a parameter value or selecting a range
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/40Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
    • H04N21/43Processing 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/431Generation of visual interfaces for content selection or interaction; Content or additional data rendering
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/40Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
    • H04N21/43Processing 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/44Processing 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
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/40Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
    • H04N21/43Processing 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/44Processing 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/4402Processing 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
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/40Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
    • H04N21/47End-user applications
    • H04N21/472End-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

Disclosed is a media file clipping method, comprising: an electronic device obtains a media file identifier and a clipping parameter, and sends a clipping request to a server according to the clipping parameter; the electronic device receives clipping result information returned by the server; and the electronic device generates a clipping file according to the clipping result information and the media file. Compared with the prior art, the embodiments of the present invention can achieve the effects of low power consumption and short clipping time for terminal side clipping.

Description

一种媒体文件裁剪的方法、电子设备和服务器Method for cutting media file, electronic equipment and server
本申请要求在2018年12月29日提交中国国家知识产权局、申请号为201811653372.9、发明名称为“一种媒体文件裁剪的方法、电子设备和服务器”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。This application requires the priority of the Chinese patent application submitted to the State Intellectual Property Office of China on December 29, 2018, with the application number 201811653372.9 and the invention titled "a method for cutting media files, electronic equipment and servers", all of its content Incorporated by reference in this application.
技术领域Technical field
本发明涉及媒体领域,尤其涉及一种媒体文件裁剪的方法、电子设备和服务器。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.
背景技术Background technique
目前,用户常常使用电子设备播放媒体文件。当用户听到喜欢的媒体文件,需要处理喜欢的媒体文件的片段时,用户需要借助其他处理媒体文件的工具来处理媒体文件。例如,用户在观看视频内容、或者收听音频内容时,用户对所述视频内容、或所述音频内容的部分内容有进行裁剪的需求。例如,获取一部影片中的精彩片段进行分享,或者获取歌曲中的高潮部分设置为铃音等。Currently, users often use electronic devices to play media files. When a user hears a favorite media file and needs to process a segment of the favorite media file, the user needs to use other tools for processing the media file to process the media file. For example, when a user watches video content or listens to audio content, the user has a need to clip the video content or part of the audio content. For example, get the highlights of a movie to share, or get the climax part of the song set to ring tone, etc.
流媒体,是边传边播的媒体,也是多媒体的一种。边传边播是指媒体提供商在网络上传输媒体的时候,用户不断地接收并观看或收听被传输的媒体。智能手机的流行让流媒体服务成为常见的内容服务,用户可以基于流媒体技术收看视频内容、收听音频内容。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. Generally, 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. When the media file is in a new media format, 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.
发明内容Summary of the invention
本发明实施例提供一种媒体文件裁剪的方法、电子设备和服务器,相比现有技术,能实现终端侧裁剪的功耗较小,裁剪时间较短的效果。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.
第一方面,本发明实施例提供了一种媒体文件裁剪的方法,包括:电子设备获取媒体文件标识和裁剪参数,根据所述裁剪参数向服务器发送裁剪请求。所述电子设备接收所述服务器返回的裁剪结果信息。所述电子设备根据所述裁剪结果信息,以及所述媒体文件,生成裁剪文件。In a first aspect, 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.
在一种可能的实现方式中,所述电子设备获取媒体文件标识和裁剪参数包括:所述电子设备接收用户操作,获取媒体文件标识和裁剪参数。In a possible implementation manner, 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.
在一种可能的实现方式中,所述裁剪参数包括至少两个以下参数:裁剪的开始时间、裁剪的结束时间、裁剪时长。In a possible implementation manner, the cropping parameters include at least two of the following parameters: cropping start time, cropping end time, and cropping duration.
在一种可能的实现方式中,所述裁剪结果信息包括待裁剪片段的起始帧和结束帧在所述 媒体文件中的字节位置。In a possible implementation manner, 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.
在一种可能的实现方式中,所述裁剪结果信息还包括所述裁剪文件的文件头信息。In a possible implementation manner, the cropping result information further includes file header information of the cropping file.
在一种可能的实现方式中,所述文件头信息被所述服务器修改。In a possible implementation manner, the file header information is modified by the server.
在一种可能的实现方式中,所述电子设备显示裁剪设置界面,接收用户通过所述裁剪设置界面的操作,获取裁剪参数。In a possible implementation manner, the electronic device displays a cropping setting interface, and receives a user operation through the cropping setting interface to obtain cropping parameters.
在一种可能的实现方式中,所述电子设备显示裁剪文件操作界面,所述裁剪文件操作界面用于对所述裁剪文件进行控制。In a possible implementation manner, the electronic device displays a crop file operation interface, and the crop file operation interface is used to control the crop file.
在一种可能的实现方式中,保存所述裁剪文件;或,试听所述裁剪文件;或,将所述裁剪文件设置为铃音。In a possible implementation manner, save the cropped file; or, listen to the cropped file; or, set the cropped file as a ringtone.
在一种可能的实现方式中,所述电子设备通过音乐播放软件,或者,视频播放软件对所述媒体文件进行裁剪。In a possible implementation manner, the electronic device cuts the media file through music playback software or video playback software.
本发明实施例提供的媒体裁剪的方法,通过所述电子设备显示操作界面,用户可以通过设置界面设置裁剪参数,以及选择对裁剪文件的操作,提高了用户体验,节约电子设备的资源占用,以及功耗。According to the media cropping method provided by the embodiment of the present invention, 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.
第二方面,本发明实施例提供了一种实现媒体文件裁剪的电子设备,所述电子设备包括:显示屏,处理器和存储器,其中,所述存储器用于存储程序;所述处理器用于调用所述程序使得所述电子设备执行上述第一方面的媒体文件裁剪方法。In a second aspect, 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.
第三方面,本发明实施例提供了一种计算机可读存储介质,包括指令,当其在计算机上运行时,使得所述计算机执行上述第一方面的媒体文件裁剪方法。In a third aspect, 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.
第四方面,本发明实施例提供了一种媒体文件裁剪的方法,包括:服务器接收电子设备发送的媒体文件裁剪请求,所述裁剪请求包括所述媒体文件标识和裁剪参数;所述服务器根据所述所述媒体文件标识获取所述媒体文件,根据所述裁剪参数对所述媒体文件进行处理,得到裁剪结果信息;向所述电子设备所述裁剪结果信息,所述裁剪结果信息用于使得所述电子设备生成裁剪文件。本实施例中服务器通过标识找到媒体文件,能使得查找过程更方便的进行。According to a fourth aspect, 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. In this embodiment, the server finds the media file through the identification, which can make the search process more convenient.
在一种可能的实现方式中,所述裁剪参数包括至少两个以下参数:裁剪的开始时间、裁剪的结束时间、裁剪时长。In a possible implementation manner, the cropping parameters include at least two of the following parameters: cropping start time, cropping end time, and cropping duration.
在一种可能的实现方式中,所述裁剪结果信息包括待裁剪片段的起始帧和结束帧在所述媒体文件中的字节位置。In a possible implementation manner, 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.
在一种可能的实现方式中,所述裁剪结果信息还包括所述裁剪文件的文件头信息。In a possible implementation manner, the cropping result information further includes file header information of the cropping file.
在一种可能的实现方式中,所述服务器修改所述文件头信息。In a possible implementation manner, the server modifies the file header information.
第五方面,本发明实施例提供了一种实现媒体文件裁剪的服务器,所述电子设备包括:处理器和存储器,其中,所述存储器用于存储程序;所述处理器用于调用所述程序使得所述服务器执行如上述第四方面的媒体文件裁剪方法。According to a fifth aspect, 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.
第六方面,本发明实施例提供了一种计算机可读存储介质,包括指令,当其在计算机上运行时,使得所述计算机执行上述第四方面的媒体文件裁剪方法。According to a sixth aspect, 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.
本发明实施例提供的媒体裁剪的方法、电子设备和服务器,通过服务器对媒体文件进行分析处理,获取所述裁剪结果,所述电子设备根据裁剪结果生成裁剪文件。减少了电子设备的资源占用,提高了媒体文件的处理效率。并且所述电子设备可以显示操作界面,用户可以通过设置界面设置裁剪参数,以及选择对裁剪文件的操作,提高了用户体验,节约电子设备的资源占用,以及功耗。According to the media cropping method, electronic device and server provided by the embodiments of the present invention, 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. In addition, 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.
附图说明BRIEF DESCRIPTION
为了更清楚地说明本发明实施例或现有技术中的技术方案,下面将对实施例或现有技术描述中所需要使用的附图作简单地介绍。In order to more clearly explain the embodiments of the present invention or the technical solutions in the prior art, the following will briefly introduce the drawings required in the embodiments or the description of the prior art.
图1A为本发明实施例提供的电子设备的结构的示意图;FIG. 1A is a schematic diagram of a structure of an electronic device provided by an embodiment of the present invention;
图1B为本发明实施例提供的电子设备的软件结构的示意图;1B is a schematic diagram of a software structure of an electronic device provided by an embodiment of the present invention;
图2是本发明实施例中的媒体裁剪系统结构示意图;2 is a schematic structural diagram of a media cropping system in an embodiment of the present invention;
图3是本发明实施例中的服务器的结构示意图;3 is a schematic structural diagram of a server in an embodiment of the present invention;
图4是本发明实施例中另一服务器的结构示意图;4 is a schematic structural diagram of another server in an embodiment of the present invention;
图5是本发明实施例中音乐播放器第一应用界面示意图;5 is a schematic diagram of a first application interface of a music player in an embodiment of the present invention;
图6是本发明实施例中音乐播放器第二应用界面示意图;6 is a schematic diagram of a second application interface of a music player in an embodiment of the present invention;
图7是本发明实施例中音乐播放器第三应用界面示意图;7 is a schematic diagram of a third application interface of a music player in an embodiment of the present invention;
图8是本发明实施例中音乐播放器第四应用界面示意图;8 is a schematic diagram of a fourth application interface of a music player in an embodiment of the present invention;
图9是本发明实施例中媒体文件的结构示意图;9 is a schematic structural diagram of a media file in an embodiment of the present invention;
图10是本发明实施例中裁剪文件的结构示意图;10 is a schematic structural diagram of a cropped file in an embodiment of the present invention;
图11是本发明实施例中媒体文件的媒体内容的示意图;11 is a schematic diagram of media content of a media file in an embodiment of the present invention;
图12是本发明实施例中裁剪文件的媒体内容的示意图。12 is a schematic diagram of media content of a cropped file in an embodiment of the present invention.
具体实施方式detailed description
本申请以下实施例中所使用的术语只是为了描述特定实施例的目的,而并非旨在作为对本申请的限制。如在本申请的说明书和所附权利要求书中所使用的那样,单数表达形式“一个”、“一种”、“所述”、“上述”、“该”和“这一”旨在也包括复数表达形式,除非其上下文中明确地有相反指示。还应当理解,本申请中使用的术语“和/或”是指并包含一个或多个所列出项目的任何或所有可能组合。The terminology used in the following embodiments of the present application is only for the purpose of describing specific embodiments, and is not intended to be a limitation of the present application. As used in the specification and appended claims of this application, the singular expressions "a", "an", "said", "above", "the" and "this" are intended to also Includes plural expressions unless the context clearly indicates otherwise. It should also be understood that the term "and/or" used in this application refers to and includes any or all possible combinations of one or more of the listed items.
以下介绍了电子设备、用于这样的电子设备的用户界面、和用于使用这样的电子设备的实施例。在一些实施例中,电子设备可以是还包含其它功能诸如个人数字助理和/或音乐播放器功能的便携式电子设备,诸如手机、平板电脑、具备无线通讯功能的可穿戴电子设备(如智能手表)等。便携式电子设备的示例性实施例包括但不限于搭载
Figure PCTCN2019122518-appb-000001
Figure PCTCN2019122518-appb-000002
或者其它操作系统的便携式电子设备。上述便携式电子设备也可以是其它便携式电子设备,诸如具有触敏表面或触控面板的膝上型计算机(Laptop)等。还应当理解的是,在其他一些实施例中,上述电子设备也可以不是便携式电子设备,而是具有触敏表面或触控面板的台式计算机。
The following describes an electronic device, a user interface for such an electronic device, and an embodiment for using such an electronic device. In some embodiments, 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. Exemplary embodiments of portable electronic devices include, but are not limited to
Figure PCTCN2019122518-appb-000001
Figure PCTCN2019122518-appb-000002
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.
本申请的说明书和权利要求书及附图中的术语“用户界面(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>来定义网页的元素和属性。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. Such as pictures, text, buttons and other controls. Controls (also called widgets) are the basic elements of the user interface. 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. For example, 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. In addition, many 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>.
用户界面常用的表现形式是图形用户界面(graphic user interface,GUI),是指采用图形方式显示的与计算机操作相关的用The common form of user interface is the graphical user interface (graphic user interface, GUI), which refers to the use of graphical display related to computer operation.
户界面。它可以是在电子设备的显示屏中显示的一个图标、窗口、控件等界面元素,其中控件可以包括图标、按钮、菜单、选项卡、文本框、对话框、状态栏、导航栏、Widget等可视的界面元素。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. In the embodiment of the present invention, 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.
在一些实施例中,开启上述功能后,电子设备可以通过蜂窝移动通信网络技术或广域网技术发现服务器。对于发现服务器的具体实现,在一些实施例中,当电子设备连接至网络中的服务器之后,该服务器可以向该电子设备提供连接至该服务器的其他设备的设备清单,这样电子设备便可以发现该其他设备,该其他设备可以为该电子设备发现的服务器。In some embodiments, after the above function is turned on, the electronic device may discover the server through cellular mobile communication network technology or wide area network technology. For the specific implementation of the discovery server, in some embodiments, after the electronic device is connected to the server in the network, 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.
首先介绍本申请以下实施例中提供的示例性电子设备100。First, an exemplary electronic device 100 provided in the following embodiments of the present application is introduced.
图1A示出了电子设备100的结构示意图。FIG. 1A shows a schematic structural diagram of the electronic device 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等。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. 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.
可以理解的是,本发明实施例示意的结构并不构成对电子设备100的具体限定。在本申请另一些实施例中,电子设备100可以包括比图示更多或更少的部件,或者组合某些部件,或者拆分某些部件,或者不同的部件布置。图示的部件可以以硬件,软件或软件和硬件的组合实现。It can be understood that the structure illustrated in the embodiment of the present invention does not constitute a specific limitation on the electronic device 100. In other embodiments of the present application, 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.
处理器110可以包括一个或多个处理单元,例如:处理器110可以包括应用处理器(application processor,AP),调制解调处理器,图形处理器(graphics processing unit,GPU),图像信号处理器(image signal processor,ISP),控制器,存储器,视频编解码器,数字信号处理器(digital signal processor,DSP),基带处理器,和/或神经网络处理器(neural-network processing unit,NPU)等。其中,不同的处理单元可以是独立的器件,也可以集成在一个或多个处理器中。在一些实施例中,电子设备100也可以包括一个或多个处理器110。The processor 110 may include one or more processing units. For example, 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. Among them, the different processing units may be independent devices or may be integrated in one or more processors. In some embodiments, the electronic device 100 may also include one or more processors 110.
其中,控制器可以是电子设备100的神经中枢和指挥中心。控制器可以根据指令操作码和时序信号,产生操作控制信号,完成取指令和执行指令的控制。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.
处理器110中还可以设置存储器,用于存储指令和数据。在一些实施例中,处理器110中的存储器为高速缓冲存储器。该存储器可以保存处理器110刚用过或循环使用的指令或数据。如果处理器110需要再次使用该指令或数据,可从所述存储器中直接调用。避免了重复存取,减少了处理器110的等待时间,因而提高了电子设备100的效率。The processor 110 may also be provided with a memory for storing instructions and data. In some embodiments, 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.
在一些实施例中,处理器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)接口等。In some embodiments, 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接口是一种双向同步串行总线,包括一根串行数据线(serial data line,SDA)和一根串行时钟线(derail clock line,SCL)。在一些实施例中,处理器110可以包含多组I2C总线。处理器110可以通过不同的I2C总线接口分别耦合触摸传感器180K,充电器,闪光灯,摄像头193等。例如:处理器110可以通过I2C接口耦合触摸传感器180K,使处理器110与触摸传感器180K通过I2C总线接口通信,实现电子设备100的触摸功能。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). In some embodiments, 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. For example, 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.
I2S接口可以用于音频通信。在一些实施例中,处理器110可以包含多组I2S总线。处理器110可以通过I2S总线与音频模块170耦合,实现处理器110与音频模块170之间的通信。在一些实施例中,音频模块170可以通过I2S接口向无线通信模块160传递音频信号,实现通过蓝牙耳机接听电话的功能。The I2S interface can be used for audio communication. In some embodiments, 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. In some embodiments, 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.
PCM接口也可以用于音频通信,将模拟信号抽样,量化和编码。在一些实施例中,音频模块170与无线通信模块160可以通过PCM总线接口耦合。在一些实施例中,音频模块170也可以通过PCM接口向无线通信模块160传递音频信号,实现通过蓝牙耳机接听电话的功能。所述I2S接口和所述PCM接口都可以用于音频通信。The PCM interface can also be used for audio communication, sampling, quantizing and encoding analog signals. In some embodiments, the audio module 170 and the wireless communication module 160 may be coupled through a PCM bus interface. In some embodiments, 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.
UART接口是一种通用串行数据总线,用于异步通信。该总线可以为双向通信总线。它将要传输的数据在串行通信与并行通信之间转换。在一些实施例中,UART接口通常被用于连接处理器110与无线通信模块160。例如:处理器110通过UART接口与无线通信模块160中的 蓝牙模块通信,实现蓝牙功能。在一些实施例中,音频模块170可以通过UART接口向无线通信模块160传递音频信号,实现通过蓝牙耳机播放音乐的功能。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. In some embodiments, the UART interface is generally used to connect the processor 110 and the wireless communication module 160. For example, the processor 110 communicates with the Bluetooth module in the wireless communication module 160 through the UART interface to implement the Bluetooth function. In some embodiments, 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.
MIPI接口可以被用于连接处理器110与显示屏194,摄像头193等外围器件。MIPI接口包括摄像头串行接口(camera serial interface,CSI),显示屏串行接口(display serial interface,DSI)等。在一些实施例中,处理器110和摄像头193通过CSI接口通信,实现电子设备100的拍摄功能。处理器110和显示屏194通过DSI接口通信,实现电子设备100的显示功能。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. In some embodiments, 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.
GPIO接口可以通过软件配置。GPIO接口可以被配置为控制信号,也可被配置为数据信号。在一些实施例中,GPIO接口可以用于连接处理器110与摄像头193,显示屏194,无线通信模块160,音频模块170,传感器模块180等。GPIO接口还可以被配置为I2C接口,I2S接口,UART接口,MIPI接口等。The GPIO interface can be configured via software. The GPIO interface can be configured as a control signal or a data signal. In some embodiments, 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.
USB接口130是符合USB标准规范的接口,具体可以是Mini USB接口,Micro USB接口,USB Type C接口等。USB接口130可以用于连接充电器为电子设备100充电,也可以用于电子设备100与外围设备之间传输数据。也可以用于连接耳机,通过耳机播放音频。该接口还可以用于连接其他电子设备,例如AR设备等。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.
可以理解的是,本发明实施例示意的各模块间的接口连接关系,只是示意性说明,并不构成对电子设备100的结构限定。在另一些实施例中,电子设备100也可以采用上述实施例中不同的接口连接方式,或多种接口连接方式的组合。It can be understood that 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. In other embodiments, the electronic device 100 may also use different interface connection methods in the foregoing embodiments, or a combination of multiple interface connection methods.
充电管理模块140用于从充电器接收充电输入。其中,充电器可以是无线充电器,也可以是有线充电器。在一些有线充电的实施例中,充电管理模块140可以通过USB接口130接收有线充电器的充电输入。在一些无线充电的实施例中,充电管理模块140可以通过电子设备100的无线充电线圈接收无线充电输入。充电管理模块140为电池142充电的同时,还可以通过电源管理模块141为电子设备供电。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. In some wired charging embodiments, the charging management module 140 may receive the charging input of the wired charger through the USB interface 130. In some wireless charging embodiments, 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.
电源管理模块141用于连接电池142,充电管理模块140与处理器110。电源管理模块141接收电池142和/或充电管理模块140的输入,为处理器110,内部存储器121,外部存储器,显示屏194,摄像头193,和无线通信模块160等供电。电源管理模块141还可以用于监测电池容量,电池循环次数,电池健康状态(漏电,阻抗)等参数。在其他一些实施例中,电源管理模块141也可以设置于处理器110中。在另一些实施例中,电源管理模块141和充电管理模块140也可以设置于同一个器件中。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. In some other embodiments, the power management module 141 may also be disposed in the processor 110. In other embodiments, the power management module 141 and the charging management module 140 may also be set in the same device.
电子设备100的无线通信功能可以通过天线1,天线2,移动通信模块150,无线通信模块160,调制解调处理器以及基带处理器等实现。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.
天线1和天线2用于发射和接收电磁波信号。电子设备100中的每个天线可用于覆盖单个或多个通信频带。不同的天线还可以复用,以提高天线的利用率。例如:可以将天线1复用为无线局域网的分集天线。在另外一些实施例中,天线可以和调谐开关结合使用。 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. For example, 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.
移动通信模块150可以提供应用在电子设备100上的包括2G/3G/4G/5G等无线通信的解决方案。移动通信模块150可以包括至少一个滤波器,开关,功率放大器,低噪声放大器(low noise amplifier,LNA)等。移动通信模块150可以由天线1接收电磁波,并对接收的电磁波进行滤波,放大等处理,传送至调制解调处理器进行解调。移动通信模块150还可以对经调制解调处理器调制后的信号放大,经天线1转为电磁波辐射出去。在一些实施例中,移动通信模块150的至少部分功能模块可以被设置于处理器110中。在一些实施例中,移动通信 模块150的至少部分功能模块可以与处理器110的至少部分模块被设置在同一个器件中。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. In some embodiments, at least part of the functional modules of the mobile communication module 150 may be provided in the processor 110. In some embodiments, 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.
调制解调处理器可以包括调制器和解调器。其中,调制器用于将待发送的低频基带信号调制成中高频信号。解调器用于将接收的电磁波信号解调为低频基带信号。随后解调器将解调得到的低频基带信号传送至基带处理器处理。低频基带信号经基带处理器处理后,被传递给应用处理器。应用处理器通过音频设备(不限于扬声器170A,受话器170B等)输出声音信号,或通过显示屏194显示图像或视频。在一些实施例中,调制解调处理器可以是独立的器件。在另一些实施例中,调制解调处理器可以独立于处理器110,与移动通信模块150或其他功能模块设置在同一个器件中。The modem processor may include a modulator and a demodulator. Among them, 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. In some embodiments, the modem processor may be an independent device. In other embodiments, 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.
无线通信模块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模块等。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. Exemplarily, the wireless communication module 160 may include a Bluetooth module, a Wi-Fi module, and the like.
在一些实施例中,电子设备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)。In some embodiments, 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).
在一些实施例中,无线通信模块160中包括的蓝牙(BT)模块、WLAN模块可以发射信号来探测或扫描电子设备100附近设备,使得电子设备100可以使用蓝牙或WLAN等无线通信技术发现附近设备,并与附近设备建立无线通信连接,并通过上述连接分享数据至附近设备。其中,蓝牙(BT)模块可以提供包括经典蓝牙(蓝牙2.1)或蓝牙低功耗(Bluetooth low energy,BLE)中一项或多项蓝牙通信的解决方案。WLAN模块可以提供包括Wi-Fi direct、Wi-Fi LAN或Wi-Fi softAP中一项或多项WLAN通信的解决方案。In some embodiments, 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. Among them, 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.
在一些实施例中,移动通信模块150提供的无线通信的解决方案可使得电子设备可以与网络中的设备(如服务器)通信,无线通信模块160提供的WLAN无线通信的解决方案也可使得电子设备可以与网络中的设备(如服务器)通信,并可以通过网络中的该设备(如服务器)与处理设备通信。这样,电子设备便可以发现处理设备、传输数据至处理设备。In some embodiments, 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, and 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.
电子设备100通过GPU,显示屏194,以及应用处理器等可以实现显示功能。GPU为图像处理的微处理器,连接显示屏194和应用处理器。GPU用于执行数学和几何计算,用于图形 渲染。处理器110可包括一个或多个GPU,其执行指令以生成或改变显示信息。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.
显示屏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的正整数。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. In some embodiments, the electronic device 100 may include 1 or N display screens 194, where N is a positive integer greater than 1.
电子设备100可以通过ISP,摄像头193,视频编解码器,GPU,显示屏194以及应用处理器等实现拍摄功能。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.
ISP用于处理摄像头193反馈的数据。例如,拍照时,打开快门,光线通过镜头被传递到摄像头感光元件上,光信号转换为电信号,摄像头感光元件将所述电信号传递给ISP处理,转化为肉眼可见的图像。ISP还可以对图像的噪点,亮度,肤色进行算法优化。ISP还可以对拍摄场景的曝光,色温等参数优化。在一些实施例中,ISP可以设置在摄像头193中。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.
摄像头193用于捕获静态图像或视频。物体通过镜头生成光学图像投射到感光元件。感光元件可以是电荷耦合器件(charge coupled device,CCD)或互补金属氧化物半导体(complementary metal-oxide-semiconductor,CMOS)光电晶体管。感光元件把光信号转换成电信号,之后将电信号传递给ISP转换成数字图像信号。ISP将数字图像信号输出到DSP加工处理。DSP将数字图像信号转换成标准的RGB,YUV等格式的图像信号。在一些实施例中,电子设备100可以包括1个或N个摄像头193,N为大于1的正整数。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. 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. In some embodiments, the electronic device 100 may include 1 or N cameras 193, where N is a positive integer greater than 1.
数字信号处理器用于处理数字信号,除了可以处理数字图像信号,还可以处理其他数字信号。例如,当电子设备100在频点选择时,数字信号处理器用于对频点能量进行傅里叶变换等。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.
视频编解码器用于对数字视频压缩或解压缩。电子设备100可以支持一种或多种视频编解码器。这样,电子设备100可以播放或录制多种编码格式的视频,例如:动态图像专家组(moving picture experts group,MPEG)-1,MPEG-2,MPEG-3,MPEG-4等。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.
NPU为神经网络(neural-network,NN)计算处理器,通过借鉴生物神经网络结构,例如借鉴人脑神经元之间传递模式,对输入信息快速处理,还可以不断的自学习。通过NPU可以实现电子设备100的智能认知等应用,例如:图像识别,人脸识别,语音识别,文本理解等。NPU is a neural-network (NN) computing processor. By drawing on the structure of biological neural networks, such as the transfer mode between neurons in the human brain, it can quickly process the input information and can continue to self-learn. 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.
外部存储器接口120可以用于连接外部存储卡,例如Micro SD卡,实现扩展电子设备100的存储能力。外部存储卡通过外部存储器接口120与处理器110通信,实现数据存储功能。例如将音乐、照片、视频等数据保存在外部存储卡中。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.
内部存储器121可以用于存储一个或多个计算机程序,该一个或多个计算机程序包括指令。处理器110可以通过运行存储在内部存储器121的上述指令,从而使得电子设备100执行本申请一些实施例中所提供的媒体裁剪的方法,以及各种功能应用以及数据处理等。内部存储器121可以包括存储程序区和存储数据区。其中,存储程序区可存储操作系统;该存储程序区还可以存储一个或多个应用程序(比如图库、联系人等)等。存储数据区可存储电子设备100使用过程中所创建的数据(比如照片,联系人等)。此外,内部存储器121可以包括高速随机存取存储器,还可以包括非易失性存储器,例如至少一个磁盘存储器件,闪存器件,通用闪存存储器(universal flash storage,UFS)等。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. Among them, 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. In addition, 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.
电子设备100可以通过音频模块170,扬声器170A,受话器170B,麦克风170C,耳机 接口170D,以及应用处理器等实现音频功能。例如音乐播放,录音等。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.
音频模块170用于将数字音频信息转换成模拟音频信号输出,也用于将模拟音频输入转换为数字音频信号。音频模块170还可以用于对音频信号编码和解码。在一些实施例中,音频模块170可以设置于处理器110中,或将音频模块170的部分功能模块设置于处理器110中。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. In some embodiments, 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.
扬声器170A,也称“喇叭”,用于将音频电信号转换为声音信号。电子设备100可以通过扬声器170A收听音乐,或收听免提通话。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.
受话器170B,也称“听筒”,用于将音频电信号转换成声音信号。当电子设备100接听电话或语音信息时,可以通过将受话器170B靠近人耳接听语音。The receiver 170B, also known as "handset", is used to convert audio electrical signals into sound signals. When the electronic device 100 answers a call or voice message, the voice can be received by bringing the receiver 170B close to the ear.
麦克风170C,也称“话筒”,“传声器”,用于将声音信号转换为电信号。当拨打电话或发送语音信息时,用户可以通过人嘴靠近麦克风170C发声,将声音信号输入到麦克风170C。电子设备100可以设置至少一个麦克风170C。在另一些实施例中,电子设备100可以设置两个麦克风170C,除了采集声音信号,还可以实现降噪功能。在另一些实施例中,电子设备100还可以设置三个,四个或更多麦克风170C,实现采集声音信号,降噪,还可以识别声音来源,实现定向录音功能等。The microphone 170C, also known as "microphone", "microphone", is used to convert sound signals into electrical signals. When making a call or sending a voice message, 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.
耳机接口170D用于连接有线耳机。耳机接口170D可以是USB接口130,也可以是3.5mm的开放移动电子设备平台(open mobile terminal platform,OMTP)标准接口,美国蜂窝电信工业协会(cellular telecommunications industry association of the USA,CTIA)标准接口。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.
压力传感器180A用于感受压力信号,可以将压力信号转换成电信号。在一些实施例中,压力传感器180A可以设置于显示屏194。压力传感器180A的种类很多,如电阻式压力传感器,电感式压力传感器,电容式压力传感器等。电容式压力传感器可以是包括至少两个具有导电材料的平行板。当有力作用于压力传感器180A,电极之间的电容改变。电子设备100根据电容的变化确定压力的强度。当有触摸操作作用于显示屏194,电子设备100根据压力传感器180A检测所述触摸操作强度。电子设备100也可以根据压力传感器180A的检测信号计算触摸的位置。在一些实施例中,作用于相同触摸位置,但不同触摸操作强度的触摸操作,可以对应不同的操作指令。例如:当有触摸操作强度小于第一压力阈值的触摸操作作用于短消息应用图标时,执行查看短消息的指令。当有触摸操作强度大于或等于第一压力阈值的触摸操作作用于短消息应用图标时,执行新建短消息的指令。The pressure sensor 180A is used to sense the pressure signal and can convert the pressure signal into an electrical signal. In some embodiments, the pressure sensor 180A may be provided on the display screen 194. There are many types of pressure sensors 180A, such as resistive pressure sensors, inductive pressure sensors, and capacitive pressure sensors. 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. When a touch operation is applied to the display screen 194, 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. In some embodiments, 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.
陀螺仪传感器180B可以用于确定电子设备100的运动姿态。在一些实施例中,可以通过陀螺仪传感器180B确定电子设备100围绕三个轴(即,x,y和z轴)的角速度。陀螺仪传感器180B可以用于拍摄防抖。示例性的,当按下快门,陀螺仪传感器180B检测电子设备100抖动的角度,根据角度计算出镜头模组需要补偿的距离,让镜头通过反向运动抵消电子设备100的抖动,实现防抖。陀螺仪传感器180B还可以用于导航,体感游戏场景。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.
气压传感器180C用于测量气压。在一些实施例中,电子设备100通过气压传感器180C测得的气压值计算海拔高度,辅助定位和导航。The air pressure sensor 180C is used to measure air pressure. In some embodiments, 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.
磁传感器180D包括霍尔传感器。电子设备100可以利用磁传感器180D检测翻盖皮套的开合。在一些实施例中,当电子设备100是翻盖机时,电子设备100可以根据磁传感器180D检测翻盖的开合。进而根据检测到的皮套的开合状态或翻盖的开合状态,设置翻盖自动解锁等特性。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. In some embodiments, when the electronic device 100 is a clamshell machine, the electronic device 100 may detect the opening and closing of the clamshell according to the magnetic sensor 180D. Furthermore, according to the detected opening and closing state of the holster or the opening and closing state of the flip cover, characteristics such as automatic unlocking of the flip cover are set.
加速度传感器180E可检测电子设备100在各个方向上(一般为三轴)加速度的大小。当电子设备100静止时可检测出重力的大小及方向。还可以用于识别电子设备姿态,应用于横竖屏切换,计步器等应用。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.
距离传感器180F,用于测量距离。电子设备100可以通过红外或激光测量距离。在一些实施例中,拍摄场景,电子设备100可以利用距离传感器180F测距以实现快速对焦。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.
接近光传感器180G可以包括例如发光二极管(LED)和光检测器,例如光电二极管。发光二极管可以是红外发光二极管。电子设备100通过发光二极管向外发射红外光。电子设备100使用光电二极管检测来自附近物体的红外反射光。当检测到充分的反射光时,可以确定电子设备100附近有物体。当检测到不充分的反射光时,电子设备100可以确定电子设备100附近没有物体。电子设备100可以利用接近光传感器180G检测用户手持电子设备100贴近耳朵通话,以便自动熄灭屏幕达到省电的目的。接近光传感器180G也可用于皮套模式,口袋模式自动解锁与锁屏。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.
环境光传感器180L用于感知环境光亮度。电子设备100可以根据感知的环境光亮度自适应调节显示屏194亮度。环境光传感器180L也可用于拍照时自动调节白平衡。环境光传感器180L还可以与接近光传感器180G配合,检测电子设备100是否在口袋里,以防误触。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.
指纹传感器180H用于采集指纹。电子设备100可以利用采集的指纹特性实现指纹解锁,访问应用锁,指纹拍照,指纹接听来电等。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.
温度传感器180J用于检测温度。在一些实施例中,电子设备100利用温度传感器180J检测的温度,执行温度处理策略。例如,当温度传感器180J上报的温度超过阈值,电子设备100执行降低位于温度传感器180J附近的处理器的性能,以便降低功耗实施热保护。在另一些实施例中,当温度低于另一阈值时,电子设备100对电池142加热,以避免低温导致电子设备100异常关机。在其他一些实施例中,当温度低于又一阈值时,电子设备100对电池142的输出电压执行升压,以避免低温导致的异常关机。The temperature sensor 180J is used to detect the temperature. In some embodiments, 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. In some other embodiments, 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. In some other embodiments, 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.
触摸传感器180K,也可称触控面板或触敏表面。触摸传感器180K可以设置于显示屏194,由触摸传感器180K与显示屏194组成触摸屏,也称“触控屏”。触摸传感器180K用于检测作用于其上或附近的触摸操作。触摸传感器可以将检测到的触摸操作传递给应用处理器,以确定触摸事件类型。可以通过显示屏194提供与触摸操作相关的视觉输出。在另一些实施例中,触摸传感器180K也可以设置于电子设备100的表面,与显示屏194所处的位置不同。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. In other embodiments, 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.
骨传导传感器180M可以获取振动信号。在一些实施例中,骨传导传感器180M可以获取人体声部振动骨块的振动信号。骨传导传感器180M也可以接触人体脉搏,接收血压跳动信号。在一些实施例中,骨传导传感器180M也可以设置于耳机中,结合成骨传导耳机。音频模块170可以基于所述骨传导传感器180M获取的声部振动骨块的振动信号,解析出语音信号,实现语音功能。应用处理器可以基于所述骨传导传感器180M获取的血压跳动信号解析心率信息,实现心率检测功能。The bone conduction sensor 180M can acquire vibration signals. In some embodiments, 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. In some embodiments, 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.
按键190包括开机键,音量键等。按键190可以是机械按键。也可以是触摸式按键。电子设备100可以接收按键输入,产生与电子设备100的用户设置以及功能控制有关的键信号输入。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.
马达191可以产生振动提示。马达191可以用于来电振动提示,也可以用于触摸振动反馈。例如,作用于不同应用(例如拍照,音频播放等)的触摸操作,可以对应不同的振动反馈效果。作用于显示屏194不同区域的触摸操作,马达191也可对应不同的振动反馈效果。不 同的应用场景(例如:时间提醒,接收信息,闹钟,游戏等)也可以对应不同的振动反馈效果。触摸振动反馈效果还可以支持自定义。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. For example, touch operations applied to different applications (such as taking pictures, audio playback, etc.) may correspond to different vibration feedback effects. For the touch operation of different areas of the display screen 194, the motor 191 can also correspond to different vibration feedback effects. Different application scenarios (for example: time reminder, receiving information, alarm clock, game, etc.) can also correspond to different vibration feedback effects. Touch vibration feedback effect can also support customization.
指示器192可以是指示灯,可以用于指示充电状态,电量变化,也可以用于指示消息,未接来电,通知等。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.
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分离。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. In some embodiments, 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.
图1A示例性所示的电子设备100可以通过显示屏194显示以下各个实施例中所描述的各个用户界面。电子设备100可以通过触摸传感器180K在各个用户界面中检测触控操作,例如在各个用户界面中的点击操作(如在图标上的触摸操作、双击操作),又例如在各个用户界面中的向上或向下的滑动操作,或执行画圆圈手势的操作,等等。在一些实施例中,电子设备100可以通过陀螺仪传感器180B、加速度传感器180E等检测用户手持电子设备100执行的运动手势,例如晃动电子设备。在一些实施例中,电子设备100可以通过摄像头193(如3D摄像头、深度摄像头)检测非触控的手势操作。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. In some embodiments, 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. In some embodiments, the electronic device 100 can detect non-touch gesture operations through the camera 193 (eg, 3D camera, depth camera).
电子设备100的软件系统可以采用分层架构,事件驱动架构,微核架构,微服务架构,或云架构。本发明实施例以分层架构的Android系统为例,示例性说明电子设备100的软件结构。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.
图1B是本发明实施例的电子设备100的软件结构框图。FIG. 1B is a block diagram of the software structure of the electronic device 100 according to an embodiment of the present invention.
分层架构将软件分成若干个层,每一层都有清晰的角色和分工。层与层之间通过软件接口通信。在一些实施例中,将Android系统分为四层,从上至下分别为应用程序层,应用程序框架层,安卓运行时(Android runtime)和系统库,以及内核层。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. In some embodiments, 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.
如图1B所示,应用程序包可以包括相机,图库,日历,通话,地图,导航,WLAN,蓝牙,音乐,视频,短信息等应用程序。As shown in FIG. 1B, the application package may include applications such as camera, gallery, calendar, call, map, navigation, WLAN, Bluetooth, music, video, and short message.
应用程序框架层为应用程序层的应用程序提供应用编程接口(application programming interface,API)和编程框架。应用程序框架层包括一些预先定义的函数。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.
如图1B所示,应用程序框架层可以包括窗口管理器,内容提供器,视图系统,电话管理器,资源管理器,通知管理器等。As shown in FIG. 1B, 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. For example, a display interface including an SMS notification icon may include a view to display text and a view to display pictures.
电话管理器用于提供电子设备100的通信功能。例如通话状态的管理(包括接通,挂断等)。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. For example, 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. For example, 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包括核心库和虚拟机。Android runtime负责安卓系统的调度和管理。Android Runtime includes core library and virtual machine. Android runtime is responsible for the scheduling and management of the Android system.
核心库包含两部分:一部分是java语言需要调用的功能函数,另一部分是安卓的核心库。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.
应用程序层和应用程序框架层运行在虚拟机中。虚拟机将应用程序层和应用程序框架层的java文件执行为二进制文件。虚拟机用于执行对象生命周期的管理,堆栈管理,线程管理,安全和异常的管理,以及垃圾回收等功能。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.
系统库可以包括多个功能模块。例如:表面管理器(surface manager),媒体库(Media Libraries),三维图形处理库(例如:OpenGL ES),2D图形引擎(例如:SGL)等。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.
表面管理器用于对显示子系统进行管理,并且为多个应用程序提供了2D和3D图层的融合。The surface manager is used to manage the display subsystem and provides the fusion of 2D and 3D layers for multiple applications.
媒体库支持多种常用的音频,视频格式回放和录制,以及静态图像文件等。媒体库可以支持多种音视频编码格式,例如:MPEG4,H.264,MP3,AAC,AMR,JPG,PNG等。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.
2D图形引擎是2D绘图的绘图引擎。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.
图1B所示的软件系统涉及到使用分享能力的应用呈现(如图库,文件管理器),提供分享能力的即时分享模块,提供打印能力的打印服务(print service)和打印后台服务(print spooler),以及应用框架层提供打印框架、WLAN服务、蓝牙服务,以及内核和底层提供WLAN蓝牙能力和基本通信协议。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.
下面结合捕获拍照场景,示例性说明电子设备100软件以及硬件的工作流程。The following describes the workflow of the software and hardware of the electronic device 100 in combination with capturing a photographing scene.
当触摸传感器180K接收到触摸操作,相应的硬件中断被发给内核层。内核层将触摸操作加工成原始输入事件(包括触摸坐标,触摸操作的时间戳等信息)。原始输入事件被存储在内核层。应用程序框架层从内核层获取原始输入事件,识别该输入事件所对应的控件。以该触摸操作所对应的控件为相机应用图标的控件为例,相机应用调用应用框架层的接口,启动相机应用,进而通过调用内核层启动摄像头驱动,通过摄像头193捕获静态图像或视频。When the touch sensor 180K receives the touch operation, 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.
如图2所示为本发明实施例提供的一种用于媒体裁剪系统,所述裁剪系统包括电子设备100和服务器202。用户操作电子设备100的显示屏,选定媒体文件A,向所述云服务器发送请求裁剪所述媒体文件A请求消息。所述请求消息可以包括所述媒体文件A的文件信息。所述服务器接收所述请求消息后,根据所述文件信息对相应的媒体内容进行裁剪,并将裁剪结果发送给所述电子设备。所述裁剪结果可以包括裁剪的摘要信息。所述电子设备100根据所 述服务器202返回的所述裁剪结果,以及所述媒体文件A重新生成裁剪文件B。As shown in FIG. 2, it is a media cropping system provided by an embodiment of the present invention. 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. After receiving the request message, 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.
本发明实施例中,所述服务器可以为云服务器,或在线服务器等具有裁剪功能的服务器。In the embodiment of the present invention, the server may be a cloud server, or an online server, etc., which has a clipping function.
在本发明的实施例中,所述请求消息中的媒体内容的文件信息可以包括至少一种以下信息:媒体文件标识、裁剪参数。所述裁剪参数可以包括至少以下一种参数:裁剪的开始时间、裁剪的结束时间、裁剪时长等。In an embodiment of the present invention, 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.
本发明实施例中,所述裁剪参数可以默认设置,也可以通过用户的操作进行设置,也可以由所述电子设备或者相关软件智能识别生成相关参数。In the embodiment of the present invention, 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.
在本发明的实施例中,所述摘要信息可以包括有序的至少一个文件片段信息,以及每个片段在所述原媒体文件A的起始位置及结束位置信息。In an embodiment of the present invention, 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.
在本发明的实施例中,所述电子设备可以通过安装在所述电子设备上的应用实现所述裁剪功能。例如,电子设备上可以安装裁剪软件C,通过所述裁剪软件C选定需要裁剪的媒体文件A,并通过所述裁剪软件C向所述云服务器发送裁剪请求。所述裁剪软件还可以提供裁剪设置界面,通过所述裁剪设置界面可以选择需要裁剪的媒体文件,并设置对所述媒体文件的裁剪参数。例如,用户可以通过所述裁剪设置界面选择需要裁剪的媒体文件,并且设置裁剪的开始时间和/或裁剪的结束时间等。In an embodiment of the present invention, the electronic device may implement the cropping function through an application installed on the electronic device. For example, 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.
本发明实施例中,所述裁剪软件功能可以独立开发,也可以通过现有的音乐播放器,或者视频播放器实现。In the embodiment of the present invention, the cropping software function may be independently developed, or may be implemented through an existing music player or video player.
本发明实施例中,结合图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设置为铃音。In the embodiment of the present invention, a processing method of cropping the media file A will be described in conjunction with the electronic device 100 of FIG. 1A. 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.
本发明实施例中,所述裁剪软件C也可以自动识别媒体文件A中的精彩部分获取裁剪参数。例如,某一进球瞬间的几帧视频流,或者,某一音频流中的高潮部分或副歌部分,而不需要用户手动设置。In the embodiment of the present invention, 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.
本发明实施例中,所述电子设备100可以通过裁剪模块实现所述裁剪软件C的裁剪功能。所述裁剪功能可以包括以下一种或多种功能:识别媒体文件标识,获取裁剪请求,发送裁剪请求,识别裁剪摘要信息,以及根据裁剪摘要信息生成裁剪文件功能等。In the embodiment of the present invention, 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.
本发明实施例中,所述服务器可以通过多个服务器设备实现媒体文件的裁剪功能。In the embodiment of the present invention, the server may implement a media file clipping function through multiple server devices.
在本发明的实施例中,如图3所示服务器结构示意图,所述服务器300可以包括媒体裁剪服务器1021和媒体服务器1022。所述媒体裁剪服务器1021接收到所述电子设备发送的裁剪所述媒体文件A的所述裁剪请求,所述媒体裁剪服务器1021识别出所述裁剪请求中的媒体文件 标识和裁剪参数。所述裁剪参数可以包括裁剪的开始时间、结束时间、或裁剪时长。所述媒体裁剪服务器1021将媒体文件标识发送到所述媒体服务器1022,以获取所述媒体文件标识对应的媒体文件。所述媒体服务器1022将与所述媒体文件标识对应的媒体文件发送给所述媒体裁剪服务器1021。所述媒体裁剪服务器1021根据所述裁剪参数对所述媒体文件进行裁剪,并将生成的裁剪结果发送给所述电子设备。所述裁剪结果信息可以包括裁剪所述原媒体文件A的起始位置及结束位置信息。其中,每个文件片段的相对位置信息标记在所述媒体文件A中的开始字节位置、结束字节位置等。In the embodiment of the present invention, as shown in the schematic structural diagram of the server shown in FIG. 3, 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. Wherein, the relative position information of each file segment marks the start byte position, end byte position, etc. in the media file A.
本发明实施例中,所述裁剪结果可以包括裁剪摘要信息。所述裁剪结果信息/裁剪摘要信息可以包括待裁剪片段的起始帧和结束帧在所述媒体文件中的字节位置。In the embodiment of the present invention, 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.
如图3所示的结构示意图,所述媒体裁剪服务器1021可以包括交互模块1025,裁剪处理模块1026。所述交互模块1025用于与所述电子设备或所述媒体服务器1022进行交互。所述裁剪处理模块1026用于根据所述裁剪请求对所述媒体服务器1022返回的所述媒体文件A进行裁剪处理,生成所述裁剪结果,并通过所述交互模块1025将所述裁剪结果返回给所述电子设备。As shown in the structural diagram shown in FIG. 3, 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.
如图3所示的结构示意图,所述媒体服务器1022可以包括交互模块1028和匹配模块1029。所述交互模块1028用于与所述媒体裁剪服务器1021交互。所述匹配模块1029用于根据所述交互模块1028接收的所述媒体裁剪服务器1021发送的所述媒体文件标识匹配相应的媒体文件,并通过所述交互模块1028将所述媒体文件发送给所述媒体裁剪服务器1021。As shown in the structural diagram shown in FIG. 3, 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.
如图4所示,本发明另一实施例中,所述服务器400可以包括:处理器10213、存储器10214和收发器10215。As shown in FIG. 4, in another embodiment of the present invention, the server 400 may include: a processor 10213, a memory 10214, and a transceiver 10215.
其中,所述处理器10213可以实现媒体的裁剪。所述收发器10215可以接收电子设备100发送的裁剪请求,所述裁剪请求包括所述媒体文件标识和裁剪参数。所述处理器10213用于根据所述裁剪请求中的媒体文件标识获取对应的媒体文件,根据所述裁剪参数对所述媒体文件进行处理,得到裁剪结果信息。所述收发器10215用于将所述裁剪结果信息发送给所述电子设备。所述存储器10214可以用于储存裁剪请求、裁剪参数、待裁剪的媒体内容、或裁剪后的媒体内容等。Wherein, 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.
在本发明实施例中,由于电子设备无法识别所有的媒体文件类型,故本发明实施例将媒体文件的裁剪通过服务器实现,不仅支持对更多类型的媒体文件进行裁剪,而且服务器进行开发即可实现。电子设备上的应用不需要进行开发和升级,使得媒体文件的裁剪更简单易行。所述服务器实现裁剪处理后,将裁剪结果发送给所述电子设备。所述电子设备根据所述裁剪结果生成裁剪文件,比起直接将裁剪后的媒体文件发送给电子设备,本发明实施例的方案更能节约电子设备和服务器之间的资源占用。In the embodiment of the present invention, since the electronic device cannot recognize all types of media files, 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. After the server implements the cutting process, 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.
以音乐媒体文件裁剪为例,结合图5,图6,图7,以及图8对本发明实施例中裁剪方法进行说明。Taking the cutting of music media files as an example, the cutting method in the embodiment of the present invention will be described with reference to FIGS. 5, 6, 7, and 8.
如图5所示,为本发明实施例中所述电子设备100中音乐播放器的第一应用界面500示意图。所述第一应用界面500包括第一区域501和第二区域502。所述第一区域501显示所述音乐播放器的播放列表封面。所述第二区域502显示所述播放器的播放清单中的曲目列表。如图5所示,在所述音乐播放器界面显示了曲目1,曲目2,曲目3,……,曲目N。As shown in 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.
用户浏览所述音乐播放器所述第一应用界面的内容,非常喜欢曲目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的文件标识和裁剪参数,向服务器发送裁剪请求。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 user clicks on track 2 on the first application interface 500, and the music player displays a second application interface 600, as shown in FIG. 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, and 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 user clicks the crop 604 option icon on the second application interface, and the music player displays the third application interface 700. As shown in FIG. 7, 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. As shown in FIG. 7, exemplarily, 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. As shown in Fig. 7, the cutting start time is: 1 minute and 27 seconds, and 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. As shown in FIG. 7, 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.
本发明实施例中,如图7所示,所述音乐播放器的所述第三应用界面还可以包括唱片封面信息704。In the embodiment of the present invention, as shown in FIG. 7, the third application interface of the music player may further include album cover information 704.
本发明实施例中,所述服务器接收所述裁剪请求中的所述曲目2的文件标识,根据所述文件标识获取对应的所述曲目的文件。所述服务器获取所述曲目2文件后,对所述曲目2文件进行裁剪,并将裁剪结果发给所述音乐播放器。In the embodiment of the present invention, 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.
所述音乐播放器根据所述曲目2,以及裁剪结果,重新组装新的媒体文件,生成裁剪文件。所述音乐播放器可以在应用界面上提示用户。如图8所示,提示用户已经保存裁剪文件。如图8所示的第四应用界面800上还可以包括试听按键802,或者,设置为铃声按键803,或者唱片信息801。本发明实施例不限制提示用户的信息,可以提示用户裁剪完成,或者,提示用户可以对裁剪文件进行操作,或者,提示用户保存所述裁剪文件等。通过提示界面,用户可以选择播放所述裁剪文件,或者,将所述裁剪文件设置为铃音等操作。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.
本发明实施例提供的媒体裁剪的方法,通过所述电子设备显示操作界面,用户可以通过设置界面设置裁剪参数,以及选择对裁剪文件的操作,提高了用户体验,节约电子设备的资源占用,以及功耗。According to the media cropping method provided by the embodiment of the present invention, 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.
结合图9,对所述服务器对所述媒体文件的裁剪方法举例说明如下。With reference to FIG. 9, an example of a method for cropping the media file by the server is as follows.
图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的正整数。9 is a schematic structural diagram of a media file in an embodiment of the present invention. For example, 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. Similarly, 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. For the media file, n is a positive integer less than or equal to 150.
本发明实施例中,示例性的,当所述媒体文件播放时长为m秒,则其内容可以为C0,C1,C2,C3,C4,C5,C6…Cm。m为正整数。In the embodiment of the present invention, for example, 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.
如图5和图6所示,以所述媒体文件为曲目2为例,所述曲目2的播放时长为150秒。 用户播放曲目2后,所述电子设备成功缓存所述曲目2。或者,用户成功下载所述曲目2后,用户可以选择对所述曲目2进行裁剪。As shown in FIGS. 5 and 6, taking the media file as track 2 as an example, the playing time of the track 2 is 150 seconds. After the user plays track 2, the electronic device successfully caches the track 2. Alternatively, after the user successfully downloads the track 2, the user may choose to crop the track 2.
如图7所示,用户设置裁剪参数为:1分27秒-2分02秒。表示用户希望裁剪这个时间段的媒体内容。As shown in Figure 7, 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.
用户点击“开始裁剪”按键后,所述电子设备根据用户的操作获取曲目2的文件标识和裁剪参数。所述电子设备向所述服务器发起裁剪请求。所述裁剪请求可以包括所述曲目2的文件标识、裁剪请求时间:1分27s,裁剪时长35秒。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.
本发明实施例中,所述裁剪请求也可以包括所述曲目2的文件标识、裁剪起始时间:1分27秒、裁剪结束时间:2分02秒。本发明实施例并不限定具体的裁剪参数,所述裁剪参数能实现裁剪目的即可。In the embodiment of the present invention, 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:
segment0:start=X’0,end=X’1;segment0: start=X’0, end=X’1;
segment1:content={CC};segment1:content={CC};
segment2:start=X87,end=X122。segment2: start=X87, end=X122.
上述裁剪结果中的参数含义说明如下:The meanings of the parameters in the above cropping results are explained as follows:
第0部分:起始于偏移量X’0,结束于偏移量X’1。Part 0: Start at offset X’0 and end at offset X’1.
第1部分:内容为{CC},该部分内容为可选。服务器可以通过该部分对文件头的信息进行修改。例如,在原始的歌曲名称后,增加“高潮版”名称后缀。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.
第2部分:起始于偏移量X87,结束于偏移量X122。Part 2: Start at offset X87 and end at offset X122.
本发明实施例中,X’0、X’1、X87和X122分别表示相对于原曲目2文件字节位置的偏移量。In the embodiment of the present invention, X'0, X'1, X87, and X122 respectively represent the offset from the byte position of the original track 2 file.
所述第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信息。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. By hexadecimal representation example, the content is similar to 0x54 0x49 0x54 0x32 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.
本发明实施例中,上述segment0和segment1组成所述裁剪文件的文件头。segment1部分为可选字节。服务器可以通过segment1对所述裁剪文件的文件头的信息进行修改。所述服务器可以通过所述segment1字段承载修改信息,返回给所述电子设备。例如,所述曲目2的歌曲名称为:《双截棍》,修改后所述裁剪文件的名称为:《双截棍彩铃版》。In the embodiment of the present invention, 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. For example, the name of the song of the track 2 is: "nunchaku", and the name of the cropped file after modification is: "nunchaku color ring version".
本发明实施例中,通常所述segment0中的参数X’1小于或等于X1。当X’1等于X1时,则所述服务器不修改所述曲目2的文件头信息,也不会返回segment1的内容。In the embodiment of the present invention, generally, the parameter X'1 in the segment0 is less than or equal to X1. When X'1 is equal to X1, the server does not modify the file header information of the track 2, nor returns the content of segment1.
所述电子设备接收所述服务器返回的裁剪结果后,根据所述裁剪结果生成裁剪文件。所述电子设备重新生成裁剪文件的过程结合图10进行说明。图10为所述裁剪文件的结构示意图。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.
所述电子设备根据所述曲目2和裁剪结果计算出所述裁剪文件的文件信息:C’0的起始点和结束点分别为X’0和X’1,{CC}长度为Z,C87-C121部分的内容对应的起始点和结束点分别为X87和X122。X87和X122是相对于原始曲目2文件字节位置的偏移量。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.
所述电子设备根据偏移量,提取原曲目2中的X’0到X’1内容,{cc}对’应的内容,以及X87到X122对应的内容,重新生成所述裁剪文件。所述X87到X122对应的内容为原曲目2中的C87,C88…C121的部分。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.
所述电子设备生成所述裁剪文件后,可以通过音乐播放器的应用界面将提示用户裁剪文件已经生成。所述电子设备可以提示用户保存、试听、设置铃音、或者对所述裁剪文件进行其他操作。After the electronic device generates the crop file, 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.
本发明实施例提供的媒体裁剪的方法、电子设备和服务器,通过服务器对媒体文件进行分析处理,获取所述裁剪结果,所述电子设备根据裁剪结果生成裁剪文件。减少了电子设备的资源占用,提高了媒体文件的处理效率。并且所述电子设备可以显示操作界面,用户可以通过设置界面设置裁剪参数,以及选择对裁剪文件的操作,提高了用户体验,节约电子设备的资源占用,以及功耗。According to the media cropping method, electronic device and server provided by the embodiments of the present invention, 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. In addition, 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.
如图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中附加曲子的演出者、作者以及其它类别资讯,方便众多乐曲的管理。FIG. 11 is a schematic diagram of media files in an embodiment of the present invention. As shown in FIG. 11, 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.
如图11所示,ID3V2的内容包括文件内容为h1到h10以及0x54到0x00的头域内容。第0到1秒包括p11到p13的媒体内容。第1到2秒包括p21到p26的媒体内容。第2到3秒包括p31到p37的媒体内容。需要说明的是,h1到h10并不表示该内容只有10个字节,只是一个示例,实际大小可能会比这个大。As shown in FIG. 11, 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. It should be noted that h1 to h10 does not mean that the content is only 10 bytes, just an example, the actual size may be larger than this.
如图12所示,所述服务器返回的裁剪后的媒体的文件头在图11中的ID3V2中的最后的0x78和0x00中间增加了0x28、0x30、0x7E、0x32、0x73和0x29。这些新增的头文件内容代表:文件标题新增的内容。例如原来的文件标题是xx,修改为xx(0-2s);文件标题新增的内容,即这几个字符就表示0到2秒。裁剪的内容为0到1秒和1到2秒的内容,即p11到p26的内容。As shown in FIG. 12, 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. For example, 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.
此外,由于电子设备无法识别所有的媒体文件类型,故本发明实施例将媒体文件的裁剪放到服务器中实现,可以实现几乎所有媒体文件的裁剪,使得媒体文件的裁剪更简单易行。In addition, since the electronic device cannot recognize all types of media files, 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.
并且,在所述服务器实现裁剪后,是将裁剪后的裁剪结果发送给电子设备,由电子设备实现裁剪文件的重新组装。比起直接将裁剪后的媒体文件发送给电子设备,本发明实施例的方案更能节约电子设备和服务器之间的带宽。In addition, after the server realizes the cropping, the cropped cropping result is sent to the electronic device, and the electronic device reassembles the cropped file. Compared with directly sending the cropped media file to the electronic device, the solution of the embodiment of the present invention can save the bandwidth between the electronic device and the server.
上述实施例中所用,根据上下文,术语“当…时”可以被解释为意思是“如果…”或“在…后”或“响应于确定…”或“响应于检测到…”。类似地,根据上下文,短语“在确定…时”或“如果检测到(所陈述的条件或事件)”可以被解释为意思是“如果确定…”或“响应于确定…”或“在检测到(所陈述的条件或事件)时”或“响应于检测到(所陈述的条件或事 件)”。As used in the above embodiments, depending on the context, the term "when" may be interpreted to mean "if..." or "after" or "in response to determination..." or "in response to detection...". Similarly, depending on the context, 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)".
在上述实施例中,可以全部或部分地通过软件、硬件、固件或者其任意组合来实现。当使用软件实现时,可以全部或部分地以计算机程序产品的形式实现。所述计算机程序产品包括一个或多个计算机指令。在计算机上加载和执行所述计算机程序指令时,全部或部分地产生按照本申请实施例所述的流程或功能。所述计算机可以是通用计算机、专用计算机、计算机网络、或者其他可编程装置。所述计算机指令可以存储在计算机可读存储介质中,或者从一个计算机可读存储介质向另一个计算机可读存储介质传输,例如,所述计算机指令可以从一个网站站点、计算机、服务器或数据中心通过有线(例如同轴电缆、光纤、数字用户线)或无线(例如红外、无线、微波等)方式向另一个网站站点、计算机、服务器或数据中心进行传输。所述计算机可读存储介质可以是计算机能够存取的任何可用介质或者是包含一个或多个可用介质集成的服务器、数据中心等数据存储设备。所述可用介质可以是磁性介质,(例如,软盘、硬盘、磁带)、光介质(例如DVD)、或者半导体介质(例如固态硬盘)等。In the above embodiments, it can be implemented in whole or in part by software, hardware, firmware, or any combination thereof. When implemented using software, it can be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, the processes or functions according to the embodiments of the present application are generated in whole or in part. 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.
本领域普通技术人员可以理解实现上述实施例方法中的全部或部分流程,该流程可以由计算机程序来指令相关的硬件完成,该程序可存储于计算机可读取存储介质中,该程序在执行时,可包括如上述各方法实施例的流程。而前述的存储介质包括:ROM或随机存储记忆体RAM、磁碟或者光盘等各种可存储程序代码的介质。A person of ordinary skill in the art may understand that all or part of the process in the method of the above embodiment may be implemented by a computer program instructing relevant hardware. 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.

Claims (19)

  1. 一种媒体文件裁剪的方法,其特征在于,包括:A method for media file cropping, characterized in that it includes:
    电子设备获取媒体文件标识和裁剪参数,根据所述裁剪参数向服务器发送裁剪请求;The electronic device obtains the media file identifier and the cropping parameters, and sends a cropping request to the 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.
  2. 根据权利要求2所述的方法,其特征在于,所述电子设备获取媒体文件标识和裁剪参数包括:所述电子设备接收用户操作,获取媒体文件标识和裁剪参数。The method according to claim 2, wherein the electronic device acquiring the media file identification and cropping parameters comprises: the electronic device receiving the user operation and acquiring the media file identification and cropping parameters.
  3. 根据权利要求1或2所述的方法,其特征在于,所述裁剪参数包括至少两个以下参数:裁剪的开始时间、裁剪的结束时间、裁剪时长。The method according to claim 1 or 2, wherein the cropping parameters include at least two of the following parameters: a cropping start time, a cropping end time, and a cropping duration.
  4. 根据权利要求1-3任一项所述的方法,其特征在于,所述裁剪结果信息包括待裁剪片段的起始帧和结束帧在所述媒体文件中的字节位置。The method according to any one of claims 1-3, wherein 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.
  5. 根据权利要求1-4任一项所述的方法,其特征在于,所述裁剪结果信息还包括所述裁剪文件的文件头信息。The method according to any one of claims 1-4, wherein the cropping result information further includes file header information of the cropping file.
  6. 根据权利要求5所述的方法,其特征在于,所述文件头信息被所述服务器修改。The method according to claim 5, wherein the file header information is modified by the server.
  7. 根据权利要求1-6任一项所述的方法,其特征在于,所述方法还包括:所述电子设备显示裁剪设置界面,接收用户通过所述裁剪设置界面的操作,获取裁剪参数。The method according to any one of claims 1-6, wherein the method further comprises: the electronic device displaying a cropping setting interface, and receiving a user operation through the cropping setting interface to obtain cropping parameters.
  8. 根据权利要求1-7任一项所述的方法,其特征在于,所述方法还包括:所述电子设备显示裁剪文件操作界面,所述裁剪文件操作界面用于对所述裁剪文件进行控制。The method according to any one of claims 1-7, wherein the method further comprises: the electronic device displaying a crop file operation interface, and the crop file operation interface is used to control the crop file.
  9. 根据权利要求1-8任一项所述的方法,其特征在于,所述方法还包括:保存所述裁剪文件;或,试听所述裁剪文件;或,将所述裁剪文件设置为铃音。The method according to any one of claims 1-8, wherein the method further comprises: saving the cropped file; or, listening to the cropped file; or, setting the cropped file as a ring tone.
  10. 根据权利要求1-9任一项所述的方法,其特征在于,所述电子设备通过音乐播放软件,或者,视频播放软件对所述媒体文件进行裁剪。The method according to any one of claims 1-9, wherein the electronic device clips the media file through music playback software or video playback software.
  11. 一种实现媒体文件裁剪的电子设备,其特征在于,所述电子设备包括:显示屏,处理器和存储器,其中,An electronic device for cutting media files, characterized in that the electronic device includes: a display screen, a processor and a memory, wherein,
    所述存储器用于存储程序;The memory is used to store programs;
    所述处理器用于调用所述程序使得所述电子设备执行如权利要求1-10中任一项所述的方法。The processor is used to call the program to cause the electronic device to perform the method according to any one of claims 1-10.
  12. 一种计算机可读存储介质,包括指令,其特征在于,当其在计算机上运行时,使得所述计算机执行如权利要求1-10任一所述的方法。A computer-readable storage medium, including instructions, characterized in that when it runs on a computer, it causes the computer to perform the method according to any one of claims 1-10.
  13. 一种媒体文件裁剪的方法,其特征在于,包括:A method for media file cropping, characterized in that it includes:
    服务器接收电子设备发送的媒体文件裁剪请求,所述裁剪请求包括所述媒体文件标识和裁剪参数;The server receives a media file cropping request sent by the electronic device, where the cropping request includes the media file identification and cropping parameters;
    所述服务器根据所述所述媒体文件标识获取所述媒体文件,根据所述裁剪参数对所述媒 体文件进行处理,得到裁剪结果信息;The server obtains the media file according to the media file identifier, and processes the media file according to the cropping parameter to obtain cropping result information;
    向所述电子设备所述裁剪结果信息,所述裁剪结果信息用于使得所述电子设备生成裁剪文件。The cropping result information is sent to the electronic device, and the cropping result information is used to cause the electronic device to generate a cropping file.
  14. 根据权利要求13所述的方法,其特征在于,所述裁剪参数包括至少两个以下参数:裁剪的开始时间、裁剪的结束时间、裁剪时长。The method according to claim 13, wherein the cutting parameters include at least two of the following parameters: start time of cutting, end time of cutting, and duration of cutting.
  15. 根据权利要求13或14所述的方法,其特征在于,所述裁剪结果信息包括待裁剪片段的起始帧和结束帧在所述媒体文件中的字节位置。The method according to claim 13 or 14, wherein 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.
  16. 根据权利要求13-15任一项所述的方法,其特征在于,所述裁剪结果信息还包括所述裁剪文件的文件头信息。The method according to any one of claims 13-15, wherein the cropping result information further includes file header information of the cropping file.
  17. 根据权利要求16所述的方法,其特征在于,所述服务器修改所述文件头信息。The method according to claim 16, wherein the server modifies the file header information.
  18. 一种实现媒体文件裁剪的服务器,其特征在于,所述电子设备包括:处理器和存储器,其中,A server for cutting media files, characterized in that the electronic device includes: a processor and a memory, wherein,
    所述存储器用于存储程序;The memory is used to store programs;
    所述处理器用于调用所述程序使得所述服务器执行如权利要求13-17中任一项所述的方法。The processor is used to call the program to cause the server to execute the method according to any one of claims 13-17.
  19. 一种计算机可读存储介质,包括指令,其特征在于,当其在计算机上运行时,使得所述计算机执行如权利要求13-17任一所述的方法。A computer-readable storage medium, including instructions, characterized in that, when it runs on a computer, it causes the computer to perform the method according to any one of claims 13-17.
PCT/CN2019/122518 2018-12-29 2019-12-03 Media file clipping method, electronic device, and server WO2020134892A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201811653372.9 2018-12-29
CN201811653372.9A CN109819306B (en) 2018-12-29 2018-12-29 Media file clipping method, electronic device and server

Publications (1)

Publication Number Publication Date
WO2020134892A1 true WO2020134892A1 (en) 2020-07-02

Family

ID=66603982

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2019/122518 WO2020134892A1 (en) 2018-12-29 2019-12-03 Media file clipping method, electronic device, and server

Country Status (2)

Country Link
CN (1) CN109819306B (en)
WO (1) WO2020134892A1 (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2023072083A1 (en) * 2021-10-29 2023-05-04 维沃移动通信有限公司 File processing method, and electronic device

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109819306B (en) * 2018-12-29 2022-11-04 花瓣云科技有限公司 Media file clipping method, electronic device and server
CN112118062B (en) * 2019-06-19 2022-12-30 荣耀终端有限公司 Multi-terminal multimedia data communication method and system
CN110650255B (en) * 2019-08-15 2021-12-07 咪咕文化科技有限公司 Method and device for editing color ring back tone, color ring back tone editing unit and storage medium
CN110909180B (en) * 2019-10-23 2022-08-02 维沃移动通信有限公司 Media file processing method and electronic equipment

Citations (6)

* Cited by examiner, † Cited by third party
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 (en) * 2008-05-29 2008-10-15 腾讯科技(深圳)有限公司 Demand method, system and device of media file
CN102203761A (en) * 2008-10-31 2011-09-28 微软公司 Dynamic fragmentation of digital media
CN103686250A (en) * 2013-12-24 2014-03-26 深圳市龙视传媒有限公司 Method for sharing fragment of media file and relevant devices
CN105141973A (en) * 2015-09-01 2015-12-09 北京暴风科技股份有限公司 Multi-segment media file mosaicing method and system
CN109819306A (en) * 2018-12-29 2019-05-28 华为技术有限公司 Media file clipping method, electronic device and server

Family Cites Families (23)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6895557B1 (en) * 1999-07-21 2005-05-17 Ipix Corporation Web-based media submission tool
JP4332089B2 (en) * 2004-08-19 2009-09-16 ソニー株式会社 REPRODUCTION DEVICE, REPRODUCTION METHOD, REPRODUCTION PROGRAM, AND RECORDING MEDIUM
CN101217638B (en) * 2007-12-28 2012-10-24 深圳市迅雷网络技术有限公司 Downloading method, system and device of video file fragmentation
US8209733B2 (en) * 2008-05-28 2012-06-26 Broadcom Corporation Edge device that enables efficient delivery of video to handheld device
CN101521745B (en) * 2009-04-14 2011-04-13 王广生 Multi-lens optical center superposing type omnibearing shooting device and panoramic shooting and retransmitting method
CN102193943B (en) * 2010-03-12 2013-10-30 腾讯科技(深圳)有限公司 Method and device for providing media data for user
CN103531218B (en) * 2013-04-17 2017-03-08 Tcl集团股份有限公司 A kind of online multimedia file editing method and system
CN103428527A (en) * 2013-08-08 2013-12-04 北京宽客网络技术有限公司 Real-time data source media stream transformation method and breakpoint switching play method
CN104023248A (en) * 2014-06-25 2014-09-03 北京奇艺世纪科技有限公司 Video screen capturing method and device
CN104602102B (en) * 2014-07-24 2018-06-01 腾讯科技(北京)有限公司 Transmission response method, apparatus, server and the system of video intercepting content
CN104883625B (en) * 2015-06-12 2018-03-09 腾讯科技(北京)有限公司 Information displaying method, terminal device, server and system
CN106612469A (en) * 2015-10-23 2017-05-03 北京国双科技有限公司 Video sharing method and device
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 (en) * 2016-03-01 2019-01-01 聚好看科技股份有限公司 A kind of method and apparatus that network video plays
CN106161985B (en) * 2016-07-05 2019-08-27 宁波菊风系统软件有限公司 A kind of implementation method of immersion video conference
CN107666396B (en) * 2016-07-29 2021-02-12 杭州华为企业通信技术有限公司 Multi-terminal conference processing method and device
CN107809678B (en) * 2016-09-09 2020-09-08 阿里巴巴集团控股有限公司 Multimedia file processing method, device and equipment
CN106454154A (en) * 2016-11-24 2017-02-22 Tcl数码科技(深圳)有限责任公司 Television wall splicing method and system
CN107155065A (en) * 2017-06-28 2017-09-12 哈尔滨市舍科技有限公司 A kind of virtual photograph device and method
CN107872639A (en) * 2017-11-14 2018-04-03 维沃移动通信有限公司 Transmission method, device and the mobile terminal of communication video
CN108540866A (en) * 2018-04-13 2018-09-14 北京显约科技有限公司 A kind of video-splicing show under multi-channel video output system and method
CN109089157B (en) * 2018-06-15 2021-12-07 广州华多网络科技有限公司 Video picture cutting method, display device and device
CN108984380A (en) * 2018-07-12 2018-12-11 郑州云海信息技术有限公司 A kind of server test method, device and medium based on linux system

Patent Citations (6)

* Cited by examiner, † Cited by third party
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 (en) * 2008-05-29 2008-10-15 腾讯科技(深圳)有限公司 Demand method, system and device of media file
CN102203761A (en) * 2008-10-31 2011-09-28 微软公司 Dynamic fragmentation of digital media
CN103686250A (en) * 2013-12-24 2014-03-26 深圳市龙视传媒有限公司 Method for sharing fragment of media file and relevant devices
CN105141973A (en) * 2015-09-01 2015-12-09 北京暴风科技股份有限公司 Multi-segment media file mosaicing method and system
CN109819306A (en) * 2018-12-29 2019-05-28 华为技术有限公司 Media file clipping method, electronic device and server

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2023072083A1 (en) * 2021-10-29 2023-05-04 维沃移动通信有限公司 File processing method, and electronic device

Also Published As

Publication number Publication date
CN109819306B (en) 2022-11-04
CN109819306A (en) 2019-05-28

Similar Documents

Publication Publication Date Title
WO2021013158A1 (en) Display method and related apparatus
WO2020103764A1 (en) Voice control method and electronic device
WO2021139768A1 (en) Interaction method for cross-device task processing, and electronic device and storage medium
WO2020108356A1 (en) Application display method and electronic device
WO2020259452A1 (en) Full-screen display method for mobile terminal, and apparatus
WO2021103981A1 (en) Split-screen display processing method and apparatus, and electronic device
WO2020134869A1 (en) Electronic device operating method and electronic device
WO2021000881A1 (en) Screen splitting method and electronic device
WO2020078299A1 (en) Method for processing video file, and electronic device
WO2021082835A1 (en) Method for activating function and electronic device
WO2021000804A1 (en) Display method and apparatus in locked state
WO2020134892A1 (en) Media file clipping method, electronic device, and server
WO2021000839A1 (en) Screen splitting method and electronic device
WO2021159746A1 (en) File sharing method and system, and related device
JP7268275B2 (en) Method and electronic device for presenting video on electronic device when there is an incoming call
WO2022068819A1 (en) Interface display method and related apparatus
WO2021258814A1 (en) Video synthesis method and apparatus, electronic device, and storage medium
WO2020238759A1 (en) Interface display method and electronic device
WO2021249318A1 (en) Screen projection method and terminal
WO2020239001A1 (en) Humming recognition method and related device
WO2022184173A1 (en) Card widget display method, graphical user interface, and related apparatus
WO2022042637A1 (en) Bluetooth-based data transmission method and related apparatus
WO2023015963A1 (en) File management method, electronic device, and computer-readable storage medium
WO2022179275A1 (en) Terminal application control method, terminal device, and chip system
WO2021143391A1 (en) Video call-based screen sharing method and mobile device

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