Theme generation method and device, electronic equipment and storage medium
By extracting topic elements from the input data and generating topics based on the characteristics of these elements, the problem of the theme library in the prior art restricting users' personalized preferences is solved, and more flexible and personalized topic customization is achieved.
Patent Information
- Application Number
- CN202411935877.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-26
- Publication Date
- 2025-04-15
AI Technical Summary
In the prior art, device theme replacement depends on a preset theme library, making it difficult to meet user personalized preference needs.
By obtaining input data, extracting topic elements, and generating topics based on the characteristics of these elements, personalized topic customization is achieved.
It greatly lowers the operating threshold for theme customization, widens the scope of optional themes, and fully meets users' personalized theme needs.
Smart Images

Figure CN119830913A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of computer technology, and in particular to a theme generation method, device, electronic device and storage medium. Background Art
[0002] With the rapid development and popularization of smart hardware devices, changing device themes has become an important means to improve user experience and product personalization.
[0003] Currently, the theme change generally relies on the theme library pre-installed in the device. When the user changes the theme, he only needs to select his favorite theme from the theme library pre-installed in the device, and the device will immediately apply the theme, thereby changing the appearance and interface style of the device.
[0004] However, the theme library actually limits the scope of selectable themes. Since the number of themes in the theme library is limited and personalized settings are not supported, it is difficult to meet the diverse actual preference needs of users. Summary of the invention
[0005] The present invention provides a theme generation method, device, electronic device and storage medium, which are used to solve the defect in the related art that selecting a theme in a theme library for replacement cannot meet the personalized needs of users.
[0006] The present invention provides a topic generation method, comprising: Get input data; extracting subject elements from the input data; Theme generation is performed based on the element features of the theme elements in the input data.
[0007] According to a topic generation method provided by the present invention, extracting topic elements from the input data includes: Extracting candidate elements from the input data; Based on the priorities of the candidate elements, a topic element is determined from the candidate elements.
[0008] According to a topic generation method provided by the present invention, the priority of the candidate element is determined based on the element form and / or custom operation of the candidate element, and the custom operation is a priority selection operation for the candidate element.
[0009] According to a topic generation method provided by the present invention, the topic generation based on the element features of the topic elements in the input data includes: Based on each element feature category of the subject element, extracting element features of the subject element under each element feature category from the input data; Theme generation is performed based on the element features of the theme elements under each of the element feature categories.
[0010] According to a topic generation method provided by the present invention, the topic generation is performed based on the element features of the topic elements under each element feature category, including: Based on the element features of the subject elements under each of the element feature categories, the original element features under each subject dimension within the subject framework are modified, and based on the modified subject framework, the subject is generated.
[0011] According to a topic generation method provided by the present invention, the input data includes at least one of text, audio, image, and video.
[0012] The present invention also provides a theme generating device, comprising: An input unit, used to obtain input data; An extraction unit, used for extracting subject elements from the input data; A generating unit is used to generate a topic based on the element features of the topic element in the input data.
[0013] The present invention also provides an electronic device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the program, any of the above-mentioned methods for generating a theme is implemented.
[0014] The present invention also provides a non-transitory computer-readable storage medium having a computer program stored thereon, and when the computer program is executed by a processor, the method for generating a topic as described in any one of the above is implemented.
[0015] The present invention also provides a computer program product, comprising a computer program, wherein when the computer program is executed by a processor, the computer program implements any of the above-mentioned methods for generating a topic.
[0016] The theme generation method, device, electronic device and storage medium provided by the present invention realize personalized theme customization by extracting theme elements from input data and generating themes based on the element features of the theme elements in the input data. Moreover, in this process, the user only needs to determine the input data to obtain a customized theme that meets his or her personalized needs, which greatly reduces the operational threshold for theme customization, broadens the scope of optional themes, and fully meets the user's personalized theme customization needs. BRIEF DESCRIPTION OF THE DRAWINGS
[0017] In order to more clearly illustrate the technical solutions in the present invention or related technologies, the following briefly introduces the drawings required for use in the embodiments or related technical descriptions. Obviously, the drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0018] Figure 1 It is a flowchart of the subject generation method provided by the present invention.
[0019] Figure 2 It is a structural schematic diagram of the theme generating device provided by the present invention.
[0020] Figure 3 It is a structural schematic diagram of the electronic device provided by the present invention. DETAILED DESCRIPTION
[0021] In order to make the purpose, technical solution and advantages of the present invention clearer, the technical solution of the present invention will be clearly and completely described below in conjunction with the drawings of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0022] With the rapid development and popularization of smart hardware devices, various device themes have penetrated into the product level of various smart hardware devices.
[0023] For example, a computer theme refers to the interface style of a computer system, which can include window colors, control layouts, icon styles, and other content. By changing these visual contents, the system interface can be beautified. A computer theme can include style, desktop wallpaper, screen saver, mouse pointer, system sound events, icons, etc. Except for the style, which is required, other parts are optional. The content that can be defined by the style can include everything that the user can see in the system. For example, the appearance of the window, font, color button appearance. The style of a computer theme can determine the style of the system that the user sees. Therefore, changing the theme has become an important means to improve user experience and product personalization.
[0024] Currently, the theme change generally relies on the theme library pre-installed in the device. When the user changes the theme, he only needs to select his favorite theme from the theme library pre-installed in the device, and the device will immediately apply the theme, thereby changing the appearance and interface style of the device.
[0025] However, the theme library actually limits the scope of selectable themes. The replaceable themes must come from the theme library provided by the device manufacturer. The number of themes in the theme library is limited and does not support personalized settings, which makes it difficult to meet the actual personalized preference needs of users.
[0026] In view of the above problems, the present invention provides a topic generating method. Figure 1 It is a flow chart of the subject generation method provided by the present invention, such as Figure 1 As shown, the method includes: Step 110, obtaining input data.
[0027] Here, the input data is specifically data input by a user or selected by a user for customized generation of a theme, and the form of the input data may include at least one of text, image, video, and audio.
[0028] For example, the input data may be data directly collected by the electronic device, specifically an image or video captured by the electronic device, or audio recorded by the electronic device, or text input by the electronic device. In addition, the input data may be text obtained by voice transcription of the audio recorded by the electronic device, etc.
[0029] For another example, the input data may be data pre-stored in the electronic device, specifically text, images, video, audio, etc. downloaded by the electronic device through the Internet, or may be text, images, video, audio, etc. received by the electronic device through social software. The embodiments of the present invention do not specifically limit this.
[0030] Step 120, extracting topic elements from the input data.
[0031] Specifically, after the input data is obtained, the subject elements can be extracted from the input data. The main subject elements here are elements used to customize the generated subject, that is, partial objects that constitute the subject, which can be objects such as people, animals, plants and objects.
[0032] In the process of extracting thematic elements from input data, the corresponding element extraction method can be selected based on the modality of the input data. For example, for input data whose modality is text, the thematic elements in the text can be extracted through the form of named entity recognition; for input data whose modality is image, the target contained in the image can be identified as the thematic element through the target detection method for the image; for input data whose modality is audio, audio recognition can be used to determine which specific elements in the audio make sounds, such as wind and rain, or, in the case where the audio is specifically speech, the thematic elements in the speech can be extracted through the form of speech recognition plus named entity recognition, and the embodiments of the present invention do not make specific limitations on this.
[0033] It can be understood that by extracting thematic elements from the input data, the specific elements that the user expects to customize the theme through the input data can be obtained. For example, if the thematic element is a person, it means that the user expects to customize the person image in the theme; for example, if the thematic element is a plant, it means that the user expects to customize the plant image in the theme.
[0034] Step 130, generating a topic based on the element features of the topic element in the input data.
[0035] Specifically, the input data may include not only the subject elements that need to be customized, but also the feature descriptions for the subject elements that need to be customized. For example, in the text modal input data "a yellow puppy lying on the green grass", the feature descriptions for the subject element "animal" include "yellow", "puppy", "lying", and the feature descriptions for the subject element "plant" include "green", "grass".
[0036] Therefore, on the basis of extracting the subject elements from the input data, feature descriptions for the subject elements can also be obtained from the input data, thereby forming feature features for the subject elements. Here, the feature features are feature abstractions of the feature descriptions for the subject elements in the input data. For example, the feature features for the subject element "animal" include {breed: dog; color: yellow; action: lying}.
[0037] It is understandable that combining the theme elements and their element features can fully reflect the information related to theme customization represented by the input data. Therefore, the theme can be generated based on the theme elements and element features.
[0038] Here, the topic generation method may be to input the topic elements and their element features into the large language model, and the large language model generates a topic whose features match the element features of the topic elements. Alternatively, the element features of the topic elements may be applied to modify the element features in an existing topic, thereby generating a topic that matches the description of the input data, which is not specifically limited in the embodiment of the present invention.
[0039] In the method provided by the embodiment of the present invention, by extracting the theme elements from the input data and generating the theme based on the element features of the theme elements in the input data, personalized theme customization is achieved. Moreover, in this process, the user only needs to confirm the input data to obtain a customized theme that meets his or her personalized needs, which greatly reduces the operational threshold for theme customization, broadens the scope of optional themes, and fully meets the user's personalized theme customization needs.
[0040] Based on the above embodiment, in step 120, extracting the subject elements from the input data includes: Extracting candidate elements from the input data; Based on the priorities of the candidate elements, a topic element is determined from the candidate elements.
[0041] Specifically, the input data may include multiple elements that can be used to customize themes. However, in actual operation, too many elements will lead to complex objects that need to be customized, which will affect the efficiency of theme generation and blur the customization content that users are most concerned about, affecting the effect of theme customization.
[0042] To address this problem, in an embodiment of the present invention, factor extraction may be performed on the input data first, and the extracted factors may be recorded as candidate factors. It is understood that the candidate factors here are factors that may be used for customized theme generation, and the number of candidate factors may be one or more.
[0043] In the case where there is only one candidate element, the candidate element can be directly used as a theme element for customized generation of the theme.
[0044] In the case where there are multiple candidate elements, in order to avoid the problem caused by too many elements, the subject element can be selected from each candidate element based on the priority of each candidate element. Here, the priority of the candidate element is specifically the priority of selecting the candidate element as the subject element. The determination of the priority of the candidate element can be a pre-set rule or a user-defined rule, which is not specifically limited in the embodiment of the present invention.
[0045] When selecting a subject element from each candidate element, the candidate element with the highest priority may be selected as the subject element, or the candidate elements may be sorted in descending order of priority, and then a preset number of candidate elements may be selected as the subject element. This embodiment of the present invention does not specifically limit this.
[0046] In the method provided in the embodiment of the present invention, topic elements are selected from candidate elements by priority, thereby limiting the number of topic elements within a controllable range, thereby ensuring the efficiency of topic generation while avoiding blurring of customized content that is of user focus, thereby optimizing the topic customization effect.
[0047] Based on any of the above embodiments, in step 120, the priority of the candidate element is determined based on the element form and / or the custom operation of the candidate element, and the custom operation is a priority selection operation for the candidate element.
[0048] Specifically, the priority of the candidate element can be determined by the element form of the candidate element. The element form here is used to reflect the type and dynamic and static characteristics of the candidate element. For example, when the candidate element is a person, the element form can be a dynamic person; when the candidate element is an animal, the element form can be a dynamic animal; when the candidate element is a plant, the element form can be a static plant; when the candidate element is an object, the element form can be a static object.
[0049] Since users usually pay different attention to different types of candidate elements, and dynamic candidate elements are more likely to attract people's attention than static candidate elements, the priority of candidate elements can be determined based on the element form of the candidate elements, thereby intervening in the determination of the theme elements.
[0050] For example, in the priority determined based on the element form of the candidate elements, people have a higher priority than animals; animals have a higher priority than plants; and plants have a higher priority than objects. That is, people are at the highest priority, and people have a higher priority than various non-people candidate elements. Based on this, when the input data is an image, and the image includes a cat on the grass, the priority of the cat as a candidate element is higher than the priority of the grass as a candidate element; when the input data is an image, and the image includes a person wearing a red skirt, the priority of the person as a candidate element is higher than the priority of the red skirt as a candidate element.
[0051] In addition, the priority of the candidate elements can also be determined by a custom operation, where the custom operation refers to the user's priority selection operation for the candidate elements. The user can select the priority for various candidate elements in advance, which is specifically reflected in: selecting a corresponding priority for each candidate element, or sorting each candidate element in order from high to low priority. Accordingly, the electronic device can receive the priority selection operation from the user, and determine the priority of the candidate elements customized by the user based on this.
[0052] Furthermore, the priority of the candidate elements can also be determined by combining the element form and the custom operation of the candidate elements. For example, the priority of the candidate elements can be determined based on the custom operation first, and for the candidate elements whose priorities cannot be set in the custom operation, the priority of such candidate elements can be determined based on the element form of the candidate elements in conjunction with other candidate elements whose priorities are set based on the custom operation.
[0053] In the method provided in the embodiment of the present invention, the priority of the candidate elements is determined based on the element form and / or the custom operation, so that the priority determination method is more flexible and controllable, and easier to adapt to the user's theme customization needs.
[0054] Based on any of the above embodiments, in step 130, the subject generation based on the element features of the subject element in the input data includes: Based on each element feature category of the subject element, extracting element features of the subject element under each element feature category from the input data; Theme generation is performed based on the element features of the theme elements under each of the element feature categories.
[0055] Specifically, the element feature category refers to the category to which the element feature belongs. For the subject element, there may be multiple element feature categories, and the element feature categories corresponding to different subject elements may be different. For example, when the subject element is a person, the element feature category may include eye features, hair features, hair accessories features, clothing features, etc.; when the subject element is an animal, the element feature category may include variety features, hair features, habit features, color features, etc.; when the subject element is a plant, the element feature category may include variety features, flower features, leaf features, stem features, fruit features, etc.; when the subject element is an object, the element feature category may include size features, morphological features, material features, etc., which are not specifically limited in the embodiments of the present invention.
[0056] After obtaining the subject elements in the input data, the description of each element feature category of the subject elements in the input data can be further extracted from the input data, thereby obtaining the element features of the subject elements under each element feature category. For example, in the text modal input data "a yellow puppy lying on the green grass", for the subject element "animal", there are element features "yellow" under the color feature category, element features "puppy" under the breed feature category, and element features "lying" under the habit feature category.
[0057] Here, based on the element feature categories of the theme elements, element feature extraction is performed, which can avoid missing element features in the input data as much as possible, so that as rich element features as possible can be obtained to achieve more refined theme customization.
[0058] Therefore, themes can be generated based on the theme elements and the element features of the theme elements under each element feature category.
[0059] Based on any of the above embodiments, in step 130, the subject generation based on the element features of the subject elements under each of the element feature categories includes: Based on the element features of the subject elements under each of the element feature categories, the original element features under each subject dimension within the subject framework are modified, and based on the modified subject framework, the subject is generated.
[0060] Specifically, in order to achieve theme generation, a theme framework can be pre-built. The theme framework here can include multiple theme dimensions, as well as element features under each theme dimension. It can be understood that the theme framework is a universal framework, and no matter what style of theme is generated, it can correspond to the theme framework. For example, the theme framework may include at least one theme dimension of {wallpaper, APP icon, button icon, boot sound, loading animation, virtual partner image}, and under each of the theme dimensions, the element features displayed under the theme dimension are maintained, and the element features under different theme dimensions can be the same or different. For example, under the wallpaper dimension, the character's hair features, eye features, clothing features, etc. can be maintained.
[0061] In the embodiment of the present invention, in order to facilitate the distinction between the element features in the subject framework and the element features extracted based on the input data, the original element features in the subject framework are recorded as original element features.
[0062] After obtaining the element features of the subject elements under each element feature category, the original element features under each subject dimension in the subject framework can be modified based on the element features of the subject elements in the input data under each element feature category. Thus, the modified subject framework is consistent with the element features related to the subject represented by the input data.
[0063] After obtaining the modified subject framework, the subject generation can be performed based on the modified subject framework. For example, the modified subject framework can be input into a large language model, and the large language model generates a subject that matches the input data. Alternatively, based on a pre-trained model, the modified subject framework can be mapped into a subject that matches the description of the input data, which is not specifically limited in the embodiment of the present invention.
[0064] Based on any of the foregoing embodiments, the input data includes at least one of text, audio, image, and video.
[0065] Specifically, the input data may be in the form of at least one of text, image, video, and audio. Among them, the input data in the form of text may describe the information required to be included in the personalized subject in the form of natural language; the input data in the form of image may draw the information required to be included in the personalized subject in the form of image; the input data in the form of audio may directly correspond to the information required to be included in the personalized subject in the form of audio, or describe the information required to be included in the personalized subject in the form of voice; the input data in the form of video may be regarded as a combination of the input data in the form of image and audio, thereby reflecting the information required to be included in the personalized subject from two modalities.
[0066] In the method provided in the embodiment of the present invention, various input forms such as text, audio, image, video, etc. are supported, so that users can easily input personalized theme elements, thereby lowering the implementation threshold of personalized theme generation.
[0067] The following is a description of the topic generation device provided by the present invention. The topic generation device described below and the topic generation method described above can be referenced to each other.
[0068] Figure 2 is a schematic diagram of the structure of the theme generation device provided by the present invention, such as Figure 2 As shown, the device comprises: An input unit 210, used to obtain input data; An extraction unit 220, used to extract subject elements from the input data; The generating unit 230 is used to generate a topic based on the element features of the topic element in the input data.
[0069] In the device provided by the embodiment of the present invention, by extracting the theme elements from the input data and generating the theme based on the element features of the theme elements in the input data, personalized theme customization is achieved. Moreover, in this process, the user only needs to confirm the input data to obtain a customized theme that meets his or her personalized needs, which greatly reduces the operational threshold for theme customization, broadens the scope of optional themes, and fully meets the user's personalized theme customization needs.
[0070] Based on any of the above embodiments, the extraction unit is specifically used for: Extracting candidate elements from the input data; Based on the priorities of the candidate elements, a topic element is determined from the candidate elements.
[0071] Based on any of the above embodiments, the priority of the candidate element is determined based on the element form and / or the custom operation of the candidate element, and the custom operation is a priority selection operation for the candidate element.
[0072] Based on any of the above embodiments, the generating unit is specifically used for: Based on each element feature category of the subject element, extracting element features of the subject element under each element feature category from the input data; Theme generation is performed based on the element features of the theme elements under each of the element feature categories.
[0073] Based on any of the above embodiments, the generating unit is specifically used for: Based on the element features of the subject elements under each of the element feature categories, the original element features under each subject dimension within the subject framework are modified, and based on the modified subject framework, the subject is generated.
[0074] Based on any of the foregoing embodiments, the input data includes at least one of text, audio, image, and video.
[0075] Figure 3 An example of a physical structure diagram of an electronic device is shown in FIG. Figure 3 As shown, the electronic device may include: a processor 310, a communication interface 320, a memory 330 and a communication bus 340, wherein the processor 310, the communication interface 320 and the memory 330 communicate with each other through the communication bus 340. The processor 310 may call the logic instructions in the memory 330 to execute the theme generation method, which includes: Get input data; extracting subject elements from the input data; Theme generation is performed based on the element features of the theme elements in the input data.
[0076] In addition, the logic instructions in the above-mentioned memory 330 can be implemented in the form of a software functional unit and can be stored in a computer-readable storage medium when it is sold or used as an independent product. Based on such an understanding, the technical solution of the present invention, or the part that contributes to the relevant technology or the part of the technical solution, can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including a number of instructions to enable a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk and other media that can store program codes.
[0077] On the other hand, the present invention further provides a computer program product, the computer program product comprising a computer program, the computer program can be stored on a non-transitory computer-readable storage medium, when the computer program is executed by a processor, the computer can execute the theme generation method provided by the above methods, the method comprising: Get input data; extracting subject elements from the input data; Theme generation is performed based on the element features of the theme elements in the input data.
[0078] In another aspect, the present invention further provides a non-transitory computer-readable storage medium having a computer program stored thereon, which is implemented when the computer program is executed by a processor to perform the theme generation method provided by the above methods, the method comprising: Get input data; extracting subject elements from the input data; Theme generation is performed based on the element features of the theme elements in the input data.
[0079] The device embodiments described above are merely illustrative, wherein the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the scheme of this embodiment. Ordinary technicians in this field can understand and implement it without paying creative labor.
[0080] Through the description of the above implementation methods, those skilled in the art can clearly understand that each implementation method can be implemented by means of software plus a necessary general hardware platform, and of course, can also be implemented by hardware. Based on this understanding, the above technical solution is essentially or the part that contributes to the relevant technology can be embodied in the form of a software product, and the computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, a disk, an optical disk, etc., including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods described in each embodiment or some parts of the embodiment.
[0081] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present invention.
Claims
1. A topic generation method, characterized in that: include: Get input data; extracting subject elements from the input data; Theme generation is performed based on the element features of the theme elements in the input data.
2. The topic generation method according to claim 1, characterized in that: The extracting of subject elements from the input data comprises: Extracting candidate elements from the input data; Based on the priorities of the candidate elements, a topic element is determined from the candidate elements.
3. The topic generation method according to claim 2, characterized in that: The priority of the candidate element is determined based on the element form and / or the custom operation of the candidate element, and the custom operation is a priority selection operation for the candidate element.
4. The topic generation method according to claim 1, characterized in that: The generating of a topic based on the feature of the topic element in the input data includes: Based on each element feature category of the subject element, extracting element features of the subject element under each element feature category from the input data; Theme generation is performed based on the element features of the theme elements under each of the element feature categories.
5. The topic generation method according to claim 4, characterized in that: The generating of themes based on the element features of the theme elements under each of the element feature categories includes: Based on the element features of the subject elements under each of the element feature categories, the original element features under each subject dimension within the subject framework are modified, and based on the modified subject framework, the subject is generated.
6. The topic generation method according to any one of claims 1 to 5, characterized in that: The input data includes at least one of text, audio, image, and video.
7. A theme generating device, characterized in that: include: An input unit, used to obtain input data; An extraction unit, used for extracting subject elements from the input data; A generating unit is used to generate a topic based on the element features of the topic element in the input data.
8. An electronic device comprising a memory, a processor, and a computer program stored in the memory and running on the processor, characterized in that: When the processor executes the computer program, the theme generation method according to any one of claims 1 to 6 is implemented.
9. A non-transitory computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the theme generation method according to any one of claims 1 to 6 is implemented.
10. A computer program product, comprising a computer program, characterized in that When the computer program is executed by a processor, the theme generation method according to any one of claims 1 to 6 is implemented.