Screen special effect adaptation method and device, electronic equipment, storage medium and program
By using interface tools and mapping tables, screen effect resources are matched according to the device model, solving the problem of mismatch between video effects and screen corner sizes, achieving efficient screen effect adaptation, and improving visual effects and resource utilization efficiency.
Patent Information
- Application Number
- CN202511241259.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-09-02
- Publication Date
- 2025-12-09
AI Technical Summary
Existing technologies struggle to accurately match video effects with the screen sizes of different electronic devices, resulting in poor visual effects and resource redundancy.
By encapsulating various parameter interfaces through interface tools, matching target parameter interfaces according to device models, obtaining screen corner parameters, and acquiring adapted screen effect resources from resource platforms, including private and general interfaces, as well as the use of mapping tables, accurate matching is ensured.
It achieves precise matching between screen effects and the corners of the device screen, improving visual effects and user experience while avoiding resource redundancy.
Smart Images

Figure CN121092104A_ABST
Abstract
Description
TECHNICAL FIELD
[0001] Embodiments of the present application relate to the technical field of video processing, and in particular to a screen special effect adaptation method and device, electronic equipment, storage medium and program. BACKGROUND
[0002] In the process of running an application on a screen, the application will load a video special effect. However, the loading of the video special effect is often closely related to the size of the screen, especially the size of the screen corners.
[0003] Specifically, the video special effect may be, for example, a flowing light, a neon flicker, a gradient fill, a dynamic highlight, a flame smoke, or other video effects, and the video special effect is often implemented at the corners of the screen, that is, by implementing a special effect that completely fits the corner size at the corners of the screen, thereby achieving an immersive special visual effect.
[0004] Therefore, when implementing a screen special effect, it is necessary to adapt the special effect video to the corner size of the current screen. If the loaded special effect cannot adapt to the corner size of the current screen, it is difficult to achieve a good visual effect, and the corner sizes of various electronic devices often differ.
[0005] In current practice, in the process of loading a screen special effect resource, the corner size of the current screen needs to be obtained first, so that a screen special effect resource adapted to the corner size is loaded. However, since different electronic devices are often manufactured by different manufacturers, it is often difficult to obtain the corner sizes of various different devices. SUMMARY
[0006] Therefore, embodiments of the present disclosure propose a screen special effect adaptation method and device, electronic equipment, storage medium and program.
[0007] In a first aspect, embodiments of the present disclosure provide a screen special effect adaptation method, which comprises:
[0008] In response to receiving a corner adaptation instruction, accessing a preset interface tool, the corner adaptation instruction being used to indicate obtaining a screen special effect resource adapted to the screen corner of the current device, and the interface tool encapsulating a plurality of parameter interfaces;
[0009] Determining a target parameter interface matched with the current device from the plurality of parameter interfaces of the interface tool;
[0010] Obtaining a target corner parameter of the screen corner from the current device using the target parameter interface;
[0011] Obtaining a screen special effect resource adapted to the target corner parameter from a preset resource platform, and playing the screen special effect resource.
[0012] In some alternative implementations, the multiple parameter interfaces in the interface tool include proprietary parameter interfaces that point to different device models respectively;
[0013] Accordingly, the target parameter interface matching the current device is determined from multiple parameter interfaces of the interface tool, including:
[0014] Query the target device model for the current device;
[0015] Determine if any of the multiple parameter interfaces in the interface tool contain a private parameter interface that points to the target device model;
[0016] In response to the determination that a private parameter interface pointing to the target device model exists, the private parameter interface pointing to the target device model is determined as the target parameter interface.
[0017] In some alternative implementations, the multiple parameter interfaces in the interface tool may also include a generic parameter interface pointing to multiple device models;
[0018] Accordingly, after determining whether a private parameter interface pointing to the target device model exists among the multiple parameter interfaces in the interface tool, the method further includes:
[0019] In response to the determination that there is no private parameter interface pointing to the target device model, the general parameter interface is determined as the target parameter interface.
[0020] In some alternative implementations, before obtaining screen effect resources adapted to the target corner parameters from a preset resource platform, the method further includes:
[0021] Upon receiving a corner adaptation instruction, query the target device model of the current device;
[0022] A preset mapping table is used to represent the correspondence between the device model and each side parameter;
[0023] The corner parameters corresponding to the target device model in the mapping table are determined as the target corner parameters.
[0024] In some alternative implementations, the method further includes, before accessing a preset interface tool in response to receiving an edge adaptation instruction:
[0025] Configure screen effect resources in the resource platform that are adapted to the target corner parameters.
[0026] In some alternative implementations, the screen effects resource includes multiple image frames;
[0027] Accordingly, the screen effects resources include:
[0028] The left half of each image frame is encoded using the color channel, and the right half is encoded using the alpha channel to obtain the encoded image frame.
[0029] The encoded image frames are decoded and played back to obtain a semi-transparent special effect.
[0030] Secondly, embodiments of this disclosure provide a screen effects adaptation device, the device comprising:
[0031] The tool access module is configured to access a preset interface tool in response to receiving a corner adaptation instruction. The corner adaptation instruction is used to indicate the acquisition of screen effect resources that adapt to the screen corners of the current device. The interface tool encapsulates multiple parameter interfaces.
[0032] The interface determination module is configured to determine the target parameter interface that matches the current device from multiple parameter interfaces of the interface tool;
[0033] The parameter acquisition module is configured to obtain the target corner parameters of the screen corners from the current device using the target parameter interface;
[0034] The special effects adaptation module is configured to obtain screen effects resources that are adapted to the target corner parameters from a preset resource platform and play the screen effects resources.
[0035] In some alternative implementations, the multiple parameter interfaces in the interface tool include private parameter interfaces pointing to different device models, and a general parameter interface pointing to multiple device models.
[0036] Accordingly, the interface determination module is further configured as follows:
[0037] Query the target device model for the current device;
[0038] Determine if any of the multiple parameter interfaces in the interface tool contain a private parameter interface that points to the target device model;
[0039] In response to the determination that a private parameter interface pointing to the target device model exists, the private parameter interface pointing to the target device model is determined as the target parameter interface.
[0040] In response to the determination that there is no private parameter interface pointing to the target device model, the general parameter interface is determined as the target parameter interface.
[0041] In some alternative implementations, the screen effects adaptation device also includes a mapping module configured to:
[0042] Before retrieving screen effect resources that match the target corner parameters from the preset resource platform, perform the following operations:
[0043] Upon receiving a corner adaptation instruction, query the target device model of the current device;
[0044] Obtain a preset mapping table, which is used to represent the correspondence between the device model and each side parameter;
[0045] The corner parameters corresponding to the target device model in the mapping table are determined as the target corner parameter effects.
[0046] In some alternative implementations, the screen effects adaptation device further includes a configuration module configured to:
[0047] Before accessing the default interface tool in response to receiving the corner adaptation instruction, perform the following operations:
[0048] Configure screen effect resources in the resource platform that are adapted to the target corner parameters.
[0049] In some alternative implementations, the screen effects resource includes multiple image frames;
[0050] Accordingly, the special effects adaptation module is further configured as follows:
[0051] The left half of each image frame is encoded using the color channel, and the right half is encoded using the alpha channel to obtain the encoded image frame.
[0052] The encoded image frames are decoded and played back to obtain a semi-transparent special effect.
[0053] Thirdly, embodiments of this disclosure provide an electronic device, including: one or more processors; and a storage device having one or more programs stored thereon, which, when executed by the one or more processors, cause the one or more processors to implement the method described in any implementation of the first aspect.
[0054] Fourthly, embodiments of this disclosure provide a computer-readable storage medium having a computer program stored thereon, wherein the computer program, when executed by one or more processors, implements the method as described in any implementation of the first aspect.
[0055] Fifthly, embodiments of this disclosure provide a computer program product, including a computer program / instructions that, when executed by a processor, implement the method described in any of the implementations of the first aspect.
[0056] To address the challenge of adapting video effects to screen corner dimensions, the screen effect adaptation method, apparatus, electronic device, storage medium, and program disclosed herein, upon receiving a corner adaptation instruction, can intelligently and accurately match the applicable target parameter interface based on the current device model using an interface tool pre-encapsulated with multiple parameter interfaces. This efficiently and accurately obtains the target corner parameters of the screen. Furthermore, based on these target corner parameters, the adapted screen effect resources are dynamically acquired from the resource platform and played, achieving precise matching between screen effects and device screen corners. This effectively improves visual effects and user experience while avoiding resource redundancy issues caused by packaging screen effect resources with different corner parameters into the application. Attached Figure Description
[0057] Other features, objects, and advantages of this disclosure will become more apparent from the following detailed description of non-limiting embodiments with reference to the accompanying drawings. The drawings are for illustrative purposes only and are not intended to limit the invention. In the drawings:
[0058] Figure 1 This is an exemplary system architecture diagram to which one embodiment of this disclosure may be applied;
[0059] Figure 2 A flowchart of one embodiment of the screen effects adaptation method according to the present disclosure;
[0060] Figure 3 This is an exploded flowchart of one embodiment of step 202 according to the present disclosure;
[0061] Figure 4 This is a flowchart of another embodiment of obtaining target corner parameters according to the present disclosure;
[0062] Figure 5 This is an exploded flowchart of one embodiment of step 204 according to the present disclosure;
[0063] Figure 6 This is a schematic diagram of the structure of one embodiment of the screen effects adaptation device according to the present disclosure;
[0064] Figure 7 A schematic diagram of the structure of a computer system suitable for implementing embodiments of the present disclosure. Detailed Implementation
[0065] The present disclosure will now be described in further detail with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the invention and not intended to limit it. Furthermore, it should be noted that, for ease of description, only the parts relevant to the invention are shown in the accompanying drawings.
[0066] It should be noted that, unless otherwise specified, the embodiments and features described in this disclosure can be combined with each other. This disclosure will now be described in detail with reference to the accompanying drawings and embodiments.
[0067] Figure 1 An exemplary system architecture 100 is shown, in which embodiments of the screen effects adaptation methods, apparatuses, electronic devices, storage media and programs of this disclosure can be applied.
[0068] like Figure 1 As shown, system architecture 100 may include terminal devices 101, 102, and 103, a network 104, and a server 105. Network 104 serves as the medium for providing communication links between terminal devices 101, 102, and 103 and server 105. Network 104 may include various connection types, such as wired or wireless communication links, or fiber optic cables, etc.
[0069] Users can use terminal devices 101, 102, and 103 to interact with server 105 via network 104 to receive or send messages, etc. Various communication client applications can be installed on terminal devices 101, 102, and 103, such as natural language processing applications, large model applications, speech recognition applications, short video social applications, audio and video conferencing applications, web browser applications, shopping applications, search applications, instant messaging tools, email clients, social platform software, etc.
[0070] Terminal devices 101, 102, and 103 can be either hardware or software. When terminal devices 101, 102, and 103 are hardware, they can be various electronic devices with sound acquisition devices (e.g., microphones), video acquisition devices (e.g., cameras), and displays, including but not limited to smartphones, tablets, e-book readers, MP3 players (Moving Picture Experts Group Audio Layer III), MP4 players (Moving Picture Experts Group Audio Layer IV), laptops, and desktop computers, etc. When terminal devices 101, 102, and 103 are software, they can be installed on the terminal devices listed above. They can be implemented as multiple software programs or software modules (e.g., to provide task management related services) or as a single software program or software module. No specific limitations are made here.
[0071] In some cases, the screen effect adaptation method provided in this disclosure can be executed by terminal devices 101, 102, and 103, and correspondingly, the screen effect adaptation device can be set in terminal devices 101, 102, and 103. In this case, the system architecture 100 may not include server 105.
[0072] In some cases, the screen effect adaptation method provided in this disclosure can be jointly executed by terminal devices 101, 102, and 103 and server 105. For example, the step of "accessing a preset interface tool in response to receiving an edge adaptation instruction" can be executed by terminal devices 101, 102, and 103, and the step of "determining a target parameter interface that matches the current device from multiple parameter interfaces of the interface tool" can be executed by server 105. This disclosure does not limit this. Correspondingly, screen effect adaptation devices can also be respectively set in terminal devices 101, 102, and 103 and server 105.
[0073] In some cases, the screen effect adaptation method provided in this disclosure can be executed by server 105. Accordingly, the screen effect adaptation device can also be set in server 105. In this case, the system architecture 100 may not include terminal devices 101, 102, and 103.
[0074] It should be noted that server 105 can be either hardware or software. When server 105 is hardware, it can be implemented as a distributed server cluster consisting of multiple servers, or as a single server. When server 105 is software, it can be implemented as multiple software programs or software modules (e.g., used to provide distributed services), or as a single software program or software module. No specific limitations are made here.
[0075] It should be understood that Figure 1 The number of terminal devices, networks, and servers shown is merely illustrative. Depending on implementation needs, any number of terminal devices, networks, and servers can be included.
[0076] It should be noted that the screen effect adaptation method disclosed herein is used to load adapted screen effect resources for the corners of the screen. This method runs on... Figure 1 When the terminal devices 101, 102 and / or 103 are used, the terminal devices 101, 102 and / or 103 can be devices with screens; the screen effects to be loaded can be deployed on the same device as this method, or they can be deployed on server 105; thus, after the terminal device determines the corner size of the screen by running the screen effect adaptation method, the screen effect resources adapted to the corner size are loaded from the server 105.
[0077] Continue to refer to Figure 2The diagram illustrates a flow 200 of an embodiment of the screen effects adaptation method disclosed herein, which includes the following steps 201 to 204:
[0078] Step 201: In response to receiving the corner adaptation instruction, access the preset interface tool.
[0079] The corner adaptation indicator is used to indicate the acquisition of screen effect resources that are adapted to the corners of the current device's screen.
[0080] Specifically, before an application on the current device requests screen effect resources from a resource platform or server, the application may receive a corner adaptation instruction. When the application receives the corner adaptation instruction, it means that the application should select screen effect resources that are adapted to the corners of the current device's screen when loading screen effect resources. If the application does not receive the corner adaptation instruction, it means that the application can disregard the adaptation between the current device's screen corners and the screen effect resources when loading screen effect resources.
[0081] The current device is the electronic device that hosts the application.
[0082] In some alternative implementations, the corner adaptation indicator can be selected by the resource platform, other servers, or servers supporting the operation of the application, based on specific needs or monitoring of each application, and then the corner adaptation indicator can be sent to these multiple applications.
[0083] In this step, the interface tool can be, for example, a software component embedded in an application, which is installed along with the application on the current device.
[0084] This interface tool encapsulates multiple parameter interfaces, each corresponding to a different electronic device. These parameter interfaces can be called by applications, allowing them to obtain the target edge parameters of the current device.
[0085] The target corner parameters can be, for example, the dimensions of the screen corners of the current device, including information such as the radius, arc, and / or perimeter of each of the four rounded corners of the screen.
[0086] In this step, after the application starts, if screen effect resources need to be loaded, it can first determine whether a corner adaptation instruction has been received. If the application receives a corner adaptation instruction, it can then access the interface tool.
[0087] Step 202: Determine the target parameter interface that matches the current device from the multiple parameter interfaces of the interface tool.
[0088] Because different electronic device manufacturers produce different models of electronic devices with different corner parameters on their screens, even though each electronic device runs a device system (e.g., Android) for loading and driving applications, and this device system can provide a common parameter interface in addition to providing the running environment for each application, the common parameter interface provided by the device system cannot be applied to all different models of electronic devices. That is, the corresponding target corner parameters cannot be retrieved in all electronic devices through the common parameter interface.
[0089] Accordingly, the multiple parameter interfaces encapsulated in the interface tool may include parameter interfaces corresponding to different device models. The parameter interfaces of different device models may be provided by the corresponding electronic device manufacturers or obtained through other means. In this disclosure, such parameter interfaces may be treated as private parameter interfaces.
[0090] In addition, since each private parameter interface may also fail, in addition to encapsulating the private parameter interfaces that point to different device models in the interface tool, a general parameter interface can also be encapsulated. Accordingly, the general parameter interface can be used as the parameter interface when all private parameter interfaces cannot match the current device, thereby increasing the probability of successfully obtaining the target corner parameters.
[0091] Based on the access to the interface tool in step 201 above, in this step, after starting the access to the interface tool, the application can search for a parameter interface that matches the current device model from multiple parameter interfaces of the interface tool, and use the searched parameter interface as the target parameter interface applicable to the current device.
[0092] The target parameter interface can be a private parameter interface set for the current device model, or it can be a general parameter interface.
[0093] Step 203: Obtain the target corner parameters of the screen corners from the current device using the target parameter interface.
[0094] Based on the target parameter interface determined in step 202 above, the application can obtain the target corner parameters of the screen corners from the current device by calling the target parameter interface and using the parameter retrieval method in the target parameter interface.
[0095] Step 204: Obtain screen effect resources that match the target corner parameters from the preset resource platform and play the screen effect resources.
[0096] Based on the target corner parameters obtained by the application in step 203 above, the application can request screen effect resources that match the device model of the current device from the resource platform.
[0097] Specifically, when an application requests screen effects resources from a resource platform, it can include target corner parameters in the request.
[0098] Accordingly, when the resource platform receives a request from an application, it can determine the screen effect resource that should be sent to the application based on the target corner parameters carried in the request, and then send the screen effect resource to the application.
[0099] Among them, the screen effect resources distributed by the resource platform can be directly playable effect videos, so that the application can play the effect video directly after receiving it.
[0100] In another scenario, the screen effects resources distributed by the resource platform can also be resource data that requires encoding and decoding before it can be played, such as multiple image frames that require encoding and decoding before they can be played.
[0101] In this scenario, after the application receives the screen effects resources sent by the resource platform, it can encode and decode the screen effects resources to obtain a playable effects video. Based on this, the application can play the effects video that is adapted to the corners of the screen on the current device screen.
[0102] In some alternative implementations, the resource platform pre-configures multiple screen effect resources for the same playback effect, and each screen effect resource is adapted to the corner parameters of different device models.
[0103] For screen effects with the same playback effect, screen effect resources that adapt to custom corner parameters can also be configured in this resource platform.
[0104] Therefore, when an application requests the screen effect resource from the resource platform, it can include the custom corner parameter in the request.
[0105] When the resource platform receives a request carrying custom corner parameters, if the resource platform has pre-configured screen effect resources that are adapted to the custom corner parameters, it will send the screen effect resources adapted to the custom corner parameters to the application.
[0106] Based on this, by responding to the corner adaptation instruction, an interface tool with multiple parameter interfaces is accessed, and the applicable target parameter interface is intelligently matched according to the current device model, thereby efficiently and accurately obtaining the target corner parameters of the screen. Furthermore, based on these target corner parameters, the adapted screen effect resources are dynamically obtained from the resource platform and played, achieving precise matching between screen effects and device screen corners, effectively improving visual effects and user experience, while avoiding resource redundancy issues caused by packaging screen effect resources with different corner parameters into the application.
[0107] Based on the received corner adaptation instruction, in step 202 of this disclosure, during the process of determining the target parameter interface that matches the current device from the interface tool, the matching target parameter interface can be determined by the device model of the current device.
[0108] Specifically, please refer to Figure 3 This illustrates a breakdown process 300 for one embodiment of step 202 of this disclosure.
[0109] The decomposition process 300 includes the following steps 301 to 303:
[0110] Step 301: Query the target device model of the current device.
[0111] Based on the corner adaptation instructions received in the aforementioned steps, during the process of accessing the interface tool, the application can query the target device model of the current device, which can then be used as the basis for determining the target parameter interface in the following steps.
[0112] Step 302: Determine whether there is a private parameter interface pointing to the target device model among the multiple parameter interfaces in the interface tool.
[0113] Based on the target device model queried in step 301 above, the application can search for the existence of a target parameter interface corresponding to the target device model among the multiple parameter interfaces of the interface tool during the access to the interface tool.
[0114] Since each private parameter interface is used for a specific device model, the corresponding private parameter interface is more applicable to the specific device model. Therefore, when searching for a target parameter interface in the interface tool, you can first determine whether there is a private parameter interface among the multiple parameter interfaces that points to the target device model of the current device. In this way, the private parameter interface with better applicability can be selected as the first choice.
[0115] Step 303: In response to determining that a private parameter interface pointing to the target device model exists, the private parameter interface pointing to the target device model is determined as the target parameter interface.
[0116] Based on the judgment in step 302 above, if the judgment result is yes, it can be determined that the interface tool has a private parameter interface that points to the target device model, that is, there is a private parameter interface set for the target device model.
[0117] Therefore, this private parameter interface can be selected as the target parameter interface.
[0118] Step 304: In response to determining that there is no private parameter interface pointing to the target device model, the general parameter interface is determined as the target parameter interface.
[0119] Based on the judgment in step 302 above, if the judgment result is negative, it can be determined that the interface tool does not have a private parameter interface that points to the target device model, that is, there is no private parameter interface set for the target device model.
[0120] In this situation, since the interface tool also encapsulates a general parameter interface, even if the general parameter interface cannot retrieve the corresponding target corner parameters in all electronic devices, that is, the parameter interface cannot be applied to all electronic device models, the general parameter interface still has the possibility of being applicable to the current device model when all private parameter interfaces do not match the current device model.
[0121] Therefore, when none of the private parameter interfaces are private parameter interfaces set for the current device model, the general parameter interface can be determined as the target parameter interface.
[0122] Based on this, the device model and target parameter interface matching and selection mechanism can efficiently and accurately determine the target parameter interface suitable for the current device from a variety of parameter interfaces. By querying the device model, it can prioritize matching the more suitable private interface to obtain the most accurate target corner parameters; if there is no corresponding private interface, it will automatically select the general parameter interface, thereby significantly improving the coverage and reliability of target corner parameter acquisition and ensuring that different models of devices can be adapted to the corresponding screen effect resources.
[0123] In some alternative implementations, for device models that do not have a private parameter interface, a mapping table can be built for them, and the corresponding target corner parameters can be determined through the mapping table.
[0124] Specifically, further reference Figure 4 This illustrates a process 400 of another embodiment of the present disclosure for obtaining target corner parameters. The process 400 includes steps 401 to 403:
[0125] Step 401: In response to receiving the corner adaptation instruction, query the target device model of the current device.
[0126] Among various electronic devices, there are some models that do not have or cannot obtain the corresponding private parameter interfaces because the electronic device manufacturer does not provide the corresponding private parameter interfaces, or because the electronic device model is a newly released product.
[0127] In this case, based on the received corner adaptation indication, a mapping table can be pre-built for the device model, and the corresponding target corner parameters can be obtained through the mapping table.
[0128] Specifically, when the application receives a corner adaptation instruction, it queries the target device parameters of the current device.
[0129] Step 402: Obtain the preset mapping table.
[0130] After finding the target device model in step 401 above, the mapping table can be accessed to obtain the mapping table.
[0131] The mapping table contains one or more different device models, and for each device model, corresponding corner parameters are set.
[0132] Furthermore, based on the various device models and their corresponding corner parameters, a corresponding pointing relationship between each device model and its corresponding corner parameters is also set.
[0133] Step 403: Determine the corner parameters corresponding to the target device model in the mapping table as the target corner parameters.
[0134] Based on the target device model determined in step 401 above, the corresponding corner parameters of the current target device model can be queried according to the corresponding pointing relationship in the mapping table, and these corresponding corner parameters can be used as the target corner parameters of the corresponding target device model.
[0135] Based on this, a mapping table lookup mechanism provides an efficient and reliable way to obtain target corner parameters for device models that do not have private parameter interfaces. That is, by accessing the preset mapping table through the current device model, the target corner parameters are directly queried and returned according to the correspondence between the device model and corner parameters in the table. This effectively supplements the limitations of the coverage of interface tools, and is especially suitable for new electronic devices or niche electronic devices, ensuring the comprehensiveness and accuracy of screen effect resource adaptation.
[0136] refer to Figure 5 The diagram illustrates a decomposition process 500 of one embodiment of step 204 of this disclosure. This decomposition process 500 includes the following steps 501 to 502:
[0137] Step 501: Encode the left half of each image frame using the color channel and the right half using the alpha channel to obtain the encoded image frame.
[0138] Based on the obtained screen effects resources, they can be converted into videos with special effects, such as AlphaVideo files (video files with an alpha channel).
[0139] The screen effect resource can be, for example, a data resource containing multiple image frames.
[0140] In this step, the left and right halves of each image frame can be encoded in different ways to obtain encoded image frames.
[0141] Specifically, taking the encoded image frame as an AlphaVideo file as an example, the left half of each image frame can be color encoded using the RGB channel (color channel), and the right half of each image frame can be transparently encoded using the transparency channel, thus obtaining an AlphaVideo file after encoding.
[0142] Step 502: Decode and play the encoded image frame to obtain a semi-transparent special effect.
[0143] Based on the encoded image frame in step 501 above, it can be decoded and played to obtain the corresponding special effects.
[0144] Specifically, by decoding and playing the encoded AlphaVideo file, a special effects video formed by semi-transparent image frames can be obtained.
[0145] Based on this, the AlphaVideo encoding and decoding mechanism enables efficient rendering and playback of high-fidelity semi-transparent effects. By encoding the left half of the image frame with color channels and the right half with transparency channels, a composite effect video with both color and transparency information is generated. During playback, real-time decoding and channel synthesis are used to accurately restore the required semi-transparent effect.
[0146] Further reference Figure 6 As an implementation of the methods shown in the above figures, this disclosure provides an embodiment of a screen effects adaptation device, which is similar to... Figure 2 Corresponding to the method embodiments shown, this device can be specifically applied to various electronic devices.
[0147] like Figure 6As shown, the screen effect adaptation device 600 of this embodiment includes: a tool access module 601, an interface determination module 602, a parameter acquisition module 603, and an effect adaptation module 604. The tool access module 601 is configured to access a preset interface tool in response to receiving a corner adaptation instruction. The corner adaptation instruction indicates the acquisition of screen effect resources adapted to the screen corners of the current device. The interface tool encapsulates multiple parameter interfaces. The interface determination module 602 is configured to determine a target parameter interface matching the current device from the multiple parameter interfaces of the interface tool. The parameter acquisition module 603 is configured to acquire target corner parameters of the screen corners from the current device using the target parameter interface. The effect adaptation module 604 is configured to acquire screen effect resources adapted to the target corner parameters from a preset resource platform and play the screen effect resources.
[0148] In this embodiment, the specific processing of the tool access module 601, interface determination module 602, parameter acquisition module 603, and effect adaptation module 604 of the screen effect adaptation device 600, and the resulting technical effects, can be found by referring to [reference needed]. Figure 2 The relevant descriptions of steps 201, 202, 203 and 204 in the corresponding embodiments will not be repeated here.
[0149] In some alternative implementations, the multiple parameter interfaces in the interface tool include private parameter interfaces pointing to different device models, and a general parameter interface pointing to multiple device models.
[0150] Accordingly, the interface determination module 602 is further configured as follows:
[0151] Query the target device model for the current device;
[0152] Determine if any of the multiple parameter interfaces in the interface tool contain a private parameter interface that points to the target device model;
[0153] In response to the determination that a private parameter interface pointing to the target device model exists, the private parameter interface pointing to the target device model is determined as the target parameter interface.
[0154] In response to the determination that there is no private parameter interface pointing to the target device model, the general parameter interface is determined as the target parameter interface.
[0155] In some alternative implementations, the screen effects adaptation device further includes a mapping module 605, configured to:
[0156] Before retrieving screen effect resources that match the target corner parameters from the preset resource platform, perform the following operations:
[0157] Upon receiving a corner adaptation instruction, query the target device model of the current device;
[0158] Obtain a preset mapping table, which is used to represent the correspondence between device models and edge parameters;
[0159] The corner parameters corresponding to the target device model in the mapping table are determined as the target corner parameters.
[0160] In some alternative implementations, the screen effects adaptation device further includes a configuration module 606, configured to:
[0161] Before accessing the default interface tool in response to receiving the corner adaptation instruction, perform the following operations:
[0162] Configure screen effect resources in the resource platform that are adapted to the target corner parameters.
[0163] In some alternative implementations, the screen effects resource includes multiple image frames;
[0164] Accordingly, the special effects adaptation module 604 is further configured as follows:
[0165] The left half of each image frame is encoded using the color channel, and the right half is encoded using the alpha channel to obtain the encoded image frame.
[0166] The encoded image frames are decoded and played back to obtain a semi-transparent special effect.
[0167] It should be noted that the implementation details and technical effects of each unit in the screen effect adaptation device provided in the embodiments of this disclosure can be referred to the descriptions of other embodiments in this disclosure, and will not be repeated here.
[0168] The following is for reference. Figure 7 It shows a schematic diagram of the structure of a computer system 700 suitable for implementing the electronic device of the present disclosure. Figure 7 The computer system 700 shown is merely an example and should not be construed as limiting the functionality and scope of the embodiments of this disclosure.
[0169] like Figure 7As shown, the computer system 700 may include a processing device (e.g., a central processing unit, a graphics processing unit, etc.) 701, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 702 or a program loaded from a storage device 708 into a random access memory (RAM) 703. The RAM 703 also stores various programs and data required for the operation of the computer system 700. The processing device 701, ROM 702, and RAM 703 are interconnected via a bus 704. An input / output (I / O) interface 705 is also connected to the bus 704.
[0170] Typically, the following devices can be connected to I / O interface 705: input devices 706 including, for example, touchscreens, touchpads, keyboards, mice, cameras, microphones, etc.; output devices 707 including, for example, liquid crystal displays (LCDs), speakers, vibrators, etc.; storage devices 708 including, for example, magnetic tapes, hard disks, etc.; and communication devices 709. Communication device 709 allows computer system 700 to communicate wirelessly or wiredly with other devices to exchange data. Although Figure 7 A computer system 700 with various electronic devices is shown; however, it should be understood that it is not required to implement or possess all of the devices shown. More or fewer devices may be implemented or possessed alternatively.
[0171] In particular, according to embodiments of this disclosure, the processes described above with reference to the flowcharts can be implemented as computer software programs. For example, embodiments of this disclosure include a computer program product comprising a computer program carried on a computer-readable medium, the computer program containing program code for performing the methods shown in the flowcharts. In such embodiments, the computer program can be downloaded and installed from a network via communication device 709, or installed from storage device 708, or installed from ROM 702. When the computer program is executed by processing device 701, it performs the functions defined in the methods of embodiments of this disclosure.
[0172] It should be noted that the computer-readable medium described in this disclosure can be a computer-readable signal medium or a computer-readable storage medium, or any combination thereof. A computer-readable storage medium can be, for example,—but not limited to—an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination thereof. More specific examples of a computer-readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer disk, a hard disk, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage device, magnetic storage device, or any suitable combination thereof. In this disclosure, a computer-readable storage medium can be any tangible medium containing or storing a program that can be used by or in connection with an instruction execution system, apparatus, or device. In this disclosure, a computer-readable signal medium can include a data signal propagated in baseband or as part of a carrier wave, carrying computer-readable program code. Such propagated data signals can take various forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination thereof. A computer-readable signal medium can be any computer-readable medium other than a computer-readable storage medium, which can send, propagate, or transmit a program for use by or in connection with an instruction execution system, apparatus, or device. The program code contained on the computer-readable medium can be transmitted using any suitable medium, including but not limited to: wires, optical fibers, RF (radio frequency), etc., or any suitable combination thereof.
[0173] The aforementioned computer-readable medium may be included in the aforementioned electronic device; or it may exist independently and not assembled into the electronic device.
[0174] The aforementioned computer-readable medium carries one or more programs, which, when executed by the electronic device, cause the electronic device to perform the following functions: Figure 2 The illustrated embodiments and their alternative implementations demonstrate a task management method.
[0175] Computer program code for performing the operations of this disclosure can be written in one or more programming languages or a combination thereof, including object-oriented programming languages such as Java, Smalltalk, and C++, and conventional procedural programming languages such as the "C" language or similar programming languages. The program code can be executed entirely on the user's computer, partially on the user's computer, as a standalone software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving remote computers, the remote computer can be connected to the user's computer via any type of network—including a local area network (LAN) or a wide area network (WAN)—or can be connected to an external computer (e.g., via the Internet using an Internet service provider).
[0176] The flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of systems, methods, and computer program products according to various embodiments of this disclosure. In this regard, each block in a flowchart or block diagram may represent a module, segment, or portion of code containing one or more executable instructions for implementing a specified logical function. It should also be noted that in some alternative implementations, the functions indicated in the blocks may occur in a different order than those indicated in the drawings. For example, two consecutively indicated blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each block in the block diagrams and / or flowcharts, and combinations of blocks in the block diagrams and / or flowcharts, can be implemented using a dedicated hardware-based system that performs the specified function or operation, or using a combination of dedicated hardware and computer instructions.
[0177] The units or modules described in the embodiments of this disclosure can be implemented in software or hardware. The names of the units or modules do not necessarily limit the unit itself; for example, a tool access module can also be described as "a module that accesses a preset interface tool in response to receiving a corner adaptation instruction."
[0178] The above description is merely a preferred embodiment of this disclosure and an explanation of the technical principles employed. Those skilled in the art should understand that the scope of this disclosure is not limited to technical solutions formed by specific combinations of the above-described technical features, but should also cover other technical solutions formed by arbitrary combinations of the above-described technical features or their equivalents without departing from the above-described concept. For example, technical solutions formed by substituting the above features with (but not limited to) technical features disclosed in this disclosure that have similar functions.
Claims
1. A screen effects adaptation method, comprising: In response to receiving a corner adaptation instruction, a preset interface tool is accessed. The corner adaptation instruction is used to indicate the acquisition of screen effect resources that are adapted to the screen corners of the current device. The interface tool encapsulates multiple parameter interfaces. Determine the target parameter interface that matches the current device from among the multiple parameter interfaces of the interface tool; The target corner parameters of the screen corners are obtained from the current device using the target parameter interface; Obtain screen effect resources that match the target corner parameters from a preset resource platform and play the screen effect resources.
2. The method according to claim 1, wherein, The interface tool includes multiple parameter interfaces, each pointing to a different device model; The step of determining the target parameter interface that matches the current device from multiple parameter interfaces of the interface tool includes: Query the target device model of the current device; Determine whether there is a private parameter interface pointing to the target device model among the multiple parameter interfaces in the interface tool; In response to determining that a private parameter interface pointing to the target device model exists, the private parameter interface pointing to the target device model is determined as the target parameter interface.
3. The method according to claim 2, wherein, The interface tool also includes a general parameter interface pointing to multiple device models; After determining whether a private parameter interface pointing to the target device model exists among the multiple parameter interfaces in the interface tool, the method further includes: In response to the determination that there is no private parameter interface pointing to the target device model, the general parameter interface is determined as the target parameter interface.
4. The method according to claim 1, wherein, Before obtaining screen effect resources adapted to the target corner parameters from a preset resource platform, the method further includes: In response to receiving a corner adaptation instruction, query the target device model of the current device; Obtain a preset mapping table, which is used to represent the correspondence between device models and edge parameters; The corner parameters corresponding to the target device model in the mapping table are determined as the target corner parameters.
5. The method according to claim 1, wherein, Before accessing a preset interface tool in response to receiving an edge adaptation instruction, the method further includes: Configure screen effect resources in the resource platform that are adapted to the target corner parameters.
6. The method according to claim 1, wherein, The screen effects resources include multiple image frames; The screen special effects resources mentioned in the playback include: The left half of each image frame is encoded using the color channel, and the right half is encoded using the alpha channel to obtain the encoded image frame. The encoded image frames are decoded and played back to obtain a semi-transparent special effect.
7. A screen effects adaptation device, comprising: The tool access module is configured to access a preset interface tool in response to receiving a corner adaptation instruction. The corner adaptation instruction is used to indicate the acquisition of screen effect resources that are adapted to the screen corners of the current device. The interface tool encapsulates multiple parameter interfaces. The interface determination module is configured to determine a target parameter interface that matches the current device from a plurality of parameter interfaces of the interface tool; The parameter acquisition module is configured to acquire the target corner parameters of the screen corner from the current device using the target parameter interface; The special effects adaptation module is configured to obtain screen effect resources that are adapted to the target corner parameters from a preset resource platform and play the screen effect resources.
8. An electronic device, comprising: One or more processors; Storage device, on which one or more programs are stored, When the one or more programs are executed by the one or more processors, the one or more processors implement the method as described in any one of claims 1-6.
9. A computer-readable storage medium having a computer program stored thereon, wherein, When the computer program is executed by one or more processors, it implements the method as described in any one of claims 1-6.
10. A computer program product comprising computer program instructions, wherein, When the computer program instructions are executed on the computer, the computer causes the computer to perform the method as described in any one of claims 1-6.