Card template generation method, card generation method, device and apparatus
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- BEIJING ZITIAO NETWORK TECH CO LTD
- Filing Date
- 2025-02-06
- Publication Date
- 2026-08-07
AI Technical Summary
[0004]然而,上述实现方式会导致卡片模板库中的卡片模板数量越来越多,造成卡片模板的维护难度大、成本高,并且还会降低消息卡片的生成效率
[0028] The technical solution disclosed in this application displays a first interactive interface in response to a card template generation instruction. This first interactive interface includes a component area and a canvas area. In response to a selection operation of a card component in the component area, the selected target card component is displayed in the canvas area. Then, an initial card template is generated based on the target card component. The target card component in the initial card template is then configured to generate a target card template. Thus, when generating a target message card, the target message card can be obtained by configuring the content of the card components in the target card template. This allows different message cards to be generated based on the same card template without storing the generated different message cards as card templates in a card template library. This effectively controls the number of card templates in the card template library, reduces the maintenance difficulty and cost of card templates, and improves the generation efficiency of message cards.
Smart Images

Figure CN122528841A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of computer technology, and in particular to a card template generation method, card generation method, apparatus, and device. Background Technology
[0002] A message card is a type of information displayed in card format, which can include images, text, videos, links, and other multimedia elements. It is widely used in instant messaging (IM), social media, and other scenarios.
[0003] In related technologies, generating message cards typically involves selecting any card template from a card template library and editing its content. This includes adding various content components and adjusting the card style, with the edited card template then serving as the message card. Simultaneously, the message card is stored as a card template in the card template library.
[0004] However, the above implementation method will lead to an increasing number of card templates in the card template library, making card template maintenance difficult and costly, and will also reduce the efficiency of message card generation. Summary of the Invention
[0005] This application provides a card template generation method, card generation method, apparatus, and device, which can effectively control the number of card templates in the card template library, reduce the maintenance difficulty and cost of card templates, and improve the generation efficiency of message cards.
[0006] In a first aspect, embodiments of this application provide a card template generation method, including:
[0007] In response to the card template generation instruction, a first interactive interface is displayed, which includes a component area and a canvas area.
[0008] In response to a selection operation on a card component in the component area, the selected target card component is displayed in the canvas area;
[0009] Based on the target card component, generate an initial card template;
[0010] Configure the target card component in the initial card template to generate the target card template.
[0011] Secondly, embodiments of this application provide a card generation method, including:
[0012] In response to a card generation instruction, a target card template is obtained from a card template library, the target card template being generated according to the card template generation method described in the first aspect embodiment above;
[0013] The target card template is displayed in the second interactive interface;
[0014] Configure the content of the card components in the target card template to generate the target message card.
[0015] Thirdly, embodiments of this application provide a card template generation apparatus, comprising:
[0016] The interface display module is used to display a first interactive interface in response to the card template generation instruction. The first interactive interface includes a component area and a canvas area.
[0017] A component display module is used to display the selected target card component in the canvas area in response to a selection operation on a card component in the component area;
[0018] The first generation module is used to generate an initial card template based on the target card component;
[0019] The second generation module is used to configure the target card component in the initial card template and generate the target card template.
[0020] Fourthly, embodiments of this application provide a card generation apparatus, including:
[0021] The template acquisition module is used to retrieve a target card template from the card template library in response to a card generation instruction. The target card template is generated according to the card template generation device described in the aforementioned third aspect embodiment.
[0022] A template display module is used to display the target card template in the second interactive interface;
[0023] The card generation module is used to configure the content of the card components in the target card template and generate the target message card.
[0024] Fifthly, embodiments of this application provide an electronic device, including:
[0025] A processor and a memory, the memory being used to store a computer program, and the processor being used to invoke and run the computer program stored in the memory to perform the method as described in the first aspect embodiment or the second aspect embodiment.
[0026] In a sixth aspect, embodiments of this application provide a computer-readable storage medium for storing a computer program that causes a computer to perform the methods described in the first aspect embodiment or the second aspect embodiment.
[0027] In a seventh aspect, embodiments of this application provide a computer program product containing program instructions that, when executed on an electronic device, cause the electronic device to perform the method described in the first aspect embodiment or the second aspect embodiment described above.
[0028] The technical solution disclosed in this application displays a first interactive interface in response to a card template generation instruction. This first interactive interface includes a component area and a canvas area. In response to a selection operation of a card component in the component area, the selected target card component is displayed in the canvas area. Then, an initial card template is generated based on the target card component. The target card component in the initial card template is then configured to generate a target card template. Thus, when generating a target message card, the target message card can be obtained by configuring the content of the card components in the target card template. This allows different message cards to be generated based on the same card template without storing the generated different message cards as card templates in a card template library. This effectively controls the number of card templates in the card template library, reduces the maintenance difficulty and cost of card templates, and improves the generation efficiency of message cards. Attached Figure Description
[0029] To more clearly illustrate the technical solutions in the embodiments of this application, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0030] Figure 1 A flowchart illustrating a card template generation method provided in this application embodiment;
[0031] Figure 2a A schematic diagram of a first interactive interface provided in an embodiment of this application;
[0032] Figure 2b A schematic diagram illustrating the selection of a target card component from a component area, provided as an embodiment of this application;
[0033] Figure 3a This is a schematic diagram of another first interactive interface provided in an embodiment of this application;
[0034] Figure 3b This is a schematic diagram of another first interactive interface provided in an embodiment of this application;
[0035] Figure 3c This is a schematic diagram of yet another first interactive interface provided in an embodiment of this application;
[0036] Figure 4A flowchart for generating a target card template is provided in an embodiment of this application;
[0037] Figure 5 A flowchart illustrating another method for generating a target card template, as provided in this application embodiment;
[0038] Figure 6 A flowchart of a card generation method provided in an embodiment of this application;
[0039] Figure 7a A schematic diagram illustrating the display of a target card template in a second interactive interface, provided as an embodiment of this application;
[0040] Figure 7b This is a schematic diagram illustrating how to configure the content of card components in a target card template to generate a target message card, as provided in an embodiment of this application.
[0041] Figure 7c A schematic diagram of a second interactive interface provided in an embodiment of this application;
[0042] Figure 8a This is a schematic diagram of another second interactive interface provided in an embodiment of this application;
[0043] Figure 8b A schematic diagram illustrating at least one configuration item of a card display component in a second configuration area, provided as an embodiment of this application;
[0044] Figure 8c A schematic diagram illustrating at least one configuration item of a card display component in a second configuration area, provided as an embodiment of this application;
[0045] Figure 9 A flowchart for generating a target message card is provided in an embodiment of this application;
[0046] Figure 10 This is a schematic diagram illustrating a specific example of generating a target message card, provided in an embodiment of this application.
[0047] Figure 11 A flowchart illustrating another card generation method provided in this application embodiment;
[0048] Figure 12 A schematic block diagram of a card template generation device provided in an embodiment of this application;
[0049] Figure 13 A schematic block diagram of a card generation apparatus provided in an embodiment of this application;
[0050] Figure 14 This is a schematic block diagram of an electronic device provided in an embodiment of this application. Detailed Implementation
[0051] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments. All other embodiments obtained by those skilled in the art based on the embodiments of this application without creative effort are within the scope of protection of this application.
[0052] It should be noted that the terms "first," "second," etc., in the specification, claims, and accompanying drawings of this application are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments of this application described herein can be implemented in orders other than those illustrated or described herein. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover non-exclusive inclusion; for example, a process, method, system, product, or server that comprises a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or devices.
[0053] In this application, the terms "exemplary" or "for example" are used to indicate that something is an example, illustration, or description. Any embodiment or solution described as "exemplary" or "for example" in this application should not be construed as being better or more advantageous than other embodiments or solutions. Specifically, the use of terms such as "exemplary" or "for example" is intended to present the relevant concepts in a specific manner.
[0054] In the description of the embodiments in this application, unless otherwise stated, "multiple" means two or more, that is, at least two. "At least one" means one or more. "Any" means any one or any several.
[0055] As mentioned earlier, in related technologies, generating message cards typically involves selecting any card template from a card template library and editing its content. This includes adding various content components and adjusting the card style, with the edited card template then serving as the message card. Simultaneously, the message card is stored as a card template in the card template library. However, this approach leads to an ever-increasing number of card templates in the library, resulting in high maintenance difficulty and cost, and also reduces the efficiency of message card generation.
[0056] To address the aforementioned technical problems, this application provides a card template generation method, card generation method, apparatus, and device to solve the problem that when generating message cards using related technologies, the number of card templates in the card template library is increasing, resulting in high maintenance difficulty and cost of card templates, and also reducing the efficiency of message card generation.
[0057] The technical solutions provided by the embodiments of this application will be described in detail below through some examples. The embodiments described below can be combined with each other, and the same or similar concepts or processes may not be repeated in some embodiments.
[0058] Figure 1 This is a flowchart illustrating a card template generation method provided in an embodiment of this application. The card template generation method of this application embodiment can be executed by a card template generation device, which can consist of hardware and / or software and can be integrated into an electronic device. In this application, the electronic device may include, but is not limited to, smartphones, tablets, in-vehicle terminals, laptops, desktop computers, smart TVs, and wearable devices. Wearable devices may include smart glasses, smartwatches, and head-mounted devices. No limitation is made on the type of electronic device herein.
[0059] like Figure 1 As shown, the method may include the following steps:
[0060] S101, in response to the card template generation instruction, displays the first interactive interface, which includes a component area and a canvas area.
[0061] It should be understood that the aforementioned card template generation instruction can refer to a card template creation instruction. The card template can also be called a message card template or a card message template.
[0062] In this application, the first interactive interface may refer to the card template generation interface.
[0063] In some optional embodiments, when a first user needs to generate a card template, a card template generation instruction can be sent to the electronic device in different ways. Upon detecting the card template generation instruction, the electronic device will display a first interactive interface to the first user. Then, the first user can generate the required card template based on the first interactive interface. In this application, the first user can refer to a developer.
[0064] The first user sends the card template generation instruction to the electronic device through various methods, including but not limited to one of the following methods:
[0065] The first method involves triggering the card template generation control displayed on the electronic device's screen by clicking or selecting, thereby sending a card template generation instruction to the electronic device.
[0066] The second method involves sending card template generation instructions to electronic devices via voice.
[0067] The third method involves sending a card generation instruction to an electronic device by sending a specific gesture that corresponds to the card template generation instruction.
[0068] The specific gesture can be a pre-set gesture, such as a clenched fist or a thumbs-up gesture, and there are no restrictions on it. Furthermore, this specific gesture can be adjusted; that is, when it is necessary to change the specific gesture corresponding to the card template generation instruction, the first user can change the specific gesture.
[0069] In some optional embodiments, the electronic device of this application displays a first interactive interface to a first user, such as... Figure 2a As shown.
[0070] exist Figure 2a The first interactive interface may include a component area and a canvas area. The component area is used to store multiple card components, such as text components, rich text components, image components, and tag components. Each card component has a different purpose; for example, text components are used to record, transmit, and display text information; rich text components are used to display various content such as text, images, and videos, making the content display richer; image components are used to display image content and enhance visual effects; and tag components are used to provide descriptive text or titles.
[0071] Furthermore, the canvas area is used to display the card components selected by the first user from the component area, and the first user can perform layout design and other operations on the displayed card components in the canvas area.
[0072] It should be noted that the multiple card components stored in the above component area can be stored individually as a unit, or they can be classified and stored according to the card component type, or they can be stored according to the number of times or frequency of use of the card components. For example, card components with the same number of times or frequency of use can be stored in the same category, etc. There are no specific restrictions on the storage method of card components in the component area.
[0073] S102, in response to a selection operation on a card component in the component area, displays the selected target card component in the canvas area.
[0074] Considering that a card template can be obtained by combining at least one card component, according to the design requirements of the card template, the first user can select a target card component from the component area of the first interactive interface. The number of target card components is one or more, that is, at least one.
[0075] Therefore, when the electronic device detects that the first user has selected any card component in the component area, it can display the target card component selected by the first user in the component area in the canvas area according to the selection operation, so that the first user can generate a target card template based on the target card component displayed in the canvas area.
[0076] In some alternative embodiments, when the first user selects a target card component from the component area of the first interactive interface, it can be achieved through one of the following methods:
[0077] Method 1: Select the target card component by clicking on the card component in the component area;
[0078] Method 2: Select the target card component by dragging and dropping card components from the component area;
[0079] Method 3: Select the target card component by entering the target card component identifier in the search box. The target card component identifier can be understood as the unique information of the target card component, such as the name or number of the target card component.
[0080] For example, such as Figure 2b As shown, assuming the card template design requirements require the use of card components including text components and image components, the first user can find the text components and image components in the component area of the first interactive interface according to the card template design requirements, and drag and drop the text components and image components to display them as target card components in the canvas area of the first interactive interface.
[0081] S103, Generate an initial card template based on the target card component.
[0082] Typically, a card template design requirement can be a design file, which may include the layout and style information of the card template. Therefore, this application can parse the design file of the card template to obtain the layout and style information of the card template from the design file. Then, based on the layout and style information of the card template, the target card components displayed in the canvas area are combined to obtain the initial card template.
[0083] In some optional embodiments, the combination of target card components displayed in the canvas area based on the layout and style information of the card template to obtain an initial card template may include one of the following:
[0084] In the first scenario, the electronic device automatically combines the target card components displayed in the canvas area based on the layout and style information of the card template to obtain the initial card template.
[0085] In the second scenario, the first user manually combines the target card components displayed in the canvas area based on the layout and style information of the card template to obtain the initial card template.
[0086] In the third scenario, the electronic device first automatically combines the target card components displayed in the canvas area according to the layout and style information of the card template to obtain the combination result. Then, the first user adjusts the component result and determines the adjusted combination result as the initial card template. This allows the first user to flexibly adjust the combination result generated by the electronic device to obtain an initial card template that meets the actual needs of the first user.
[0087] The first user can adjust the component result by adjusting the style and / or layout of the target card component in the combined result. Optionally, adjusting the style of the target card component in the combined result can be adjusting at least one of the target card component's color, font, background, and border; adjusting the layout of the target card component in the combined result can be adjusting at least one of the target card component's position, size, and arrangement order.
[0088] It should be understood that adjusting the style and / or layout of the target card component in the above-mentioned combination result may be adjusting the style of the target card component in the combination result; or, it may be adjusting the layout of the target card component in the combination result; or, it may be adjusting both the style and layout of the target card component in the combination result.
[0089] S104, Configure the target card component in the initial card template to generate the target card template.
[0090] In this application, the target card template may be, but is not limited to, a logistics card template, an event card template, a coupon card template, a service progress card template, a work card template, and a user card template.
[0091] In some alternative embodiments, the first user can configure whether each target card component in the initial card template supports secondary configuration. Then, the initial card template after configuration can be used as the target card template, and the target card template can be saved and published, thereby facilitating the subsequent generation of different message cards based on the target card template.
[0092] It should be understood that the aforementioned secondary configuration refers to allowing a second user to customize the card components in the card template according to their own needs, such as changing the content of the card components. The second user can be any user other than the first user who has a need to generate message cards, such as operators or users; no specific restrictions are imposed on them here.
[0093] The aforementioned saving of the target card template may refer to saving the target card template in the local storage module or a specified storage area, so that the first user can quickly count the number of existing card templates when they need to count the number of card templates.
[0094] The aforementioned publishing of the target card template may refer to uploading the target card template to the network or card generation platform, so that a second user can use the target card template to generate a message card.
[0095] For example, suppose the initial card template includes two target card components: a text component and an image component. The first user can configure whether the text component supports secondary configuration, and the same applies to the image component. If the first user configures the text component to support secondary configuration but disables it for the image component, then in the final generated target card template, the text component will allow the second user to customize its settings according to their needs, while the image component will not.
[0096] The technical solution disclosed in this application displays a first interactive interface in response to a card template generation instruction. This first interactive interface includes a component area and a canvas area. In response to a selection operation of a card component in the component area, the selected target card component is displayed in the canvas area. Then, an initial card template is generated based on the target card component. The target card component in the initial card template is then configured to generate a target card template. Thus, when generating a target message card, the target message card can be obtained by configuring the content of the card components in the target card template. This allows different message cards to be generated based on the same card template without storing the generated different message cards as card templates in a card template library. This effectively controls the number of card templates in the card template library, reduces the maintenance difficulty and cost of card templates, and improves the generation efficiency of message cards.
[0097] In some alternative embodiments, such as Figure 3a As shown, the first interactive interface in this application also includes a first configuration area, which is used to configure the information of the target card component displayed in the canvas area to obtain the target card template.
[0098] The following is combined with Figure 4 The content described in step S104 of the foregoing embodiments will be further explained and illustrated. For example... Figure 4 As shown, step S104 above may include the following steps S104-1A to S104-2A:
[0099] S104-1A, in response to a configuration operation for a target card component in the first configuration area, adjusts the configuration switch state of the target card component.
[0100] S104-2A, Generate a target card template based on the adjusted target card components.
[0101] In some optional embodiments, when setting configuration information for each target card component regarding whether secondary configuration is supported, the first user can trigger each target card component in the canvas area by clicking or selecting, etc., to send a configuration instruction for each target component to the electronic device. This allows the electronic device to display the configuration interface of each target card component in the first configuration area of the first interactive interface according to the configuration instruction. Figure 3b As shown.
[0102] Then, the first user can set configuration information for each target card component in the first configuration area to indicate whether secondary configuration is supported, according to configuration requirements. This allows the electronic device to detect the first user's configuration operation for each target card component and adjust the configuration switch status of each target card component.
[0103] Furthermore, this application can use an initial card template, including each adjusted target card component, as the target card template. It can also save and publish the target card template, thereby laying the foundation for generating different message cards based on it.
[0104] In some optional embodiments, adjusting the configuration switch state of each target card component may include: switching the configuration switch state of each target card component from a first state to a second state; or, switching the configuration switch state of each target card component from a second state to a first state.
[0105] The first state can be a state that supports secondary configuration, and the second state can be a state that does not support secondary configuration.
[0106] In some alternative embodiments, the target card component displayed in the canvas area may include at least one configurable item. It should be understood that each card component has a different function, so the corresponding configurable items also differ. For example, when the card component is a text component, the configurable items of the text component may include at least one of the following: font size, text content, font weight, font color, and font style.
[0107] So, let's combine the following... Figure 5 The content described in step S104 of the foregoing embodiments will be further explained and illustrated. For example... Figure 5 As shown, step S104 above may include the following steps S104-1B to S104-2B:
[0108] S104-1 B, in response to a configuration operation for a target card component in the first configuration area and at least one configurable item in the target card component, adjust the configuration switch state of the target card component and at least one configurable item in the target card component.
[0109] S104-2B, Generate a target card component based on the adjusted target card component and at least one configurable item in the target card component.
[0110] Optionally, when setting configuration information for each target card component and at least one configurable item within each target card component regarding whether secondary configuration is supported, the first user can trigger each target card component in the canvas area through clicking or selecting, etc., to send a configuration instruction for each target component to the electronic device. This allows the electronic device to display the configuration interface for each target card component and at least one configurable item within each target card component in the first configuration area of the first interactive interface, according to the configuration instruction. Figure 3c As shown.
[0111] Then, the first user can set configuration information in the first configuration area, according to configuration requirements, whether secondary configuration is supported for each target card component and at least one configurable item in each target card component, so that the electronic device can detect the configuration operation of the first user for each target card component and at least one configurable item in each target card component, and adjust the configuration switch state of each target card component and at least one configurable item in each target card component.
[0112] Furthermore, this application can use an initial card template, including each adjusted target card component and at least one configurable item in each target card component, as a target card template. Moreover, the target card template can be saved and published, thereby laying the foundation for generating different message cards based on the target card template.
[0113] In some optional embodiments, adjusting the configuration switch state of each target card component and at least one configurable item in each target card component may include: switching the configuration switch state of each target card component and at least one configurable item in each target card component from a first state to a second state; or, switching the configuration switch state of each target card component and at least one configurable item in each target card component from a second state to a first state.
[0114] In other words, this application generates a target card template by setting configuration information on whether secondary configuration is supported for each target card component in the initial card template, or for each target card component in the initial card template and at least one configurable item in each target card component. This allows a second user to customize the card components in the target card template that support secondary configuration when generating a message card based on the target card template. This enables the generation of different message cards based on the same card template, thereby meeting the personalized needs of message cards, improving the utilization rate of card templates, and increasing the generation efficiency of message cards.
[0115] After a detailed explanation of the card template generation process, the following section will focus on the process of generating target message cards based on the generated card templates. Figure 6 This is a flowchart illustrating a card generation method provided in an embodiment of this application. Figure 6 As shown, the method may include the following steps:
[0116] S201, in response to the card generation instruction, retrieves the target card template from the card template library.
[0117] The target card template is generated according to the aforementioned card template generation method embodiment.
[0118] In this application, the card template library is a pre-built database for storing card templates, which can store multiple card templates.
[0119] Furthermore, each card template has a corresponding identification information. This identification information refers to the information that can uniquely identify the card template, that is, the unique information of the card template, such as the card template ID.
[0120] In some optional embodiments, when generating a message card, the second user may send a card generation instruction carrying a target card template identifier to the electronic device. When the electronic device detects the card generation instruction, it parses the instruction to obtain the target card template identifier. Then, based on the target card template identifier, the target card template is retrieved from a card template library storing multiple card templates.
[0121] The aforementioned target card template identifier refers to information that can uniquely identify the target card template, that is, the unique information of the target card template, such as the ID of the target card template.
[0122] S202, the target card template is displayed in the second interactive interface.
[0123] S203, Configure the content of the card components in the target card template to generate the target message card.
[0124] The second interactive interface may refer to the message card generation interface.
[0125] In some alternative embodiments, such as Figure 7a As shown, this application can display the target card template obtained from the card template library in the second interactive interface, so that the second user can personalize the card components in the target card template according to their own needs to generate the target message card.
[0126] As an optional implementation, when a second user personalizes the card components in a target card template, they can trigger any card component in the template by clicking or selecting it. Then, based on the second user's triggering action on that card component, the electronic device can display a configuration interface associated with that card component on the second interactive interface, allowing the second user to personalize the card component's content within that configuration interface.
[0127] Furthermore, when a second user completes or saves a content-configured target card template, the content-configured target card template is identified as the target message card.
[0128] For the detailed implementation process of configuring the content of the card components in the target card template and generating the target message card, please refer to [link to relevant documentation]. Figure 7b As shown. Among them, Figure 7b In addition to selecting from multiple options provided by the drop-down list, the personalized content corresponding to any configurable item in the card can also support personalized input operations by a second user. This allows users to flexibly configure the content of the card component according to their own needs, thereby achieving a unique personalized experience.
[0129] In some embodiments, this application may optionally further include: storing the target message card in a preset manner in response to a storage operation on the target message card. The preset storage method may be storing the generated target message card in both a server-side database and a local database, so that subsequent users can retrieve the target message card for rendering and display. The server-side database may be any caching server in a content delivery network, or other physical or virtual servers; no restrictions are placed on the server itself.
[0130] In some optional embodiments, the second interactive interface of this application may further include: a preview control, such as... Figure 7cAs shown. Therefore, after the second user personalizes the card component in the configuration interface, this application may optionally include: displaying the generated effect of the target message card in the second interactive interface in response to the triggering operation of the preview control. This allows the second user to carefully check the content of the target message card before saving it, identify and correct any errors, ensure the accuracy and completeness of the message card content, and avoid wasting a lot of time and resources due to repeated modifications to the saved target message card, thus saving significant time and resources.
[0131] The technical solution disclosed in this application displays a first interactive interface in response to a card template generation instruction. This first interactive interface includes a component area and a canvas area. In response to a selection operation of a card component in the component area, the selected target card component is displayed in the canvas area. Then, an initial card template is generated based on the target card component. The target card component in the initial card template is then configured to generate a target card template. Thus, when generating a target message card, the target message card can be obtained by configuring the content of the card components in the target card template. This allows different message cards to be generated based on the same card template without storing the generated different message cards as card templates in a card template library. This effectively controls the number of card templates in the card template library, reduces the maintenance difficulty and cost of card templates, and improves the generation efficiency of message cards.
[0132] In some alternative embodiments, such as Figure 8a As shown, the second interactive interface in this application also includes a second configuration area, which is used to configure the content of the card components in the target card template to obtain the target message card.
[0133] The following is combined with Figure 9 The content described in step S203 of the foregoing embodiments will be further explained and illustrated. For example... Figure 9 As shown, step S203 above may include the following steps S203-1 to S203-4:
[0134] Step S203-1: Determine the configuration switch status of the card component in the target card template.
[0135] The target card template may include at least one card component, and each card component has a corresponding configuration switch.
[0136] The above configuration switch states include: secondary configuration supported and secondary configuration not supported.
[0137] In some alternative embodiments, the configuration switch state of each card component can be determined by obtaining the configuration information of each card component in the target card template.
[0138] Optionally, based on the configuration information of each card component, the configuration switch state of each card component is determined. This may include determining the configuration switch state of any card component to be in the first state if it is determined that the configuration information of any card component supports secondary configuration, and determining the configuration switch state of that card component to be in the second state if it is determined that the configuration information of any card component does not support secondary configuration.
[0139] The first state specifically refers to the state that supports secondary configuration, while the second state specifically refers to the state that does not support secondary configuration.
[0140] Step S203-2: When the configuration switch state of the card component is in the first state, at least one configurable item of the card component is displayed in the second configuration area.
[0141] In some optional embodiments, when the configuration switch state of any card component in the target card template is determined to be in the first state, at least one configurable item of that card component can be displayed in the second configuration area of the second interactive interface, so that the second user can perform content configuration operations on at least one configurable item of that card component in the second configuration area. (See also...) Figure 8b .
[0142] In some alternative embodiments, when the configuration switch state of any card component in the target card template is determined to be in the first state, and when it is detected that the second user triggers the card component by clicking or selecting, at least one configurable item of the card component can be displayed in the second configuration area of the second interactive interface for content configuration operations. This allows the second user to perform content configuration operations on at least one configurable item of the card component in the second configuration area. (See also...) Figure 8c .
[0143] Step S203-3, in response to a configuration operation for at least one configurable item in the second configuration area, adjust at least one configurable item of the card component.
[0144] Step S203-4: Obtain the target message card based on the adjusted target card template.
[0145] In some optional embodiments, for at least one configurable item of the card component displayed in the second configuration area, the second user can selectively configure at least one configurable item in any card component according to their own needs. Furthermore, when a completion or save operation of the second user on the content-configured target card template is detected, the content-configured target card template is determined as the target message card.
[0146] For example, such as Figure 10 As shown, assuming the target card template contains text and image components, and both components are in the first configuration switch state, at least one configurable item for the text component (font size, text content, and font color) and at least one configurable item for the image component (image label and image format) can be displayed in the second configuration area. The second user can then modify the font size in the text component from size 4 to size 3, the text content from XXX to YYY, and the font color from black to red. Additionally, the user can modify the image label in the image component from image1 to WWW and the image format from format1 to format2. Afterward, the second user can click the save control in the second interactive interface to confirm the adjusted target card template as the target message card.
[0147] This application embodiment determines the configuration switch state of the card component in the target card template. When the configuration switch state of the card component is in the first state, at least one configurable item of the card component is displayed in the second configuration area. Then, in response to the configuration operation of at least one configurable item in the second configuration area, at least one configurable item of the card component is adjusted. Then, based on the adjusted target card component, the target message card is obtained. In this way, when generating a target message card based on the target card template, different message cards can be generated based on the same card template by customizing the card components in the target card template that support secondary configuration. This can meet the personalized needs of message cards, improve the utilization rate of card templates, and improve the generation efficiency of message cards.
[0148] In some alternative embodiments, considering that after the target message card is generated and stored, if a user needs to use the target message card, a rendering command can be sent to render and display the target message card. The following is in conjunction with... Figure 11 The process of rendering and displaying the target message card described in the embodiments of this application will be explained.
[0149] like Figure 11 As shown, the method may include the following steps:
[0150] S301, in response to a rendering instruction for the target message card, obtains the card data and rendering protocol of the target message card.
[0151] S302, Render the target message card according to the card data and rendering protocol to obtain the rendering result.
[0152] S303 displays the rendering result.
[0153] Optionally, considering that the generated target message card can be stored on the server and in a local database, when a user (e.g., the first user and / or the second user) needs to use the target message card, they can first send a rendering instruction for the target message card to the electronic device, carrying the identifier of the target message card to be rendered and displayed in the rendering instruction. Then, after receiving the rendering instruction sent by the user, the electronic device can parse the instruction to obtain the target message card identifier. Then, based on the target message card identifier, it can retrieve the card data and rendering protocol of the target message card from the local database.
[0154] If the card data and rendering protocol of the target message card are obtained from the local database, the target message card is rendered according to the card data and rendering protocol to obtain the rendering result, and the rendering result is displayed.
[0155] However, because the storage space in the local database is smaller than that on the server, message cards in the local database are deleted periodically based on their storage time and infrequent use. Therefore, there are situations where the card data and rendering protocol for the target message card cannot be retrieved from the local database.
[0156] To address the aforementioned issues, if the card data and rendering protocol of the target message card are not obtained from the local database, this application sends a rendering instruction for the target message card to the server via an electronic device. The server then parses the rendering instruction to obtain the target message card identifier. Based on this identifier, the application retrieves the card data and rendering protocol of the target message card from its own database.
[0157] If the server obtains the card data and rendering protocol of the target message card from its own database, it sends the card data and rendering protocol of the target message card to the electronic device, so that the electronic device can render the target message card according to the card data and rendering protocol of the target message card, obtain the rendering result, and display the rendering result.
[0158] In some optional embodiments, the above-described rendering of the target message card based on the card data and rendering protocol to obtain the rendering result may include the following steps:
[0159] The first step is to obtain the first, second, and third fields from the rendering protocol of the target message card.
[0160] The second step is to obtain the first target data corresponding to the first field, the second target data corresponding to the second field, and the third target data corresponding to the third field from the card data of the target message card.
[0161] The third step is to render the target message card based on the first target data, the second target data, and the third target data to obtain the rendering result.
[0162] The first field is the target card template identifier field, which can be represented as cardTp l id; the second field is the secondary configuration content of the card component in the target card template after content configuration, which can be represented as tp l Data; the third field is the specific value of the secondary configuration content of the card component in the target card template, which can be represented as providers.
[0163] Optionally, after obtaining the first, second, and third fields from the rendering protocol of the target message card, the card template data corresponding to the target card template can be obtained based on the first field. Next, a rendering tree is constructed based on the card template data. Then, the content configuration of each card component in the rendering tree is traversed to check for secondary configuration content in the second field. If any card component has secondary configuration content, the rendering operation is performed based on the specific value of that card component's secondary configuration (i.e., the third field). If any card component does not have secondary configuration content, the rendering operation is performed based on the default value of that card component to obtain the rendering result of the target message card. Finally, the rendering result is displayed on an electronic device screen for the user's convenience in viewing and using the rendering result.
[0164] In this embodiment of the application, when rendering and displaying a target message card, the corresponding target data is obtained from the card data of the target message card according to three fields in the rendering protocol, and the target message card is rendered according to the three target data corresponding to the three fields. In this way, by determining which card components in the target card template need to be reconfigured, the card components that have been reconfigured are rendered, while the card components that have not been reconfigured use the pre-rendered data. This can improve the rendering speed of the target message card and improve the user experience.
[0165] The following is a reference to the appendix. Figure 12 This application describes a card template generation apparatus according to an embodiment. Figure 12 As shown, the card template generation device 400 includes: an interface display module 410, a component display module 420, a first generation module 430, and a second generation module 440.
[0166] The interface display module 410 is used to display a first interactive interface in response to the card template generation instruction. The first interactive interface includes a component area and a canvas area.
[0167] The component display module 420 is configured to display the selected target card component in the canvas area in response to a selection operation on a card component in the component area.
[0168] The first generation module 430 is used to generate an initial card template based on the target card component;
[0169] The second generation module 440 is used to configure the target card component in the initial card template and generate the target card template.
[0170] In one optional implementation of this application embodiment, the first interactive interface further includes a first configuration area, and the second generation module 440 includes:
[0171] The first adjustment unit is configured to adjust the configuration switch state of the target card component in response to a configuration operation on the target card component in the first configuration area.
[0172] The first generation unit is used to generate the target card template based on the adjusted target card component.
[0173] In one optional implementation of this application embodiment, the adjustment unit is specifically used for:
[0174] Switch the configuration switch state of the target card component from the first state to the second state;
[0175] Alternatively, the configuration switch state of the target card component can be switched from the second state to the first state.
[0176] In one optional implementation of this application, the target card component includes at least one configurable item, and the second generation module 440 further includes:
[0177] The second adjustment unit is configured to adjust the configuration switch state of the target card component and at least one configurable item in the target card component in response to a configuration operation on the target card component in the first configuration area.
[0178] The second generation unit is used to generate the target card component based on the adjusted target card component and at least one configurable item in the target card component.
[0179] It should be understood that the device embodiments and the foregoing method embodiments can correspond to each other, and similar descriptions can be referred to the method embodiments. To avoid repetition, further details will not be provided here. Specifically, Figure 12 The device 400 shown can perform Figure 1 The corresponding method embodiments, and the foregoing and other operations and / or functions of each module in device 400 are respectively implemented to achieve Figure 1 For the sake of brevity, the corresponding processes in each method are not described in detail here.
[0180] The apparatus 400 of this application embodiment has been described above from the perspective of functional modules in conjunction with the accompanying drawings. It should be understood that this functional module can be implemented in hardware, in software instructions, or in a combination of hardware and software modules. Specifically, the steps of the first aspect method embodiment in this application can be completed by integrated logic circuits in the processor's hardware and / or by software instructions. The steps of the first aspect method disclosed in this application embodiment can be directly embodied as being executed by a hardware decoding processor, or by a combination of hardware and software modules in the decoding processor. Optionally, the software module can be located in a mature storage medium in the art, such as random access memory, flash memory, read-only memory, programmable read-only memory, electrically erasable programmable memory, registers, etc. This storage medium is located in memory, and the processor reads information from the memory and, in conjunction with its hardware, completes the steps of the first aspect method embodiment described above.
[0181] The following is a reference to the appendix. Figure 13 This application describes a card generation apparatus based on an embodiment. Figure 13 As shown, the card generation device 500 includes: a template acquisition module 510, a template display module 520, and a card generation module 530.
[0182] The template acquisition module 510 is used to acquire a target card template from the card template library in response to a card generation instruction. The target card template is generated according to the card template generation device described in the third aspect embodiment.
[0183] Template display module 520 is used to display the target card template in the second interactive interface;
[0184] The card generation module 530 is used to configure the content of the card components in the target card template and generate the target message card.
[0185] In one optional implementation of this application embodiment, the second interactive interface includes a second configuration area, and the card generation module 530 includes:
[0186] A status determination unit is used to determine the configuration switch status of the card components in the target card template;
[0187] The display unit is configured to display at least one configurable item of the card component in the second configuration area when the configuration switch state of the card component is in the first state;
[0188] A configuration unit is configured to adjust at least one configurable item of the card component in response to a configuration operation for at least one configurable item in the second configuration area;
[0189] The generation unit is used to obtain the target message card based on the adjusted target card template.
[0190] In one optional implementation of this application embodiment, the second interactive interface further includes: a preview control, and the device 500 further includes:
[0191] The preview module is used to respond to the triggering operation of the preview control and display the generation effect of the target message card in the second interactive interface.
[0192] In an optional implementation of this application embodiment, the device 500 further includes:
[0193] The data acquisition module is used to acquire the card data and rendering protocol of the target message card in response to the rendering instruction for the target message card;
[0194] The rendering module is used to render the target message card according to the card data and rendering protocol of the target message card to obtain the rendering result;
[0195] The result display module is used to display the rendering result.
[0196] In one optional implementation of this application embodiment, the rendering module is specifically used for:
[0197] Obtain the first field, the second field, and the third field from the rendering protocol of the target message card;
[0198] From the card data of the target message card, obtain the first target data corresponding to the first field, the second target data corresponding to the second field, and the third target data corresponding to the third field;
[0199] The target message card is rendered based on the first target data, the second target data, and the third target data to obtain a rendering result.
[0200] It should be understood that the device embodiments and the foregoing method embodiments can correspond to each other, and similar descriptions can be referred to the method embodiments. To avoid repetition, further details will not be provided here. Specifically, Figure 13 The device 500 shown can perform Figure 6 The corresponding method embodiments, and the foregoing and other operations and / or functions of each module in device 500 are respectively implemented to achieve Figure 6 For the sake of brevity, the corresponding processes in each method are not described in detail here.
[0201] The apparatus 500 of this application embodiment has been described above from the perspective of functional modules in conjunction with the accompanying drawings. It should be understood that this functional module can be implemented in hardware, in software instructions, or in a combination of hardware and software modules. Specifically, the steps of the second aspect method embodiment in this application can be completed by integrated logic circuits in the processor's hardware and / or by software instructions. The steps of the second aspect method disclosed in this application embodiment can be directly embodied as being executed by a hardware decoding processor, or by a combination of hardware and software modules in the decoding processor. Optionally, the software module can be located in a mature storage medium in the art, such as random access memory, flash memory, read-only memory, programmable read-only memory, electrically erasable programmable memory, registers, etc. This storage medium is located in memory, and the processor reads information from the memory and, in conjunction with its hardware, completes the steps in the above-described second aspect method embodiment.
[0202] Figure 14 This is a schematic block diagram of an electronic device provided as an embodiment of this application. Figure 14 As shown, the electronic device 600 may include a memory 610 and a processor 620. The memory 610 stores computer programs and transmits the program code to the processor 620. In other words, the processor 620 can call and run the computer program from the memory 610 to implement the card template generation method described in the first aspect of the embodiments of this application, or the card generation method described in the second aspect.
[0203] For example, the processor 620 can be used to execute the card template generation method described in the first aspect of the embodiments of this application, or the card generation method described in the second aspect, according to instructions in the computer program.
[0204] In some embodiments of this application, the processor 620 may include, but is not limited to:
[0205] General-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc.
[0206] In some embodiments of this application, the memory 610 includes, but is not limited to:
[0207] Volatile memory and / or non-volatile memory. Non-volatile memory can be read-only memory (ROM), programmable read-only memory (PROM), erasable programmable read-only memory (EPROM), electrically erasable programmable read-only memory (EEPROM), or flash memory. Volatile memory can be random access memory (RAM), which is used as an external cache. By way of example, but not limitation, many forms of RAM are available, such as Static RAM (SRAM), Dynamic RAM (DRAM), Synchronous DRAM (SDRAM), Double Data Rate SDRAM (DDR SDRAM), Enhanced Synchronous DRAM (ESDRAM), Synchronous Link DRAM (SLDRAM), and Direct Rambus RAM (DR RAM).
[0208] In some embodiments of this application, the computer program may be divided into one or more modules, which are stored in the memory 610 and executed by the processor 620 to complete the card template generation method or card generation method provided in this application. The one or more modules may be a series of computer program instruction segments capable of performing specific functions, which describe the execution process of the computer program in the electronic device.
[0209] like Figure 14 As shown, the electronic device 600 may further include:
[0210] Transceiver 630, which can be connected to processor 620 or memory 610.
[0211] The processor 620 can control the transceiver 630 to communicate with other devices; specifically, it can send information or data to other devices or receive information or data sent by other devices. The transceiver 630 may include a transmitter and a receiver. The transceiver 630 may further include antennas, and the number of antennas may be one or more.
[0212] It should be understood that the various components in the electronic device are connected through a bus system, which includes a data bus, a power bus, a control bus, and a status signal bus.
[0213] This application also provides a computer storage medium storing a computer program thereon, which, when executed by a computer, enables the computer to perform the card template generation method described in the first aspect or the card generation method described in the second aspect.
[0214] This application also provides a computer program product containing program instructions that, when the program instructions are run on an electronic device, cause the electronic device to execute the card template generation method described in the first aspect or the card generation method described in the second aspect.
[0215] When implemented using software, it can be implemented entirely or partially as a computer program product. This computer program product includes one or more computer instructions. When these computer program instructions are loaded and executed on a computer, all or part of the processes or functions described in the embodiments of this application are generated. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions can be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another. For example, the computer instructions can be transmitted from one website, computer, server, or data center to another via wired (e.g., coaxial cable, fiber optic, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) means. The computer-readable storage medium can be any available medium that a computer can access or a data storage device such as a server or data center that integrates one or more available media. The available medium can be a magnetic medium (e.g., floppy disk, hard disk, magnetic tape), an optical medium (e.g., digital video disc (DVD)), or a semiconductor medium (e.g., solid-state disk (SSD)).
[0216] Those skilled in the art will recognize that the modules and algorithm steps of the various examples described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application.
[0217] In the several embodiments provided in this application, it should be understood that the disclosed systems, apparatuses, and methods can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative; for instance, the division of modules is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple modules or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be through some interfaces; the indirect coupling or communication connection between apparatuses or modules may be electrical, mechanical, or other forms.
[0218] The modules described as separate components may or may not be physically separate. The components shown as modules may or may not be physical modules; that is, they may be located in one place or distributed across multiple network units. Some or all of the modules can be selected to achieve the purpose of this embodiment according to actual needs. For example, the functional modules in the various embodiments of this application may be integrated into one processing module, or each module may exist physically separately, or two or more modules may be integrated into one module.
[0219] In this application embodiment, the terms "module" or "unit" refer to a computer program or part of a computer program that has a predetermined function and works with other related parts to achieve a predetermined goal, and can be implemented wholly or partially using software, hardware (such as processing circuitry or memory), or a combination thereof. Similarly, a processor (or multiple processors or memory) can be used to implement one or more modules or units. Furthermore, each module or unit can be part of an overall module or unit that includes the functionality of that module or unit.
[0220] The above description is merely a specific embodiment of this application, but the scope of protection of this application is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in this application should be included within the scope of protection of this application. Therefore, the scope of protection of this application should be determined by the scope of the claims.
Claims
1. A method for generating card templates, characterized in that, include: In response to the card template generation instruction, a first interactive interface is displayed, which includes a component area and a canvas area. In response to a selection operation on a card component in the component area, the selected target card component is displayed in the canvas area; Based on the target card component, generate an initial card template; Configure the target card component in the initial card template to generate the target card template.
2. The method according to claim 1, characterized in that, The first interactive interface further includes a first configuration area, wherein configuring the target card component in the initial card template to generate the target card template includes: In response to a configuration operation on the target card component in the first configuration area, the configuration switch state of the target card component is adjusted; The target card template is generated based on the adjusted target card components.
3. The method according to claim 2, characterized in that, The adjustment of the configuration switch state of the target card component includes: Switch the configuration switch state of the target card component from the first state to the second state; Alternatively, the configuration switch state of the target card component can be switched from the second state to the first state.
4. The method according to claim 1, characterized in that, The target card component includes at least one configurable item. Configuring the target card component in the initial card template to generate the target card template includes: In response to a configuration operation on the target card component in the first configuration area and at least one configurable item in the target card component, the configuration switch state of the target card component and at least one configurable item in the target card component is adjusted. The target card component is generated based on the adjusted target card component and at least one configurable item in the target card component.
5. A card generation method, characterized in that, include: In response to a card generation instruction, a target card template is obtained from a card template library, wherein the target card template is generated by the card template generation method according to any one of claims 1-4; The target card template is displayed in the second interactive interface; Configure the content of the card components in the target card template to generate the target message card.
6. The method according to claim 5, characterized in that, The second interactive interface includes a second configuration area. The step of configuring the content of the card components in the target card template to generate the target message card includes: Determine the configuration switch status of the card components in the target card template; When the configuration switch state of the card component is in the first state, at least one configurable item of the card component is displayed in the second configuration area; In response to a configuration operation for at least one configurable item in the second configuration area, at least one configurable item of the card component is adjusted; The target message card is obtained based on the adjusted target card template.
7. The method according to claim 5, characterized in that, The second interactive interface further includes a preview control, and the method further includes: In response to the triggering operation of the preview control, the generation effect of the target message card is displayed in the second interactive interface.
8. The method according to claim 5, characterized in that, The method further includes: In response to a rendering instruction for the target message card, the card data and rendering protocol of the target message card are obtained; Based on the card data and rendering protocol of the target message card, the target message card is rendered to obtain the rendering result; The rendering result is displayed.
9. The method according to claim 8, characterized in that, The step of rendering the target message card according to the card data and rendering protocol to obtain the rendering result includes: Obtain the first field, the second field, and the third field from the rendering protocol of the target message card; From the card data of the target message card, obtain the first target data corresponding to the first field, the second target data corresponding to the second field, and the third target data corresponding to the third field; The target message card is rendered based on the first target data, the second target data, and the third target data to obtain a rendering result.
10. A card template generating device, characterized in that, include: The interface display module is used to display a first interactive interface in response to the card template generation instruction. The first interactive interface includes a component area and a canvas area. A component display module is used to display the selected target card component in the canvas area in response to a selection operation on a card component in the component area; The first generation module is used to generate an initial card template based on the target card component; The second generation module is used to configure the target card component in the initial card template and generate the target card template.
11. A card generating apparatus, characterized in that, include: The template acquisition module is used to acquire a target card template from the card template library in response to a card generation instruction, wherein the target card template is generated by the card template generation device according to claim 10; A template display module is used to display the target card template in the second interactive interface; The card generation module is used to configure the content of the card components in the target card template and generate the target message card.
12. An electronic device, characterized in that, include: A processor and a memory, the memory being used to store a computer program, the processor being used to invoke and run the computer program stored in the memory to perform the method as described in any one of claims 1 to 9.
13. A computer-readable storage medium, characterized in that, Used to store a computer program that causes a computer to perform the method as described in any one of claims 1 to 9.
14. A computer program product containing program instructions, characterized in that, When the program instructions are executed on the electronic device, the electronic device causes the electronic device to perform the method as described in any one of claims 1 to 9.