CN109657233B - Method and device for generating theme, storage medium and electronic equipment - Google Patents

Method and device for generating theme, storage medium and electronic equipment Download PDF

Info

Publication number
CN109657233B
CN109657233B CN201811408356.3A CN201811408356A CN109657233B CN 109657233 B CN109657233 B CN 109657233B CN 201811408356 A CN201811408356 A CN 201811408356A CN 109657233 B CN109657233 B CN 109657233B
Authority
CN
China
Prior art keywords
attribute
parameter
target
association
theme
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
CN201811408356.3A
Other languages
Chinese (zh)
Other versions
CN109657233A (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.)
Neusoft Corp
Original Assignee
Neusoft Corp
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 Neusoft Corp filed Critical Neusoft Corp
Priority to CN201811408356.3A priority Critical patent/CN109657233B/en
Publication of CN109657233A publication Critical patent/CN109657233A/en
Application granted granted Critical
Publication of CN109657233B publication Critical patent/CN109657233B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F40/00Handling natural language data
    • G06F40/20Natural language analysis
    • G06F40/258Heading extraction; Automatic titling; Numbering

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Health & Medical Sciences (AREA)
  • Artificial Intelligence (AREA)
  • Audiology, Speech & Language Pathology (AREA)
  • Computational Linguistics (AREA)
  • General Health & Medical Sciences (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
  • Document Processing Apparatus (AREA)

Abstract

The disclosure relates to a method, a device, a storage medium and an electronic device for generating a theme, wherein a target attribute can be determined in a preset theme template, and a first attribute parameter of the target attribute is acquired; acquiring an attribute association relationship, and determining the association type of the target attribute according to the attribute association relationship; acquiring an associated attribute associated with the target attribute according to the attribute association relationship; determining a second attribute parameter of the associated attribute according to the associated type and the first attribute parameter; and generating a target theme according to the first attribute parameter and the second attribute parameter.

Description

Method and device for generating theme, storage medium and electronic equipment
Technical Field
The disclosure relates to the field of theme generation, and in particular relates to a method, a device, a storage medium and electronic equipment for generating a theme.
Background
With the rapid development of internet technology, social networking sites have become popular, and because of the difference of user groups, the demands of each user on the topic patterns of the social networking sites are different, so that the topic patterns of the pages need to be set according to the demands of the users before the business system is on line.
In general, when generating a theme, a user needs to set each variable attribute to be set in a preset theme template one by one, but a complete set of preset theme templates often contains a large number of variable attributes, so if the variable attributes to be set need to be set one by one, a large number of data adjustments need to be performed according to the operation of the user, thereby increasing the complexity of theme generation and resulting in lower efficiency of theme generation.
Disclosure of Invention
The invention aims to provide a method, a device, a storage medium and electronic equipment for generating a theme.
According to a first aspect of embodiments of the present disclosure, there is provided a method of generating a theme, the method comprising: determining a target attribute in a preset theme template, and acquiring a first attribute parameter of the target attribute; acquiring an attribute association relationship, and determining the association type of the target attribute according to the attribute association relationship; acquiring an associated attribute associated with the target attribute according to the attribute association relationship; determining a second attribute parameter of the associated attribute according to the associated type and the first attribute parameter;
and generating a target theme according to the first attribute parameter and the second attribute parameter.
Optionally, before the attribute association relationship is obtained, the method further includes: determining a plurality of variable attributes in the preset theme template; acquiring type parameters of each variable attribute in the preset theme template; determining variable attributes of the same type according to the type parameters to obtain similar attributes; and obtaining the common attribute identification of the similar attributes, and determining the attribute association relation according to the common attribute identification.
Optionally, the determining the second attribute parameter of the association attribute according to the association type and the first attribute parameter includes: when the association type indicates that the target attribute is a first-level attribute, replacing the current attribute parameter of the association attribute with the first attribute parameter to obtain the second attribute parameter; when the association type indicates that the target attribute is a second-level attribute, taking the current attribute parameter of the association attribute as the second attribute parameter; the second level attribute is a sub-attribute of the first level attribute.
Optionally, the generating the target theme according to the first attribute parameter and the second attribute parameter includes: and adjusting the page style of the preset theme template according to the first attribute parameter and the second attribute parameter to obtain the target theme.
According to a second aspect of embodiments of the present disclosure, there is provided an apparatus for generating a theme, the apparatus comprising: the first acquisition module is used for determining a target attribute in a preset theme template and acquiring a first attribute parameter of the target attribute; the first determining module is used for acquiring attribute association relations and determining the association type of the target attribute according to the attribute association relations; the second acquisition module is used for acquiring the association attribute associated with the target attribute according to the attribute association relation; the second determining module is used for determining a second attribute parameter of the association attribute according to the association type and the first attribute parameter; and the theme generation module is used for generating a target theme according to the first attribute parameter and the second attribute parameter.
Optionally, the apparatus further comprises: the third determining module is used for determining a plurality of variable attributes in the preset theme template; the third acquisition module is used for acquiring the type parameter of each variable attribute in the preset theme template; a fourth determining module, configured to determine variable attributes of the same type according to the type parameter, so as to obtain similar attributes; and a fifth determining module, configured to obtain a common attribute identifier of the similar attribute, and determine the attribute association relationship according to the common attribute identifier.
Optionally, the second determining module includes: a fourth determining submodule, configured to replace a current attribute parameter of the associated attribute with the first attribute parameter when the association type indicates that the target attribute is a first-level attribute, to obtain the second attribute parameter; a fifth determining submodule, configured to use a current attribute parameter of the associated attribute as a second attribute parameter when the association type indicates that the target attribute is a second-level attribute; the second level attribute is a sub-attribute of the first level attribute.
Optionally, the theme generating module is configured to adjust a page style of the preset theme template according to the first attribute parameter and the second attribute parameter, so as to obtain the target theme.
According to a third aspect of embodiments of the present disclosure, there is provided a computer readable storage medium having stored thereon a computer program which when executed by a processor implements the steps of the method of the first aspect of the present disclosure.
According to a fourth aspect of embodiments of the present disclosure, there is provided an electronic device, comprising: a memory having a computer program stored thereon; a processor for executing the computer program in the memory to implement the steps of the method of the first aspect of the disclosure.
Through the technical scheme, the target attribute can be determined in the preset theme template, and the first attribute parameter of the target attribute is acquired; acquiring an attribute association relationship, and determining the association type of the target attribute according to the attribute association relationship; acquiring an associated attribute associated with the target attribute according to the attribute association relationship; determining a second attribute parameter of the associated attribute according to the associated type and the first attribute parameter; and generating a target theme according to the first attribute parameter and the second attribute parameter, so that the target theme can be quickly generated according to the association type and the attribute association relation of the target attribute, thereby avoiding complex operation of setting each variable attribute to be set one by one and improving the theme generation efficiency.
Additional features and advantages of the present disclosure will be set forth in the detailed description which follows.
Drawings
The accompanying drawings are included to provide a further understanding of the disclosure, and are incorporated in and constitute a part of this specification, illustrate the disclosure and together with the description serve to explain, but do not limit the disclosure. In the drawings:
FIG. 1 is a flowchart illustrating a first method of generating a theme in accordance with an exemplary embodiment;
FIG. 2 is a flowchart illustrating a second method of generating a theme in accordance with an exemplary embodiment;
FIG. 3 is a schematic diagram illustrating an attribute association according to an exemplary embodiment;
FIG. 4 is a block diagram illustrating a first apparatus for generating a theme in accordance with an exemplary embodiment;
FIG. 5 is a block diagram illustrating a second apparatus for generating a theme in accordance with an exemplary embodiment;
FIG. 6 is a block diagram illustrating a third apparatus for generating a theme according to an exemplary embodiment;
fig. 7 is a block diagram of an electronic device, according to an example embodiment.
Detailed Description
Specific embodiments of the present disclosure are described in detail below with reference to the accompanying drawings. It should be understood that the detailed description and specific examples, while indicating and illustrating the disclosure, are not intended to limit the disclosure.
The method, the device, the storage medium and the electronic equipment for generating the theme can determine the association type of the target attribute according to the attribute association relationship after acquiring the target attribute selected by the user, and then quickly generate the target theme according to the association type of the target attribute and the attribute association relationship, so that the user can obtain the target theme meeting the requirements of the user only by setting the attribute parameter of the target attribute, thereby avoiding complex operation of setting each variable attribute to be set one by one, improving the theme generation efficiency and further improving the user experience.
The following describes in detail the embodiments of the present disclosure with reference to specific examples.
FIG. 1 is a flowchart illustrating a method of generating a theme, as shown in FIG. 1, according to an exemplary embodiment, the method including the steps of:
s101, determining a target attribute in a preset theme template, and acquiring a first attribute parameter of the target attribute.
The theme may include an interface style of an interface of a terminal (such as a mobile phone, a computer, etc.), the interface style may include an attribute set of various attributes such as a font, a font color, a background color, a margin, etc. on the interface, the preset theme template may include a preset theme template of one or more styles, for example, when the preset theme template includes three theme templates of template 1, template 2, and template 3, the template 1 may correspond to a cartoon type theme, the template 2 may correspond to a landscape type theme, and the template 3 may correspond to a dream type theme; the target attribute may include an attribute selected by the user, for example, the target attribute may include any one of a plurality of attributes such as a font, a background color, a text font, a title background color, a text background color, a menu font color, a text font color, and the like, and the first attribute parameter may include an attribute value indicating the target attribute, for example, when the target attribute is a font and the font corresponding to the attribute value 1 is "Song Ti" and the font corresponding to the attribute value 2 is "regular script", it is indicated that the user wants to set the font to Song Ti when the first attribute parameter is 1 is obtained.
In one possible implementation manner, a user may generate a theme meeting the needs of the user through a login theme generating application (such as a "theme designer"), where an interface of the theme generating application may be generally divided into multiple functional areas, for example, may be divided into a theme selection area, an attribute setting area, a theme style preview area, and other multiple functional areas, so that after the user logs in the theme generating application, the user may select a preset theme template that is needed by the user in the theme selection area, and then set a first attribute parameter of the target attribute in the attribute setting area, and may preview a theme effect set by the user in the theme style preview area.
S102, acquiring an attribute association relationship, and determining the association type of the target attribute according to the attribute association relationship.
The attribute association relationship may include a pre-established attribute correspondence relationship, the association type may include a first level attribute type or a second level attribute type, the first level attribute is a parent attribute of the second level attribute, the second level attribute is a child attribute of the first level attribute, the parent attribute may control a subject style of the subject, the child attribute may implement individuation of the subject, the attribute association relationship may include a correspondence relationship between the parent attribute and the child attribute, when the association type of the target attribute is the parent attribute, the association type of the association attribute associated with the target attribute is the child attribute, and when the association type of the target attribute is the child attribute, the association type of the association attribute associated with the target attribute is the parent attribute.
In the disclosure, before the attribute association relationship is acquired, a plurality of variable attributes in the preset theme template can be determined, then, type parameters of each variable attribute in the preset theme template are acquired, variable attributes of the same type are determined according to the type parameters, like attributes are obtained, a common attribute identifier of the like attributes is acquired, and the attribute association relationship is determined according to the common attribute identifier.
The variable attribute may include an object with an adjustable attribute value on a preset theme template, for example, the variable attribute may include an attribute of text font, title font, menu font, text background color, title background color, text word size, title word size, menu word size, etc., and the attribute may be set by a user, and in a possible implementation, the variable attributes may be determined as a plurality of sub-variables; the type parameter may include an attribute type value indicating which attribute the variable attribute is specifically, for example, the type parameter of "text font" in the variable attribute is A1, the type parameter of "title font" is A2, the type parameter of "menu font" is A3, the type parameter of "text background color" in the variable attribute is B1, the type parameter of "title background color" is B2, the type parameter of "menu background color" is B3, at this time, "text font", "title font", "menu font" are a group of like attributes with common attribute identification of "font", and "text background color", "title background color", "menu background color" are a group of like attributes with common attribute identification of "background color", and then the attribute association relationship determined according to the common attribute identification is: the attributes "font" corresponds to three variable attributes of "text font", "title font", "menu font", and the attributes "background color" corresponds to three variable attributes of "text background color", "title background color", "menu background color", which are merely illustrative and not limiting in this disclosure.
After determining the attribute association relationship, the attribute association relationship and initial values of all the attributes can be recorded through a json file, wherein the initial values can be randomly generated by a system, and a default value can be preset according to the theme requirement of a user.
S103, acquiring the association attribute associated with the target attribute according to the attribute association relationship.
The association attribute may include an attribute corresponding to the target attribute determined according to the attribute association relationship, for example, when the target attribute is "font", the association attribute associated with the target attribute is "text font", "title font", "menu font"; when the target attribute is "text font", the associated attribute associated with the target attribute is "font".
S104, determining a second attribute parameter of the association attribute according to the association type and the first attribute parameter.
In the step, when the association type indicates that the target attribute is a first-level attribute, replacing the current attribute parameter of the association attribute with the first attribute parameter to obtain the second attribute parameter; when the association type indicates that the target attribute is a second-level attribute, taking the current attribute parameter of the association attribute as the second attribute parameter; the second-level attribute is a child attribute of the first-level attribute, so that when the target attribute is the first-level attribute (such as a father attribute), after the first attribute parameter of the target attribute is set by a user, the current attribute parameter of the associated attribute associated with the target attribute can be also modified into the first attribute parameter, thereby improving the efficiency of theme modification; when the target attribute is a second-level attribute (such as a sub attribute), after the first attribute parameter of the target attribute is set by a user, the current attribute parameter of the associated attribute associated with the target attribute is kept unchanged, so that the user can purposefully modify only one or more sub attributes, and the father attribute associated with the sub attribute is kept unchanged, and individuation of the theme can be realized while the main style of the theme is kept unchanged.
S105, generating a target theme according to the first attribute parameter and the second attribute parameter.
In this step, the page style of the preset theme template may be adjusted according to the first attribute parameter and the second attribute parameter, so as to obtain the target theme.
In one possible implementation manner, after the theme generation application program obtains the first attribute parameter and the second attribute parameter, the theme generation application program can present the target theme to the user in a theme style preview area on the interface, and further can generate and store a style file corresponding to the target theme according to a triggering operation of the user, so that the user can directly package and download the style file when using the target theme, and in one possible implementation manner, the style file corresponding to the target theme can be generated through a less language.
By adopting the method, the target theme can be quickly generated according to the association type and the attribute association relation of the target attribute, so that the complex operation of setting each variable attribute to be set one by one is avoided, and the theme generation efficiency is improved.
Fig. 2 is a flowchart of a method for generating a theme according to an exemplary embodiment, and considering that the purpose of the present disclosure is to generate a target theme according to an attribute association relationship and an association type of a target attribute, in this embodiment, the attribute association relationship may be previously established by performing S201 to S204 as shown in fig. 2, so that, when a target attribute selected by a user is acquired, the association type of the target attribute may be determined directly according to the previously established attribute association relationship, and then the target theme may be generated according to the association type of the target attribute and the attribute association relationship, specifically, the target theme may be generated by performing S205 to S209 as shown in fig. 2, the method includes the steps of:
s201, determining a plurality of variable attributes in a preset theme template.
The theme can comprise an interface style of an interface of a terminal (such as a mobile phone, a computer and the like), wherein the interface style can comprise an attribute set of various attributes such as fonts, font colors, background colors, page margins and the like on the interface; the preset theme templates may include preset theme templates of one or more styles, for example, when the preset theme templates include three theme templates of template 1, template 2 and template 3, the template 1 may correspond to a cartoon type theme, the template 2 may correspond to a landscape type theme, and the template 3 may correspond to a fantasy type theme; the variable attribute may include an object with an adjustable attribute value on a preset theme template, for example, the variable attribute may include an attribute of text font, title font, menu font, text background color, title background color, text font size, title font size, menu font size, etc., and the attribute may be set by a user, and in one possible implementation, the variable attributes may be determined as a plurality of sub-variables.
S202, obtaining type parameters of each variable attribute in the preset theme template.
The type parameter may include an attribute type value indicating which attribute the variable attribute is, for example, a type parameter of "text font" in the variable attribute is A1, a type parameter of "title font" is A2, a type parameter of "menu font" is A3, a type parameter of "text background color" in the variable attribute is B1, a type parameter of "title background color" is B2, a type parameter of "menu background color" is B3, a type parameter of "text font size" in the variable attribute is C1, a type parameter of "title font size" is C2, a type parameter of "menu font size" is C3, which is merely illustrative, and the disclosure is not limited thereto.
S203, determining the variable attributes of the same type according to the type parameters to obtain the similar attributes.
For example, taking the obtained plurality of variable attributes as text font, title font, menu font, text background color, title background color, menu background color, and type parameter of "text font" as A1, type parameter of "title font" as A2, type parameter of "menu font" as A3, type parameter of "text background color" as B1, type parameter of "title background color" as B2, type parameter of "menu background color" as B3 as an example, the present disclosure may determine that "text font", "title font", "menu font" are all type a attributes, and "text background color", "title background color", and "menu background color" are all type B attributes, and at this time, it may determine that "text font", "title font", "menu font" is a set of like attributes, and "text background color", "title background color" is another set of like attributes.
S204, obtaining the common attribute identification of the similar attributes, and determining the attribute association relation according to the common attribute identification.
Illustratively, continuing with the example in S203, in this step, the common attribute identifier of the homogeneous attribute "text font", "title font", and "menu font" may be obtained as "font", the common attribute identifier of the homogeneous attribute "text background color", "title background color", and "menu background color" may be obtained as "background color", and in one possible implementation, the common attribute identifier may be determined as a parent variable, and each variable attribute may be determined as a child variable, where the attribute association relationship that may be determined according to the common attribute identifier is: the parent variable "font" corresponds to three sub-variables of "text font", "title font", "menu font", the parent variable "background color" corresponds to three sub-variables of "text background color", "title background color", "menu background color", and the above examples are merely illustrative, and the disclosure is not limited thereto.
In addition, after the attribute association relationship is determined, the attribute association relationship and initial values of all the attributes can be recorded through json files, the initial values can be randomly generated by a system, and a default value can be preset according to the theme requirement of a user.
S205, determining a target attribute in the preset theme template, and acquiring a first attribute parameter of the target attribute.
The target attribute may include an attribute selected by the user, for example, the target attribute may include any one of a plurality of attributes such as a font, a background color, a text font, a title background color, a text background color, a menu font color, a text font color, and the like, and the first attribute parameter may include an attribute value indicating the target attribute, for example, when the target attribute is a font and the font corresponding to the attribute value 1 is "Song Ti" and the font corresponding to the attribute value 2 is "regular script", when the first attribute parameter is 1, it is indicated that the user wants to set the font to Song Ti.
In one possible implementation manner, a user may generate a theme meeting the needs of the user through a login theme generating application (such as a "theme designer"), where an interface of the theme generating application may be generally divided into multiple functional areas, for example, may be divided into a theme selection area, an attribute setting area, a theme style preview area, and other multiple functional areas, so that after the user logs in the theme generating application, the user may select a preset theme template that is needed by the user in the theme selection area, and then set a first attribute parameter of the target attribute in the attribute setting area, and may preview a theme effect set by the user in the theme style preview area.
S206, determining the association type of the target attribute according to the attribute association relation.
The association type may include a first-level attribute type or a second-level attribute type, where the first-level attribute is a parent attribute of the second-level attribute, the second-level attribute is a child attribute of the first-level attribute, the parent attribute may control a main style of the theme, the child attribute may implement personalization of the theme, the attribute association relationship may include a correspondence relationship between the parent attribute and the child attribute, and it is to be noted that, when the association type of the target attribute is the parent attribute, the association type of the association attribute associated with the target attribute is the child attribute, and when the association type of the target attribute is the child attribute, the association type of the association attribute associated with the target attribute is the parent attribute.
S207, acquiring the association attribute associated with the target attribute according to the attribute association relationship.
Illustratively, fig. 3 is a schematic diagram of an attribute association, as shown in fig. 3, according to an exemplary embodiment, where the attribute association is: the parent variable 'font' corresponds to the three sub-variables of 'text font', 'title font', 'menu font', the parent variable 'background color' corresponds to the three sub-variables of 'text background color', 'title background color', 'menu background color', when the target attribute is the parent variable 'font', the associated attribute associated with the target attribute 'font' can be determined to be the sub-variable 'text font', 'title font', 'menu font' according to the attribute association relationship; when the target attribute is the child variable "text background color", it may be determined that the associated attribute associated with the target attribute "text background color" is the parent variable "background color" according to the attribute association relationship, which is merely illustrative and not limited in this disclosure.
S208, determining a second attribute parameter of the association attribute according to the association type and the first attribute parameter.
In the step, when the association type indicates that the target attribute is a first-level attribute, replacing the current attribute parameter of the association attribute with the first attribute parameter to obtain the second attribute parameter; when the association type indicates that the target attribute is a second-level attribute, taking the current attribute parameter of the association attribute as the second attribute parameter; the second-level attribute is a child attribute of the first-level attribute, so that when the target attribute is the first-level attribute (such as a father attribute), after the first attribute parameter of the target attribute is set by a user, the current attribute parameter of the associated attribute associated with the target attribute can be also modified into the first attribute parameter, thereby improving the efficiency of theme modification; when the target attribute is a second-level attribute (such as a sub attribute), after the first attribute parameter of the target attribute is set by a user, the current attribute parameter of the associated attribute associated with the target attribute is kept unchanged, so that the user can purposefully modify only one or more sub attributes, and the father attribute associated with the sub attribute is kept unchanged, and individuation of the theme can be realized while the main style of the theme is kept unchanged.
For example, when the target attribute is "font" and the first attribute parameter is 1 representing "Song Ti", the target attribute is a first level attribute, at this time, the current attribute parameter of the associated attribute "text font", "title font", "menu font" associated with the target attribute "font" may be replaced by the first attribute parameter 1, and the second attribute parameter is 1, so that the text font, title font, and menu font may be all modified to Song Ti, and when the target attribute is "text font" and the first attribute parameter is 2 representing "regular script", the target attribute is a second level attribute, at this time, the current attribute parameter value 1 of the associated attribute "font" associated with the target attribute "text font" may be used as the second attribute parameter, so that only the text may be modified to regular script by Song Ti, and other fonts are still Song Ti, thereby implementing personalization of the subject.
S209, generating a target theme according to the first attribute parameter and the second attribute parameter.
In this step, the page style of the preset theme template may be adjusted according to the first attribute parameter and the second attribute parameter, so as to obtain the target theme.
In one possible implementation manner, after the theme generation application program obtains the first attribute parameter and the second attribute parameter, the theme generation application program may present the target theme to the user in a theme style preview area on the interface, and further may generate and store a style file (such as style file 1, style file 2 and style file 3 shown in fig. 3) corresponding to the target theme according to a triggering operation of the user, so that the user may directly package and download the style file when using the target theme. In one possible implementation, the style file corresponding to the target theme may be generated through a less language.
By adopting the method, the target theme can be quickly generated according to the association type and the attribute association relation of the target attribute, so that the complex operation of setting each variable attribute to be set one by one is avoided, and the theme generation efficiency is improved.
FIG. 4 is a block diagram illustrating an apparatus for generating a theme, as shown in FIG. 3, according to an exemplary embodiment, the apparatus including:
a first obtaining module 401, configured to determine a target attribute in a preset theme template, and obtain a first attribute parameter of the target attribute;
a first determining module 402, configured to obtain an attribute association relationship, and determine an association type of the target attribute according to the attribute association relationship;
a second obtaining module 403, configured to obtain an association attribute associated with the target attribute according to the attribute association relationship;
a second determining module 404, configured to determine a second attribute parameter of the association attribute according to the association type and the first attribute parameter;
the theme generation module 405 is configured to generate a target theme according to the first attribute parameter and the second attribute parameter.
Optionally, fig. 5 is a block diagram of an apparatus for generating a theme according to the embodiment shown in fig. 4, and as shown in fig. 5, the apparatus further includes:
a third determining module 406, configured to determine a plurality of variable attributes in the preset theme template;
a third obtaining module 407, configured to obtain a type parameter of each variable attribute in the preset theme template;
a fourth determining module 408, configured to determine variable attributes of the same type according to the type parameter, so as to obtain similar attributes;
and a fifth determining module 409, configured to obtain a common attribute identifier of the similar attribute, and determine the attribute association relationship according to the common attribute identifier.
Optionally, fig. 6 is a block diagram of an apparatus for generating a theme according to the embodiment shown in fig. 4, and as shown in fig. 6, the second determining module 404 includes:
a fourth determining submodule 4041, configured to replace, when the association type indicates that the target attribute is a first-level attribute, a current attribute parameter of the association attribute with the first attribute parameter to obtain the second attribute parameter;
a fifth determining submodule 4042, configured to, when the association type indicates that the target attribute is a second-level attribute, take a current attribute parameter of the association attribute as the second attribute parameter; the second level attribute is a sub-attribute of the first level attribute.
Optionally, the theme generation module 405 is configured to adjust a page style of the preset theme template according to the first attribute parameter and the second attribute parameter to obtain the target theme.
The specific manner in which the various modules perform the operations in the apparatus of the above embodiments have been described in detail in connection with the embodiments of the method, and will not be described in detail herein.
By adopting the device, the target theme can be quickly generated according to the association type and the attribute association relation of the target attribute, so that the complex operation of setting each variable attribute to be set one by one is avoided, and the theme generation efficiency is improved.
Fig. 7 is a block diagram of an electronic device 700, according to an example embodiment. As shown in fig. 7, the electronic device 700 may include: a processor 701, a memory 702. The electronic device 700 may also include one or more of a multimedia component 703, an input/output (I/O) interface 704, and a communication component 705.
Wherein the processor 701 is configured to control the overall operation of the electronic device 700 to perform all or part of the steps in the method for generating a theme described above. The memory 702 is used to store various types of data to support operation on the electronic device 700, which may include, for example, instructions for any application or method operating on the electronic device 700, as well as application-related data, such as contact data, messages sent and received, pictures, audio, video, and so forth. The Memory 702 may be implemented by any type or combination of volatile or non-volatile Memory devices, such as static random access Memory (Static Random Access Memory, SRAM for short), electrically erasable programmable Read-Only Memory (Electrically Erasable Programmable Read-Only Memory, EEPROM for short), erasable programmable Read-Only Memory (Erasable Programmable Read-Only Memory, EPROM for short), programmable Read-Only Memory (Programmable Read-Only Memory, PROM for short), read-Only Memory (ROM for short), magnetic Memory, flash Memory, magnetic disk, or optical disk. The multimedia component 703 can include a screen and an audio component. Wherein the screen may be, for example, a touch screen, the audio component being for outputting and/or inputting audio signals. For example, the audio component may include a microphone for receiving external audio signals. The received audio signals may be further stored in the memory 702 or transmitted through the communication component 705. The audio assembly further comprises at least one speaker for outputting audio signals. The I/O interface 704 provides an interface between the processor 701 and other interface modules, which may be a keyboard, mouse, buttons, etc. These buttons may be virtual buttons or physical buttons. The communication component 705 is for wired or wireless communication between the electronic device 700 and other devices. Wireless communication, such as Wi-Fi, bluetooth, near field communication (Near Field Communication, NFC for short), 2G, 3G or 4G, or a combination of one or more thereof, the corresponding communication component 705 may thus comprise: wi-Fi module, bluetooth module, NFC module.
In an exemplary embodiment, the electronic device 700 may be implemented by one or more application specific integrated circuits (Application Specific Integrated Circuit, abbreviated ASIC), digital signal processor (Digital Signal Processor, abbreviated DSP), digital signal processing device (Digital Signal Processing Device, abbreviated DSPD), programmable logic device (Programmable Logic Device, abbreviated PLD), field programmable gate array (Field Programmable Gate Array, abbreviated FPGA), controller, microcontroller, microprocessor, or other electronic component for performing the method of generating a theme as described above.
In another exemplary embodiment, a computer readable storage medium is also provided comprising program instructions which, when executed by a processor, implement the steps of the method of generating a theme described above. For example, the computer readable storage medium may be the memory 702 including program instructions described above that are executable by the processor 701 of the electronic device 700 to perform the method of generating a theme described above.
The preferred embodiments of the present disclosure have been described in detail above with reference to the accompanying drawings, but the present disclosure is not limited to the specific details of the above embodiments, and various simple modifications may be made to the technical solutions of the present disclosure within the scope of the technical concept of the present disclosure, and all the simple modifications belong to the protection scope of the present disclosure.
In addition, the specific features described in the foregoing embodiments may be combined in any suitable manner, and in order to avoid unnecessary repetition, the present disclosure does not further describe various possible combinations.
Moreover, any combination between the various embodiments of the present disclosure is possible as long as it does not depart from the spirit of the present disclosure, which should also be construed as the disclosure of the present disclosure.

Claims (8)

1. A method of generating a theme, the method comprising:
determining a target attribute in a preset theme template, and acquiring a first attribute parameter of the target attribute; the target attribute is an attribute selected by a user, and the first attribute parameter is an attribute parameter set by the user for the target attribute;
acquiring an attribute association relationship, and determining the association type of the target attribute according to the attribute association relationship;
acquiring an associated attribute associated with the target attribute according to the attribute association relationship; the attribute association relation characterizes the corresponding relation between the target attribute and the association attribute;
determining a second attribute parameter of the associated attribute according to the associated type and the first attribute parameter;
generating a target theme according to the first attribute parameter and the second attribute parameter;
the determining the second attribute parameter of the associated attribute according to the association type and the first attribute parameter comprises:
when the association type indicates that the target attribute is a first-level attribute, replacing the current attribute parameter of the association attribute with the first attribute parameter to obtain the second attribute parameter;
when the association type indicates that the target attribute is a second-level attribute, taking the current attribute parameter of the association attribute as the second attribute parameter;
the second level attribute is a sub-attribute of the first level attribute.
2. The method of claim 1, wherein prior to the obtaining the attribute association, the method further comprises:
determining a plurality of variable attributes in the preset theme template;
acquiring type parameters of each variable attribute in the preset theme template;
determining variable attributes of the same type according to the type parameters to obtain similar attributes;
and obtaining the common attribute identification of the similar attributes, and determining the attribute association relation according to the common attribute identification.
3. The method of claim 1 or 2, wherein the generating a target theme from the first attribute parameter and the second attribute parameter comprises:
and adjusting the page style of the preset theme template according to the first attribute parameter and the second attribute parameter to obtain the target theme.
4. An apparatus for generating a theme, the apparatus comprising:
the first acquisition module is used for determining a target attribute in a preset theme template and acquiring a first attribute parameter of the target attribute; the target attribute is an attribute selected by a user, and the first attribute parameter is an attribute parameter set by the user for the target attribute;
the first determining module is used for acquiring attribute association relations and determining the association type of the target attribute according to the attribute association relations;
the second acquisition module is used for acquiring the association attribute associated with the target attribute according to the attribute association relation; the attribute association relation characterizes the corresponding relation between the target attribute and the association attribute;
the second determining module is used for determining a second attribute parameter of the association attribute according to the association type and the first attribute parameter;
the theme generation module is used for generating a target theme according to the first attribute parameter and the second attribute parameter;
the second determining module includes:
a fourth determining submodule, configured to replace a current attribute parameter of the associated attribute with the first attribute parameter when the association type indicates that the target attribute is a first-level attribute, to obtain the second attribute parameter;
a fifth determining submodule, configured to use a current attribute parameter of the associated attribute as a second attribute parameter when the association type indicates that the target attribute is a second-level attribute; the second-level attribute is a sub-attribute of the first-level attribute;
the second level attribute is a sub-attribute of the first level attribute.
5. The apparatus of claim 4, wherein the apparatus further comprises:
the third determining module is used for determining a plurality of variable attributes in the preset theme template;
the third acquisition module is used for acquiring the type parameter of each variable attribute in the preset theme template;
a fourth determining module, configured to determine variable attributes of the same type according to the type parameter, so as to obtain similar attributes;
and a fifth determining module, configured to obtain a common attribute identifier of the similar attribute, and determine the attribute association relationship according to the common attribute identifier.
6. The apparatus according to claim 4 or 5, wherein the theme generation module is configured to adjust a page style of the preset theme template according to the first attribute parameter and the second attribute parameter, so as to obtain the target theme.
7. A computer readable storage medium, on which a computer program is stored, characterized in that the program, when being executed by a processor, implements the steps of the method according to any of claims 1-3.
8. An electronic device, comprising:
a memory having a computer program stored thereon;
a processor for executing the computer program in the memory to carry out the steps of the method of any one of claims 1-3.
CN201811408356.3A 2018-11-23 2018-11-23 Method and device for generating theme, storage medium and electronic equipment Active CN109657233B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201811408356.3A CN109657233B (en) 2018-11-23 2018-11-23 Method and device for generating theme, storage medium and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201811408356.3A CN109657233B (en) 2018-11-23 2018-11-23 Method and device for generating theme, storage medium and electronic equipment

Publications (2)

Publication Number Publication Date
CN109657233A CN109657233A (en) 2019-04-19
CN109657233B true CN109657233B (en) 2024-01-02

Family

ID=66111520

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201811408356.3A Active CN109657233B (en) 2018-11-23 2018-11-23 Method and device for generating theme, storage medium and electronic equipment

Country Status (1)

Country Link
CN (1) CN109657233B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110286904A (en) * 2019-05-30 2019-09-27 重庆金融资产交易所有限责任公司 Generate method, apparatus, computer equipment and the storage medium of front end skin

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103761273A (en) * 2014-01-08 2014-04-30 兴天通讯技术(天津)有限公司 Tree structure node attribute configuration method and system
CN106097417A (en) * 2016-06-07 2016-11-09 腾讯科技(深圳)有限公司 Subject generating method, device, equipment
CN106408321A (en) * 2015-07-31 2017-02-15 华为技术有限公司 Management method and device of commodity template, and method and device for calling database, and system
CN107911448A (en) * 2017-11-14 2018-04-13 北京金山安全软件有限公司 Content pushing method and device
CN108228184A (en) * 2018-01-26 2018-06-29 福建中金在线信息科技有限公司 Style sheet generation method, device, electronic equipment and computer storage media
CN108614886A (en) * 2018-05-03 2018-10-02 北京搜狐互联网信息服务有限公司 A kind of generation method and device of subject of Web site
CN108829758A (en) * 2018-05-28 2018-11-16 郑州悉知信息科技股份有限公司 A kind of Website construction method and apparatus

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103761273A (en) * 2014-01-08 2014-04-30 兴天通讯技术(天津)有限公司 Tree structure node attribute configuration method and system
CN106408321A (en) * 2015-07-31 2017-02-15 华为技术有限公司 Management method and device of commodity template, and method and device for calling database, and system
CN106097417A (en) * 2016-06-07 2016-11-09 腾讯科技(深圳)有限公司 Subject generating method, device, equipment
CN107911448A (en) * 2017-11-14 2018-04-13 北京金山安全软件有限公司 Content pushing method and device
CN108228184A (en) * 2018-01-26 2018-06-29 福建中金在线信息科技有限公司 Style sheet generation method, device, electronic equipment and computer storage media
CN108614886A (en) * 2018-05-03 2018-10-02 北京搜狐互联网信息服务有限公司 A kind of generation method and device of subject of Web site
CN108829758A (en) * 2018-05-28 2018-11-16 郑州悉知信息科技股份有限公司 A kind of Website construction method and apparatus

Also Published As

Publication number Publication date
CN109657233A (en) 2019-04-19

Similar Documents

Publication Publication Date Title
WO2020057131A1 (en) Content sharing method, terminal device and storage medium
CN105635063B (en) Internet of Things communication protocol configuration method and device
CN108228293B (en) Interface skin switching method and device
CN110060317A (en) Poster method of automatic configuration, equipment, storage medium and device
CN111274000B (en) Service arrangement method and device, electronic equipment and storage medium
CN105099861A (en) User emotion-based display control method and display control device
CN108762760A (en) Software interface customizing method, device, computer equipment and storage medium
CN104168417A (en) Picture processing method and device
KR101638725B1 (en) Application text adjusting method, device, terminal, program, and recording medium
US20150363380A1 (en) System and method for generating a design template based on graphical input
US20170147364A1 (en) Simultaneous website and mobile app creation method and system
US20150099590A1 (en) Cloud server and method for providing cloud game service
KR20060066989A (en) Mobile communication terminal with improved user interface
US20160092441A1 (en) File Acquiring Method and Device
CN106201212A (en) Generation method, device and the mobile terminal of a kind of application icon
CN108334385B (en) User interface skin management method and device
CN108984623B (en) Data query condition generation method and device, storage medium and electronic equipment
CN104158720A (en) Chatting record clearing method and system, and mobile terminal
CN109657233B (en) Method and device for generating theme, storage medium and electronic equipment
US10931610B2 (en) Method, device, user terminal and electronic device for sharing online image
CN105468606B (en) Webpage saving method and device
WO2010043130A1 (en) Method for generating an optimized mobile terminal’s operation sequence and mobile terminal
JP2020523719A (en) Multilingual keyboard system
CN109656995B (en) Data export method, device, terminal, server and storage medium
WO2015089788A1 (en) Method and tv associated communication device for switching user personalized interface

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
GR01 Patent grant
GR01 Patent grant