CN112269605A - Skin replacement method and device, electronic equipment and storage medium - Google Patents

Skin replacement method and device, electronic equipment and storage medium Download PDF

Info

Publication number
CN112269605A
CN112269605A CN202011262364.9A CN202011262364A CN112269605A CN 112269605 A CN112269605 A CN 112269605A CN 202011262364 A CN202011262364 A CN 202011262364A CN 112269605 A CN112269605 A CN 112269605A
Authority
CN
China
Prior art keywords
description content
replacement
type
application program
display interface
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202011262364.9A
Other languages
Chinese (zh)
Inventor
陈兆龙
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Nanjing Qi Bao Mdt Infotech Ltd
Original Assignee
Beijing Baidu Netcom Science and Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Baidu Netcom Science and Technology Co Ltd filed Critical Beijing Baidu Netcom Science and Technology Co Ltd
Priority to CN202011262364.9A priority Critical patent/CN112269605A/en
Publication of CN112269605A publication Critical patent/CN112269605A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/445Program loading or initiating
    • G06F9/44521Dynamic linking or loading; Link editing at or after load time, e.g. Java class loading
    • G06F9/44526Plug-ins; Add-ons
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/60Software deployment
    • G06F8/61Installation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/70Software maintenance or management
    • G06F8/71Version control; Configuration management

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Computer Security & Cryptography (AREA)
  • User Interface Of Digital Computer (AREA)

Abstract

The application discloses a skin replacement method and device, electronic equipment and a storage medium, and relates to the technical field of computer vision. The specific scheme is as follows: acquiring a skin replacement file corresponding to an application program; determining a target layout file corresponding to the application program based on a pre-acquired original layout file corresponding to the application program and a skin replacement file corresponding to the application program; and performing skin replacement on each display interface in the application program based on the target local file corresponding to the application program. The skin can be replaced at any time, and the normal use of an application program is not influenced; and the installation files are not occupied, so that the resource is saved, and the operation is convenient.

Description

Skin replacement method and device, electronic equipment and storage medium
Technical Field
The present application relates to the field of computer applications, and further relates to the field of computer vision technologies, and in particular, to a skin replacement method and apparatus, an electronic device, and a storage medium.
Background
In order to satisfy the preferences of different users, an Application program (APP) often provides a plurality of skins corresponding to different themes for the users to select. Accordingly, the user can select favorite skin to replace according to the preference of the user. When the user uses different skins, the style of the tag of each page in the application program may be different, and the style of the tag is generally determined by the shape of the tag and the configuration set on the tag. When replacing the skin of an application, this is typically done by changing the configuration on the tabs in the various pages of the application. For example, assume that an interface of an application includes three tags, which are: the label comprises a label A, a label B and a label C, wherein characters, pictures, videos and the like can be arranged on each label, and the styles of the three labels are determined by configuration information arranged on each label.
In the prior art, when configuration information in tags is changed, a reserved resource method is adopted in a mainstream scheme, that is, the configuration information of each tag in each page is written into an installation file, so that configuration information of multiple sets of skins needs to be packaged into the installation file at the same time, and the size of the installation file is increased invisibly; the application program can only realize skin replacement by depending on the release of the new version, and the skin replacement is troublesome; and even a service code is coupled with a skinning code.
Disclosure of Invention
The application provides a skin replacing method, a skin replacing device, electronic equipment and a storage medium, which can replace skin at any time without influencing the normal use of an application program; and the installation files are not occupied, so that the resource is saved, and the operation is convenient.
In a first aspect, the present application provides a skin replacement method, the method comprising:
acquiring a skin replacement file corresponding to an application program;
determining a target layout file corresponding to the application program based on a pre-acquired original layout file corresponding to the application program and a skin replacement file corresponding to the application program;
and carrying out skin replacement on each display interface in the application program based on the target local file corresponding to the application program.
In a second aspect, the present application provides a skin replacement device, the device comprising: the device comprises an acquisition module, a determination module and a replacement module; wherein the content of the first and second substances,
the acquisition module is used for acquiring a skin replacement file corresponding to the application program;
the determining module is configured to determine a target layout file corresponding to the application program based on a pre-acquired original layout file corresponding to the application program and a skin replacement file corresponding to the application program;
and the replacing module is used for performing skin replacement on each display interface in the application program based on the target local file corresponding to the application program.
In a third aspect, an embodiment of the present application provides an electronic device, including:
one or more processors;
a memory for storing one or more programs,
when executed by the one or more processors, cause the one or more processors to implement a skin replacement method as described in any of the embodiments of the present application.
In a fourth aspect, the present application provides a storage medium, on which a computer program is stored, where the program is executed by a processor to implement the skin replacement method according to any embodiment of the present application.
According to the technology of the application, the problem that in the prior art, the configuration information of a plurality of sets of skins needs to be packaged into the installation file at the same time, and the size of the installation file is increased invisibly is solved; the technical scheme provided by the application can replace the skin at any time without influencing the normal use of the application; and the installation files are not occupied, so that the resource is saved, and the operation is convenient.
It should be understood that the statements in this section do not necessarily identify key or critical features of the embodiments of the present disclosure, nor do they limit the scope of the present disclosure. Other features of the present disclosure will become apparent from the following description.
Drawings
The drawings are included to provide a better understanding of the present solution and are not intended to limit the present application. Wherein:
fig. 1 is a first flowchart of a skin replacement method according to an embodiment of the present disclosure;
FIG. 2 is a second schematic flow chart of a skin replacement method provided by an embodiment of the present application;
FIG. 3 is a third schematic flow chart of a skin replacement method provided in an embodiment of the present application;
FIG. 4 is a schematic structural diagram of a skin replacement device provided in an embodiment of the present application;
FIG. 5 is a schematic structural diagram of a determination module provided in an embodiment of the present application;
fig. 6 is a block diagram of an electronic device for implementing a skin replacement method according to an embodiment of the present application.
Detailed Description
The following description of the exemplary embodiments of the present application, taken in conjunction with the accompanying drawings, includes various details of the embodiments of the application for the understanding of the same, which are to be considered exemplary only. Accordingly, those of ordinary skill in the art will recognize that various changes and modifications of the embodiments described herein can be made without departing from the scope and spirit of the present application. Also, descriptions of well-known functions and constructions are omitted in the following description for clarity and conciseness.
Example one
Fig. 1 is a first flowchart of a skin-replacement method provided in an embodiment of the present application, where the method may be performed by a skin-replacement apparatus or an electronic device, where the apparatus or the electronic device may be implemented by software and/or hardware, and the apparatus or the electronic device may be integrated in any intelligent device with a network communication function. As shown in fig. 1, the skin replacement method may include the steps of:
s101, acquiring a skin replacement file corresponding to the application program.
In a specific embodiment of the present application, the electronic device may obtain a skin replacement file corresponding to the application program. Specifically, the electronic device may download a skin replacement file corresponding to the application program in the server. Because each application program comprises at least one display interface, the skin replacement file corresponding to the application program comprises the skin replacement subfile corresponding to each display interface. For example, assume that an application may include N display interfaces, which are: display interface 1, display interfaces 2 and … and display interface N; wherein N is a natural number greater than or equal to 1; the skin-replacement file corresponding to the application program may include: skin replacement subfile 1, skin replacement subfiles 2 and …, and skin replacement subfile N; each display interface corresponds to a skin replacement subfile. Each skin replacement subfile may be style.
S102, determining a target layout file corresponding to the application program based on the pre-acquired original layout file corresponding to the application program and the skin replacement file corresponding to the application program.
In this step, the electronic device may determine the target layout file corresponding to the application program based on the pre-obtained original layout file corresponding to the application program and the skin replacement file corresponding to the application program. Specifically, the electronic device may extract a skin replacement subfile corresponding to each display interface from a skin replacement file corresponding to the application program; extracting original layout subfiles corresponding to each display interface from the original layout files corresponding to the application program; then determining a target layout subfile corresponding to each display interface based on the original layout subfile corresponding to each display interface and the skin replacement subfile corresponding to each display interface; and combining the target local subfiles corresponding to all the display interfaces into a target layout file corresponding to the application program. The original layout subfile corresponding to each display interface may be layout1. xml.
In a specific embodiment of the application, the electronic device may download in advance an original layout file corresponding to the application program from the server; or simultaneously downloading the original layout file and the skin replacement file corresponding to the application program in the server. Because each application program comprises at least one display interface, the original layout file corresponding to the application program comprises original layout subfiles corresponding to the display interfaces. For example, assume that an application may include N display interfaces, which are: display interface 1, display interfaces 2 and … and display interface N; wherein N is a natural number greater than or equal to 1; the original layout file corresponding to the application program may include: original layout subfile 1, original layout subfiles 2, …, original layout subfile N; each display interface corresponds to an original layout subfile.
And S103, performing skin replacement on each display interface in the application program based on the target local file corresponding to the application program.
In this step, the electronic device may perform skin replacement on each display interface in the application program based on the target local file corresponding to the application program; the target layout file corresponding to each display interface may be layout2. xml.
The skin replacing method provided by the embodiment of the application comprises the steps of firstly obtaining a skin replacing file corresponding to an application program; then, determining a target layout file corresponding to the application program based on a pre-acquired original layout file corresponding to the application program and a skin replacement file corresponding to the application program; and then, based on the target local file corresponding to the application program, carrying out skin replacement on each display interface in the application program. That is, the application can separate the layout file and the skin replacement file corresponding to the application program; the original layout file corresponding to the application program can ensure the normal use of the application program; the skin replacing file corresponding to the application program can realize the skin replacing of the application program. In the existing skin replacement method, the service code and the skin change code are uniformly configured together, so that the skin change code occupies the resource of a package file. Because the technical means that the layout file corresponding to the application program is separated from the skin replacement file is adopted, the problem that the configuration information of a plurality of sets of skins needs to be packaged into the installation file at the same time in the prior art is solved, and the size of the installation file is increased invisibly; the technical scheme provided by the application can replace the skin at any time without influencing the normal use of the application; the installation files are not occupied, resources are saved, and the operation is convenient; moreover, the technical scheme of the embodiment of the application is simple and convenient to implement, convenient to popularize and wide in application range.
Example two
Fig. 2 is a second flowchart of a skin replacement method according to an embodiment of the present application. Further optimization and expansion are performed based on the technical scheme, and the method can be combined with the various optional embodiments. As shown in fig. 2, the skin replacement method may include the steps of:
s201, obtaining a skin replacement file corresponding to the application program.
The electronic equipment can acquire a skin replacement file corresponding to the application program; the skin change file corresponding to each display interface may be style. Bcs can include the following two parts: a first type of replacement description and a second type of replacement description. For example, the first type of replacement description is ". A1"; the second type of replacement description is "# ID"; wherein ". A1" corresponds to a tag of type (class) A1; "# ID" corresponds to the view ID (viewID) being the label of A1.
Illustratively, the skin replacement file style.bcs is described as follows:
.A1{
textColor:#FFFFFF
textSize:10sp
margin-left:10dip;
margin-rught:10dip
}
#A1{
textColor:#59F1FF
textSize:25sp
margin-left:10dip
margin-rught:10dip
padding-left:10dip
}
s202, extracting skin replacement subfiles corresponding to all display interfaces from skin replacement files corresponding to application programs; and extracting the original layout subfiles corresponding to each display interface from the original layout files corresponding to the application program.
In this step, the electronic device may extract a skin replacement subfile corresponding to each display interface from the skin replacement file corresponding to the application program; extracting original layout subfiles corresponding to each display interface from the original layout files corresponding to the application program; the original layout subfile corresponding to each display interface may be layout1. xml.
Illustratively, the original layout subfile, layout1.xml, is described as follows:
Figure BDA0002775054110000061
Figure BDA0002775054110000071
s203, determining a target layout subfile corresponding to each display interface based on the original layout subfile corresponding to each display interface and the skin replacement subfile corresponding to each display interface.
In this step, the electronic device may determine a target layout subfile corresponding to each display interface based on the original layout subfile corresponding to each display interface and the skin replacement subfile corresponding to each display interface. Specifically, the electronic device may first extract the first type of replacement description content and the second type of replacement description content from the skin replacement subfile corresponding to each display interface; then, determining label description content corresponding to the first type of replacement description content and label description content corresponding to the second type of replacement description content in the original layout subfile corresponding to each display interface; and then determining the target layout subfiles corresponding to each display interface based on the first type of replacement description content and the corresponding label description content, and the second type of replacement description content and the corresponding label description content.
Furthermore, the electronic device may combine the first type of replacement description content and the second type of replacement description content with the respective corresponding tag description content, respectively, to obtain a first type of target layout description content and a second type of target layout description content; and then combining the first type of target layout description content and the second type of target layout description content into a target layout subfile corresponding to each display interface.
Illustratively, the target layout subfile, layout2.xml, is described as follows:
Figure BDA0002775054110000072
Figure BDA0002775054110000081
Figure BDA0002775054110000091
and S204, combining the target local subfiles corresponding to all the display interfaces into a target layout file corresponding to the application program.
In this step, the electronic device may combine the target local subfiles corresponding to all the display interfaces into a target layout file corresponding to the application program. Specifically, the electronic device may combine the target local subfiles corresponding to all the display interfaces into the target layout file corresponding to the application program according to the structure of the display tree (ViewTree) corresponding to the application program.
And S205, performing skin replacement on each display interface in the application program based on the target local file corresponding to the application program.
The skin replacing method provided by the embodiment of the application comprises the steps of firstly obtaining a skin replacing file corresponding to an application program; then, determining a target layout file corresponding to the application program based on a pre-acquired original layout file corresponding to the application program and a skin replacement file corresponding to the application program; and then, based on the target local file corresponding to the application program, carrying out skin replacement on each display interface in the application program. That is, the application can separate the layout file and the skin replacement file corresponding to the application program; the original layout file corresponding to the application program can ensure the normal use of the application program; the skin replacing file corresponding to the application program can realize the skin replacing of the application program. In the existing skin replacement method, the service code and the skin change code are uniformly configured together, so that the skin change code occupies the resource of a package file. Because the technical means that the layout file corresponding to the application program is separated from the skin replacement file is adopted, the problem that the configuration information of a plurality of sets of skins needs to be packaged into the installation file at the same time in the prior art is solved, and the size of the installation file is increased invisibly; the technical scheme provided by the application can replace the skin at any time without influencing the normal use of the application; the installation files are not occupied, resources are saved, and the operation is convenient; moreover, the technical scheme of the embodiment of the application is simple and convenient to implement, convenient to popularize and wide in application range.
EXAMPLE III
Fig. 3 is a third flowchart of a skin replacement method according to an embodiment of the present application. Further optimization and expansion are performed based on the technical scheme, and the method can be combined with the various optional embodiments. As shown in fig. 3, the skin replacement method may include the steps of:
s301, acquiring a skin replacement file corresponding to the application program.
S302, extracting skin replacement subfiles corresponding to all display interfaces from the skin replacement files corresponding to the application programs; and extracting the original layout subfiles corresponding to each display interface from the original layout files corresponding to the application program.
And S303, extracting the first type of replacement description content and the second type of replacement description content from the skin replacement subfiles corresponding to the display interfaces respectively.
In this step, the electronic device may extract the first type of replacement description content and the second type of replacement description content from the skin replacement subfile corresponding to each display interface. For example, the first type of replacement description is ". A1"; the second type of replacement description is "# ID"; wherein ". A1" corresponds to a tag of type (class) A1; "# ID" corresponds to the view ID (viewID) being the label of A1.
S304, determining label description content corresponding to the first type of replacement description content and label description content corresponding to the second type of replacement description content in the original layout subfile corresponding to each display interface.
In this step, the electronic device may determine, in the original layout subfile corresponding to each display interface, tag description content corresponding to the replacement description content of the first type and tag description content corresponding to the replacement description content of the second type. Specifically, the electronic device may first search for a first type of tag and a second type of tag in the original layout subfiles corresponding to the respective display interfaces; then, acquiring label description content corresponding to the replacement description content of the first type from the labels of the first type; and acquiring the label description content corresponding to the replacement description content of the second type from the labels of the second type. For example, the electronic device may determine sknttextview 1 and sknttextview 2 corresponding to ". A1" and sknttextview 3 corresponding to "# ID" in the original layout subfile corresponding to each display interface.
S305, determining target layout subfiles corresponding to each display interface based on the replacement description content of the first type and the label description content corresponding to the replacement description content of the first type, and the replacement description content of the second type and the label description content corresponding to the replacement description content of the second type.
In this step, the electronic device may determine the target layout subfiles corresponding to the respective display interfaces based on the replacement description content of the first type and the tag description content corresponding to the replacement description content of the first type, and based on the replacement description content of the second type and the tag description content corresponding to the replacement description content of the second type. Specifically, the electronic device may combine the first type of replacement description content and the second type of replacement description content with the corresponding tag description content, respectively, to obtain the first type of target layout description content and the second type of target layout description content; and then combining the first type of target layout description content and the second type of target layout description content into a target layout subfile corresponding to each display interface.
Furthermore, the electronic device may extract a page attribute as the current page attribute from the first type of replacement description content and the second type of replacement description content, respectively; if the current page attribute does not exist in the corresponding tag description content, the electronic device may insert the current page attribute into the corresponding tag description content; if the current page attribute exists in the corresponding label description content, the electronic equipment can replace the current page attribute with the original page attribute in the corresponding label description content; the above operations are repeatedly performed until the page attributes are extracted from the replacement description contents of the first type and the replacement description contents of the second type.
And S306, combining the target local subfiles corresponding to all the display interfaces into a target layout file corresponding to the application program.
And S307, performing skin replacement on each display interface in the application program based on the target local file corresponding to the application program.
The skin replacing method provided by the embodiment of the application comprises the steps of firstly obtaining a skin replacing file corresponding to an application program; then, determining a target layout file corresponding to the application program based on a pre-acquired original layout file corresponding to the application program and a skin replacement file corresponding to the application program; and then, based on the target local file corresponding to the application program, carrying out skin replacement on each display interface in the application program. That is, the application can separate the layout file and the skin replacement file corresponding to the application program; the original layout file corresponding to the application program can ensure the normal use of the application program; the skin replacing file corresponding to the application program can realize the skin replacing of the application program. In the existing skin replacement method, the service code and the skin change code are uniformly configured together, so that the skin change code occupies the resource of a package file. Because the technical means that the layout file corresponding to the application program is separated from the skin replacement file is adopted, the problem that the configuration information of a plurality of sets of skins needs to be packaged into the installation file at the same time in the prior art is solved, and the size of the installation file is increased invisibly; the technical scheme provided by the application can replace the skin at any time without influencing the normal use of the application; the installation files are not occupied, resources are saved, and the operation is convenient; moreover, the technical scheme of the embodiment of the application is simple and convenient to implement, convenient to popularize and wide in application range.
Example four
Fig. 4 is a schematic structural diagram of a skin replacement device provided in an embodiment of the present application. As shown in fig. 4, the apparatus 400 includes: an acquisition module 401, a determination module 402 and a replacement module 403; wherein the content of the first and second substances,
the obtaining module 401 is configured to obtain a skin replacement file corresponding to an application;
the determining module 402 is configured to determine a target layout file corresponding to the application program based on a pre-obtained original layout file corresponding to the application program and a skin replacement file corresponding to the application program;
the replacing module 403 is configured to replace skins of each display interface in the application program based on the target local file corresponding to the application program.
Fig. 5 is a schematic structural diagram of a determination module provided in an embodiment of the present application. As shown in fig. 5, the determining module 402 includes: an extraction sub-module 4021, a determination sub-module 4022 and a combination sub-module 4023; wherein the content of the first and second substances,
the extracting submodule 4021 is configured to extract a skin replacement subfile corresponding to each display interface from the skin replacement file corresponding to the application program; extracting original layout subfiles corresponding to each display interface from the original layout files corresponding to the application program;
the determining sub-module 4022 is configured to determine a target layout sub-file corresponding to each display interface based on the original layout sub-file corresponding to each display interface and the skin replacement sub-file corresponding to each display interface;
the combining sub-module 4023 is configured to combine the target local sub-files corresponding to all the display interfaces into a target layout file corresponding to the application program.
Further, the determining sub-module 4022 is specifically configured to extract a first type of replacement description content and a second type of replacement description content from the skin replacement subfile corresponding to each display interface; determining label description content corresponding to the first type of replacement description content and label description content corresponding to the second type of replacement description content in an original layout subfile corresponding to each display interface; and determining a target layout subfile corresponding to each display interface based on the first type of replacement description content and the corresponding label description content, and the second type of replacement description content and the corresponding label description content.
Further, the determining sub-module 4022 is specifically configured to combine the first type of replacement description content and the second type of replacement description content with the corresponding tag description content, respectively, to obtain the first type of target layout description content and the second type of target layout description content; and combining the first type of target layout description content and the second type of target layout description content into a target layout subfile corresponding to each display interface.
Further, the determining sub-module 4022 is specifically configured to extract a page attribute from each of the first type replacement description content and the second type replacement description content as a current page attribute; if the current page attribute does not exist in the corresponding label description content, inserting the current page attribute into the corresponding label description content; if the current page attribute exists in the corresponding label description content, replacing the current page attribute with the original page attribute in the corresponding label description content; the above operations are repeatedly executed until the page attributes are extracted from the replacement description content of the first type and the replacement description content of the second type.
Further, the determining sub-module 4022 is specifically configured to search for a first type of tag and a second type of tag in the original layout subfile corresponding to each display interface; acquiring label description content corresponding to the replacement description content of the first type from the labels of the first type; and acquiring the label description content corresponding to the replacement description content of the second type from the labels of the second type.
The skin replacement device can execute the method provided by any embodiment of the application, and has corresponding functional modules and beneficial effects of the execution method. For technical details that are not elaborated in this embodiment, reference may be made to the skin replacement method provided in any of the embodiments of the present application.
EXAMPLE five
According to an embodiment of the present application, an electronic device and a readable storage medium are also provided.
Fig. 6 is a block diagram of an electronic device of a skin replacement method according to an embodiment of the present application. Electronic devices are intended to represent various forms of digital computers, such as laptops, desktops, workstations, personal digital assistants, servers, blade servers, mainframes, and other appropriate computers. The electronic device may also represent various forms of mobile devices, such as personal digital processing, cellular phones, smart phones, wearable devices, and other similar computing devices. The components shown herein, their connections and relationships, and their functions, are meant to be examples only, and are not meant to limit implementations of the present application that are described and/or claimed herein.
As shown in fig. 6, the electronic apparatus includes: one or more processors 601, memory 602, and interfaces for connecting the various components, including a high-speed interface and a low-speed interface. The various components are interconnected using different buses and may be mounted on a common motherboard or in other manners as desired. The processor may process instructions for execution within the electronic device, including instructions stored in or on the memory to display graphical information of a GUI on an external input/output apparatus (such as a display device coupled to the interface). In other embodiments, multiple processors and/or multiple buses may be used, along with multiple memories and multiple memories, as desired. Also, multiple electronic devices may be connected, with each device providing portions of the necessary operations (e.g., as a server array, a group of blade servers, or a multi-processor system). In fig. 6, one processor 601 is taken as an example.
The memory 602 is a non-transitory computer readable storage medium as provided herein. Wherein the memory stores instructions executable by at least one processor to cause the at least one processor to perform the skin replacement method provided herein. The non-transitory computer readable storage medium of the present application stores computer instructions for causing a computer to perform the skin replacement method provided herein.
The memory 602, as a non-transitory computer readable storage medium, may be used to store non-transitory software programs, non-transitory computer executable programs, and modules, such as program instructions/modules (e.g., the obtaining module 401, the determining module 402, and the replacing module 403 shown in fig. 4) corresponding to the skin replacing method in the embodiment of the present application. The processor 601 executes various functional applications of the server and data processing by running non-transitory software programs, instructions and modules stored in the memory 602, namely, implements the skin replacement method in the above method embodiment.
The memory 602 may include a storage program area and a storage data area, wherein the storage program area may store an operating system, an application program required for at least one function; the storage data area may store data created according to use of the skin-replacement electronic device, and the like. Further, the memory 602 may include high speed random access memory, and may also include non-transitory memory, such as at least one magnetic disk storage device, flash memory device, or other non-transitory solid state storage device. In some embodiments, the memory 602 optionally includes memory located remotely from the processor 601, and these remote memories may be connected to the skin-replacement electronic device via a network. Examples of such networks include, but are not limited to, the internet, intranets, local area networks, mobile communication networks, and combinations thereof.
The electronic device of the skin replacement method may further include: an input device 603 and an output device 604. The processor 601, the memory 602, the input device 603 and the output device 604 may be connected by a bus or other means, and fig. 6 illustrates the connection by a bus as an example.
The input device 603 may receive input numeric or character information and generate key signal inputs related to user settings and function control of the skin-replacement electronic device, such as a touch screen, keypad, mouse, track pad, touch pad, pointer stick, one or more mouse buttons, track ball, joystick, or other input device. The output devices 604 may include a display device, auxiliary lighting devices (e.g., LEDs), and tactile feedback devices (e.g., vibrating motors), among others. The display device may include, but is not limited to, a Liquid Crystal Display (LCD), a Light Emitting Diode (LED) display, and a plasma display. In some implementations, the display device can be a touch screen.
Various implementations of the systems and techniques described here can be realized in digital electronic circuitry, integrated circuitry, application specific ASICs (application specific integrated circuits), computer hardware, firmware, software, and/or combinations thereof. These various embodiments may include: implemented in one or more computer programs that are executable and/or interpretable on a programmable system including at least one programmable processor, which may be special or general purpose, receiving data and instructions from, and transmitting data and instructions to, a storage system, at least one input device, and at least one output device.
These computer programs (also known as programs, software applications, or code) include machine instructions for a programmable processor, and may be implemented using high-level procedural and/or object-oriented programming languages, and/or assembly/machine languages. As used herein, the terms "machine-readable medium" and "computer-readable medium" refer to any computer program product, apparatus, and/or device (e.g., magnetic discs, optical disks, memory, Programmable Logic Devices (PLDs)) used to provide machine instructions and/or data to a programmable processor, including a machine-readable medium that receives machine instructions as a machine-readable signal. The term "machine-readable signal" refers to any signal used to provide machine instructions and/or data to a programmable processor.
To provide for interaction with a user, the systems and techniques described here can be implemented on a computer having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to a user; and a keyboard and a pointing device (e.g., a mouse or a trackball) by which a user can provide input to the computer. Other kinds of devices may also be used to provide for interaction with a user; for example, feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user may be received in any form, including acoustic, speech, or tactile input.
The systems and techniques described here can be implemented in a computing system that includes a back-end component (e.g., as a data server), or that includes a middleware component (e.g., an application server), or that includes a front-end component (e.g., a user computer having a graphical user interface or a web browser through which a user can interact with an implementation of the systems and techniques described here), or any combination of such back-end, middleware, or front-end components. The components of the system can be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: local Area Networks (LANs), Wide Area Networks (WANs), the internet, and blockchain networks.
The computer system may include clients and servers. A client and server are generally remote from each other and typically interact through a communication network. The relationship of client and server arises by virtue of computer programs running on the respective computers and having a client-server relationship to each other. The server can be a cloud server, also called a cloud computing server or a cloud host, and is a host product in a cloud computing service system, so that the defects of high management difficulty and weak service expansibility in the traditional physical host and VPS service are overcome.
According to the technical scheme of the embodiment of the application, a skin replacement file corresponding to an application program is obtained firstly; then, determining a target layout file corresponding to the application program based on a pre-acquired original layout file corresponding to the application program and a skin replacement file corresponding to the application program; and then, based on the target local file corresponding to the application program, carrying out skin replacement on each display interface in the application program. That is, the application can separate the layout file and the skin replacement file corresponding to the application program; the original layout file corresponding to the application program can ensure the normal use of the application program; the skin replacing file corresponding to the application program can realize the skin replacing of the application program. In the existing skin replacement method, the service code and the skin change code are uniformly configured together, so that the skin change code occupies the resource of a package file. Because the technical means that the layout file corresponding to the application program is separated from the skin replacement file is adopted, the problem that the configuration information of a plurality of sets of skins needs to be packaged into the installation file at the same time in the prior art is solved, and the size of the installation file is increased invisibly; the technical scheme provided by the application can replace the skin at any time without influencing the normal use of the application; the installation files are not occupied, resources are saved, and the operation is convenient; moreover, the technical scheme of the embodiment of the application is simple and convenient to implement, convenient to popularize and wide in application range.
It should be understood that various forms of the flows shown above may be used, with steps reordered, added, or deleted. For example, the steps described in the present application may be executed in parallel, sequentially, or in different orders, as long as the desired results of the technical solutions disclosed in the present application can be achieved, and the present invention is not limited herein.
The above-described embodiments should not be construed as limiting the scope of the present application. It should be understood by those skilled in the art that various modifications, combinations, sub-combinations and substitutions may be made in accordance with design requirements and other factors. Any modification, equivalent replacement, and improvement made within the spirit and principle of the present application shall be included in the protection scope of the present application.

Claims (14)

1. A skin replacement method, the method comprising:
acquiring a skin replacement file corresponding to an application program;
determining a target layout file corresponding to the application program based on a pre-acquired original layout file corresponding to the application program and a skin replacement file corresponding to the application program;
and carrying out skin replacement on each display interface in the application program based on the target local file corresponding to the application program.
2. The method according to claim 1, wherein the determining a target layout file corresponding to the application program based on the pre-acquired original layout file corresponding to the application program and the skin replacement file corresponding to the application program includes:
extracting skin replacement subfiles corresponding to all display interfaces from the skin replacement files corresponding to the application programs; extracting original layout subfiles corresponding to each display interface from the original layout files corresponding to the application program;
determining a target layout subfile corresponding to each display interface based on the original layout subfile corresponding to each display interface and the skin replacement subfile corresponding to each display interface;
and combining the target local subfiles corresponding to all the display interfaces into a target layout file corresponding to the application program.
3. The method according to claim 2, wherein the determining a target layout subfile corresponding to each display interface based on the original layout subfile corresponding to each display interface and the skin replacement subfile corresponding to each display interface includes:
respectively extracting a first type of replacement description content and a second type of replacement description content from the skin replacement subfile corresponding to each display interface;
determining label description content corresponding to the first type of replacement description content and label description content corresponding to the second type of replacement description content in an original layout subfile corresponding to each display interface;
and determining a target layout subfile corresponding to each display interface based on the first type of replacement description content and the corresponding label description content, and the second type of replacement description content and the corresponding label description content.
4. The method according to claim 3, wherein the determining the target layout subfile corresponding to each display interface based on the replacement description content of the first type and the tag description content corresponding to the replacement description content of the first type, and the replacement description content of the second type and the tag description content corresponding to the replacement description content of the second type comprises:
merging the first type of replacement description content and the second type of replacement description content with the corresponding label description content respectively to obtain the first type of target layout description content and the second type of target layout description content;
and combining the first type of target layout description content and the second type of target layout description content into a target layout subfile corresponding to each display interface.
5. The method according to claim 4, wherein the merging the first type of replacement description content and the second type of replacement description content with the corresponding tag description content to obtain the first type of target layout description content and the second type of target layout description content comprises:
respectively extracting a page attribute from the first type of replacement description content and the second type of replacement description content as a current page attribute;
if the current page attribute does not exist in the corresponding label description content, inserting the current page attribute into the corresponding label description content; if the current page attribute exists in the corresponding label description content, replacing the current page attribute with the original page attribute in the corresponding label description content; the above operations are repeatedly executed until the page attributes are extracted from the replacement description content of the first type and the replacement description content of the second type.
6. The method according to claim 3, wherein the determining of the tag description content corresponding to the first type of replacement description content and the tag description content corresponding to the second type of replacement description content in the original layout subfile corresponding to each display interface includes:
respectively searching a first type of label and a second type of label in the original layout subfiles corresponding to the display interfaces;
acquiring label description content corresponding to the replacement description content of the first type from the labels of the first type; and acquiring the label description content corresponding to the replacement description content of the second type from the labels of the second type.
7. A skin replacement device, the device comprising: the device comprises an acquisition module, a determination module and a replacement module; wherein the content of the first and second substances,
the acquisition module is used for acquiring a skin replacement file corresponding to the application program;
the determining module is configured to determine a target layout file corresponding to the application program based on a pre-acquired original layout file corresponding to the application program and a skin replacement file corresponding to the application program;
and the replacing module is used for performing skin replacement on each display interface in the application program based on the target local file corresponding to the application program.
8. The apparatus of claim 7, the determining module comprising: extracting a submodule, determining a submodule and combining the submodules; wherein the content of the first and second substances,
the extraction submodule is used for extracting skin replacement subfiles corresponding to all the display interfaces from the skin replacement files corresponding to the application programs; extracting original layout subfiles corresponding to each display interface from the original layout files corresponding to the application program;
the determining submodule is used for determining a target layout subfile corresponding to each display interface based on the original layout subfile corresponding to each display interface and the skin replacement subfile corresponding to each display interface;
and the combining submodule is used for combining the target local subfiles corresponding to all the display interfaces into a target layout file corresponding to the application program.
9. The apparatus according to claim 8, wherein the determining sub-module is specifically configured to extract a first type of replacement description content and a second type of replacement description content from the skin replacement subfile corresponding to each display interface; determining label description content corresponding to the first type of replacement description content and label description content corresponding to the second type of replacement description content in an original layout subfile corresponding to each display interface; and determining a target layout subfile corresponding to each display interface based on the first type of replacement description content and the corresponding label description content, and the second type of replacement description content and the corresponding label description content.
10. The apparatus according to claim 9, wherein the determining submodule is specifically configured to combine the first type of replacement description content and the second type of replacement description content with respective corresponding tag description content, so as to obtain the first type of target layout description content and the second type of target layout description content; and combining the first type of target layout description content and the second type of target layout description content into a target layout subfile corresponding to each display interface.
11. The apparatus according to claim 10, wherein the determining sub-module is specifically configured to extract a page attribute as a current page attribute from each of the first type replacement description content and the second type replacement description content; if the current page attribute does not exist in the corresponding label description content, inserting the current page attribute into the corresponding label description content; if the current page attribute exists in the corresponding label description content, replacing the current page attribute with the original page attribute in the corresponding label description content; the above operations are repeatedly executed until the page attributes are extracted from the replacement description content of the first type and the replacement description content of the second type.
12. The apparatus according to claim 9, wherein the determining sub-module is specifically configured to search for a first type of tag and a second type of tag in the original layout subfile corresponding to each display interface, respectively; acquiring label description content corresponding to the replacement description content of the first type from the labels of the first type; and acquiring the label description content corresponding to the replacement description content of the second type from the labels of the second type.
13. An electronic device, comprising:
at least one processor; and
a memory communicatively coupled to the at least one processor; wherein the content of the first and second substances,
the memory stores instructions executable by the at least one processor to enable the at least one processor to perform the method of any one of claims 1-6.
14. A non-transitory computer readable storage medium having stored thereon computer instructions for causing the computer to perform the method of any one of claims 1-6.
CN202011262364.9A 2020-11-12 2020-11-12 Skin replacement method and device, electronic equipment and storage medium Pending CN112269605A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011262364.9A CN112269605A (en) 2020-11-12 2020-11-12 Skin replacement method and device, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011262364.9A CN112269605A (en) 2020-11-12 2020-11-12 Skin replacement method and device, electronic equipment and storage medium

Publications (1)

Publication Number Publication Date
CN112269605A true CN112269605A (en) 2021-01-26

Family

ID=74340842

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011262364.9A Pending CN112269605A (en) 2020-11-12 2020-11-12 Skin replacement method and device, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN112269605A (en)

Citations (16)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20020103817A1 (en) * 2001-01-31 2002-08-01 Novak Michael J. Methods and systems for synchronizing skin properties
US20110179483A1 (en) * 2010-01-15 2011-07-21 Apple Inc. Methods for handling a file associated with a program in a restricted program environment
US20110314390A1 (en) * 2010-06-18 2011-12-22 Microsoft Corporation Techniques to dynamically modify themes based on messaging
US20130239001A1 (en) * 2012-03-12 2013-09-12 Microsoft Corporation Providing theme variations in a user interface
CN104050002A (en) * 2014-06-24 2014-09-17 广州金山网络科技有限公司 Skin changing method and device for application software interface
CN104166556A (en) * 2014-08-27 2014-11-26 北京金山安全软件有限公司 Software interface replacing method and device and terminal
CN106569885A (en) * 2016-10-13 2017-04-19 乐视控股(北京)有限公司 Application theme switching method and device
CN106802794A (en) * 2016-12-20 2017-06-06 智车优行科技(北京)有限公司 Method for switching theme, device, vehicle and system
CN108628518A (en) * 2017-07-26 2018-10-09 北京视联动力国际信息技术有限公司 A kind of Application Program Interface replacing skins method and device
CN108829485A (en) * 2018-06-25 2018-11-16 腾讯科技(深圳)有限公司 Update method, device, storage medium and the computer equipment of application interface layout
CN108829393A (en) * 2018-06-15 2018-11-16 北京奇艺世纪科技有限公司 A kind of skin file generation method, device and equipment for realizing interface layout
CN109284165A (en) * 2018-10-30 2019-01-29 武汉斗鱼网络科技有限公司 Client skin change method, device, equipment and computer readable storage medium
CN109426541A (en) * 2017-08-31 2019-03-05 阿里巴巴集团控股有限公司 A kind of method and apparatus that the page changes skin
CN110908655A (en) * 2019-10-16 2020-03-24 浙江大搜车软件技术有限公司 Skin changing method, skin changing device, computer equipment and readable storage medium
CN111338725A (en) * 2020-02-17 2020-06-26 Oppo广东移动通信有限公司 Interface layout method and related product
CN111552903A (en) * 2020-04-09 2020-08-18 深圳壹账通智能科技有限公司 Page generation method and device based on HTML (Hypertext markup language) template and computer equipment

Patent Citations (16)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20020103817A1 (en) * 2001-01-31 2002-08-01 Novak Michael J. Methods and systems for synchronizing skin properties
US20110179483A1 (en) * 2010-01-15 2011-07-21 Apple Inc. Methods for handling a file associated with a program in a restricted program environment
US20110314390A1 (en) * 2010-06-18 2011-12-22 Microsoft Corporation Techniques to dynamically modify themes based on messaging
US20130239001A1 (en) * 2012-03-12 2013-09-12 Microsoft Corporation Providing theme variations in a user interface
CN104050002A (en) * 2014-06-24 2014-09-17 广州金山网络科技有限公司 Skin changing method and device for application software interface
CN104166556A (en) * 2014-08-27 2014-11-26 北京金山安全软件有限公司 Software interface replacing method and device and terminal
CN106569885A (en) * 2016-10-13 2017-04-19 乐视控股(北京)有限公司 Application theme switching method and device
CN106802794A (en) * 2016-12-20 2017-06-06 智车优行科技(北京)有限公司 Method for switching theme, device, vehicle and system
CN108628518A (en) * 2017-07-26 2018-10-09 北京视联动力国际信息技术有限公司 A kind of Application Program Interface replacing skins method and device
CN109426541A (en) * 2017-08-31 2019-03-05 阿里巴巴集团控股有限公司 A kind of method and apparatus that the page changes skin
CN108829393A (en) * 2018-06-15 2018-11-16 北京奇艺世纪科技有限公司 A kind of skin file generation method, device and equipment for realizing interface layout
CN108829485A (en) * 2018-06-25 2018-11-16 腾讯科技(深圳)有限公司 Update method, device, storage medium and the computer equipment of application interface layout
CN109284165A (en) * 2018-10-30 2019-01-29 武汉斗鱼网络科技有限公司 Client skin change method, device, equipment and computer readable storage medium
CN110908655A (en) * 2019-10-16 2020-03-24 浙江大搜车软件技术有限公司 Skin changing method, skin changing device, computer equipment and readable storage medium
CN111338725A (en) * 2020-02-17 2020-06-26 Oppo广东移动通信有限公司 Interface layout method and related product
CN111552903A (en) * 2020-04-09 2020-08-18 深圳壹账通智能科技有限公司 Page generation method and device based on HTML (Hypertext markup language) template and computer equipment

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
刘昌平;刘洋;陈佳实;: "Android应用程序界面动态布局研究", 计算机与现代化, no. 05, pages 197 - 200 *

Similar Documents

Publication Publication Date Title
JP7366078B2 (en) Methods, devices, electronic devices, computer readable storage media and computer programs for determining page themes
CN111737965A (en) Document comparison method and device, electronic equipment and readable storage medium
EP3872651A1 (en) Determination method and apparatus for video distribution timeliness
CN111309200B (en) Method, device, equipment and storage medium for determining extended reading content
CN111966633A (en) Method, device, electronic equipment and medium for inquiring child nodes under directory
CN111090991A (en) Scene error correction method and device, electronic equipment and storage medium
CN110532404B (en) Source multimedia determining method, device, equipment and storage medium
CN111610972A (en) Page generation method, device, equipment and storage medium
CN111339462A (en) Component rendering method, device, server, terminal and medium
CN111309872B (en) Search processing method, device and equipment
CN112163143A (en) Page switching method, device, equipment and storage medium
CN111966877A (en) Front-end service method, device, equipment and storage medium
CN112100454A (en) Searching method, searching device, electronic equipment and readable storage medium
CN111400431A (en) Event argument extraction method and device and electronic equipment
CN111832070A (en) Data mask method and device, electronic equipment and storage medium
CN111984883B (en) Label mining method, device, equipment and storage medium
CN112269605A (en) Skin replacement method and device, electronic equipment and storage medium
CN112540958B (en) File processing method, device, equipment and computer storage medium
CN112148279B (en) Log information processing method, device, electronic equipment and storage medium
CN111723318B (en) Page data processing method, device, equipment and storage medium
CN110516030B (en) Method, device and equipment for determining intention word and computer readable storage medium
CN111352685A (en) Input method keyboard display method, device, equipment and storage medium
CN113010811A (en) Webpage acquisition method and device, electronic equipment and computer readable storage medium
CN111076742A (en) Display method and device of AR navigation, electronic equipment and storage medium
CN110765737A (en) Label display method and device

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
TA01 Transfer of patent application right

Effective date of registration: 20211020

Address after: 100176 101, floor 1, building 1, yard 7, Ruihe West 2nd Road, Beijing Economic and Technological Development Zone, Daxing District, Beijing

Applicant after: Apollo Intelligent Connectivity (Beijing) Technology Co., Ltd.

Address before: 2 / F, baidu building, 10 Shangdi 10th Street, Haidian District, Beijing 100085

Applicant before: BEIJING BAIDU NETCOM SCIENCE AND TECHNOLOGY Co.,Ltd.

TA01 Transfer of patent application right
TA01 Transfer of patent application right

Effective date of registration: 20240612

Address after: Room 1103, Building A, Qilin Science and Technology Innovation Park, No. 100 Tianjiao Road, Jiangning District, Nanjing City, Jiangsu Province, 210000

Applicant after: Nanjing Qi Bao Mdt InfoTech Ltd.

Country or region after: China

Address before: 100176 101, floor 1, building 1, yard 7, Ruihe West 2nd Road, Beijing Economic and Technological Development Zone, Daxing District, Beijing

Applicant before: Apollo Intelligent Connectivity (Beijing) Technology Co., Ltd.

Country or region before: China