Interactive theme processing method and electronic equipment
By acquiring and playing configuration files and video clips of interactive themes on mobile phones, and based on different interactive event triggering strategies, the problem of monotonous interaction forms is solved, enabling diverse interaction forms and efficient video playback, thus improving the user experience.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- HONOR DEVICE CO LTD
- Filing Date
- 2024-10-23
- Publication Date
- 2026-05-01
AI Technical Summary
Existing mobile interactive themes have limited interactive formats and lack flexibility, failing to meet users' diverse interactive needs.
By acquiring configuration files and video clips from interactive themes, corresponding video clips can be played based on different interactive events. By combining clip selection and control strategies, various interactive formats can be combined and video clips can be played flexibly.
It improves the flexibility of interactive themes and user experience, shortens interaction latency, avoids video clip playback jumps and excessive latency, and enhances user engagement and experience.
Smart Images

Figure CN121967774A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of terminal technology, and in particular to a method for processing interactive themes and an electronic device. Background Technology
[0002] With the widespread adoption of smartphones and the development of mobile internet, mobile phones have become an indispensable part of people's daily lives. Interactive mobile themes, as an important component of mobile phone personalization, not only provide users with a unique visual experience but also enhance user engagement and experience through interactive methods.
[0003] However, current mobile interactive themes on the market generally suffer from problems such as limited interactive formats and poor flexibility. Therefore, there is an urgent need for a solution that can improve the flexibility of interactive themes. Summary of the Invention
[0004] To address the technical problems of limited and inflexible interactive formats in interactive themes, embodiments of this application provide a method for processing interactive themes and an electronic device.
[0005] Firstly, a method for processing interactive topics is provided, which includes:
[0006] Obtain the configuration file and at least one video clip contained in the interactive topic. The configuration file contains at least one interactive event corresponding to at least one video clip and a clip playback strategy corresponding to at least one interactive event.
[0007] Upon detecting the triggering of the first interactive event, the video segment corresponding to the first interactive event is played according to the segment playback strategy corresponding to the first interactive event. The first interactive event is any one of at least one interactive event.
[0008] In this application, based on the configuration file contained in the interactive theme, the electronic device can play different video clips for different interactive events, thereby improving the flexibility of the interactive theme.
[0009] In one possible implementation of the first aspect, the segment playback strategy includes a segment selection strategy and a segment control strategy; according to the segment playback strategy corresponding to the first interactive event, the video segment corresponding to the first interactive event is played, including:
[0010] Based on the segment selection strategy corresponding to the first interactive event, the target video segment corresponding to the first interactive event is determined from the video segments corresponding to the first interactive event.
[0011] Based on the segment control strategy corresponding to the first interactive event, the target video segment corresponding to the first interactive event is played.
[0012] In this application, the electronic device can achieve various combinations between interactive events and video segments based on segment selection and segment control strategies, enriching the interactive forms of interactive themes and improving the user's interactive experience.
[0013] In one possible implementation of the first aspect, based on a segment selection strategy corresponding to the first interactive event, the target video segment corresponding to the first interactive event is determined from the video segments corresponding to the first interactive event, including:
[0014] Based on the segment selection strategy corresponding to the first interactive event, the target video segment corresponding to the first interactive event is determined in the segment matching queue, which stores the video segment corresponding to the first interactive event.
[0015] In one possible implementation of the first aspect, based on the segment control strategy corresponding to the first interactive event, the target video segment corresponding to the first interactive event is played, including:
[0016] Add the target video clip to the clip buffer queue and update the buffer status of the target video clip in the clip matching queue to the buffered status;
[0017] Read the target video segment from the segment buffer queue and play the target video segment based on the segment control strategy corresponding to the first interactive event.
[0018] In one possible implementation of the first aspect, before determining the target video segment corresponding to the first interactive event in the segment matching queue based on the segment selection strategy corresponding to the first interactive event, the method further includes:
[0019] Determine if the first interactive event is the same as the previously triggered second interactive event;
[0020] If the first interactive event is different from the second interactive event, the segment matching queue and the segment buffer queue are initialized, and the video segment corresponding to the first interactive event is added to the segment matching queue.
[0021] If the first interactive event is the same as the second interactive event, the buffered state of the video segment in the segment matching queue is updated to the unbuffered state, and the segment selection strategy based on the first interactive event is executed to determine the target video segment corresponding to the first interactive event in the segment matching queue.
[0022] In this application, when the first interactive event and the second interactive event are the same, the electronic device does not need to initialize the segment matching queue, but only updates the buffered state of the video segments in the segment matching queue to the unbuffered state, thereby shortening the interactive latency of the interactive topic and improving the user's interactive experience.
[0023] In one possible implementation of the first aspect, the method further includes:
[0024] Determine whether the video segment corresponding to the previously triggered second interactive event has finished playing;
[0025] If the video segment corresponding to the second interactive event finishes playing, then the step of playing the video segment corresponding to the first interactive event according to the segment playback strategy corresponding to the first interactive event is executed.
[0026] If the video segment corresponding to the second interactive event has not finished playing, then continue playing the video segment corresponding to the second interactive event. After the video segment corresponding to the second interactive event has finished playing, execute the step of playing the video segment corresponding to the first interactive event according to the segment playback strategy corresponding to the first interactive event.
[0027] In this application, the electronic device plays the video segment corresponding to the first interactive event only after the video segment corresponding to the previously triggered second interactive event has finished playing, thereby avoiding playback jumps in video segments and improving the user experience.
[0028] In one possible implementation of the first aspect, the configuration file also includes the event transition duration and the playback rate corresponding to at least one video segment; continuing to play the video segment corresponding to the second interactive event includes:
[0029] The target playback rate is determined based on the playback rate, unplayed duration, and event transition duration of the video segment corresponding to the second interactive event;
[0030] Based on the target playback rate, continue playing the video segment corresponding to the second interactive event.
[0031] In this application, when the unplayed duration of the video segment corresponding to the second interactive event is longer than the event transition duration, the electronic device accelerates the playback of the video segment corresponding to the second interactive event, thereby avoiding excessive interaction delay and affecting the user's interactive experience.
[0032] In one possible implementation of the first aspect, determining the target playback rate based on the playback rate, unplayed duration, and event transition duration of the video segment corresponding to the second interactive event includes:
[0033] If the unplayed duration of the video segment corresponding to the second interactive event is less than or equal to the event transition duration, then the playback rate of the video segment corresponding to the second interactive event is determined as the target playback rate.
[0034] If the unplayed duration of the video segment corresponding to the second interactive event is greater than the event transition duration, then the product of the ratio of the unplayed duration of the video segment corresponding to the second interactive event to the event transition duration and the playback rate of the video segment corresponding to the second interactive event is determined as the target playback rate.
[0035] In this application, when the unplayed duration of the video segment corresponding to the second interactive event is longer than the event transition duration, the electronic device accelerates the playback of the video segment corresponding to the second interactive event, thereby avoiding excessive interaction delay and affecting the user's interactive experience.
[0036] In one possible implementation of the first aspect, before continuing to play the video segment corresponding to the second interactive event based on the target playback rate, the method further includes:
[0037] Determine if the target playback rate is greater than the preset maximum playback rate;
[0038] If the target playback rate is greater than the maximum playback rate, the target playback rate is updated to the maximum playback rate, and the frame dropping interval is determined based on the event transition duration, the maximum playback rate, the number of unplayed frames and the frame interval corresponding to the video segment corresponding to the second interactive event.
[0039] Based on the target playback rate, continue playing the video segment corresponding to the second interactive event, including:
[0040] Based on the target playback rate and frame drop interval, continue playing the video segment corresponding to the second interactive event.
[0041] In this application, when the target playback rate is greater than the maximum playback rate, the electronic device plays the video segment corresponding to the second interactive event based on the maximum playback rate, and performs frame dropping processing on the video segment corresponding to the second interactive event during playback, thereby improving the user's interactive experience while ensuring the interaction latency.
[0042] In one possible implementation of the first aspect, the configuration file also includes an event priority corresponding to at least one interactive event, and the method further includes:
[0043] If a third interactive event is detected during the playback of the video segment corresponding to the first interactive event, and the event priority of the third interactive event is lower than that of the first interactive event, then the third interactive event will not be responded to.
[0044] In this application, during the playback of video clips featuring high-priority interactive events, low-priority interactive events will not preempt high-priority interactive events, thereby improving the user's interactive experience.
[0045] In one possible implementation of the first aspect, the configuration file further includes screen information corresponding to at least one video segment; playing the video segment corresponding to the first interactive event includes:
[0046] On the target screen corresponding to the screen information, play the video clip corresponding to the first interactive event.
[0047] In this application, an electronic device can play a video clip corresponding to the first interactive event on a target screen corresponding to the screen information, thereby adapting to electronic devices with multiple screens.
[0048] In one possible implementation of the first aspect, the method further includes:
[0049] In response to user interactive topic query operations, obtain the theme framework version number and interactive capabilities of the electronic device;
[0050] Send an interactive topic query request to the cloud server. The interactive topic query request carries the theme framework version number and interactive capabilities of the electronic device.
[0051] Receive the interactive topic query response sent by the cloud server. The interactive topic query response carries the target interactive topic. The topic framework version number and interactive capabilities of the electronic device meet the topic framework version number requirements and interactive capability requirements contained in the configuration file of the target interactive topic, respectively.
[0052] Display the target interactive theme.
[0053] In this application, when an electronic device queries an interactive theme, it sends the theme framework version number and interactive capabilities of the electronic device to the cloud server, thereby obtaining the interactive themes that the electronic device can use. This avoids the problem of downloaded interactive themes being unusable, and thus improves the user's interactive experience.
[0054] Secondly, an electronic device is provided, comprising: a processor and a memory; the memory is coupled to the processor; the memory stores computer program code, the computer program code including computer instructions, which, when executed by the processor, cause the electronic device to perform the method described above.
[0055] Thirdly, a computer-readable storage medium is provided, including computer instructions that, when executed on an electronic device, cause the electronic device to perform the method described above.
[0056] It should be understood that the above general description and the following detailed description are exemplary and explanatory only, and do not limit this application. Attached Figure Description
[0057] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0058] Figure 1 A schematic diagram illustrating an application scenario provided in an embodiment of this application;
[0059] Figure 2 A schematic diagram of the hardware structure of an electronic device provided in an embodiment of this application;
[0060] Figure 3 A schematic diagram of the software structure of an electronic device provided in an embodiment of this application;
[0061] Figure 4 A flowchart illustrating an interactive topic processing method provided in an embodiment of this application;
[0062] Figure 5 A flowchart illustrating another method for processing interactive topics provided in this application embodiment;
[0063] Figure 6 A schematic diagram of a fragment matching queue and a fragment buffer queue provided in an embodiment of this application;
[0064] Figure 7 A flowchart illustrating another method for processing interactive topics provided in this application embodiment;
[0065] Figure 8 A flowchart illustrating another method for processing interactive topics provided in this application embodiment;
[0066] Figures 9A to 9C A schematic diagram of an interactive video clip provided in an embodiment of this application;
[0067] Figure 10 A schematic diagram of an interactive theme framework provided for an embodiment of this application;
[0068] Figure 11 A signaling interaction diagram of an interactive theme provided in an embodiment of this application;
[0069] Figure 12 A schematic diagram of the structure of an interactive theme processing device provided in an embodiment of this application;
[0070] Figure 13 This is a schematic diagram of the structure of a control device for an electronic device provided in an embodiment of this application. Detailed Implementation
[0071] To make the objectives, technical solutions, and advantages of this application clearer, the embodiments of this application will be described in further detail below with reference to the accompanying drawings.
[0072] It should be understood that "multiple" as mentioned in this application refers to two or more. In the description of this application, unless otherwise stated, " / " indicates "or," for example, A / B can mean A or B; "and / or" in this document is merely a description of the relationship between related objects, indicating that three relationships can exist, for example, A and / or B can represent: A existing alone, A and B existing simultaneously, and B existing alone. Furthermore, to facilitate a clear description of the technical solutions of this application, the terms "first," "second," etc., are used to distinguish identical or similar items with essentially the same function and effect. Those skilled in the art will understand that the terms "first," "second," etc., do not limit the quantity or execution order, and that "first," "second," etc., do not necessarily imply differences.
[0073] References to "one embodiment" or "some embodiments" as described in this specification mean that one or more embodiments of this application include a specific feature, structure, or characteristic described in connection with that embodiment. Therefore, the phrases "in one embodiment," "in some embodiments," "in other embodiments," "in still other embodiments," etc., appearing in different parts of this specification do not necessarily refer to the same embodiment, but rather mean "one or more, but not all, embodiments," unless otherwise specifically emphasized. The terms "comprising," "including," "having," and variations thereof mean "including but not limited to," unless otherwise specifically emphasized.
[0074] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, data stored, data displayed, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties. Furthermore, the collection, use and processing of the relevant data must comply with the relevant regulations and standards of the relevant countries and regions, and corresponding operation entry points are provided for users to choose to authorize or refuse.
[0075] With the widespread adoption of smartphones and the development of mobile internet, mobile phones have become an indispensable part of people's daily lives. As a crucial component of mobile phone personalization, interactive themes not only provide users with a unique visual experience but also enhance user engagement and engagement through interactive methods. However, current interactive themes on the market generally suffer from problems such as limited interactive formats and poor flexibility. Therefore, there is an urgent need for a method to improve the flexibility of interactive themes.
[0076] The present application provides a method for processing interactive themes, which can be applied to interactive theme scenarios of electronic devices. Figure 1 This is a schematic diagram illustrating an application scenario provided in an embodiment of this application, such as... Figure 1 As shown, electronic device 110 interacts with cloud server 120 via a network. Cloud server 120 stores interactive themes, and electronic device 110 downloads these themes from cloud server 120. Each interactive theme includes a configuration file and at least one video clip. The configuration file contains at least one interactive event corresponding to each video clip and a playback strategy for each interactive event. When electronic device 110 detects a first interactive event, it plays the video clip corresponding to the first interactive event according to the playback strategy for that first interactive event. The first interactive event is any one of the at least one interactive events.
[0077] For example, the electronic device in the embodiments of this application can be a mobile phone, tablet computer, laptop computer, ultra-mobile personal computer (UMPC), handheld computer, netbook, personal digital assistant (PDA), wearable device (such as smartwatch, smart glasses or smart helmet, etc.), virtual reality device, smart home device, in-vehicle computer, access control device, etc., which includes a fingerprint recognition module. The following embodiments do not impose any special restrictions on the specific form of the electronic device.
[0078] Figure 2 A schematic diagram of the structure of the electronic device 100 is shown.
[0079] Electronic device 100 may include processor 110, external memory interface 120, internal memory 121, universal serial bus (USB) interface 130, charging management module 140, power management module 141, battery 142, antenna 1, 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, button 190, motor 191, indicator 192, camera 193, display screen 194, and subscriber identification module (SIM) card interface 195, etc. The sensor module 180 may include a pressure sensor 180A, a gyroscope sensor 180B, a barometric pressure sensor 180C, a magnetic sensor 180D, an accelerometer sensor 180E, a distance sensor 180F, a proximity sensor 180G, a fingerprint sensor 180H, a temperature sensor 180J, a touch sensor 180K, an ambient light sensor 180L, a bone conduction sensor 180M, etc.
[0080] It is understood that the structures illustrated in the embodiments of the present invention do not constitute a specific limitation on the electronic device 100. In other embodiments of this application, the electronic device 100 may include more or fewer components than illustrated, or combine some components, or split some components, or have different component arrangements. The illustrated components may be implemented in hardware, software, or a combination of software and hardware.
[0081] Processor 110 may include one or more processing units, such as application processors (APs), modem processors, graphics processing units (GPUs), image signal processors (ISPs), controllers, video codecs, digital signal processors (DSPs), baseband processors, and / or neural network processing units (NPUs). These different processing units may be independent devices or integrated into one or more processors.
[0082] The controller can generate operation control signals based on the instruction opcode and timing signals to complete the control of instruction fetching and execution.
[0083] The processor 110 may also include a memory for storing instructions and data. In some embodiments, the memory in the processor 110 is a cache memory. This memory can store instructions or data that the processor 110 has just used or that are used repeatedly. If the processor 110 needs to use the instruction or data again, it can retrieve it directly from the memory. This avoids repeated accesses, reduces the waiting time of the processor 110, and thus improves the efficiency of the system.
[0084] In some embodiments, the processor 110 may include one or more interfaces. Interfaces may include an inter-integrated circuit (I2C) interface, an inter-integrated circuit sound (I2S) interface, a pulse code modulation (PCM) interface, a universal asynchronous receiver / transmitter (UART) interface, a mobile industry processor interface (MIPI), a general-purpose input / output (GPIO) interface, a subscriber identity module (SIM) interface, and / or a universal serial bus (USB) interface, etc.
[0085] The I2C interface is a bidirectional synchronous serial bus, including a serial data line (SDA) and a serial clock line (SCL). In some embodiments, the processor 110 may include multiple I2C buses. The processor 110 can couple to the touch sensor 180K, charger, flash, camera 193, etc., through different I2C bus interfaces. For example, the processor 110 can couple to the touch sensor 180K through the I2C interface, enabling the processor 110 and the touch sensor 180K to communicate through the I2C bus interface, thereby realizing the touch function of the electronic device 100.
[0086] The I2S interface can be used for audio communication. In some embodiments, the processor 110 may include multiple I2S buses. The processor 110 can be coupled to the audio module 170 via the I2S bus to enable 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 via the I2S interface to enable the function of answering phone calls through a Bluetooth headset.
[0087] 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 can be coupled via the PCM bus interface. In some embodiments, the audio module 170 can also transmit audio signals to the wireless communication module 160 via the PCM interface, enabling the function of answering phone calls through a Bluetooth headset. Both the I2S interface and the PCM interface can be used for audio communication.
[0088] The UART interface is a universal serial data bus used for asynchronous communication. This bus can be a bidirectional communication bus. It converts the data to be transmitted between serial and parallel communication. In some embodiments, the UART interface is typically 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 via the UART interface to implement Bluetooth functionality. In some embodiments, the audio module 170 can transmit audio signals to the wireless communication module 160 via the UART interface to enable music playback through Bluetooth headphones.
[0089] The MIPI interface can be used to connect the processor 110 to peripheral devices such as the display screen 194 and the camera 193. The MIPI interface includes a camera serial interface (CSI) and a display serial interface (DSI). In some embodiments, the processor 110 and the camera 193 communicate via the CSI interface to enable the electronic device 100 to capture images. The processor 110 and the display screen 194 communicate via the DSI interface to enable the electronic device 100 to display images.
[0090] The GPIO interface can be configured via software. It can be configured as a control signal or a data signal. In some embodiments, the GPIO interface can be used to connect the processor 110 to a camera 193, a display screen 194, a wireless communication module 160, an audio module 170, a sensor module 180, etc. The GPIO interface can also be configured as an I2C interface, an I2S interface, a UART interface, a MIPI interface, etc.
[0091] USB port 130 is a USB standard compliant interface, specifically a Mini USB port, Micro USB port, USB Type-C port, etc. USB port 130 can be used to connect a charger to charge electronic device 100, and can also be used for data transfer between electronic device 100 and peripheral devices. It can also be used to connect headphones for audio playback. This interface can also be used to connect other electronic devices, such as AR devices.
[0092] It is understood that the interface connection relationships between the modules illustrated in the embodiments of the present invention are merely illustrative and do not constitute a structural limitation on the electronic device 100. In other embodiments of this application, the electronic device 100 may also employ different interface connection methods or combinations of multiple interface connection methods as described in the above embodiments.
[0093] The charging management module 140 receives charging input from a charger. The charger can be a wireless charger or a wired charger. In some wired charging embodiments, the charging management module 140 receives charging input from the wired charger via the USB interface 130. In some wireless charging embodiments, the charging management module 140 receives wireless charging input via the wireless charging coil of the electronic device 100. While charging the battery 142, the charging management module 140 can also supply power to the electronic device via the power management module 141.
[0094] The power management module 141 connects 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, providing power to the processor 110, internal memory 121, display screen 194, camera 193, and wireless communication module 160, etc. The power management module 141 can also monitor parameters such as battery capacity, battery cycle count, and battery health status (leakage current, impedance). In some other embodiments, the power management module 141 may also be located within the processor 110. In other embodiments, the power management module 141 and the charging management module 140 may be located in the same device.
[0095] The wireless communication function of electronic device 100 can be realized through antenna 1, antenna 2, mobile communication module 150, wireless communication module 160, modem processor and baseband processor, etc.
[0096] Antenna 1 and antenna 2 are used to transmit and receive electromagnetic wave signals. Each antenna in electronic device 100 can be used to cover one or more communication frequency bands. Different antennas can also be multiplexed to improve antenna utilization. For example, antenna 1 can be multiplexed as a diversity antenna for a wireless local area network. In some other embodiments, the antennas can be used in conjunction with tuning switches.
[0097] The mobile communication module 150 can provide solutions for wireless communication, including 2G / 3G / 4G / 5G, applied to the electronic device 100. The mobile communication module 150 may include at least one filter, switch, power amplifier, low noise amplifier (LNA), etc. The mobile communication module 150 can receive electromagnetic waves via antenna 1, and perform filtering, amplification, and other processing on the received electromagnetic waves before transmitting them to a modem processor for demodulation. The mobile communication module 150 can also amplify the signal modulated by the modem processor and convert it into electromagnetic waves for radiation via antenna 1. In some embodiments, at least some functional modules of the mobile communication module 150 may be housed in the processor 110. In some embodiments, at least some functional modules of the mobile communication module 150 and at least some modules of the processor 110 may be housed in the same device.
[0098] The modem processor may include a modulator and a demodulator. The modulator modulates the low-frequency baseband signal to be transmitted into a mid-to-high frequency signal. The demodulator demodulates 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. After processing by the baseband processor, the low-frequency baseband signal is transmitted to the application processor. The application processor outputs sound signals through an audio device (not limited to speaker 170A, receiver 170B, etc.) or displays images or videos through the display screen 194. In some embodiments, the modem processor may be a separate device. In other embodiments, the modem processor may be independent of the processor 110 and may be housed in the same device as the mobile communication module 150 or other functional modules.
[0099] The wireless communication module 160 can provide solutions for wireless communication applications on the electronic device 100, including wireless local area networks (WLANs) (such as wireless fidelity (Wi-Fi) networks), Bluetooth (BT), global navigation satellite system (GNSS), frequency modulation (FM), near field communication (NFC), and infrared (IR) technologies. The wireless communication module 160 can be one or more devices integrating at least one communication processing module. The wireless communication module 160 receives electromagnetic waves via antenna 2, performs frequency modulation and filtering of the electromagnetic wave signals, and sends the processed signal to processor 110. The wireless communication module 160 can also receive signals to be transmitted from processor 110, perform frequency modulation and amplification, and convert them into electromagnetic waves for radiation via antenna 2.
[0100] In some embodiments, antenna 1 of electronic device 100 is coupled to mobile communication module 150, and antenna 2 is coupled to wireless communication module 160, enabling electronic device 100 to communicate with networks and other devices via wireless communication technology. The wireless communication technology may include 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, and / or IR technologies, etc. The GNSS may include the Global Positioning System (GPS), the Global Navigation Satellite System (GLONASS), the BeiDou Navigation Satellite System (BDS), the Quasi-Zenith Satellite System (QZSS), and / or satellite-based augmentation systems (SBAS).
[0101] Electronic device 100 implements display functions through a GPU, a display screen 194, and an application processor. The GPU is a microprocessor for image processing, connected to the display screen 194 and the application processor. The GPU is used to perform mathematical and geometric calculations and for graphics rendering. Processor 110 may include one or more GPUs, which execute program instructions to generate or modify display information.
[0102] Display screen 194 is used to display images, videos, etc. Display screen 194 includes a display panel. The display panel may be a liquid crystal display (LCD), an organic light-emitting diode (OLED), an active-matrix organic light-emitting diode (AMOLED), a flexible light-emitting diode (FLED), a miniature LED, a microLED, a quantum dot light-emitting diode (QLED), etc. In some embodiments, electronic device 100 may include one or N displays 194, where N is a positive integer greater than 1.
[0103] Electronic device 100 can perform shooting functions through ISP, camera 193, video codec, GPU, display 194 and application processor.
[0104] The ISP (Image Signal Processor) is used to process data fed back from the camera 193. For example, when taking a picture, the shutter is opened, and light is transmitted through the lens to the camera's photosensitive element. The light signal is converted into an electrical signal, and the camera's photosensitive element transmits the electrical signal to the ISP for processing, transforming it into an image visible to the naked eye. The ISP can also perform algorithmic optimization of image noise, brightness, and skin tone. The ISP can also optimize parameters such as exposure and color temperature of the shooting scene. In some embodiments, the ISP can be set in the camera 193.
[0105] Camera 193 is used to capture still images or videos. An object is projected onto a photosensitive element by generating an optical image through the lens. The photosensitive element can be a charge-coupled device (CCD) or a complementary metal-oxide-semiconductor (CMOS) phototransistor. The photosensitive element converts the light signal into an electrical signal, which is then passed to an ISP for conversion into a digital image signal. The ISP outputs the digital image signal to a DSP for processing. The DSP converts the digital image signal into image signals in standard RGB, YUV, or other formats. In some embodiments, the electronic device 100 may include one or N cameras 193, where N is a positive integer greater than 1.
[0106] Digital signal processors (DSPs) are used to process digital signals. Besides digital image signals, they can also process other digital signals. For example, when electronic device 100 selects a frequency, the DSP can perform Fourier transforms on the frequency energy.
[0107] Video codecs are used to compress or decompress digital video. Electronic device 100 may support one or more video codecs. Thus, electronic device 100 can play or record videos in various encoding formats, such as Moving Picture Experts Group (MPEG) 1, MPEG2, MPEG3, MPEG4, etc.
[0108] An NPU (Neural Processing Unit) is a computational processor for neural networks (NNs). By borrowing the structure of biological neural networks, such as the transmission patterns between neurons in the human brain, it can rapidly process input information and continuously learn on its own. NPUs enable intelligent cognitive applications in electronic devices, such as image recognition, facial recognition, speech recognition, and text understanding.
[0109] The external storage 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 storage interface 120 to perform data storage functions. For example, music, video, and other files can be saved on the external memory card.
[0110] Internal memory 121 can be used to store computer executable program code, which includes instructions. Internal memory 121 may include a program storage area and a data storage area. The program storage area may store the operating system, at least one application program required for a function (such as sound playback, image playback, etc.), etc. The data storage area may store data created during the use of electronic device 100 (such as audio data, phonebook, etc.). Furthermore, internal memory 121 may include high-speed random access memory, and may also include non-volatile memory, such as at least one disk storage device, flash memory device, universal flash storage (UFS), etc. Processor 110 executes various functional applications and data processing of electronic device 100 by running instructions stored in internal memory 121 and / or instructions stored in memory located in the processor.
[0111] Electronic device 100 can implement audio functions, such as music playback and recording, through audio module 170, speaker 170A, receiver 170B, microphone 170C, headphone jack 170D, and application processor.
[0112] The audio module 170 is used to convert digital audio information into analog audio signals for output, and also to convert analog audio input into digital audio signals. The audio module 170 can also be used for encoding and decoding audio signals. In some embodiments, the audio module 170 may be located in the processor 110, or some functional modules of the audio module 170 may be located in the processor 110.
[0113] The speaker 170A, also known as a "loudspeaker," is used to convert audio electrical signals into sound signals. The electronic device 100 can listen to music or make hands-free calls through the speaker 170A.
[0114] The receiver 170B, also known as the "earpiece," is used to convert audio electrical signals into sound signals. When the electronic device 100 answers a telephone call or voice message, the receiver 170B can be brought close to the ear to listen to the voice.
[0115] Microphone 170C, also known as a "microphone" or "voice transducer," is used to convert sound signals into electrical signals. When making a phone call or sending a voice message, the user can speak by bringing their mouth close to microphone 170C, inputting the sound signal into microphone 170C. Electronic device 100 may have at least one microphone 170C. In some embodiments, electronic device 100 may have two microphones 170C, which, in addition to collecting sound signals, can also perform noise reduction. In other embodiments, electronic device 100 may also have three, four, or more microphones 170C, which can collect sound signals, reduce noise, identify the sound source, and perform directional recording, etc.
[0116] The 170D headphone jack is used to connect wired headphones. The 170D headphone jack can be a USB 130 interface or a 3.5mm Open Mobile Terminal Platform (OMTP) standard interface, a CTIA (Cellular Telecommunications Industry Association of the USA) standard interface.
[0117] Pressure sensor 180A is used to sense pressure signals and convert them into electrical signals. In some embodiments, pressure sensor 180A can be disposed on display screen 194. There are many types of pressure sensors 180A, such as resistive pressure sensors, inductive pressure sensors, and capacitive pressure sensors. A capacitive pressure sensor may include at least two parallel plates with conductive material. When force is applied to pressure sensor 180A, the capacitance between the electrodes changes. Electronic device 100 determines the pressure intensity based on the change in capacitance. When a touch operation is applied to display screen 194, electronic device 100 detects the intensity of the touch operation based on pressure sensor 180A. Electronic device 100 can also calculate the touch position based on the detection signal from pressure sensor 180A. In some embodiments, touch operations applied to the same touch position but with different touch operation intensities can correspond to different operation commands. For example, when a touch operation with an intensity less than a first pressure threshold is applied to the SMS application icon, a command to view an SMS is executed. When a touch operation with an intensity greater than or equal to the first pressure threshold is applied to the SMS application icon, a command to create a new SMS is executed.
[0118] The gyroscope sensor 180B can be used to determine the motion attitude of the electronic device 100. In some embodiments, the gyroscope sensor 180B can determine the angular velocity of the electronic device 100 about three axes (i.e., the x, y, and z axes). The gyroscope sensor 180B can be used for image stabilization. For example, when the shutter is pressed, the gyroscope sensor 180B detects the angle of the shake 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 shake of the electronic device 100 by moving in the opposite direction, thus achieving image stabilization. The gyroscope sensor 180B can also be used in navigation and motion-sensing game scenarios.
[0119] The barometric pressure sensor 180C is used to measure air pressure. In some embodiments, the electronic device 100 calculates altitude using the air pressure value measured by the barometric pressure sensor 180C to assist in positioning and navigation.
[0120] The magnetic sensor 180D includes a Hall sensor. The electronic device 100 can use the magnetic sensor 180D to detect the opening and closing of the flip cover. In some embodiments, when the electronic device 100 is a flip phone, the electronic device 100 can detect the opening and closing of the flip cover using the magnetic sensor 180D. Then, based on the detected opening and closing state of the cover or the flip cover, features such as automatic flip unlocking can be set.
[0121] The 180E accelerometer can detect the magnitude of acceleration of electronic device 100 in various directions (typically three axes). When electronic device 100 is stationary, it can detect the magnitude and direction of gravity. It can also be used to identify the posture of electronic devices and applied to applications such as screen orientation switching and pedometers.
[0122] A distance sensor 180F is used to measure distance. Electronic device 100 can measure distance via infrared or laser. In some embodiments, during a shooting scene, electronic device 100 can utilize the distance sensor 180F to measure distance for rapid focusing.
[0123] The proximity sensor 180G may include, for example, a light-emitting diode (LED) and a light detector, such as a photodiode. The LED may be an infrared LED. The electronic device 100 emits infrared light outward through the LED. The electronic device 100 uses the photodiode to detect infrared reflected light from nearby objects. When sufficient reflected light is detected, it can be determined that there is an object near the electronic device 100. When insufficient reflected light is detected, the electronic device 100 can determine that there is no object near the electronic device 100. The electronic device 100 may use the proximity sensor 180G to detect when a user holds the electronic device 100 close to their ear for a call, so as to automatically turn off the screen to save power. The proximity sensor 180G can also be used in holster mode and pocket mode for automatic unlocking and locking of the screen.
[0124] 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 based on the sensed ambient light brightness. 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 work with the proximity sensor 180G to detect whether the electronic device 100 is in a pocket to prevent accidental touches.
[0125] The fingerprint sensor 180H is used to collect fingerprints. The electronic device 100 can utilize the characteristics of the collected fingerprints to achieve fingerprint unlocking, accessing application locks, taking photos with fingerprints, answering calls with fingerprints, etc.
[0126] Temperature sensor 180J is used to detect temperature. In some embodiments, electronic device 100 uses the temperature detected by temperature sensor 180J to execute a temperature handling strategy. For example, when the temperature reported by temperature sensor 180J exceeds a threshold, electronic device 100 performs thermal protection by reducing the performance of a processor located near temperature sensor 180J to reduce power consumption. In other embodiments, when the temperature is below another threshold, electronic device 100 heats battery 142 to prevent abnormal shutdown of electronic device 100 due to low temperature. In still other embodiments, when the temperature is below yet another threshold, electronic device 100 boosts the output voltage of battery 142 to prevent abnormal shutdown due to low temperature.
[0127] Touch sensor 180K, also known as a "touch device," can be located on display screen 194. The touch sensor 180K and display screen 194 together form a touchscreen, also known as a "touchscreen." Touch sensor 180K detects touch operations applied to or near it. The touch sensor can transmit the detected touch operation to the application processor to determine the type of touch event. Visual output related to the touch operation can be provided through display screen 194. In other embodiments, touch sensor 180K may also be located on the surface of electronic device 100, in a different position than display screen 194.
[0128] The bone conduction sensor 180M can acquire vibration signals. In some embodiments, the bone conduction sensor 180M can acquire vibration signals from the vibrating bone segments of the human vocal cords. The bone conduction sensor 180M can also contact the human pulse to receive blood pressure signals. In some embodiments, the bone conduction sensor 180M can also be incorporated into headphones to form bone conduction headphones. The audio module 170 can parse the voice signals from the vibrating bone segments of the vocal cords acquired by the bone conduction sensor 180M to realize voice functionality. The application processor can parse heart rate information from the blood pressure signals acquired by the bone conduction sensor 180M to realize heart rate detection functionality.
[0129] Buttons 190 include a power button, volume buttons, etc. Buttons 190 can be mechanical buttons or touch-sensitive buttons. Electronic device 100 can receive button input and generate key signal inputs related to user settings and function control of electronic device 100.
[0130] Motor 191 can generate vibration alerts. Motor 191 can be used for incoming call vibration alerts or for touch vibration feedback. For example, different vibration feedback effects can correspond to touch operations performed on different applications (such as taking photos, playing audio, etc.). Motor 191 can also correspond to different vibration feedback effects for touch operations performed on different areas of the display screen 194. Different application scenarios (such as time reminders, receiving messages, alarm clocks, games, etc.) can also correspond to different vibration feedback effects. The touch vibration feedback effect can also be customized.
[0131] Indicator 192 can be an indicator light, used to indicate charging status, power changes, or to indicate messages, missed calls, notifications, etc.
[0132] 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 make contact with and separate from the electronic device 100. The electronic device 100 can support one 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. Multiple cards can be inserted into the same SIM card interface 195 simultaneously. The multiple cards can be of the same or different types. The SIM card interface 195 is also compatible with different types of SIM cards. The SIM card interface 195 is also compatible with external memory cards. The electronic device 100 interacts with the network through the SIM card to realize functions such as calls and data communication. In some embodiments, the electronic device 100 uses an eSIM, i.e., an embedded SIM card. The eSIM card can be embedded in the electronic device 100 and cannot be separated from the electronic device 100.
[0133] The software system of electronic device 100 can adopt a layered architecture, event-driven architecture, microkernel architecture, microservice architecture, or cloud architecture. This embodiment of the invention uses the layered architecture Android system as an example to exemplify the software structure of electronic device 100.
[0134] Figure 3 This is a software structure block diagram of the electronic device 100 according to an embodiment of the present invention.
[0135] A layered architecture divides software into several layers, each with a clear role and function. Layers communicate with each other through software interfaces. In some embodiments, the Android system is divided into four layers, from top to bottom: the application layer, the application framework layer, the Android runtime and system libraries, and the kernel layer.
[0136] The application layer can include a series of application packages.
[0137] like Figure 3 As shown, the application package may include applications such as camera, gallery, calendar, call, map, navigation, WLAN, Bluetooth, music, video, and themes.
[0138] The application framework layer provides application programming interfaces (APIs) and a programming framework for applications in the application layer. The application framework layer includes some predefined functions.
[0139] like Figure 3 As shown, the application framework layer may include a window manager, content provider, view system, phone manager, resource manager, notification manager, etc.
[0140] The window manager is used to manage windowed applications. It can retrieve screen size, determine the presence of a status bar, lock the screen, and capture screenshots, among other things.
[0141] Content providers store and retrieve data, making that data accessible to applications. This data may include videos, images, audio, made and received phone calls, browsing history and bookmarks, phone books, etc.
[0142] A view system includes visual controls, such as controls for displaying text and controls for displaying images. View systems can be used to build applications. A display interface can consist of one or more views. For example, a display interface including a text notification icon could include views for displaying text and views for displaying images.
[0143] The phone manager is used to provide communication functions for electronic device 100. For example, it manages call status (including connection and disconnection).
[0144] The file explorer provides applications with various resources, such as localized strings, icons, images, layout files, video files, and more.
[0145] The notification manager allows applications to display notifications in the status bar. These notifications can be used to deliver informational messages and can disappear automatically after a short pause, requiring no user interaction. For example, the notification manager can be used to notify users of completed downloads or message alerts. The notification manager can also display notifications as icons or scrolling text in the top status bar, such as notifications from background applications, or as dialog boxes on the screen. Examples include displaying text messages in the status bar, emitting sounds, vibrating electronic devices, and flashing indicator lights.
[0146] The Android Runtime consists of core libraries and a virtual machine. The Android runtime is responsible for the scheduling and management of the Android system.
[0147] The core library consists of two parts: one part is the functionalities that need to be called by the Java language, and the other part is the Android core library.
[0148] The application layer and application framework layer run in a virtual machine. The virtual machine executes the Java files of the application layer and application framework layer as binary files. The virtual machine is used to perform functions such as object lifecycle management, stack management, thread management, security and exception management, and garbage collection.
[0149] System libraries can include multiple functional modules. For example: surface manager, media libraries, 3D graphics processing libraries (e.g., OpenGL ES), 2D graphics engines (e.g., SGL), etc.
[0150] The Surface Manager is used to manage the display subsystem and provides the blending of 2D and 3D layers for multiple applications.
[0151] The media library supports playback and recording of various common audio and video formats, as well as still image files. It supports multiple audio and video encoding formats, such as MPEG4, H.264, MP3, AAC, AMR, JPG, and PNG.
[0152] The 3D graphics processing library is used to implement 3D graphics drawing, image rendering, compositing, and layer processing.
[0153] A 2D graphics engine is a graphics engine for 2D drawing.
[0154] The kernel layer is the layer between hardware and software. It contains at least the display driver, camera driver, audio driver, and sensor driver. The camera driver controls the camera to detect always-on (AO) gaze interaction events; the audio driver controls the microphone to detect the user's audio airflow interaction events; and the sensor driver can detect other user interaction events by controlling relevant sensors, such as detecting acceleration interaction events using inertial sensors.
[0155] Based on the electronic devices described above, embodiments of this application provide a method for processing interactive themes. This method can be applied to any interactive theme scenario. The method of this application embodiment is described below. Figure 4 As shown, the specific processing procedure is as follows.
[0156] Step 401: Obtain the configuration file and at least one video clip contained in the interactive topic. The configuration file contains at least one interactive event corresponding to at least one video clip and a clip playback strategy corresponding to at least one interactive event.
[0157] In one implementation, when an electronic device downloads and installs an interactive theme from a theme store, the electronic device can obtain a configuration file and at least one video clip contained in the interactive theme. The at least one video clip is used by the electronic device to play content based on interactive events; the configuration file contains at least one interactive event corresponding to the at least one video clip and a clip playback strategy corresponding to the at least one interactive event.
[0158] In one example, the aforementioned interactive events may include at least screen-on wake-up interactive events, screen-off unlock interactive events, idle events, touch interactive events, AO gaze interactive events, eye-tracking interactive events, and audio airflow interactive events. The association between a video clip and an interactive event can be one-to-one, one-to-many, or many-to-one; that is, a video clip may only play when a specific interactive event is triggered, or a video clip may play when certain interactive events are triggered, or certain video clips may play when a specific interactive event is triggered. The aforementioned clip playback strategy may include at least one or more of a clip selection strategy and a clip control strategy. The clip selection strategy is used by the electronic device to select a video clip to be played from the video clips corresponding to the interactive event when the interactive event is triggered. The clip control strategy is used by the electronic device to control the playback of the selected video clip after it has been selected. Specifically, the clip selection strategy and the clip control strategy will be described in detail later and will not be repeated here.
[0159] Step 402: Upon detecting the triggering of the first interactive event, play the video segment corresponding to the first interactive event according to the segment playback strategy corresponding to the first interactive event. Here, the first interactive event is any one of at least one interactive event.
[0160] In one implementation, after obtaining the configuration file contained in the interactive topic, the electronic device can register to listen for interactive events contained in the configuration file. When the electronic device detects a first interactive event being triggered, it can determine the video segment corresponding to the first interactive event and the corresponding segment playback strategy from the configuration file. Then, the electronic device can play the video segment corresponding to the first interactive event according to the segment playback strategy. Here, the first interactive event is any one of at least one interactive event contained in the configuration file. The process of the electronic device playing the video segment corresponding to the first interactive event according to the segment playback strategy will be described in detail later and will not be repeated here.
[0161] In some embodiments, in order to adapt to different interactive events, the configuration file may also include at least one or more of the following: event value, specification mode, duration, triggering area, and event priority corresponding to the interactive event.
[0162] The event value indicates the trigger state corresponding to the interaction event. For example, taking the interaction event as a touch interaction event, if the event value is 1, it means that the press state in the touch interaction event is the trigger state. If the event value is 0, it means that the release state in the touch interaction event is the trigger state.
[0163] The specification mode indicates the supported specification modes for an interactive event. An interactive event can have one or more specification modes. For example, taking the AO gaze interactive event as an example, the specification modes corresponding to the AO gaze interactive event can include 1*1, 1*2, 2*1, and other multiple specification modes. Among them, the 1*1 specification mode indicates that the AO gaze interactive event supports AO gaze regardless of screen area, the 1*2 specification mode indicates that the AO gaze interactive event supports AO gaze in the upper and lower halves of the screen, and the 2*1 specification mode indicates that the AO gaze event supports AO gaze in the left and right halves of the screen.
[0164] Duration is used to distinguish between interactive events of the same type with different durations. For example, taking AO gaze interactive events as an example, if the duration of the AO gaze interactive event is 0, it means that after listening for the AO gaze event, the AO gaze interactive event is determined to be triggered. If the duration of the AO gaze interactive event is 2000ms, it means that after listening for the AO gaze event, the AO gaze interactive event is determined to be triggered after 2000ms of AO gaze.
[0165] The trigger area represents the area where the interactive event is triggered. This trigger area includes four attribute parameters: the x-coordinate of the starting point (trigger_on_begin_x), the y-coordinate of the starting point (trigger_on_begin_y), the x-coordinate of the ending point (trigger_on_end_x), and the y-coordinate of the ending point (trigger_on_end_y). To adapt to the screen size and resolution of different electronic devices, the values of the above four attribute parameters are [0, 1.0].
[0166] For example, a starting point x-coordinate (trigger_on_begin_x) = 0, a starting point y-coordinate (trigger_on_begin_y) = 0, an ending point x-coordinate (trigger_on_end_x) = 1.0, and an ending point y-coordinate (trigger_on_end_y) = 1.0 represent the full screen; a starting point x-coordinate (trigger_on_begin_x) = 0, a starting point y-coordinate (trigger_on_begin_y) = 0, an ending point x-coordinate (trigger_on_end_x) = 1.0, and an ending point y-coordinate (trigger_on_end_y) = 0.5 represent the upper half of the screen.
[0167] Event priority indicates the priority of the interactive event. A smaller event priority value indicates a higher priority, and a larger event priority value indicates a lower priority.
[0168] It should be noted that the implementation methods for event values, specification modes, durations, trigger areas, and event priorities differ for different interactive events, and this application does not limit these aspects. For example, the trigger area can be various shapes such as rectangles, triangles, and circles. When the trigger area is circular, it includes two attribute parameters: the origin coordinates and the radius length. Other cases are similar and will not be elaborated here.
[0169] In this embodiment, the electronic device acquires a configuration file and at least one video segment contained in an interactive theme. The configuration file contains at least one interactive event corresponding to the at least one video segment and a segment playback strategy corresponding to the at least one interactive event. Then, upon detecting the triggering of a first interactive event, the electronic device plays the video segment corresponding to the first interactive event according to the segment playback strategy for the first interactive event. The first interactive event is any one of the at least one interactive events. In this way, based on the configuration file contained in the interactive theme, the electronic device can play different video segments for different interactive events, thereby improving the flexibility of the interactive theme.
[0170] The segment playback strategy in the configuration file includes at least one or more of a segment selection strategy and a segment control strategy. The segment selection strategy is used to select a video segment to be played from the video segments corresponding to the interactive event; the segment control strategy is used to control the playback of the video segment to be played. Specifically, the segment selection strategy may include at least one or more of sequential selection, random selection, and sequential selection strategies. The segment control strategy may include at least one or more of single control, loop control, and continuous control strategies. Table 1 shows the strategy table for segment selection and segment control. As shown in Table 1, the electronic device selects a video segment to be played from the video segments corresponding to the interactive event based on the segment selection strategy, and controls the playback of the video segment to be played based on the segment control strategy.
[0171] Table 1
[0172]
[0173] In some embodiments, such as Figure 5 As shown, the process by which the electronic device plays the video segment corresponding to the first interactive event according to the segment playback strategy is as follows:
[0174] Step 501: Based on the segment selection strategy corresponding to the first interactive event, determine the target video segment corresponding to the first interactive event from the video segments corresponding to the first interactive event.
[0175] In one implementation, since the video segment corresponding to the first interactive event may be one video segment or multiple video segments, after the electronic device determines the video segment corresponding to the first interactive event and the segment playback strategy corresponding to the first interactive event from the configuration file, the electronic device can further determine the target video segment corresponding to the first interactive event from the video segments corresponding to the first interactive event based on the segment selection strategy corresponding to the first interactive event.
[0176] Step 502: Based on the segment control strategy corresponding to the first interactive event, play the target video segment corresponding to the first interactive event.
[0177] In one implementation, after determining the target video segment corresponding to the first interactive event from the video segments corresponding to the first interactive event based on the segment selection strategy corresponding to the first interactive event, the electronic device can further play the target video segment corresponding to the first interactive event based on the segment control strategy corresponding to the first interactive event.
[0178] In one example, suppose the first interactive event is a short-lived AO (Awake-Off) gaze interaction event, and the video segments corresponding to the first interactive event are video segment 1, video segment 3, and video segment 5. The segment selection strategy corresponding to the first interactive event is a random selection strategy, and the segment control strategy corresponding to the first interactive event is a single-time control strategy. Based on this, the electronic device randomly selects a video segment from video segment 1, video segment 3, and video segment 5 based on the random selection strategy. Let's assume the selected video segment is video segment 3. Subsequently, the electronic device can further control video segment 3 to play once based on the single-time control strategy.
[0179] In another example, suppose the first interactive event is a long-duration AO gaze interactive event, and the video segments corresponding to the first interactive event are video segments 2, 4, and 6. The segment selection strategy corresponding to the first interactive event is a sequential selection strategy, and the segment control strategy corresponding to the first interactive event is a single-time control strategy. Based on this, the video segment previously played by the electronic device was video segment 3. The electronic device selects the next video segment of video segment 3 from video segments 2, 4, and 6 based on the sequential selection strategy, namely video segment 4. Subsequently, the electronic device can further control video segment 4 to play once based on the single-time control strategy.
[0180] It should be noted that each video segment can be divided into at least four parts: the entry segment (frame_init), the looping playback segment (frame_loop), the looping rewind segment (frame_back), and the exit segment (frame_exit). When a video segment is played once, the playback path is: entry segment (frame_init) → looping playback segment (frame_loop) → exit segment (frame_exit). When a video segment is played in a loop, the playback path is: entry segment (frame_init) → (looping playback segment (frame_loop) + looping rewind segment (frame_back)) looping until the termination condition is met, at which point it exits from the looping playback segment (frame_loop) → exit segment (frame_exit). When the two playback paths are connected end-to-end, the electronic device can merge the playback paths to reduce interference from frame skipping.
[0181] Each of the four parts of the aforementioned video segment contains two attribute parameters: the first frame and the last frame. Correspondingly, the configuration file also includes the first and last frames for at least one of the four parts of the video segment. Specifically, the first frame of the entry part (frame_init) is represented by frame_init_begin, and the last frame by frame_init_end; the first frame of the loop forward part (frame_loop) is represented by frame_loop_begin, and the last frame by frame_loop_end; the first frame of the loop backward part (frame_back) is represented by frame_back_begin, and the last frame by frame_back_end; and the first frame of the exit part (frame_exit) is represented by frame_exit_begin, and the last frame by frame_exit_end.
[0182] Except for the first and last frames of the ingress section (frame_init), the first and last frames of other sections (i.e., the loop forward section (frame_loop), the loop backward section (frame_back), and the exit section (frame_exit)) can have default values. The default rule is as follows:
[0183] frame_loop_end=frame_loop_begin=frame_init_end;
[0184] frame_back_end=frame_back_begin=frame_loop_end;
[0185] frame_exit_end=frame_exit_begin=frame_loop_begin.
[0186] In the embodiments of this application, the electronic device can realize various combinations between interactive events and video segments based on the segment selection strategy and the segment control strategy, which enriches the interactive forms of interactive themes and improves the user's interactive experience.
[0187] The electronic device also includes a segment matching queue and a segment buffer queue. The segment matching queue stores the video segments corresponding to interactive events, which the electronic device selects based on a segment selection strategy. The segment buffer queue stores the target video segments to be played, which the electronic device controls based on a segment control strategy. Both the segment matching queue and the segment buffer queue store information such as the addresses and pointers of the video segments, representing their physical storage addresses.
[0188] In some embodiments, the process by which an electronic device determines a target video segment corresponding to a first interactive event from the video segments corresponding to the first interactive event based on a segment selection strategy for the first interactive event is as follows: based on the segment selection strategy for the first interactive event, the target video segment corresponding to the first interactive event is determined in a segment matching queue. The segment matching queue stores the video segments corresponding to the first interactive event.
[0189] In one implementation, when an electronic device detects a first interactive event, it can determine the video segment corresponding to the first interactive event and the segment playback strategy in a configuration file. First, the electronic device can add the video segment corresponding to the first interactive event to a segment matching queue. Then, based on the segment selection strategy corresponding to the first interactive event, the electronic device can determine the target video segment corresponding to the first interactive event from the segment matching queue.
[0190] In one example, suppose the first interaction event is a short-lived AO gaze interaction event, the video segment corresponding to the first interaction event is a video segment, and the segment selection strategy corresponding to the first interaction event is a random selection strategy. Based on this, firstly, the electronic device can add video segment 1, video segment 3, and video segment 5 to the segment matching queue. Then, the electronic device randomly selects a video segment from video segment 1, video segment 3, and video segment 5 stored in the segment matching queue based on the random selection strategy. Let's assume the video segment selected by the electronic device is video segment 3.
[0191] In some embodiments, the process by which the electronic device plays the target video segment corresponding to the first interactive event based on the segment control strategy corresponding to the first interactive event is as follows:
[0192] Step 1: Add the target video clip to the clip buffer queue and update the buffer status of the target video clip in the clip matching queue to the buffered status.
[0193] In one implementation, based on the segment selection strategy corresponding to the first interactive event, the electronic device, after determining the target video segment corresponding to the first interactive event in the segment matching queue, can further add the target video segment to the segment buffer queue and update the buffer status of the target video segment in the segment matching queue to a buffered state. The buffer status of the video segment not only indicates whether the video segment has been added to the segment buffer queue, but also prevents the video segment from being selected repeatedly; that is, if the buffer status of a video segment is buffered, the electronic device will not select that video segment again.
[0194] Step two: Read the target video segment from the segment buffer queue and play the target video segment based on the segment control strategy corresponding to the first interactive event.
[0195] In one implementation, after the electronic device adds the target video segment to the segment buffer queue, it can further read the target video segment from the segment buffer queue and play the target video segment based on the segment control strategy corresponding to the first interactive event.
[0196] In one example, suppose the first interactive event is a short-lived AO gaze interaction event, and the corresponding video segments are video segments 2, 4, and 6. The segment selection strategy for the first interactive event is a random selection strategy, and the segment control strategy is a single-time control strategy. Based on this, firstly, the electronic device can add video segments 2, 4, and 6 to the segment matching queue. Then, the electronic device randomly selects a video segment from the video segments 2, 4, and 6 stored in the segment matching queue based on the random selection strategy. Let's assume the selected video segment is video segment 3. Next, the electronic device adds video segment 3 to the segment buffer queue and updates the buffer status of video segment 3 to the buffered state in the segment matching queue. Finally, the electronic device reads video segment 3 from the segment buffer queue and controls video segment 3 to play once according to the single-time control strategy.
[0197] In some embodiments, to further enhance the user's interactive experience, the configuration file may also include at least the response duration of the response executor corresponding to the interactive event. The response duration of the response executor represents the response time of the executor after the target video segment corresponding to the interactive event is added to the segment buffer queue. The response executor may include a vibrator, a speaker, an indicator, etc., and this application embodiment does not limit the scope. For example, taking a vibrator as the response executor, with a response duration of 500ms, the vibrator starts vibrating and continues to vibrate for 500ms after the target video segment corresponding to the interactive event is added to the segment buffer queue.
[0198] In some embodiments, before determining the target video segment corresponding to the first interactive event in the segment matching queue based on the segment selection strategy corresponding to the first interactive event, the electronic device may also perform the following processing procedure based on whether the first interactive event is the same as the previously triggered second interactive event:
[0199] Step 1: Determine if the first interactive event is the same as the previously triggered second interactive event.
[0200] In one implementation, after the electronic device detects the triggering of a first interactive event, it can first determine whether the first interactive event is the same as the previously triggered second interactive event. If the first interactive event and the second interactive event are different, it indicates that the video segment corresponding to the first interactive event is different from the video segment corresponding to the second interactive event (i.e., the first interactive event is the first trigger or the first interactive event is triggered by an event switch), further indicating that the video segment stored in the segment matching queue is different from the video segment corresponding to the first interactive event. Accordingly, the electronic device can perform step two as described below. If the first interactive event and the second interactive event are the same, it indicates that the video segment corresponding to the first interactive event is the same as the video segment corresponding to the second interactive event, further indicating that the video segment corresponding to the first interactive event was at least added to the segment matching queue when the electronic device detected the triggering of the second interactive event. Accordingly, the electronic device can perform step three as described below.
[0201] Step 2: If the first interactive event and the second interactive event are different, the segment matching queue and the segment buffer queue are initialized, and the video segment corresponding to the first interactive event is added to the segment matching queue.
[0202] In one implementation, if the first interactive event and the second interactive event are different, it indicates that the video segment corresponding to the first interactive event is different from the video segment corresponding to the second interactive event, further indicating that the video segment stored in the segment matching queue is different from the video segment corresponding to the first interactive event. Accordingly, the electronic device can initialize the segment matching queue and the segment buffer queue, that is, clear the original video segments stored in the segment matching queue and the segment buffer queue. Then, the electronic device can further add the video segment corresponding to the first interactive event to the segment matching queue.
[0203] Step 3: If the first interactive event is the same as the second interactive event, then update the buffered state of the video segment in the segment matching queue to the unbuffered state, and execute the segment selection strategy based on the first interactive event to determine the target video segment corresponding to the first interactive event in the segment matching queue.
[0204] In one implementation, if the first interactive event is the same as the second interactive event, it indicates that the video segment corresponding to the first interactive event is the same as the video segment corresponding to the second interactive event. This further indicates that the video segment corresponding to the first interactive event was at least added to the segment matching queue when the electronic device detected the triggering of the second interactive event. Accordingly, the electronic device does not need to initialize the segment matching queue; it only updates the buffered state of the video segments in the segment matching queue to an unbuffered state, and determines the target video segment corresponding to the first interactive event in the segment matching queue based on the segment selection strategy corresponding to the first interactive event.
[0205] In this embodiment of the application, when the first interactive event and the second interactive event are the same, the electronic device does not need to initialize the segment matching queue, but only updates the buffered state of the video segments in the segment matching queue to the unbuffered state, thereby shortening the interaction latency of the interactive topic and improving the user's interactive experience.
[0206] In one example, such as Figure 6 As shown, the electronic device detects the triggering of interaction event 1. This is the first triggering of interaction event 1, and the corresponding video segments are video segments 1 to 4. First, the electronic device adds video segments 1 to 4 to the segment matching queue. At this time, the buffered state of video segments 1 to 4 is unbuffered. Then, based on the segment selection strategy corresponding to interaction event 1, the electronic device determines video segment 2 as the target video segment in the segment matching queue. Afterwards, the electronic device updates the buffered state of video segment 2 in the segment matching queue to a buffered state (e.g., ...). Figure 6 As shown in the figure, video clip 2 is indicated by a dashed box, and video clip 2 is added to the clip buffer queue.
[0207] The electronic device detects that interaction event 2 has been triggered, which is the same as interaction event 1. First, the electronic device updates the buffer status of video segment 2 in the segment matching queue to an unbuffered state. Then, based on the segment selection strategy corresponding to interaction event 2, the electronic device determines video segment 4 as the target video segment in the segment matching queue. Afterwards, the electronic device updates the buffer status of video segment 4 in the segment matching queue to a buffered state (e.g., ...). Figure 6 As shown in the figure, video clip 4 is indicated by a dashed box, and video clip 4 is added to the clip buffer queue.
[0208] The electronic device detects that interactive event 3 has been triggered. This interactive event 3 is different from interactive event 2, and the video segments corresponding to interactive event 3 are video segments 5 to 6. First, the electronic device initializes the segment matching queue and the segment buffering queue, and adds video segments 5 to 6 to the segment matching queue. At this time, the buffered states of video segments 5 to 6 are all unbuffered. Then, based on the segment selection strategy corresponding to interactive event 3, the electronic device determines video segment 5 as the target video segment in the segment matching queue. Afterwards, the electronic device updates the buffered state of video segment 5 stored in the segment matching queue to a buffered state (e.g., ...). Figure 6 As shown in the figure, video clip 5 is indicated by a dashed box, and video clip 5 is added to the clip buffer queue.
[0209] In some embodiments, to prevent the electronic device from interrupting the currently playing video segment by playing the video segment corresponding to the first interactive event, thereby causing playback abrupt changes and resulting in a poor user experience, the electronic device, before playing the video segment corresponding to the first interactive event, such as... Figure 7 As shown, the electronic device also performs the following process:
[0210] Step 701: Determine whether the video segment corresponding to the previously triggered second interactive event has finished playing.
[0211] In one implementation, before playing the video segment corresponding to the first interactive event, the electronic device can determine whether the video segment corresponding to the previously triggered second interactive event has finished playing. If the video segment corresponding to the second interactive event has finished playing, it means that playing the video segment corresponding to the first interactive event at this time will not cause a playback jump in the video segment. Accordingly, the electronic device can perform step 702 below. If the video segment corresponding to the second interactive event has not finished playing, it means that playing the video segment corresponding to the first interactive event at this time will cause a playback jump in the video segment. Accordingly, the electronic device can perform step 703 below.
[0212] Step 702: If the video segment corresponding to the second interactive event has finished playing, then execute the step of playing the video segment corresponding to the first interactive event according to the segment playback strategy corresponding to the first interactive event.
[0213] In one implementation, if the video segment corresponding to the second interactive event has finished playing, it means that playing the video segment corresponding to the first interactive event at this time will not cause a jump in the playback of the video segment. Accordingly, the electronic device can then play the video segment corresponding to the first interactive event according to the playback strategy for the segment corresponding to the first interactive event.
[0214] Step 703: If the video segment corresponding to the second interactive event has not finished playing, continue playing the video segment corresponding to the second interactive event. After the video segment corresponding to the second interactive event has finished playing, execute the step of playing the video segment corresponding to the first interactive event according to the segment playback strategy corresponding to the first interactive event.
[0215] In one implementation, if the video segment corresponding to the second interactive event has not finished playing, it indicates that playing the video segment corresponding to the first interactive event at this time would cause a playback jump in the video segment. Accordingly, the electronic device can continue playing the video segment corresponding to the second interactive event. Subsequently, after the video segment corresponding to the second interactive event has finished playing, the electronic device can further play the video segment corresponding to the first interactive event according to the playback strategy for the segment corresponding to the first interactive event.
[0216] In this embodiment of the application, the electronic device plays the video segment corresponding to the first interactive event only after the video segment corresponding to the previously triggered second interactive event has finished playing, thereby avoiding playback jumps of video segments and improving the user experience.
[0217] In some embodiments, the configuration file also includes an event transition duration and a playback rate corresponding to at least one video segment. The event transition duration indicates the remaining playback time of the video segment corresponding to the previous interactive event when a new interactive event is detected; the playback rate indicates the playback speed of the currently playing video segment. To reduce interaction latency and improve the user's interactive experience, the process for the electronic device to continue playing the video segment corresponding to the second interactive event is as follows:
[0218] Step 1: Determine the target playback rate based on the playback rate, unplayed duration, and event transition duration of the video segment corresponding to the second interactive event.
[0219] In one implementation, after the electronic device determines that the video segment corresponding to the second interactive event has not been played, it can determine the target playback rate based on the playback rate, unplayed duration, and event transition duration of the video segment corresponding to the second interactive event. The process by which the electronic device determines the target playback rate based on the playback rate, unplayed duration, and event transition duration of the video segment corresponding to the second interactive event will be described later and will not be repeated here.
[0220] Step two: Based on the target playback rate, continue playing the video segment corresponding to the second interactive event.
[0221] In one implementation, after determining the target playback rate, the electronic device can continue playing the video segment corresponding to the second interactive event based on the target playback rate.
[0222] In some embodiments, the process by which the electronic device determines the target playback rate based on the playback rate, unplayed duration, and event transition duration of the video segment corresponding to the second interactive event is as follows:
[0223] Step 1: If the unplayed duration of the video segment corresponding to the second interactive event is less than or equal to the event transition duration, then the playback rate of the video segment corresponding to the second interactive event is determined as the target playback rate.
[0224] In one implementation, after the electronic device determines that the video segment corresponding to the second interactive event has not been played, it can further determine whether the unplayed duration of the video segment corresponding to the second interactive event is less than or equal to the event transition duration. If the unplayed duration of the video segment corresponding to the second interactive event is less than or equal to the event transition duration, it means that continuing to play the video segment corresponding to the second interactive event at its current playback rate will not cause excessive interaction latency in the video segment of the first interactive event. Therefore, the electronic device can determine the playback rate of the video segment corresponding to the second interactive event as the target playback rate. In this way, continuing to play the video segment corresponding to the second interactive event at the target playback rate will not cause excessive interaction latency and affect the user's interactive experience.
[0225] Step 2: If the unplayed duration of the video segment corresponding to the second interactive event is greater than the event transition duration, then the product of the ratio of the unplayed duration of the video segment corresponding to the second interactive event to the event transition duration and the playback rate of the video segment corresponding to the second interactive event is determined as the target playback rate.
[0226] In one implementation, if the unplayed duration of the video segment corresponding to the second interactive event is greater than the event transition duration, it indicates that continuing to play the video segment corresponding to the second interactive event at its current playback rate would result in excessive interaction latency for the video segment of the first interactive event. In this case, the electronic device can accelerate the playback of the video segment corresponding to the second interactive event. Therefore, the electronic device can first calculate the ratio of the unplayed duration of the video segment corresponding to the second interactive event to the event transition duration. Then, the electronic device can multiply this ratio by the playback rate of the video segment corresponding to the second interactive event to determine the target playback rate. In this way, continuing to accelerate the playback of the video segment corresponding to the second interactive event at the determined target playback rate will not cause excessive interaction latency and affect the user's interactive experience.
[0227] In one example, assuming the event transition duration is 200ms, the playback rate of the video segment corresponding to the second interactive event is 1.2. If the unplayed duration of the video segment corresponding to the second interactive event is 150ms, then the target playback rate is 1.2. If the unplayed duration of the video segment corresponding to the second interactive event is 250ms, then the target playback rate is (250 / 200)*1.2 = 1.5.
[0228] In this embodiment of the application, when the unplayed duration of the video segment corresponding to the second interactive event is longer than the event transition duration, the electronic device accelerates the playback of the video segment corresponding to the second interactive event, thereby avoiding excessive interaction latency and affecting the user's interactive experience.
[0229] In some embodiments, if the playback speed is too fast during the accelerated playback of the video segment corresponding to the second interactive event, it will reduce the user's interactive experience. Therefore, before continuing to play the video segment corresponding to the second interactive event based on the target playback rate, the electronic device also performs the following process:
[0230] Step 1: Determine if the target playback rate is greater than the preset maximum playback rate.
[0231] In one implementation, before accelerating the playback of the video segment corresponding to the second interactive event based on the target playback rate, the electronic device can further determine whether the target playback rate is greater than a preset maximum playback rate. If the target playback rate is greater than the preset maximum playback rate, it indicates that the target playback rate is too fast, which will reduce the user's interactive experience. Accordingly, the electronic device can perform step two below. If the target playback rate is less than or equal to the preset maximum playback rate, it indicates that the target playback rate is normal and will not reduce the user's interactive experience. Accordingly, the electronic device may not perform any operation.
[0232] Step 2: If the target playback rate is greater than the maximum playback rate, the target playback rate is updated to the maximum playback rate, and the frame dropping interval is determined based on the event transition duration, the maximum playback rate, the number of unplayed frames corresponding to the video segment corresponding to the second interactive event, and the frame interval.
[0233] In one implementation, if the target playback rate is greater than the maximum playback rate, it indicates that the target playback rate is too fast, which will reduce the user's interactive experience. Accordingly, the electronic device can update the target playback rate to the maximum playback rate and determine the frame dropping interval based on the event transition duration, the maximum playback rate, the number of unplayed frames corresponding to the video segment corresponding to the second interactive event, and the frame interval.
[0234] In one example, assuming the event transition duration is 200ms, the maximum playback rate is 1.25, the number of unplayed frames corresponding to the video segment of the second interactive event is 150, and the frame interval is 2ms, then the frame dropping interval = 150 / (150-200*1.25 / 2) = 6, that is, when the electronic device plays the video segment of the second interactive event, it discards one frame every 6 frames.
[0235] Accordingly, the electronic device continues to play the video segment corresponding to the second interactive event based on the target playback rate as follows: according to the target playback rate and the frame dropping interval, continue to play the video segment corresponding to the second interactive event.
[0236] In one implementation, after the electronic device determines a new target playback rate (which is the maximum playback rate at this time) and a frame drop interval, it can continue to accelerate the playback of the video segment corresponding to the second interactive event based on the determined new target playback rate and frame drop interval.
[0237] In this embodiment of the application, when the target playback rate is greater than the maximum playback rate, the electronic device plays the video segment corresponding to the second interactive event based on the maximum playback rate, and performs frame dropping processing on the video segment corresponding to the second interactive event during playback, thereby improving the user's interactive experience while ensuring the interaction latency.
[0238] In some embodiments, the configuration file also includes the event priority corresponding to at least one interactive event. Based on the event priority corresponding to the interactive event, the electronic device may also perform the following process: during the playback of the video segment corresponding to the first interactive event, if a third interactive event is detected and the event priority of the third interactive event is lower than that of the first interactive event, then the third interactive event is not responded to.
[0239] In one implementation, during the playback of the video segment corresponding to the first interactive event, if the electronic device detects a third interactive event being triggered, and the event priority of the third interactive event is lower than that of the first interactive event, the electronic device will not respond to the third interactive event. This avoids lower-priority interactive events preempting higher-priority interactive events during the playback of video segments with higher-priority interactive events, thus improving the user's interactive experience.
[0240] In some embodiments, to adapt to multi-screen electronic devices (such as foldable phones containing multiple screens), the configuration file also includes screen information corresponding to at least one video segment. The process of the electronic device playing the video segment corresponding to the first interactive event is as follows: in the target screen corresponding to the screen information, the video segment corresponding to the first interactive event is played.
[0241] In one implementation, to adapt to multi-screen electronic devices, such as foldable phones containing multiple screens, the configuration file also includes screen information corresponding to at least one video clip. This screen information indicates which screens the video clip can be played on. For example, screen information of 0 indicates the main screen, screen information of 1 indicates a secondary screen, and screen information of -1 indicates all screens, etc. When the electronic device detects a first interactive event, it can also determine the screen information of the video clip corresponding to that first interactive event in the configuration file. Then, the electronic device can play the video clip corresponding to the first interactive event on the target screen corresponding to the screen information.
[0242] In this embodiment of the application, the electronic device can play the video segment corresponding to the first interactive event on the target screen corresponding to the screen information, thereby adapting to electronic devices with multiple screens.
[0243] In some embodiments, the electronic device may also provide a method for querying interactive topics, such as... Figure 8 As shown, the electronic device performs the following process:
[0244] Step 801: In response to the user's interactive topic query operation, obtain the theme framework version number and interactive capabilities of the electronic device.
[0245] In one implementation, the electronic device, in response to a user's interactive theme query operation in a theme application, obtains the device's theme framework version number and interactive capabilities. The theme framework version number is the software version number of the currently installed theme framework on the electronic device, and this software version number characterizes the compatibility of the interactive wallpapers on the electronic device. This theme framework version number is backward compatible, meaning that higher version themes are compatible with lower version themes. Interactive capabilities characterize the capabilities of the electronic device to support interactive events. For example, if the electronic device supports AO (Awake Attention) and eye-tracking capabilities, then the electronic device can support AO gazing interactive events and eye-tracking interactive events.
[0246] Step 802: Send an interactive topic query request to the cloud server. The interactive topic query request carries the theme framework version number and interactive capabilities of the electronic device.
[0247] In one implementation, after the interactive theme designer uploads the designed interactive theme to the cloud server, the cloud server can obtain the theme framework version number requirement and interactive capability requirement corresponding to the interactive theme from the interactive theme's configuration file. Once the electronic device obtains the theme framework version number and interactive capabilities, it can send an interactive theme query request to the cloud server. This interactive theme query request carries the electronic device's theme framework version number and interactive capabilities.
[0248] Step 803: Receive the interactive topic query response sent by the cloud server. The interactive topic query response carries the target interactive topic, and the electronic device's topic framework version number and interactive capabilities satisfy the topic framework version number requirements and interactive capability requirements contained in the target interactive topic's configuration file, respectively.
[0249] In one implementation, after receiving an interactive topic query request from an electronic device, the cloud server can further query a target interactive topic that matches the electronic device's theme framework version number and interactive capabilities, based on the topic framework version number and interactive capabilities. A matched target interactive topic is defined as one where the electronic device's theme framework version number is higher than or equal to the target interactive topic's theme framework version number requirement, and the electronic device's interactive capabilities include the target interactive topic's interactive capability requirements. Then, the cloud server can send an interactive topic query response to the electronic device, which carries the target interactive topic. Correspondingly, the electronic device can receive the interactive topic query response carrying the target interactive topic from the cloud server.
[0250] Step 804: Display the target interactive theme.
[0251] In one implementation, after the electronic device obtains the target interactive theme, it can further display the target interactive theme in the interface of the theme application for the user to download and use.
[0252] In this embodiment of the application, when an electronic device queries an interactive theme, it sends the theme framework version number and interactive capabilities of the electronic device to the cloud server, thereby obtaining the interactive themes that the electronic device can use. This avoids the problem of downloaded interactive themes being unusable, and thus improves the user's interactive experience.
[0253] Figures 9A to 9C This is a schematic diagram of an interactive video clip provided in an embodiment of this application. Figure 9A The video clip shown is a person breathing video clip, which can be played in a loop when the electronic device screen is on. Figure 9B The video clip shown is a video clip of a person greeting someone. This video clip can be played once when a short AO gaze interaction event is detected on an electronic device in a screen-off scene. Figure 9C The video clip shown is a video clip of a person waving. This video clip can be used when a long-term AO (Awake Attention) interaction event is detected on an electronic device with the screen off. Figure 9B The video clip shown will be played once.
[0254] Based on the above Figures 9A to 9C The configuration file includes: <video clip:> Figure 9A Screen Information: Full Screen; Interactive Event: Screen-on Interactive Event; Segment Selection Strategy: Sequential; Segment Control Strategy: Loop; Transaction Priority: 0; Playback Rate: 1; frame_init_begin=0, frame_init_end=10, frame_loop_begin=11, frame_loop_end=50, frame_back_begin=51, frame_back_end=90, frame_exit_begin=91, frame_exit_end=99>; <Video Segment: Figure 9B Interactive Event: AO Interactive Event, Event Value: 1, Specification Mode: 1*1, 1*2, Duration: 0, Starting Point X-coordinate (trigger_on_begin_x): 0, Starting Point Y-coordinate (trigger_on_begin_y): 0, Ending Point X-coordinate (trigger_on_end_x): 1, Ending Point Y-coordinate (trigger_on_end_y): 1, Vibration Duration: 500, Transaction Priority: 200; Segment Selection Strategy: Random; Segment Control Strategy: Single >; <Video Segment: Figure 9CInteractive event: AO interactive event, event value: 1, specification mode: 1*1, 1*2, duration: 2000, starting point x-coordinate (trigger_on_begin_x): 0, starting point y-coordinate (trigger_on_begin_y): 0, ending point x-coordinate (trigger_on_end_x): 1, ending point y-coordinate (trigger_on_end_y): 1, vibration duration: 500, transaction priority: 100; fragment selection strategy: continuous; fragment control strategy: single >.
[0255] Figure 10 This is a schematic diagram of an interactive theme framework provided in an embodiment of this application. Figure 10 As shown, the interactive theme is stored on a cloud server. The theme application is divided into an interface layer, a control layer, an interaction layer, and an adaptation layer. The interface layer contains the theme service and theme engine; the control layer contains the theme interaction logic and interactive playback control; the interaction layer includes an event decomposer, a video encoder, a response actuator, and a theme configuration parser; and the adaptation layer includes sensors for AO gaze, eye tracking, audio airflow, inertial measurement, and motion vibration.
[0256] Figure 11 This is a signaling interaction diagram for an interactive theme provided in an embodiment of this application. For example... Figure 11 As shown, electronic devices use interactive themes. The theme management system decompresses the theme package and sends theme switching broadcasts to both the system user interface (UI) and the theme management service. The theme management service parses the interactive theme's configuration file and creates a theme service. The theme service creates a theme engine, the theme engine creates theme interaction logic, the theme interaction logic creates a theme instance (theme playback control), and the theme playback control creates an event decomposer and a response executor. The theme engine sends a play creation command to the theme interaction logic, and the theme interaction logic sends a play creation command to the theme playback control. When switching display screens, the theme engine sends a screen switching command to the theme interaction logic, and the theme interaction logic sends an adjustment playback command to the theme playback control.
[0257] When an electronic device enters a screen-off scene, the electronic device sends a sleep command to the theme management service, the theme management service sends a theme command to the theme engine, the theme engine sends a command event to the theme interaction logic, and the theme interaction logic sends a pause playback command to the theme playback control.
[0258] When an electronic device enters a screen-on scene, it sends an activity command to the theme management service. The theme management service then sends a theme command to the theme engine. The theme engine sends a command event to the theme interaction logic, which in turn sends a start playback command to the theme playback control. The theme playback control registers interactive events with the event decomposer. In interactive input scenes, the event decomposer sends an interactive event trigger to the theme playback control. The theme playback control then plays a video segment based on the interactive event and sends a start response executor command to the response executor.
[0259] When an electronic device is in an unlocked state, it sends an unlock command to the theme engine. The theme engine receives the unlock command and sends it to the theme interaction logic. The theme interaction logic then sends an adjust playback command to the theme playback control, which in turn sends an unregistered interactive event listener command to the event decomposer. After a video segment finishes playing, the theme playback control sends a playback end command to the theme interaction logic, which in turn sends a stop playback command to the theme playback control.
[0260] When an electronic device switches themes, the theme engine sends a theme destruction command to the theme interaction logic, the theme interaction logic sends a resource destruction command to the theme playback control, and sends an event decomposer destruction command to the event decomposer.
[0261] The foregoing primarily describes the solutions provided in the embodiments of this application from the perspective of an electronic device. It is understood that, in order to achieve the aforementioned functions, the electronic device includes corresponding hardware structures and / or software modules for executing each function. Those skilled in the art should readily recognize that the control method steps of an electronic device described in conjunction with the embodiments disclosed in this application can be implemented in hardware or a combination of hardware and computer software. Whether a function is executed by hardware or by software-driven hardware depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application.
[0262] This application embodiment can divide the above-described electronic device into functional modules or functional units according to the above method examples. For example, each function can be divided into its own functional modules or functional units, or two or more functions can be integrated into one processing module. The integrated module can be implemented in hardware or as a software functional module or functional unit. The module or unit division in this application embodiment is illustrative and represents only one logical functional division; other division methods may be used in actual implementation.
[0263] Other embodiments of this application provide a processing apparatus for interactive topics, such as... Figure 12 As shown, the device includes:
[0264] The first acquisition module 1210 is used to acquire a configuration file and at least one video segment contained in the interactive topic. The configuration file contains at least one interactive event corresponding to at least one video segment and a segment playback strategy corresponding to at least one interactive event.
[0265] The first playback module 1220 is used to play the video segment corresponding to the first interactive event according to the segment playback strategy corresponding to the first interactive event when the first interactive event is detected. The first interactive event is any one of at least one interactive event.
[0266] In one possible implementation, the segment playback strategy includes a segment selection strategy and a segment control strategy; the first playback module 1220 is specifically used for:
[0267] Based on the segment selection strategy corresponding to the first interactive event, the target video segment corresponding to the first interactive event is determined from the video segments corresponding to the first interactive event.
[0268] Based on the segment control strategy corresponding to the first interactive event, the target video segment corresponding to the first interactive event is played.
[0269] In one possible implementation, the first playback module 1220 is specifically used for:
[0270] Based on the segment selection strategy corresponding to the first interactive event, the target video segment corresponding to the first interactive event is determined in the segment matching queue, which stores the video segment corresponding to the first interactive event.
[0271] In one possible implementation, the first playback module 1220 is specifically used for:
[0272] Add the target video clip to the clip buffer queue and update the buffer status of the target video clip in the clip matching queue to the buffered status;
[0273] Read the target video segment from the segment buffer queue and play the target video segment based on the segment control strategy corresponding to the first interactive event.
[0274] In one possible implementation, the device further includes:
[0275] The first judgment module is used to determine whether the first interactive event is the same as the previously triggered second interactive event;
[0276] The module is used to initialize the segment matching queue and the segment buffer queue if the first interactive event is different from the second interactive event, and to add the video segment corresponding to the first interactive event to the segment matching queue.
[0277] The update module is used to update the buffered state of the video segment in the segment matching queue to an unbuffered state if the first interactive event is the same as the second interactive event, and to trigger the first playback module 1220 to execute the segment selection strategy based on the first interactive event, and to determine the target video segment corresponding to the first interactive event in the segment matching queue.
[0278] In one possible implementation, the device further includes:
[0279] The second judgment module is used to determine whether the video segment corresponding to the previously triggered second interactive event has finished playing.
[0280] The first determining module is used to trigger the first playback module 1220 to execute the step of playing the video segment corresponding to the first interactive event according to the segment playback strategy corresponding to the first interactive event if the video segment corresponding to the second interactive event has finished playing.
[0281] The second playback module is used to continue playing the video segment corresponding to the second interactive event if the video segment corresponding to the second interactive event has not been played in time, and to trigger the first playback module 1220 to execute the step of playing the video segment corresponding to the first interactive event according to the segment playback strategy of the first interactive event after the video segment corresponding to the second interactive event has been played in time.
[0282] In one possible implementation, the configuration file also includes the event transition duration and the playback rate corresponding to at least one video segment; the second playback module is specifically used for:
[0283] The target playback rate is determined based on the playback rate, unplayed duration, and event transition duration of the video segment corresponding to the second interactive event;
[0284] Based on the target playback rate, continue playing the video segment corresponding to the second interactive event.
[0285] In one possible implementation, the second playback module is specifically used for:
[0286] If the unplayed duration of the video segment corresponding to the second interactive event is less than or equal to the event transition duration, then the playback rate of the video segment corresponding to the second interactive event is determined as the target playback rate.
[0287] If the unplayed duration of the video segment corresponding to the second interactive event is greater than the event transition duration, then the product of the ratio of the unplayed duration of the video segment corresponding to the second interactive event to the event transition duration and the playback rate of the video segment corresponding to the second interactive event is determined as the target playback rate.
[0288] In one possible implementation, the device further includes:
[0289] The third judgment module is used to determine whether the target playback rate is greater than the preset maximum playback rate;
[0290] The second determining module is used to update the target playback rate to the maximum playback rate if the target playback rate is greater than the maximum playback rate, and to determine the frame dropping interval based on the event transition duration, the maximum playback rate, the number of unplayed frames and the frame interval corresponding to the video segment corresponding to the second interactive event.
[0291] The second playback module is specifically used for:
[0292] The third playback module is used to continue playing the video segment corresponding to the second interactive event based on the target playback rate and the frame drop interval.
[0293] In one possible implementation, the configuration file also includes an event priority corresponding to at least one interactive event, and the device further includes:
[0294] The third determining module is used to determine whether to respond to the third interactive event if a third interactive event is detected during the playback of the video segment corresponding to the first interactive event, and the event priority of the third interactive event is lower than that of the first interactive event.
[0295] In one possible implementation, the configuration file also includes screen information corresponding to at least one video segment; the first playback module 1220 is specifically used for:
[0296] On the target screen corresponding to the screen information, play the video clip corresponding to the first interactive event.
[0297] In one possible implementation, the device further includes:
[0298] The second acquisition module is used to respond to the user's interactive topic query operation and obtain the theme framework version number and interactive capabilities of the electronic device;
[0299] The sending module is used to send interactive topic query requests to the cloud server. The interactive topic query request carries the topic framework version number and interactive capabilities of the electronic device.
[0300] The receiving module is used to receive the interactive topic query response sent by the cloud server. The interactive topic query response carries the target interactive topic. The topic framework version number and interactive capabilities of the electronic device respectively meet the topic framework version number requirements and interactive capability requirements contained in the configuration file of the target interactive topic.
[0301] The display module is used to display the target interactive theme.
[0302] Other embodiments of this application provide a control device for an electronic device that can perform the functions of the aforementioned electronic device, such as a mobile phone. Figure 13 As shown, the device includes: a display screen 1301, a memory 1302, a processor 1303, and a communication module 1304. These components can be connected via one or more communication buses 1305. The display screen 1301 may include a display panel 13011 and a touch sensor 13012. The display panel 13011 displays images, and the touch sensor 13012 transmits detected touch operations to the application processor to determine the type of touch event. The display panel 13011 provides visual output related to the touch operation. The processor 1303 may include one or more processing units, such as an application processor, a modem processor, a graphics processor, an image signal processor, a controller, a video codec, a digital signal processor, a baseband processor, and / or a neural network processor. Different processing units may be independent devices or integrated into one or more processors. The memory 1302 is coupled to the processor 1303 and is used to store various software programs and / or computer instructions. The memory 1302 may include volatile memory and / or non-volatile memory. When the processor executes computer instructions, the electronic device can perform the various functions or steps performed by the mobile phone in the above method embodiments.
[0303] This application also provides a computer-readable storage medium, which includes computer instructions that, when the computer instructions are used in the aforementioned electronic device (such as...), Figure 2 When the electronic device 100 shown is run, it causes the electronic device to perform the various functions or steps performed by the mobile phone in the above method embodiment.
[0304] This application also provides a computer program product that, when run on a computer, causes the computer to perform the various functions or steps performed by the mobile phone in the above method embodiments.
[0305] Through the above description of the embodiments, those skilled in the art can clearly understand that, for the sake of convenience and brevity, only the division of the above functional modules is used as an example. In actual applications, the above functions can be assigned to different functional modules as needed, that is, the internal structure of the device can be divided into different functional modules to complete all or part of the functions described above.
[0306] In the several embodiments provided in this application, it should be understood that the disclosed apparatus and methods can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative; for instance, the division of modules or units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another device, or some features may be ignored or not executed. Furthermore, the mutual coupling or direct coupling or communication connection shown or discussed may be through some interfaces; the indirect coupling or communication connection between devices or units may be electrical, mechanical, or other forms.
[0307] The units described as separate components may or may not be physically separate. A component shown as a unit can be one or more physical units; that is, it can be located in one place or distributed in multiple different locations. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.
[0308] Furthermore, the functional units in the various embodiments of this application can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit.
[0309] If the integrated unit is implemented as a software functional unit and sold or used as an independent product, it can be stored in a readable storage medium. Based on this understanding, the technical solutions of the embodiments of this application, essentially or in other words, the parts that contribute to the prior art, or all or part of the technical solutions, can be embodied in the form of a software product. This software product is stored in a storage medium and includes several instructions to cause a device (which may be a microcontroller, chip, etc.) or processor to execute all or part of the steps of the methods described in the various embodiments of this application. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.
[0310] The above description is merely a specific embodiment of this application, but the scope of protection of this application is not limited thereto. Any variations or substitutions within the technical scope disclosed in this application should be included within the scope of protection of this application. Therefore, the scope of protection of this application should be determined by the scope of the claims.
Claims
1. A method for processing interactive themes, characterized in that, The method includes: Obtain a configuration file and at least one video clip contained in the interactive theme, wherein the configuration file contains at least one interactive event corresponding to the at least one video clip and a clip playback strategy corresponding to the at least one interactive event; Upon detecting the triggering of a first interactive event, the video segment corresponding to the first interactive event is played according to the segment playback strategy corresponding to the first interactive event, wherein the first interactive event is any one of the at least one interactive events.
2. The method according to claim 1, characterized in that, The segment playback strategy includes a segment selection strategy and a segment control strategy; playing the video segment corresponding to the first interactive event according to the segment playback strategy corresponding to the first interactive event includes: Based on the segment selection strategy corresponding to the first interactive event, the target video segment corresponding to the first interactive event is determined in the video segment corresponding to the first interactive event. Based on the segment control strategy corresponding to the first interactive event, the target video segment corresponding to the first interactive event is played.
3. The method according to claim 2, characterized in that, The step of determining the target video segment corresponding to the first interactive event from the video segments corresponding to the first interactive event based on the segment selection strategy corresponding to the first interactive event includes: Based on the segment selection strategy corresponding to the first interactive event, the target video segment corresponding to the first interactive event is determined in the segment matching queue, which stores the video segment corresponding to the first interactive event.
4. The method according to claim 3, characterized in that, The step of playing the target video segment corresponding to the first interactive event based on the segment control strategy corresponding to the first interactive event includes: The target video segment is added to the segment buffer queue, and the buffer status of the target video segment in the segment matching queue is updated to the buffered status. The target video segment is read from the segment buffer queue and played based on the segment control strategy corresponding to the first interactive event.
5. The method according to claim 3, characterized in that, Before determining the target video segment corresponding to the first interactive event in the segment matching queue based on the segment selection strategy corresponding to the first interactive event, the method further includes: Determine whether the first interactive event is the same as the previously triggered second interactive event; If the first interactive event is different from the second interactive event, the segment matching queue and the segment buffer queue are initialized, and the video segment corresponding to the first interactive event is added to the segment matching queue. If the first interactive event is the same as the second interactive event, then the buffered state of the video segment in the segment matching queue is updated to an unbuffered state, and the step of determining the target video segment corresponding to the first interactive event in the segment matching queue based on the segment selection strategy corresponding to the first interactive event is executed.
6. The method according to claim 1, characterized in that, The method further includes: Determine whether the video segment corresponding to the previously triggered second interactive event has finished playing; If the video segment corresponding to the second interactive event finishes playing, then the step of playing the video segment corresponding to the first interactive event according to the segment playback strategy corresponding to the first interactive event is executed. If the video segment corresponding to the second interactive event has not finished playing, then continue playing the video segment corresponding to the second interactive event, and after the video segment corresponding to the second interactive event has finished playing, execute the step of playing the video segment corresponding to the first interactive event according to the segment playback strategy corresponding to the first interactive event.
7. The method according to claim 6, characterized in that, The configuration file also includes the event transition duration and the playback rate corresponding to the at least one video segment; continuing to play the video segment corresponding to the second interactive event includes: The target playback rate is determined based on the playback rate, unplayed duration, and event transition duration of the video segment corresponding to the second interactive event; Based on the target playback rate, continue playing the video segment corresponding to the second interactive event.
8. The method according to claim 7, characterized in that, Determining the target playback rate based on the playback rate, unplayed duration, and event transition duration of the video segment corresponding to the second interactive event includes: If the unplayed duration of the video segment corresponding to the second interactive event is less than or equal to the event transition duration, then the playback rate of the video segment corresponding to the second interactive event is determined as the target playback rate. If the unplayed duration of the video segment corresponding to the second interactive event is greater than the event transition duration, then the product of the ratio of the unplayed duration of the video segment corresponding to the second interactive event to the event transition duration and the playback rate of the video segment corresponding to the second interactive event is determined as the target playback rate.
9. The method according to claim 7, characterized in that, Before continuing to play the video segment corresponding to the second interactive event based on the target playback rate, the method further includes: Determine whether the target playback rate is greater than the preset maximum playback rate; If the target playback rate is greater than the maximum playback rate, the target playback rate is updated to the maximum playback rate, and the frame dropping interval is determined based on the event transition duration, the maximum playback rate, the number of unplayed frames and the frame interval corresponding to the video segment corresponding to the second interactive event. The step of continuing to play the video segment corresponding to the second interactive event based on the target playback rate includes: Based on the target playback rate and the frame drop interval, continue playing the video segment corresponding to the second interactive event.
10. The method according to claim 1, characterized in that, The configuration file also includes the event priority corresponding to the at least one interactive event, and the method further includes: If a third interactive event is detected during the playback of the video segment corresponding to the first interactive event, and the event priority of the third interactive event is lower than that of the first interactive event, then the third interactive event will not be responded to.
11. The method according to claim 1, characterized in that, The configuration file also includes screen information corresponding to the at least one video segment; playing the video segment corresponding to the first interactive event includes: On the target screen corresponding to the screen information, the video clip corresponding to the first interactive event is played.
12. The method according to claim 1, characterized in that, The method further includes: In response to user interactive topic query operations, obtain the theme framework version number and interactive capabilities of the electronic device; Send an interactive topic query request to the cloud server. The interactive topic query request carries the topic framework version number and interactive capabilities of the electronic device. The device receives an interactive topic query response sent by the cloud server. The interactive topic query response carries a target interactive topic. The theme framework version number and interactive capabilities of the electronic device respectively meet the theme framework version number requirements and interactive capability requirements contained in the configuration file of the target interactive topic. Display the target interactive theme.
13. An electronic device, characterized in that, The electronic device includes: a processor and a memory; the memory is coupled to the processor; the memory stores computer program code, the computer program code including computer instructions, which, when executed by the processor, cause the electronic device to perform the method as described in any one of claims 1-12.
14. A computer-readable storage medium, characterized in that, Includes computer instructions that, when executed on an electronic device, cause the electronic device to perform the method as described in any one of claims 1 to 12.