[go: up one dir, main page]

CN112269605B - 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
CN112269605B
CN112269605B CN202011262364.9A CN202011262364A CN112269605B CN 112269605 B CN112269605 B CN 112269605B CN 202011262364 A CN202011262364 A CN 202011262364A CN 112269605 B CN112269605 B CN 112269605B
Authority
CN
China
Prior art keywords
type
replacement
description content
tag
application program
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.)
Active
Application number
CN202011262364.9A
Other languages
Chinese (zh)
Other versions
CN112269605A (en
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
Nanjing Qi Bao Mdt Infotech 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 Nanjing Qi Bao Mdt Infotech Ltd filed Critical Nanjing Qi Bao Mdt Infotech Ltd
Priority to CN202011262364.9A priority Critical patent/CN112269605B/en
Publication of CN112269605A publication Critical patent/CN112269605A/en
Application granted granted Critical
Publication of CN112269605B publication Critical patent/CN112269605B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING OR CALCULATING; 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 OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/60Software deployment
    • G06F8/61Installation
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; 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)
  • Stored Programmes (AREA)
  • User Interface Of Digital Computer (AREA)

Abstract

The application discloses a skin replacement method, a skin replacement 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 an original layout file corresponding to the application program and a skin replacement file corresponding to the application program, which are obtained in advance; and performing skin replacement on each display interface in the application program based on the target local file corresponding to the application program. The embodiment of the application can replace the skin at any time, and does not influence the normal use of the application program; and the installation files are not occupied, so that the resources are saved, and the operation is convenient.

Description

Skin replacement method and device, electronic equipment and storage medium
Technical Field
The application relates to the field of computer application, and further relates to the technical field of computer vision, in particular to a skin replacement method, a skin replacement device, electronic equipment and a storage medium.
Background
To meet the preferences of different users, applications (APP) often provide a variety of skins corresponding to different topics for user selection. Accordingly, the user can select favorite skin to replace according to his own preference. The style of the tag for each page in the application will vary when the user uses different skins, and the style of the tag is generally determined by the shape of the tag itself and the configuration provided on the tag. When changing the skin of an application, this is typically done by changing the configuration on the labels in the various pages of the application. For example, assume that a certain interface of a certain application includes three tags, which are respectively: labels A, B and C, each of which may be provided with text, pictures, videos, etc., the patterns of the three labels being determined by configuration information provided on each of the labels.
In the prior art, when configuration information in labels is changed, a main scheme adopts a reserved resource method, namely, the configuration information of each label in each page is written into an installation file, so that a plurality of sets of skin configuration information are required to be packaged into the installation file at the same time, and the size of the installation file is increased intangibly; moreover, the application program can realize the replacement of the skin only by releasing a new version, and the skin replacement is troublesome; and the service code is even coupled with the skin code.
Disclosure of Invention
The application provides a skin replacement method, a skin replacement device, electronic equipment and a storage medium, which can replace skin at any time without affecting the normal use of an application program; and the installation files are not occupied, so that the resources are saved, and the operation is convenient.
In a first aspect, the present application provides a method of skin replacement, 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 an original layout file corresponding to the application program and a skin replacement file corresponding to the application program, which are obtained in advance;
And performing 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 acquisition module is used for acquiring a skin replacement file corresponding to the application program;
The determining module is used for determining a target layout file corresponding to the application program based on an original layout file corresponding to the application program and a skin replacement file corresponding to the application program, which are acquired in advance;
And the replacing module is used for replacing the skin of 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,
The one or more programs, when executed by the one or more processors, cause the one or more processors to implement the skin replacement method of any embodiment of the present application.
In a fourth aspect, an embodiment of the present application provides a storage medium having stored thereon a computer program which, when executed by a processor, implements the skin replacement method according to any embodiment of the present application.
According to the technology provided by the application, the problem that in the prior art, a plurality of sets of skin configuration information are required to be packaged into the installation file at the same time is solved, and the size of the installation file is increased intangibly; the technical scheme provided by the application can replace the skin at any time without affecting the normal use of the application program; and the installation files are not occupied, so that the resources are saved, and the operation is convenient.
It should be understood that the description in this section is not intended to identify key or critical features of the embodiments of the disclosure, nor is it intended to be used to limit the scope of the disclosure. Other features of the present disclosure will become apparent from the following specification.
Drawings
The drawings are included to provide a better understanding of the present application and are not to be construed as limiting the application. Wherein:
FIG. 1 is a schematic view of a first process of a skin replacement method according to an embodiment of the present application;
FIG. 2 is a schematic illustration of a second procedure for a skin replacement method according to an embodiment of the present application;
FIG. 3 is a schematic view of a third flow chart of a skin replacement method according to an embodiment of the present application;
fig. 4 is a schematic structural view of a skin replacement device according to an embodiment of the present application;
fig. 5 is a schematic structural diagram of a determining module according to an embodiment of the present application;
Fig. 6 is a block diagram of an electronic device for implementing a skin replacement method of an embodiment of the present application.
Detailed Description
Exemplary embodiments of the present application will now be described with reference to the accompanying drawings, in which various details of the embodiments of the present application are included to facilitate understanding, and are to be considered merely exemplary. 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 application. Also, descriptions of well-known functions and constructions are omitted in the following description for clarity and conciseness.
Example 1
Fig. 1 is a schematic flow chart of a skin replacement method according to an embodiment of the present application, where the method may be performed by a skin replacement apparatus or an electronic device, and the apparatus or the electronic device may be implemented by software and/or hardware, and the apparatus or the electronic device may be integrated into any intelligent device having 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 an 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 the 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 skin replacement subfiles corresponding to the display interfaces. For example, assume that a certain application program may include N display interfaces, respectively: display interface 1, display interfaces 2, …, 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, …, 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 an original layout file corresponding to the application program and a skin replacement file corresponding to the application program, which are acquired in advance.
In this step, the electronic device may determine the target layout file corresponding to the application program based on the original layout file corresponding to the application program and the skin replacement file corresponding to the application program, which are acquired in advance. Specifically, the electronic device may extract skin replacement subfiles corresponding to each display interface from skin replacement files corresponding to the application program; extracting original layout subfiles corresponding to each display interface from original layout files corresponding to the application programs; 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 all the target local subfiles corresponding to 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 present application, the electronic device may download in advance in a server to obtain an original layout file corresponding to the application program; the original layout file and the skin replacement file corresponding to the application program can be downloaded in the server at the same time. Because each application program comprises at least one display interface, the original layout file corresponding to the application program comprises the original layout subfiles corresponding to the display interfaces. For example, assume that a certain application program may include N display interfaces, respectively: display interface 1, display interfaces 2, …, 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.
S103, based on the target local file corresponding to the application program, performing skin replacement on each display interface in 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 replacement method provided by the embodiment of the application comprises the steps of firstly obtaining a skin replacement file corresponding to an application program; then, determining a target layout file corresponding to the application program based on the original layout file corresponding to the application program and the skin replacement file corresponding to the application program, which are obtained in advance; and then, based on the target local file corresponding to the application program, performing skin replacement on each display interface in the application program. That is, the present 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 replacement file corresponding to the application program can realize the skin replacement of the application program. In the existing skin replacement method, the service code and the skin replacement code are uniformly configured together, so that the skin replacement code occupies the resources of the packaged file. Because the application adopts the technical means that the layout file and the skin replacement file corresponding to the application program are separated, the problem that in the prior art, a plurality of sets of skin configuration information are required to be packaged into the installation file at the same time is solved, and the size of the installation file is increased intangibly; the technical scheme provided by the application can replace the skin at any time without affecting the normal use of the application program; the installation files are not occupied, the resources are saved, and the operation is convenient; in addition, the technical scheme of the embodiment of the application is simple and convenient to realize, convenient to popularize and wider in application range.
Example two
Fig. 2 is a schematic diagram of a second flow chart of a skin replacement method according to an embodiment of the present application. Further optimization and expansion based on the above technical solution can be combined with the above various alternative embodiments. As shown in fig. 2, the skin replacement method may include the steps of:
S201, acquiring a skin replacement file corresponding to an application program.
The electronic equipment can acquire a skin replacement file corresponding to the application program; the skin replacement file corresponding to each display interface may be style. Each style.bcs may 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 a tag whose view ID (viewID) is 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 the display interfaces from the original layout files corresponding to the application programs.
In this step, the electronic device may extract skin replacement subfiles corresponding to each display interface from skin replacement files corresponding to the application program; extracting original layout subfiles corresponding to each display interface from original layout files corresponding to the application programs; the original layout subfile corresponding to each display interface may be layout1.Xml.
Illustratively, the original layout subfile layout1.Xml is described as follows:
s203, determining target layout subfiles corresponding to all display interfaces based on the original layout subfiles corresponding to all display interfaces and the skin replacement subfiles corresponding to all display interfaces.
In this step, the electronic device may determine the 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 extract, first, a first type of replacement description content and a second type of replacement description content from skin replacement subfiles corresponding to respective display interfaces; then, determining tag description contents corresponding to the first type of replacement description contents and tag description contents corresponding to the second type of replacement description contents in original layout subfiles corresponding to the display interfaces; and determining the target layout subfiles corresponding to the display interfaces based on the first type of replacement description content and the tag description content corresponding to the first type of replacement description content, and the second type of replacement description content and the tag description content corresponding to the second type of replacement description content.
Further, the electronic device may combine the first type of replacement description content and the second type of replacement description content with the tag description content respectively, to obtain a first type of target layout description content and a 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 target layout subfiles corresponding to the display interfaces.
Illustratively, the target layout subfile layout2.Xml is described as follows:
s204, combining all the target local subfiles corresponding to the display interfaces into a target layout file corresponding to the application program.
In this step, the electronic device may combine all the target local subfiles corresponding to the display interface into the target layout file corresponding to the application program. Specifically, the electronic device may combine, according to the structure (ViewTree) of the display tree corresponding to the application program, all the target local subfiles corresponding to the display interface into the target layout file corresponding to the application program.
S205, based on the target local file corresponding to the application program, performing skin replacement on each display interface in the application program.
The skin replacement method provided by the embodiment of the application comprises the steps of firstly obtaining a skin replacement file corresponding to an application program; then, determining a target layout file corresponding to the application program based on the original layout file corresponding to the application program and the skin replacement file corresponding to the application program, which are obtained in advance; and then, based on the target local file corresponding to the application program, performing skin replacement on each display interface in the application program. That is, the present 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 replacement file corresponding to the application program can realize the skin replacement of the application program. In the existing skin replacement method, the service code and the skin replacement code are uniformly configured together, so that the skin replacement code occupies the resources of the packaged file. Because the application adopts the technical means that the layout file and the skin replacement file corresponding to the application program are separated, the problem that in the prior art, a plurality of sets of skin configuration information are required to be packaged into the installation file at the same time is solved, and the size of the installation file is increased intangibly; the technical scheme provided by the application can replace the skin at any time without affecting the normal use of the application program; the installation files are not occupied, the resources are saved, and the operation is convenient; in addition, the technical scheme of the embodiment of the application is simple and convenient to realize, convenient to popularize and wider in application range.
Example III
Fig. 3 is a schematic view of a third flow chart of a skin replacement method according to an embodiment of the present application. Further optimization and expansion based on the above technical solution can be combined with the above various alternative embodiments. As shown in fig. 3, the skin replacement method may include the steps of:
s301, acquiring a skin replacement file corresponding to an application program.
S302, 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 the display interfaces from the original layout files corresponding to the application programs.
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 subfiles corresponding to the respective display interfaces. 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 a tag whose view ID (viewID) is A1.
S304, determining 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 subfiles corresponding to the display interfaces.
In this step, the electronic device may determine, in the original layout subfiles corresponding to the respective display interfaces, tag description contents corresponding to the first type of replacement description contents and tag description contents corresponding to the second type of replacement description contents. Specifically, the electronic device may first search for the first type of tag and the second type of tag in the original layout subfiles corresponding to the respective display interfaces; then, acquiring tag description contents corresponding to the first type of replacement description contents from the first type of tags; and acquiring the tag description content corresponding to the second type of replacement description content from the second type of tag. For example, the electronic device may determine SknTextView and SknTextView corresponding to ". A1" and SknTextView3 corresponding to "# ID" in the original layout subfiles corresponding to the respective display interfaces.
S305, determining a target layout subfile corresponding to each display interface based on the first type of replacement description content and the tag description content corresponding to the first type of replacement description content, and the second type of replacement description content and the tag description content corresponding to the second type of replacement description content.
In this step, the electronic device may determine the target layout subfiles corresponding to the respective display interfaces based on the first type of replacement description content and the tag description content corresponding to the first type of replacement description content, and the second type of replacement description content and the tag description content corresponding to the second type of replacement description content. Specifically, 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 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 target layout subfiles corresponding to the display interfaces.
Further, the electronic device may first extract a page attribute from the first type of replacement description content and the second type of replacement description content as a current page attribute, respectively; if the current page attribute does not exist in the corresponding tag description content, the electronic equipment can insert the current page attribute into the corresponding tag description content; if the current page attribute exists in the corresponding tag description content, the electronic equipment can replace the original page attribute in the corresponding tag description content with the current page attribute; the above operations are repeatedly performed until each page attribute is extracted in the first type of replacement description contents and the second type of replacement description contents.
S306, combining all the target local subfiles corresponding to the display interfaces into a target layout file corresponding to the application program.
S307, based on the target local file corresponding to the application program, performing skin replacement on each display interface in the application program.
The skin replacement method provided by the embodiment of the application comprises the steps of firstly obtaining a skin replacement file corresponding to an application program; then, determining a target layout file corresponding to the application program based on the original layout file corresponding to the application program and the skin replacement file corresponding to the application program, which are obtained in advance; and then, based on the target local file corresponding to the application program, performing skin replacement on each display interface in the application program. That is, the present 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 replacement file corresponding to the application program can realize the skin replacement of the application program. In the existing skin replacement method, the service code and the skin replacement code are uniformly configured together, so that the skin replacement code occupies the resources of the packaged file. Because the application adopts the technical means that the layout file and the skin replacement file corresponding to the application program are separated, the problem that in the prior art, a plurality of sets of skin configuration information are required to be packaged into the installation file at the same time is solved, and the size of the installation file is increased intangibly; the technical scheme provided by the application can replace the skin at any time without affecting the normal use of the application program; the installation files are not occupied, the resources are saved, and the operation is convenient; in addition, the technical scheme of the embodiment of the application is simple and convenient to realize, convenient to popularize and wider in application range.
Example IV
Fig. 4 is a schematic structural view of a skin replacement device according to 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 acquiring module 401 is configured to acquire a skin replacement file corresponding to an application program;
The determining module 402 is configured to determine a target layout file corresponding to the application program based on the original layout file corresponding to the application program and the skin replacement file corresponding to the application program, which are acquired in advance;
The replacing module 403 is configured to replace skin 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 determining module according to an embodiment of the present application. As shown in fig. 5, the determining module 402 includes: extracting the submodule 4021, determining the submodule 4022 and combining the submodule 4023; wherein,
The extracting sub-module 4021 is configured to extract skin replacement sub-files corresponding to each display interface from skin replacement files corresponding to the application program; extracting original layout subfiles corresponding to each display interface from the original layout files corresponding to the application programs;
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 combination sub-module 4023 is configured to combine all target local sub-files corresponding to the display interfaces into a target layout file corresponding to the application program.
Further, the determining submodule 4022 is specifically configured to extract, in the skin replacement subfiles corresponding to the display interfaces, a first type of replacement description content and a second type of replacement description content respectively; determining tag description contents corresponding to the first type of replacement description contents and tag description contents corresponding to the second type of replacement description contents in original layout subfiles corresponding to the display interfaces; and determining the target layout subfiles corresponding to the display interfaces based on the first type of replacement description contents and the tag description contents corresponding to the first type of replacement description contents, and the second type of replacement description contents and the tag description contents corresponding to the second type of replacement description contents.
Further, the determining submodule 4022 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 contents to obtain the first type of target layout description content and the second type of target layout description content; and combining the target layout description content of the first type and the target layout description content of the second type into target layout subfiles corresponding to all display interfaces.
Further, the determining submodule 4022 is specifically configured to extract a page attribute from the first type of replacement description content and the second type of replacement description content as a current page attribute respectively; if the current page attribute does not exist in the corresponding tag description content, inserting the current page attribute into the corresponding tag description content; if the current page attribute exists in the corresponding tag description content, replacing the original page attribute in the corresponding tag description content with the current page attribute; the above operations are repeatedly performed until each page attribute is extracted in the first type of replacement description content and the second type of replacement description content.
Further, the determining submodule 4022 is specifically configured to search the first type of tag and the second type of tag in the original layout subfiles corresponding to the display interfaces respectively; acquiring tag description contents corresponding to the first type of replacement description contents from the first type of tags; and acquiring the tag description content corresponding to the second type of replacement description content from the second type of tag.
The skin replacement device can execute the method provided by any embodiment of the application, and has the corresponding functional modules and beneficial effects of the execution method. Technical details not described in detail in this embodiment can be seen in the skin replacement method provided in any embodiment 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.
As shown in fig. 6, a block diagram of an electronic device according to 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 telephones, smartphones, wearable devices, and other similar computing devices. The components shown herein, their connections and relationships, and their functions, are meant to be exemplary only, and are not meant to limit implementations of the applications described and/or claimed herein.
As shown in fig. 6, the electronic device includes: one or more processors 601, memory 602, and interfaces for connecting the components, including high-speed interfaces and low-speed interfaces. 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 executing within the electronic device, including instructions stored in or on memory to display graphical information of the GUI on an external input/output device, such as a display device coupled to the interface. In other embodiments, multiple processors and/or multiple buses may be used, if desired, along with multiple memories and multiple memories. Also, multiple electronic devices may be connected, each providing a portion of the necessary operations (e.g., as a server array, a set of blade servers, or a multiprocessor system). One processor 601 is illustrated in fig. 6.
The memory 602 is a non-transitory computer readable storage medium provided by the present application. Wherein the memory stores instructions executable by the at least one processor to cause the at least one processor to perform the skin replacement method provided by the present application. The non-transitory computer readable storage medium of the present application stores computer instructions for causing a computer to execute the skin replacement method provided by the present application.
The memory 602 is used as a non-transitory computer readable storage medium for storing non-transitory software programs, non-transitory computer executable programs, and modules, such as program instructions/modules (e.g., the acquisition module 401, the determination module 402, and the replacement module 403 shown in fig. 4) corresponding to the skin replacement method according to the embodiment of the present application. The processor 601 performs various functional applications of the server and data processing, i.e., implements the skin replacement method in the above-described method embodiments, by running non-transitory software programs, instructions, and modules stored in the memory 602.
The memory 602 may include a storage program area and a storage data area, wherein the storage program area may store an operating system, at least one application program required for a function; the storage data area may store data created from the use of the skin-changed electronic device, etc. In addition, 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, memory 602 optionally includes memory remotely located relative to processor 601, which 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, memory 602, input device 603 and output device 604 may be connected by a bus or otherwise, for example in fig. 6.
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-changed electronic device, such as a touch screen, keypad, mouse, trackpad, touchpad, pointer stick, one or more mouse buttons, trackball, joystick, and like input devices. The output means 604 may include a display device, auxiliary lighting means (e.g., LEDs), tactile feedback means (e.g., vibration motors), and the like. 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 may be a touch screen.
Various implementations of the systems and techniques described here can be realized in digital electronic circuitry, integrated circuitry, application specific ASIC (application specific integrated circuit), computer hardware, firmware, software, and/or combinations thereof. These various embodiments may include: implemented in one or more computer programs, the one or more computer programs may be executed and/or interpreted on a programmable system including at least one programmable processor, which may be a special purpose or general-purpose programmable processor, that may receive data and instructions from, and transmit data and instructions to, a storage system, at least one input device, and at least one output device.
These computing programs (also referred to as programs, software applications, or code) include machine instructions for a programmable processor, and may be implemented in a high-level procedural and/or object-oriented programming language, and/or in assembly/machine language. 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 pointing device (e.g., a mouse or 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 may 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 input, speech input, or tactile input.
The systems and techniques described here can be implemented in a computing system that includes a background 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 background, 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 a client and a server. The client and server are typically 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 hosts and VPS service are overcome.
According to the technical scheme of the embodiment of the application, firstly, skin replacement files corresponding to application programs are acquired; then, determining a target layout file corresponding to the application program based on the original layout file corresponding to the application program and the skin replacement file corresponding to the application program, which are obtained in advance; and then, based on the target local file corresponding to the application program, performing skin replacement on each display interface in the application program. That is, the present 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 replacement file corresponding to the application program can realize the skin replacement of the application program. In the existing skin replacement method, the service code and the skin replacement code are uniformly configured together, so that the skin replacement code occupies the resources of the packaged file. Because the application adopts the technical means that the layout file and the skin replacement file corresponding to the application program are separated, the problem that in the prior art, a plurality of sets of skin configuration information are required to be packaged into the installation file at the same time is solved, and the size of the installation file is increased intangibly; the technical scheme provided by the application can replace the skin at any time without affecting the normal use of the application program; the installation files are not occupied, the resources are saved, and the operation is convenient; in addition, the technical scheme of the embodiment of the application is simple and convenient to realize, convenient to popularize and wider in application range.
It should be appreciated that various forms of the flows shown above may be used to reorder, add, or delete steps. For example, the steps described in the present application may be performed in parallel, sequentially, or in a different order, so long as the desired results of the technical solution disclosed in the present application can be achieved, and are not limited herein.
The above embodiments do not limit the scope of the present application. It will be apparent to those skilled in the art that various modifications, combinations, sub-combinations and alternatives are possible, depending on design requirements and other factors. Any modifications, equivalent substitutions and improvements made within the spirit and principles of the present application should be included in the scope of the present application.

Claims (10)

1. A method of skin replacement, the method comprising:
acquiring a skin replacement file corresponding to an application program;
Extracting skin replacement subfiles corresponding to each display interface from 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 programs;
extracting a first type of replacement description content and a second type of replacement description content from the skin replacement subfiles corresponding to the display interfaces respectively;
Determining tag description contents corresponding to the first type of replacement description contents and tag description contents corresponding to the second type of replacement description contents in original layout subfiles corresponding to the display interfaces;
Determining a target layout subfile corresponding to each display interface based on the first type of replacement description content and the tag description content corresponding to the first type of replacement description content, and the second type of replacement description content and the tag description content corresponding to the second type of replacement description content;
Combining all target layout subfiles corresponding to the display interfaces into target layout files corresponding to the application programs;
and performing skin replacement on each display interface in the application program based on the target layout file corresponding to the application program.
2. The method according to claim 1, wherein the determining the target layout subfiles corresponding to the display interfaces based on the first type of replacement description content and the tag description content corresponding thereto, and the second type of replacement description content and the tag description content corresponding thereto includes:
Combining 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 target layout description content of the first type and the target layout description content of the second type into target layout subfiles corresponding to all display interfaces.
3. The method according to claim 2, wherein the merging the first type of replacement description content and the second type of replacement description content with the respective corresponding tag description content to obtain the first type of target layout description content and the second type of target layout description content includes:
Extracting a page attribute from the first type of replacement description content and the second type of replacement description content respectively to serve as a current page attribute;
If the current page attribute does not exist in the corresponding tag description content, inserting the current page attribute into the corresponding tag description content; if the current page attribute exists in the corresponding tag description content, replacing the original page attribute in the corresponding tag description content with the current page attribute; the above operations are repeatedly performed until each page attribute is extracted in the first type of replacement description content and the second type of replacement description content.
4. The method according to claim 1, wherein determining, in the original layout subfiles corresponding to the respective display interfaces, the tag description corresponding to the first type of replacement description content and the tag description corresponding to the second type of replacement description content includes:
Searching for a first type of label and a second type of label in the original layout subfiles corresponding to the display interfaces respectively;
Acquiring tag description contents corresponding to the first type of replacement description contents from the first type of tags; and acquiring the tag description content corresponding to the second type of replacement description content from the second type of tag.
5. A skin replacement device, the device comprising: the device comprises an acquisition module, an extraction sub-module, a determination sub-module, a combination sub-module and a replacement module; wherein,
The acquisition module is used for acquiring a skin replacement file corresponding to the application program;
The extraction sub-module is used for extracting skin replacement sub-files corresponding to each display interface from skin replacement files corresponding to the application program; extracting original layout subfiles corresponding to each display interface from the original layout files corresponding to the application programs;
The determination submodule is used for respectively extracting a first type of replacement description content and a second type of replacement description content from the skin replacement subfiles corresponding to the display interfaces; determining tag description contents corresponding to the first type of replacement description contents and tag description contents corresponding to the second type of replacement description contents in original layout subfiles corresponding to the display interfaces; determining a target layout subfile corresponding to each display interface based on the first type of replacement description content and the tag description content corresponding to the first type of replacement description content, and the second type of replacement description content and the tag description content corresponding to the second type of replacement description content;
The combination sub-module is used for combining all target layout sub-files corresponding to the display interfaces into target layout files corresponding to the application programs;
and the replacing module is used for replacing the skin of each display interface in the application program based on the target layout file corresponding to the application program.
6. The apparatus of claim 5, 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 contents to obtain the first type of target layout description content and the second type of target layout description content; and combining the target layout description content of the first type and the target layout description content of the second type into target layout subfiles corresponding to all display interfaces.
7. The apparatus according to claim 6, wherein the determining submodule is configured to extract a page attribute as a current page attribute in 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, inserting the current page attribute into the corresponding tag description content; if the current page attribute exists in the corresponding tag description content, replacing the original page attribute in the corresponding tag description content with the current page attribute; the above operations are repeatedly performed until each page attribute is extracted in the first type of replacement description content and the second type of replacement description content.
8. The device of claim 5, wherein the determining submodule is specifically configured to search for a first type of tag and a second type of tag in the original layout subfiles corresponding to the display interfaces respectively; acquiring tag description contents corresponding to the first type of replacement description contents from the first type of tags; and acquiring the tag description content corresponding to the second type of replacement description content from the second type of tag.
9. An electronic device, comprising:
At least one processor; and
A memory communicatively coupled to the at least one processor; wherein,
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-4.
10. A non-transitory computer readable storage medium storing computer instructions for causing the computer to perform the method of any one of claims 1-4.
CN202011262364.9A 2020-11-12 2020-11-12 Skin replacement method and device, electronic equipment and storage medium Active CN112269605B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011262364.9A CN112269605B (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 CN112269605B (en) 2020-11-12 2020-11-12 Skin replacement method and device, electronic equipment and storage medium

Publications (2)

Publication Number Publication Date
CN112269605A CN112269605A (en) 2021-01-26
CN112269605B true CN112269605B (en) 2024-07-12

Family

ID=74340842

Family Applications (1)

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

Country Status (1)

Country Link
CN (1) CN112269605B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115756679A (en) * 2022-11-01 2023-03-07 深圳市普森斯科技有限公司 Application program skin changing method and device, storage medium and electronic equipment

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108829393A (en) * 2018-06-15 2018-11-16 北京奇艺世纪科技有限公司 A kind of skin file generation method, device and equipment for realizing interface layout
CN109426541A (en) * 2017-08-31 2019-03-05 阿里巴巴集团控股有限公司 A kind of method and apparatus that the page changes skin

Family Cites Families (14)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6791581B2 (en) * 2001-01-31 2004-09-14 Microsoft Corporation Methods and systems for synchronizing skin properties
US8850572B2 (en) * 2010-01-15 2014-09-30 Apple Inc. Methods for handling a file associated with a program in a restricted program environment
US8332752B2 (en) * 2010-06-18 2012-12-11 Microsoft Corporation Techniques to dynamically modify themes based on messaging
US9354779B2 (en) * 2012-03-12 2016-05-31 Microsoft Technology Licensing, Llc Providing theme variations in a user interface
CN104050002B (en) * 2014-06-24 2018-04-03 广州猎豹网络科技有限公司 A kind of software interface skin change method and device
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
CN106802794B (en) * 2016-12-20 2020-06-16 智车优行科技(北京)有限公司 Theme switching method, device, vehicle and system
CN108628518A (en) * 2017-07-26 2018-10-09 北京视联动力国际信息技术有限公司 A kind of Application Program Interface replacing skins method and device
CN108829485B (en) * 2018-06-25 2021-03-02 腾讯科技(深圳)有限公司 Application interface layout updating method and device, storage medium and computer equipment
CN109284165B (en) * 2018-10-30 2021-11-09 武汉斗鱼网络科技有限公司 Client skin changing method, device, equipment and computer readable storage medium
CN110908655B (en) * 2019-10-16 2023-12-05 浙江大搜车软件技术有限公司 Skin changing method, device, computer equipment and readable storage medium
CN111338725B (en) * 2020-02-17 2023-11-14 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 (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
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

Also Published As

Publication number Publication date
CN112269605A (en) 2021-01-26

Similar Documents

Publication Publication Date Title
CN112099790B (en) Methods, devices, equipment and storage media for determining page themes
JP7096917B2 (en) Matrix text storage methods, devices and electronic devices
JP2021174516A (en) Knowledge graph construction method, device, electronic equipment, storage medium, and computer program
CN112199620B (en) Page operation method and device, electronic equipment and storage medium
CN110727434B (en) Rendering method, rendering device, electronic equipment and storage medium
CN110532489A (en) Methods of exhibiting, device, equipment and the medium of the page
EP3872651A1 (en) Determination method and apparatus for video distribution timeliness
CN112446728B (en) Advertisement recall method, device, equipment and storage medium
US20210406299A1 (en) Method and apparatus for mining entity relationship, electronic device, and storage medium
CN111309872B (en) Search processing method, device and equipment
CN110532415A (en) Picture search processing method, device, equipment and storage medium
CN110990057B (en) Method, device, equipment and medium for extracting small program subchain information
CN112163143B (en) Page switching method, device, equipment and storage medium
US20210216598A1 (en) Method and apparatus for mining tag, device, and storage medium
CN110532404B (en) Source multimedia determining method, device, equipment and storage medium
CN112269605B (en) Skin replacement method and device, electronic equipment and storage medium
CN110517079B (en) Data processing method, apparatus, electronic device and storage medium
CN112860535B (en) User page testing method and device, electronic equipment and storage medium
CN112148279B (en) Log information processing method, device, electronic equipment and storage medium
US11462013B2 (en) Method and apparatus for recognizing target object, electronic device and storage medium
CN111966433B (en) Method, device, storage medium and electronic device for changing language in page
CN112099791B (en) Method, device, equipment and storage medium for setting the style of a page in a browser
CN112948718B (en) Information delivery method, device, equipment and medium
CN111966846B (en) Image query method, device, electronic equipment and storage medium
EP3889770A1 (en) Mini program material processing method and apparatus, electronic device, and medium

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

TA01 Transfer of patent application right
GR01 Patent grant
GR01 Patent grant