Message display method, device, computer equipment and storage medium

By pre-setting component templates and carrying card component information in IM applications, card messages are generated and displayed, which solves the problem of multi-template support efficiency and improves the display efficiency and customization capabilities of card messages.

CN112559222BActive Publication Date: 2024-08-27BIGO TECH PTE LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202011549900.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2020-12-23
Publication Date
2024-08-27
Estimated Expiration
2040-12-23

AI Technical Summary

Technical Problem

As third-party business volume increases, the number of card message templates that IM applications need to support increases, which affects the parsing performance of card message data and reduces the display efficiency of card messages.

Method used

Preset each component template supported by the card message in the first application, carry card component information and card content data in the card message data, generate one or more card components included in the card information, and display the card message through combination to reduce The number of component templates that need to be set to improve parsing performance and display efficiency.

Benefits of technology

It supports third-party businesses to customize the structure of different card messages, reduces the number of templates, improves the display efficiency of card messages, and reduces development and maintenance costs.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN112559222B
    Figure CN112559222B
Patent Text Reader

Abstract

The present application discloses a message display method, apparatus, computer equipment and storage medium, which relate to the field of Internet application technology; the method comprises: receiving card message data; the card message data comprises card component information and card content data; based on the card component information, obtaining a component template of at least one card component contained in the card message; based on the component template of the at least one card component and the card content data, generating the at least one card component; combining the at least one card component to generate the card message; displaying the card message in the message display interface of the first application; the scheme can limit the number of templates, improve the parsing performance of the card message data, and thus improve the display efficiency of the card message.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of Internet application technology, and in particular to a message display method, device, computer equipment and storage medium. Background Art

[0002] Card messages are a special type of message that is triggered based on a specified page and displayed in instant messaging (IM) applications.

[0003] In the related art, card messages in different template formats can be configured for different third-party services. For example, the server of the IM application can provide a card configuration interface to the business party of the third-party service, and the developers of the business party can use the interface to set a card message template for the third-party service (the service provided by a certain designated page of the business party), and upload the card message template to the server, which will update the card message template to the IM application; when the IM application subsequently receives the card message data triggered by the designated page, it will generate and display the card message based on the corresponding card message template.

[0004] As the volume of third-party business increases, the number of card message templates that IM applications need to support is also increasing, which affects the parsing performance of card message data and further reduces the display efficiency of card messages. Summary of the invention

[0005] The embodiments of the present application provide a message display method, apparatus, computer device, and storage medium, which can be used to improve the display efficiency of card messages in a scenario supporting third-party customized card messages. The technical solution is as follows:

[0006] In one aspect, a message display method is provided, the method comprising:

[0007] Receive card message data, wherein the card message data is data for displaying a card message in a first application based on a specified page trigger; the card message data includes card component information and card content data; the card component information is used to indicate at least one card component included in the card message;

[0008] Based on the card component information, obtaining a component template of at least one card component included in the card message;

[0009] generating the at least one card component based on the component template of the at least one card component and the card content data;

[0010] Combining the at least one card component to generate the card message;

[0011] The card message is displayed in the message display interface of the first application.

[0012] In one aspect, a message display method is provided, the method comprising:

[0013] Display a card configuration interface, which is used to configure a card message triggered based on a specified page; the card configuration interface contains configuration items for each card component;

[0014] generating a card component configuration parameter in response to a configuration operation on a configuration item of at least one card component among the card components;

[0015] The card component configuration parameters are uploaded to the server of the first application so that the server generates card message data in response to the card message sending operation triggered in the designated page, and sends the card message data to the target terminal installed with the first application; the card message data includes card component information and card content data; the card component information is used to indicate the at least one card component; the card message data is used to instruct the target terminal to obtain the component template of at least one card component contained in the card message based on the card component information, generate the at least one card component based on the component template of the at least one card component and the card content data, combine the at least one card component to generate the card message, and display the card message in the message display interface of the first application.

[0016] In another aspect, a message display device is provided, the device comprising:

[0017] A message data receiving module, used to receive card message data, wherein the card message data is data for displaying a card message in a first application based on a specified page trigger; the card message data includes card component information and card content data; the card component information is used to indicate at least one card component included in the card message;

[0018] A template acquisition module, used for acquiring a component template of at least one card component included in the card message based on the card component information;

[0019] A component generation module, configured to generate the at least one card component based on the component template of the at least one card component and the card content data;

[0020] A card message generating module, used for combining the at least one card component to generate the card message;

[0021] A card message display module is used to display the card message in the message display interface of the first application.

[0022] In another aspect, a message display device is provided, the device comprising:

[0023] A configuration interface display module, used to display a card configuration interface, wherein the card configuration interface is used to configure a card message triggered based on a specified page; the card configuration interface includes configuration items for each card component;

[0024] A parameter generation module, configured to generate a card component configuration parameter in response to a configuration operation on a configuration item of at least one card component among the card components;

[0025] A parameter uploading module, used to upload the card component configuration parameters to the server of the first application, so that the server generates card message data based on the card component configuration parameters in response to the card message sending operation triggered in the specified page, and sends the card message data to the target terminal installed with the first application; the card message data contains card component information and card content data; the card component information is used to indicate the at least one card component; the card message data is used to instruct the target terminal to obtain the component template of at least one card component contained in the card message based on the card component information, generate the at least one card component based on the component template of the at least one card component and the card content data, combine the at least one card component to generate the card message, and display the card message in the message display interface of the first application.

[0026] On the other hand, a computer device is provided, which includes a processor and a memory, wherein the memory stores at least one instruction, at least one program, a code set or an instruction set, and the at least one instruction, the at least one program, the code set or the instruction set is loaded and executed by the processor to implement the above-mentioned message display method.

[0027] On the other hand, a computer-readable storage medium is provided, wherein at least one instruction, at least one program, a code set or an instruction set is stored in the storage medium, and the at least one instruction, the at least one program, the code set or the instruction set is loaded and executed by a processor to implement the above-mentioned message display method.

[0028] In another aspect, a computer program product is provided, the computer program product comprising computer instructions, the computer instructions being stored in a computer-readable storage medium. A processor of a computer device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions, so that the computer device executes the above-mentioned message display method.

[0029] The technical solution provided by this application may have the following beneficial effects:

[0030] In the first application, various component templates supported by the card message are pre-set, and the card component information and card content data are carried in the card message data, so that after receiving the card message data, the first application combines the card component information, the card content data and the corresponding component template to generate one or more card components contained in the card information, and combines one or more card components into card information for display. In the above scheme, since a complete card message is composed of one or more card components, it is only necessary to set a small number of component templates in the first application, that is, it can support the business party of the third-party business to customize the composition structure of different card messages, and there is no need to set a corresponding card message template for each card message of the third-party business, thereby limiting the number of templates, improving the parsing performance of the card message data, and further improving the display efficiency of the card message. BRIEF DESCRIPTION OF THE DRAWINGS

[0031] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present application and, together with the description, serve to explain the principles of the present application.

[0032] Figure 1 is a schematic diagram of an instant messaging system according to an exemplary embodiment;

[0033] Figure 2 is a flowchart of a message display method according to an exemplary embodiment;

[0034] Figure 3 is a flowchart of a message display method according to an exemplary embodiment;

[0035] Figure 4 is a flowchart of a message display method according to an exemplary embodiment;

[0036] Figure 5 yes Figure 4 A schematic diagram of card assembly configuration rules involved in the illustrated embodiment;

[0037] Figure 6 yes Figure 4 A schematic diagram of a card configuration interface according to the illustrated embodiment;

[0038] Figure 7 is a structural block diagram of a message display device according to an exemplary embodiment;

[0039] Figure 8 is a structural block diagram of a message display device according to an exemplary embodiment;

[0040] Fig. 9 The diagram is a schematic structural diagram of a computer device according to an exemplary embodiment. DETAILED DESCRIPTION

[0041] Exemplary embodiments will be described in detail herein, examples of which are shown in the accompanying drawings. When the following description refers to the drawings, the same numbers in different drawings represent the same or similar elements unless otherwise indicated. The implementations described in the following exemplary embodiments do not represent all implementations consistent with the present application. Instead, they are merely examples of devices and methods consistent with some aspects of the present application as detailed in the appended claims.

[0042] Figure 1 1 is a schematic diagram of an instant messaging system according to an exemplary embodiment. The instant messaging system includes a server 110 , a user terminal 120 and a database 130 .

[0043] The server 110 is set up on the network side and provides background support for instant messaging applications.

[0044] The server 110 may be a single server, or may be a server cluster consisting of a plurality of servers, or may include one or more virtualization platforms, or may be a cloud computing service center.

[0045] An instant messaging application is installed in the user terminal 120 .

[0046] The user can open and log in to the instant messaging application corresponding to the server 110 on the user terminal 120. In addition, the user can also trigger the card message displayed in the instant messaging application in the page corresponding to the third-party service.

[0047] In the embodiment of the present application, a card message is a message bubble that supports multiple types of message content and multiple operation response methods. Usually, a card message is triggered by a third-party page (including but not limited to application pages, web pages, and other different types of pages) outside of the IM application and is displayed in the conversation interface of the IM application.

[0048] For example, a third-party business is an online activity conducted by a merchant (such as a group buying activity), and the designated page is a group buying page for a product. When a user browses the group buying page, he or she can invite friends to join the group buying. At this time, he or she can click the "Invite Friends" control on the page, and select Send to a certain IM application in the pop-up menu. The card message data corresponding to the group buying page will be sent to a contact or contact group in the corresponding IM application. Correspondingly, when the user's friend also opens the IM application, the IM application will display the corresponding card message in the conversation interface of the user / group.

[0049] The database 130 stores user data and business data related to the instant messaging application, including user accounts, account information corresponding to the user accounts (including account levels, permissions, settings, etc.), and the like.

[0050] In a possible implementation, the instant messaging system further includes a card customization terminal 140 .

[0051] The card customization terminal 140 is a terminal of a third-party service provider. A card customization application may be installed in the card customization terminal 140 . The card customization application is used to provide a card message customization function to the third-party service provider.

[0052] In a possible implementation, the card customization application is the IM application.

[0053] Figure 2 is a flowchart of a message display method according to an exemplary embodiment. The message display method can be executed by a computer device. The computer device can be a target terminal, for example, the target terminal can be the Figure 1 The user terminal 120 in the system shown. Figure 2 As shown, the message display method may include the following steps:

[0054] Step 201, receiving card message data, which is data based on a specified page trigger to display a card message in a first application; the card message data includes card component information and card content data; the card component information is used to indicate at least one card component included in the card message.

[0055] In a possible implementation manner, the first application is an IM application installed in the target terminal.

[0056] In a possible implementation, the card component information is used to indicate which types of card components are included in the card message.

[0057] For example, in an embodiment of the present application, a card message supports card components of at least two parts, and the card component information indicates that the card message contains a card component of at least one of the at least two parts. For example, the card component information contains the part identifiers corresponding to at least one card component contained in the card message.

[0058] Step 202: Based on the card component information, obtain a component template of at least one card component included in the card message.

[0059] In one possible implementation, component templates of various card components supported by card messages are pre-set in the first application. After receiving card message data of a card message, the component templates of one or more card components required to generate the card message can be determined through the card component information in the card message data.

[0060] For example, the first application program pre-sets three card components, namely, the card header, the card body, and the card footer. When the card message data is received, and the card component information in the card message data indicates that the card message includes the card header and the card body, the first application program in the target terminal can obtain the pre-set component template of the card header and the component template of the card body according to the card component information.

[0061] Step 203: Generate the at least one card component based on the component template of the at least one card component and the card content data.

[0062] In an embodiment of the present application, the card content data may include the content data of each of the at least one card component mentioned above, and the first application in the target terminal may obtain the corresponding card component by filling the corresponding content data in the component template of at least one card component.

[0063] Step 204: combine the at least one card component to generate the card message.

[0064] In an embodiment of the present application, the first application in the target terminal may combine card components corresponding to at least one card message to obtain a displayable card message.

[0065] Step 205: Display the card message in the message display interface of the first application.

[0066] In summary, the scheme shown in the embodiment of the present application pre-sets various component templates supported by the card message in the first application, and carries the card component information and the card content data in the card message data, so that after receiving the card message data, the first application combines the card component information, the card content data and the corresponding component template to generate one or more card components contained in the card information, and combines the one or more card components into the card information for display. In the above scheme, since a complete card message is composed of one or more card components, it is only necessary to set a small number of component templates in the first application, that is, it can support the customization of different card message composition structures by the business party of the third-party business, and there is no need to set the corresponding card message template for each card message of the third-party business, thereby limiting the number of templates, improving the parsing performance of the card message data, and further improving the display efficiency of the card messages.

[0067] In the above-mentioned embodiment of the present application, the composition structure of the card message corresponding to the specified page can be customized by the business party of the third-party business corresponding to the specified page.

[0068] Figure 3 is a flowchart of a message display method according to an exemplary embodiment. The message display method can be executed by a computer device. The computer device may include a configuration terminal; for example, the configuration terminal may be the Figure 1 The card assembly configuration terminal 140 in the system shown. Figure 3 As shown, the message display method may include the following steps:

[0069] Step 301, the configuration terminal displays a card configuration interface, where the card configuration interface is used to configure a card message triggered based on a specified page; the card configuration interface includes configuration items for each card component.

[0070] Step 302: Generate card component configuration parameters in response to a configuration operation on a configuration item of at least one card component among the card components.

[0071] Step 303, upload the card component configuration parameters to the server of the first application, so that the server generates card message data based on the card component configuration parameters in response to the card message sending operation triggered in the specified page, and sends the card message data to the target terminal installed with the first application; the card message data contains card component information and card content data; the card component information is used to indicate the at least one card component; the card message data is used to indicate the target terminal to obtain the component template of at least one card component contained in the card message based on the card component information, generate the at least one card component based on the component template of the at least one card component and the card content data, combine the at least one card component to generate the card message, and display the card message in the message display interface of the first application.

[0072] In summary, the scheme shown in the embodiment of the present application is that the configuration terminal can display the card configuration interface, so that the business party of the third-party business corresponding to the specified page configures the component composition of the card component for the card message corresponding to the specified page, and generates the card component configuration parameters according to the user configuration and uploads them to the server; and, in the first application, the various component templates supported by the card message are pre-set, and the card message data sent by the server to the first application based on the card component configuration parameters carries the card component information and the card content data, so that after the first application receives the card message data, it combines the card component information, the card content data and the corresponding component template to generate one or more card components contained in the card information, and combines the one or more card components into the card information for display. In the above scheme, since a complete card message is composed of one or more card components pre-configured by the business party, only a small number of component templates need to be set in the first application, that is, the business party of the third-party business can support the customization of different card message composition structures, and there is no need to set the corresponding card message template for each card message of the third-party business, so that the number of templates can be limited, the parsing performance of the card message data can be improved, and the display efficiency of the card message can be improved.

[0073] In the solution shown in the above embodiment of the present application, in addition to customizing the composition structure of the card message, the business party of the third-party business can also customize the active / passive behavior of the card message, as well as the third-party data displayed with the card message, etc.

[0074] Figure 4 is a flowchart of a message display method according to an exemplary embodiment. The message display method can be executed by a computer device. The computer device may include a target terminal, a server, and a configuration terminal; for example, the target terminal may be the above Figure 1The user terminal 120 in the system shown in the figure, the server can be the above Figure 1 The server 110 in the system shown in the figure may be the configuration terminal Figure 1 The card assembly configuration terminal 140 in the system shown. Figure 4 As shown, the message display method may include the following steps:

[0075] Step 401, the configuration terminal displays a card configuration interface, where the card configuration interface is used to configure a card message triggered based on a specified page; the card configuration interface includes configuration items for each card component.

[0076] In an embodiment of the present application, the structure of the card message can be split into structural components corresponding to multiple card parts, and one or more structural components for overall configuration / data carrying.

[0077] In a possible implementation, an example of a component structure of a card message may be shown in Table 1 below:

[0078] Table 1

[0079] Component Name Value Description title Title component (optional) Header Components body Body Component Main components tail Tail component (optional) Tail components config UniversalConfig General Configuration business_data BusinessData(optional) Business data

[0080] In the component structure shown in Table 1 above, the card message can be decomposed into five component structures, including structural components corresponding to three parts (corresponding to the header, body and footer respectively), a structural component of a general configuration and a structural component carrying business data.

[0081] The configuration data example of the above Title component can be shown in Table 2:

[0082] Table 2

[0083]

[0084]

[0085] The data structure definition example of the above Body component can be shown in Table 3:

[0086] Table 3

[0087] Component Name Value Description text Text type (optional) body text data media UniversalMediaData Type Body Rich Media Data Type action Action Type body click behavior style string body display style

[0088] The definition example of the above business data structure can be shown in Table 4:

[0089] Table 4

[0090] Component Name Value Description type stirng Business Type fallback_url stirng (optional) Downgrade url / old version compatibility Decription string(optional) Business Description

[0091] Based on the contents shown in Tables 1 to 4 above, please refer to Figure 5, which shows a schematic diagram of the card component configuration rules involved in the embodiment of the present application. Figure 5 As shown, the card message can be composed of a header component, a body component and a footer component connected in sequence, wherein the header component and the footer component are optional components, and the body component is a required component. Each part component has a hot zone that responds to the operation, and different hot zones respond to different operations. The entire card message can also be configured to support long press operations, which include but are not limited to sharing operations and deletion operations, etc. The body component contains various style types, including but not limited to multiple default types and multiple operation types.

[0092] In an embodiment of the present application, for a card message corresponding to a specified page, the business party can customize which component structures are included in the card message and the properties / data of each component structure through a card configuration interface.

[0093] For example, see Figure 6 , which shows a schematic diagram of a card configuration interface involved in an embodiment of the present application. Figure 6 As shown, the above card configuration interface includes configuration options 61 for each component structure that can be selected for the card message, each configuration option 61 is used to configure a component structure, and each configuration option 61 further includes one or more configuration sub-options 62, and each configuration sub-option 62 is used to configure an attribute / data of the corresponding component structure.

[0094] For example, Figure 6 Take the configuration option corresponding to the header component in as an example. This configuration option can be used to configure whether the corresponding card message contains a header component. If the business party configures the card message to contain a header component, the properties of the header component can be further configured through the corresponding configuration sub-options of the header component, including configuring the resource address, etc.

[0095] For example, Figure 6 Take the configuration option corresponding to the main component in as an example. This configuration option can be used to configure whether the corresponding card message contains the main component. If the business party configures the card message to contain the main component, the properties of the main component can be further configured through the corresponding configuration sub-options of the main component, including configuring the resource type, resource address, style, behavior action, etc.

[0096] Step 402: In response to a configuration operation on a configuration item of at least one of the card components, the configuration terminal generates a card component configuration parameter.

[0097] In an embodiment of the present application, after the business party completes the configuration of the card message corresponding to the specified page in the card configuration interface displayed by the configuration terminal, the configuration terminal organizes the configuration information of the business party in the card configuration interface in a preset data format to generate card component configuration parameters.

[0098] Step 403: The configuration terminal uploads the card component configuration parameters to the server of the first application; correspondingly, the server receives the card component configuration parameters.

[0099] In the embodiment of the present application, when the business party clicks the Send / Confirm / Submit button in the card configuration interface, the configuration terminal can send the generated card component configuration parameters to the server.

[0100] In a possible implementation, before uploading the card component configuration parameters to the server of the first application, the configuration terminal also sends the card component configuration parameters to the preview terminal so that the preview terminal generates and displays a preview image of the card message based on the card component configuration parameters.

[0101] The present application embodiment provides rich preview capabilities for card effects:

[0102] In order to provide a better technical experience, reduce unnecessary communication during the development process, and eliminate differences in understanding between product developers and technical personnel, the solution shown in this application implements the ability of real-time configuration and real-time preview for the fine-grained component configuration of cards.

[0103] For example, taking the ability of Json data to present the card UI experience and interaction in real time as an example, on the Android platform, the solution shown in the embodiment of this application can trigger the input of strings to the Android APP in real time through the adb debugging tool. The solution shown in this application designs and implements the Json string receiver and parser on the debug page of the App. The json string entity of the instruction and the corresponding card data is input through the PC side (which can be the above-mentioned configuration terminal), that is, sent to the App (i.e., the application in the preview terminal), and the corresponding card is automatically parsed and generated, so that technical or non-technical personnel can configure and construct the card in real time on the PC side.

[0104] In the embodiment of the present application, the card generation is configurable and automated by configuring the terminal (such as Android). Since there are many common card attributes and rules, most of the card rules are presented in code and text, which is not very intuitive for newly connected business parties. The real-time display of Json data configuration is more flexible, but the configuration requires the use of PC and adb tools. In order to balance flexibility and ease of use, the embodiment of the present application also provides a visual card generation capability, that is, the visual matching and declaration description of each matching rule of the card through the configuration page (for example Figure 6 Each configuration option and configuration sub-option in it) makes it easier for technical and non-technical personnel to understand and access this universal card.

[0105] Step 404: the server generates card message data based on the card component configuration parameters in response to the card message sending operation triggered in the specified page.

[0106] In a possible implementation of an embodiment of the present application, when a user browses a specified page, the sending of a card message is triggered. At this time, the server receives a request to send the card message and performs the following steps according to the card component configuration parameters corresponding to the specified page to generate corresponding card component data.

[0107] S1. Select the appropriate card type and the component information to be configured.

[0108] S2. Determine whether a header is needed, whether the header needs an independent click event, whether a footer is needed, the footer style, whether the footer needs an independent click event, and the template style of the body.

[0109] S3. Configure whether a long press response is required and add corresponding business data configuration items.

[0110] S4. Confirm the business data information carried in the card message.

[0111] S5. Use the builder corresponding to the card component to construct the card components of each part of the card, and use the card builder to combine the various parts to construct the card message data.

[0112] In the embodiment of the present application, the process of server card message data can be as follows:

[0113] S51, first determine whether the card message needs a header component, if so, enter S52, otherwise enter S53.

[0114] S52, constructing and adding data items corresponding to the header component in the card component data.

[0115] In a possible implementation, the server sequentially adds the header icon address, header text, and header click response configuration, and encapsulates them into data items corresponding to the header component through the header builder and outputs them.

[0116] S53, constructing and adding data items corresponding to the main component in the card component data.

[0117] In a possible implementation, the server sequentially selects the main body style, adds the video logo, adds the graphic data, adds the button data, adds the click response behavior, and encapsulates the data items corresponding to the main body components through the main body builder and outputs them.

[0118] S54, determine whether the card message needs a tail component, if so, go to S55, otherwise, go to S56.

[0119] S55, constructing and adding data items corresponding to the tail component in the card component data.

[0120] In a possible implementation, the server sequentially selects whether to follow the main body, add a tail icon address, add tail text data, and encapsulates the tail component into a data item corresponding to the tail component through a tail builder and outputs it.

[0121] S56, constructing and adding data items corresponding to the general configuration in the card component data.

[0122] In a possible implementation, the server sequentially configures the card component selection information, configures whether to support long press, configures the long press event response behavior, and encapsulates the data items corresponding to the general configuration through the general configuration builder and outputs them.

[0123] S57, constructing and adding data items corresponding to the business data in the card component data.

[0124] In a possible implementation, the server sequentially configures the downgrade address, adds the service name, and adds the service custom data, and encapsulates the data items corresponding to the service data through the service data builder and outputs the data.

[0125] After the above construction steps, the generated card component data can include card component information, card content data, and business configuration information, etc. The business configuration information includes at least one of configuration information (i.e., data items corresponding to the above general configuration) and business information (i.e., data items corresponding to the above business data). The configuration information is used to indicate the operation configuration supported by the card message, and the business information includes business data of the third-party business corresponding to the specified page.

[0126] In the embodiment of the present application, when designing the component data structure, the commonality of the universal card is extracted, and the universal card is split into the following UI components: header, body, and tail; each component is distributed downward using the responsibility chain mode, and each maintains its own display style, data format, and detects the legitimacy of the data. The overall structure is less coupled, which conforms to the object-oriented programming concept. For the entire card, configuration information and the behavior information of the entire card are added, and config is used to carry the UI performance and behavior interaction of the card (including the configuration of active and passive behaviors such as data recovery, sharing, deletion, and reply). Since third-party businesses generally have their own data needs, custom BusinessData is added to the business to load business data (including data that supports data recovery and identification, as well as customized display data, etc.) to meet the needs of flexible adaptation of business data. The above data structures are all serialized using Json to better achieve high scalability in data. In addition, when generating card message data, the data structure and standardization of each mechanism component are detected to prevent the risk of introducing user interaction anomalies or crashes due to boundary conditions. For the construction of the entire card, a rich set of builder standardized constructors are provided, and a rich set of default configurations are provided to avoid cumbersome configuration items that increase unnecessary workload for developers.

[0127] S6. Send the card message data to the corresponding recipient.

[0128] After the server generates the card message data, it can send the card message data to the target terminal corresponding to the recipient.

[0129] Step 405: the target terminal receives card message data, where the card message data is triggered based on a designated page to display the card message in the first application.

[0130] In an embodiment of the present application, when the server sends the card message data to the recipient, the target terminal corresponding to the recipient can receive the card message data and parse the card message data so as to subsequently display the corresponding card message.

[0131] Step 406: The target terminal obtains a component template of at least one card component included in the card message based on the card component information.

[0132] In a possible implementation, the card component information includes a part type of the at least one card component and a component attribute of the at least one card component;

[0133] The obtaining, based on the card component information, a component template of at least one card component included in the card message includes:

[0134] Based on the part type of the target card component, determining a template set corresponding to the target card component; the target card component is any one of the at least one card component;

[0135] Based on the component attribute of the target card component, the component template of the target card component is determined from the template set corresponding to the target card component.

[0136] In a possible implementation, the component attribute includes at least one of a displayed data type, a behavior type in response to a triggering operation, and a display style.

[0137] In the embodiment of the present application, after parsing the card component message, the target terminal can determine each component template required for the card message through the card component information.

[0138] For example, in one possible implementation, the target terminal can determine which part components are included based on the data items corresponding to the general configuration, and further determine the corresponding component template through the template-related attributes (such as the data type of each part, click response actions, and display style of the main part, etc.) in the data items corresponding to the determined part components.

[0139] In a possible implementation, before obtaining the component template of at least one card component included in the card message based on the card component information, the method further includes:

[0140] Acquire version support information based on the card component information, where the version support information is used to indicate whether the version of the currently running first application supports the display of the card message;

[0141] The obtaining, based on the card component information, a component template of at least one card component included in the card message includes:

[0142] In response to the version support information indicating that the version of the currently running first application supports the display of the card message, a step of obtaining a component template of at least one card component included in the card message based on the card component information is performed.

[0143] In a possible implementation, the card message data also includes compatible data, and the method further includes:

[0144] In response to the version support information indicating that the currently running version of the first application does not support the display of the card message, generating a compatible message corresponding to the card message based on the compatible data;

[0145] The compatible message is displayed in the message display interface of the first application.

[0146] In a possible implementation, the acquiring version support information based on the card component information includes:

[0147] Parse the card component information to determine the parsed card component;

[0148] In response to the parsed card component including the card component of the specified part, generating first version support information, the first version support information is used to indicate that the version of the currently running first application supports the display of the card message;

[0149] In response to the parsed card components not including the card component of the specified location, second version support information is generated, where the second version support information is used to indicate that the version of the currently running first application does not support the display of the card message.

[0150] In an embodiment of the present application, the target terminal can achieve upward or downward compatibility with the card message. That is, if the version of the first application currently running supports the card message, the card message will be displayed according to the card structure indicated by the card message data. If the version of the first application currently running does not support the card message, the corresponding compatible message can also be generated through the compatible data in the card component data.

[0151] For IM message cards, a common problem is the compatibility of the previous and next versions of the card, especially backward compatibility. This application can achieve forward compatibility and backward compatibility for the card.

[0152] 1. Forward compatibility:

[0153] Forward compatibility generally refers to compatibility from now to the future, that is, the current version is compatible with changes in future versions.

[0154] For IM sharing cards, this compatibility is mainly reflected in the addition, deletion and modification of data fields, iterative updates of UI display styles, optimization of user interaction experience, and empowerment diversification of card response events. The main work done by this application for forward compatibility is: based on the principle of maximum interactive experience, for future iterative updates of data, the program adopts the maximum degree of parsing, display and interaction required fields, and adopts a layer-by-layer degradation method, link and plain text information as a backup method to achieve the maximum information presentation to users without discarding messages.

[0155] For example, the target terminal first parses the card components in the card message data. If the parsed card components include the card components (such as the main body components) necessary for displaying the card message in the current version, the card message is displayed according to the card message data; if the parsed card components do not include the card components necessary for displaying the card message in the current version, a compatible message is displayed through a link or text to achieve a degraded presentation.

[0156] For the degraded presentation of link type, a crawler can be used to crawl the title, icon, description and other information of the corresponding web page and present it in the card to provide users with a richer and more intuitive link experience.

[0157] 2. Backward compatibility:

[0158] Backward compatibility generally refers to the compatibility of the current version data structure change, receiving the past version data, or the data flow to the past version. The solution shown in the embodiment of the present application provides an optional and default configuration of fallbacklink or text display form using the fallback mechanism. Under the same message type, or the type that the past version cannot recognize, only the downgrade copy or link can be configured.

[0159] Step 407: The target terminal generates the at least one card component based on the component template of the at least one card component and the card content data.

[0160] In a possible implementation, before generating the at least one card component based on the component template of the at least one card component and the card content data, the method further includes:

[0161] Determining a border style of the at least one card component based on a position of the at least one card component in the card message;

[0162] The generating the at least one card component based on the component template of the at least one card component and the card content data includes:

[0163] The at least one card component is generated based on the border style of the at least one card component, the component template of the at least one card component, and the card content data.

[0164] The solution shown in the embodiment of the present application also provides the ability to dynamically adapt the card border:

[0165] For IM sharing cards, there is a demand to display the corners as rounded corners. The solution shown in the embodiment of the present application is designed to dynamically obtain the border information in response to this demand. That is, each card component can customize the adaptation of right angles and rounded corners to achieve the ability to dynamically adapt the border in real time.

[0166] Step 408: The target terminal combines the at least one card component to generate the card message.

[0167] In a possible implementation, when the card message data further includes service configuration information, combining the at least one card component to generate the card message includes:

[0168] Based on the service configuration information, the at least one card component is combined to generate the card message.

[0169] In an embodiment of the present application, when the card components are combined to obtain a card message, the target terminal can configure the card message as a whole based on the information in the data items corresponding to the configuration information, for example, whether the card message supports long press, and the response action after long press.

[0170] In addition, when the card components are combined to obtain a card message, the target terminal can also add third-party customized business data to the card message based on the information in the data items corresponding to the business data, such as displaying real-time click volume data, etc.

[0171] Step 409: The target terminal displays the card message in the message display interface of the first application.

[0172] After the target terminal generates the card message, the card message can be displayed in the corresponding dialog interface or group interface.

[0173] Third-party sharing cards have become an indispensable form of message bubble display for mature IM. The scheme shown in this application can make the expansion of this card to add a new card type very simple, and the code structure is concise and clear. For IM products, the compatibility of previous and next versions of messages is particularly important. The present invention adopts the fallback mechanism and the default configuration mechanism to provide card message bubbles with good forward and backward compatibility. This application provides a rich Debug configuration page, so that product and designer personnel can obtain the real sharing card effect presentation at the first time, greatly reducing the communication cost when the card is accessed. Standardized widget-based template configuration rules greatly reduce the intrusion of third-party services into IM code, reduce maintenance costs, and make the behavioral boundaries of IM cards clearer and less coupled. Finer-grained widget design can meet the flexible deployment of cards by development designers to a greater extent, taking into account the dual needs of standardization and personalized customization. In addition, this application also provides an open Builder design mode configuration, which makes it easier for developers to access and add new components and template styles.

[0174] The solution shown in this application is to provide a universal card solution to address the problem of increasing code coupling and high maintenance and expansion costs caused by the increasing number of third-party business sharing cards in IM scenarios; to provide a real-time dynamic card display method to reduce the communication and cognitive differences costs caused by the increasing communication costs between technical and non-technical personnel due to the redundant card types. However, this solution can be extended to a multi-format data presentation, code design specifications for universal card implementation, and standardized processing for forward and backward compatibility. It is not limited to the Android IM scenario, and can also be used to guide the implementation of multi-format card display of common lists on the iOS side.

[0175] The solution shown in the embodiment of the present application can at least achieve the following technical effects:

[0176] Define a universal card message type to solve the message type redundancy problem;

[0177] Add fine-grained optional support and rich style templates. Basically, there is no need to expand. The existing selections can meet most scenarios.

[0178] Add downgrade links for backward compatibility; each component provides a default style for forward compatibility;

[0179] Define basic component templates and use a combination approach to avoid repeated development of similar functions;

[0180] The code design adopts the Builder mode, providing rich configurations and standard processes to construct cards, reducing the risk of introduction;

[0181] Define common behaviors for cards, such as long-press to display deletion, sharing, copying, etc., to standardize default behaviors and extended behaviors;

[0182] Provide a card configuration page, the product can directly generate the corresponding card by operating the optional information, and experience the card effect in real time;

[0183] Each time you upgrade, you only need to add corresponding styles and set the default styles of the old version, which is not coupled with the previous logic;

[0184] To facilitate debugging, each component adopts the responsibility chain model, and the corresponding data provides legitimacy detection and DebugLog output.

[0185] In summary, the scheme shown in the embodiment of the present application is that the configuration terminal can display the card configuration interface, so that the business party of the third-party business corresponding to the specified page configures the component composition of the card component for the card message corresponding to the specified page, and generates the card component configuration parameters according to the user configuration and uploads them to the server; and, in the first application, the various component templates supported by the card message are pre-set, and the card message data sent by the server to the first application based on the card component configuration parameters carries the card component information and the card content data, so that after the first application receives the card message data, it combines the card component information, the card content data and the corresponding component template to generate one or more card components contained in the card information, and combines the one or more card components into the card information for display. In the above scheme, since a complete card message is composed of one or more card components pre-configured by the business party, only a small number of component templates need to be set in the first application, that is, the business party of the third-party business can support the customization of different card message composition structures, and there is no need to set the corresponding card message template for each card message of the third-party business, so that the number of templates can be limited, the parsing performance of the card message data can be improved, and the display efficiency of the card message can be improved.

[0186] Figure 7 is a structural block diagram of a message display device according to an exemplary embodiment. The message display device can execute Figure 2 or Figure 4 All or part of the steps of the method shown in the corresponding embodiment. The message display device may include:

[0187] The message data receiving module 701 is used to receive card message data, wherein the card message data is data for displaying a card message in a first application based on a specified page trigger; the card message data includes card component information and card content data; the card component information is used to indicate at least one card component included in the card message;

[0188] A template acquisition module 702, configured to acquire a component template of at least one card component included in the card message based on the card component information;

[0189] A component generation module 703, configured to generate the at least one card component based on the component template of the at least one card component and the card content data;

[0190] A card message generating module 704, configured to combine the at least one card component to generate the card message;

[0191] The card message display module 705 is used to display the card message in the message display interface of the first application.

[0192] In a possible implementation, the card component information includes a part type of the at least one card component and a component attribute of the at least one card component;

[0193] The template acquisition module 702 is used to:

[0194] Based on the part type of the target card component, determining a template set corresponding to the target card component; the target card component is any one of the at least one card component;

[0195] Based on the component attribute of the target card component, the component template of the target card component is determined from the template set corresponding to the target card component.

[0196] In a possible implementation, the component attribute includes at least one of a displayed data type, a behavior type in response to a triggering operation, and a display style.

[0197] In a possible implementation manner, the device further includes:

[0198] A version support information acquisition module, used for acquiring version support information based on the card component information before the template acquisition module 702 acquires the component template of at least one card component included in the card message based on the card component information, wherein the version support information is used to indicate whether the version of the first application currently running supports the display of the card message;

[0199] The template acquisition module 702 is used to execute the step of acquiring a component template of at least one card component included in the card message based on the card component information in response to the version support information indicating that the version of the first application currently running supports the display of the card message.

[0200] In a possible implementation manner, the card message data also includes compatible data, and the device further includes:

[0201] a compatible message generating module, configured to generate a compatible message corresponding to the card message based on the compatible data in response to the version support information indicating that the version of the first application currently running does not support the display of the card message;

[0202] A compatible message display module is used to display the compatible message in the message display interface of the first application.

[0203] In a possible implementation, the version support information acquisition module is used to:

[0204] Parsing the card component information to determine the parsed card component;

[0205] In response to the parsed card components including the card component of the specified part, generating first version support information, wherein the first version support information is used to indicate that the version of the first application currently running supports the display of the card message;

[0206] In response to the parsed card components not including the card component of the specified part, second version support information is generated, where the second version support information is used to indicate that the version of the first application currently running does not support the display of the card message.

[0207] In a possible implementation manner, the device further includes:

[0208] A border style determination module, used for determining the border style of the at least one card component based on the position of the at least one card component in the card message before the component generation module 703 generates the at least one card component based on the component template of the at least one card component and the card content data;

[0209] The component generation module 703 is used to generate the at least one card component based on the border style of the at least one card component, the component template of the at least one card component, and the card content data.

[0210] In a possible implementation, the card message data further includes business configuration information, the business configuration information includes at least one of configuration information and business information, the configuration information is used to indicate the operation configuration supported by the card message, and the business information includes business data of a third-party business corresponding to the designated page;

[0211] The card message generating module 704 is used to combine the at least one card component based on the service configuration information to generate the card message.

[0212] In summary, the scheme shown in the embodiment of the present application pre-sets various component templates supported by the card message in the first application, and carries the card component information and the card content data in the card message data, so that after receiving the card message data, the first application combines the card component information, the card content data and the corresponding component template to generate one or more card components contained in the card information, and combines the one or more card components into the card information for display. In the above scheme, since a complete card message is composed of one or more card components, it is only necessary to set a small number of component templates in the first application, that is, it can support the customization of different card message composition structures by the business party of the third-party business, and there is no need to set the corresponding card message template for each card message of the third-party business, thereby limiting the number of templates, improving the parsing performance of the card message data, and further improving the display efficiency of the card messages.

[0213] Figure 8 is a structural block diagram of a message display device according to an exemplary embodiment. The message display device can execute Figure 3 or Figure 4 All or part of the steps of the method shown in the corresponding embodiment. The message display device may include:

[0214] Configuration interface display module 801, used to display the card configuration interface, the card configuration interface is used to configure the card message triggered based on the specified page; the card configuration interface contains the configuration items of each card component;

[0215] A parameter generating module 802, configured to generate a card component configuration parameter in response to a configuration operation on a configuration item of at least one card component among the card components;

[0216] The parameter uploading module 803 is used to upload the card component configuration parameters to the server of the first application so that the server generates card message data based on the card component configuration parameters in response to the card message sending operation triggered in the specified page, and sends the card message data to the target terminal installed with the first application; the card message data includes card component information and card content data; the card component information is used to indicate the at least one card component; the card message data is used to indicate the target terminal to obtain the component template of at least one card component contained in the card message based on the card component information, generate the at least one card component based on the component template of the at least one card component and the card content data, combine the at least one card component to generate the card message, and display the card message in the message display interface of the first application.

[0217] In a possible implementation manner, the device further includes:

[0218] The parameter sending module is used to send the card component configuration parameters to the preview terminal before the parameter uploading module 803 uploads the card component configuration parameters to the server of the first application, so that the preview terminal generates and displays a preview image of the card message based on the card component configuration parameters.

[0219] Fig. 9 1 is a schematic diagram of the structure of a computer device according to an exemplary embodiment. The computer device 900 includes a central processing unit (CPU) 901, a system memory 904 including a random access memory (RAM) 902 and a read-only memory (ROM) 903, and a system bus 905 connecting the system memory 904 and the central processing unit 901. The computer device 900 also includes a basic input / output system (I / O system) 906 for helping to transmit information between various devices in the computer device, and a large-capacity storage device 907 for storing an operating system 908, an application program 909 and other program modules 910.

[0220] The memory also includes one or more programs, one or more programs are stored in the memory, and the central processing unit 901 implements the one or more programs by executing the one or more programs. Figure 2 , Figure 3 or Figure 4 All or part of the steps of the method shown.

[0221] In an exemplary embodiment, a non-transitory computer-readable storage medium including instructions is also provided, such as a memory including at least one instruction, at least one program, code set, or instruction set, wherein the at least one instruction, at least one program, code set, or instruction set can be executed by a processor to perform the above Figure 2 , Figure 3 or Figure 4 All or part of the steps of the method shown in the corresponding embodiment.

[0222] In an exemplary embodiment, a computer program product is also provided, the computer program product comprising computer instructions, the computer instructions being stored in a computer-readable storage medium. A processor of a computer device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions, so that the computer device performs the above Figure 2 , Figure 3 or Figure 4All or part of the steps of the method shown in the corresponding embodiment.

[0223] It should be understood that the present disclosure is not limited to the exact construction that has been described above and shown in the drawings, and that various modifications and changes may be made without departing from the scope thereof.

Claims

1. A message display method, characterized in that: The method is performed by a target terminal, and the method includes: Receive card message data, the card message data is data for displaying the card message in an IM application based on a card message sending operation triggered by a specified page of a configuration terminal; the card message data includes card component information and card content data; the card component information is used to indicate at least one card component included in the card message; the card component includes a header component, a body component and a footer component; the card component information includes a part type of the at least one card component and a component attribute of the at least one card component; the component attribute includes at least one of a displayed data type, a behavior type in response to a triggering operation and a display style; Based on the part type of the target card component, determining a template set corresponding to the target card component; the target card component is any one of the at least one card component; Based on the component attribute of the target card component, the component template of the target card component is determined from the template set corresponding to the target card component; the component templates of each of the card components supported by the card message are pre-set in the IM application; Determining a border style of the at least one card component based on a position of the at least one card component in the card message; generating the at least one card component based on the border style of the at least one card component, the component template of the at least one card component, and the card content data; Combining the at least one card component to generate the card message; The card message is displayed in the message display interface of the IM application.

2. The method according to claim 1, characterized in that Before determining the template set corresponding to the target card component based on the part type of the target card component, the method further includes: Acquire version support information based on the card component information, where the version support information is used to indicate whether the version of the currently running IM application supports the display of the card message; The step of determining a template set corresponding to the target card component based on the part type of the target card component includes: In response to the version support information indicating that the version of the currently running IM application supports the display of the card message, a step of determining a template set corresponding to the target card component based on the part type of the target card component is performed.

3. The method according to claim 2, characterized in that The card message data also includes compatible data, and the method further includes: In response to the version support information indicating that the version of the IM application currently running does not support the display of the card message, generating a compatible message corresponding to the card message based on the compatible data; The compatible message is displayed in the message display interface of the IM application.

4. The method according to claim 2, characterized in that: The acquiring version support information based on the card component information includes: Parsing the card component information to determine the parsed card component; In response to the parsed card components including the card component of the specified part, generating first version support information, wherein the first version support information is used to indicate that the version of the currently running IM application supports the display of the card message; In response to the parsed card components not including the card component of the specified part, second version support information is generated, where the second version support information is used to indicate that the version of the currently running IM application does not support the display of the card message.

5. The method according to claim 1, characterized in that The card message data also includes service configuration information, the service configuration information includes at least one of configuration information and service information, the configuration information is used to indicate the operation configuration supported by the card message, and the service information includes service data of the third-party service corresponding to the specified page; The combining the at least one card component to generate the card message includes: Based on the service configuration information, the at least one card component is combined to generate the card message.

6. A message display method, characterized in that: The method is performed by a configuration terminal, and the method includes: Displaying a card configuration interface, the card configuration interface is used to configure a card message triggered by a card message sending operation based on a specified page of the configuration terminal; the card configuration interface includes configuration items for each card component; generating a card component configuration parameter in response to a configuration operation on a configuration item of at least one card component among the card components; Upload the card component configuration parameters to the server of the IM application so that the server generates card message data in response to the card message sending operation triggered in the specified page, and sends the card message data to the target terminal installed with the IM application; the card message data contains card component information and card content data; the card component information is used to indicate at least one card component; the card component includes a header component, a body component and a footer component; the card component information includes the part type of at least one card component and the component attributes of at least one card component; the component attributes include at least one of the displayed data type, the behavior type in response to the triggering operation and the display style; the IM application is pre-set with each of the card components supported by the card message component template; the target card component is any one of the at least one card components; the card message data is used to instruct the target terminal to determine the template set corresponding to the target card component based on the part type of the target card component, determine the component template of the target card component from the template set corresponding to the target card component based on the component attribute of the target card component, determine the border style of the at least one card component based on the position of the at least one card component in the card message, generate the at least one card component based on the border style of the at least one card component, the component template of the at least one card component, and the card content data, combine the at least one card component to generate the card message, and display the card message in the message display interface of the IM application.

7. The method according to claim 6, characterized in that Before uploading the card component configuration parameters to the server of the IM application, the method further includes: The card component configuration parameters are sent to a preview terminal so that the preview terminal generates and displays a preview image of the card message based on the card component configuration parameters.

8. A message display device, characterized in that: The device comprises: A message data receiving module, used for receiving card message data, wherein the card message data is data for displaying the card message in an IM application based on a card message sending operation triggered by a specified page; the card message data includes card component information and card content data; the card component information is used for indicating at least one card component included in the card message; the card component includes a header component, a body component and a footer component; the card component information includes a part type of the at least one card component and a component attribute of the at least one card component; the component attribute includes at least one of a displayed data type, a behavior type in response to a triggering operation and a display style; A template set determination module, used to determine a template set corresponding to a target card component based on a part type of the target card component; the target card component is any one of the at least one card component; A template acquisition module, used to determine the component template of the target card component from the template set corresponding to the target card component based on the component attribute of the target card component; the component templates of each of the card components supported by the card message are pre-set in the IM application; A border style determination module, configured to determine a border style of the at least one card component based on a position of the at least one card component in the card message; A component generation module, configured to generate the at least one card component based on the border style of the at least one card component, the component template of the at least one card component, and the card content data; A card message generating module, used for combining the at least one card component to generate the card message; The card message display module is used to display the card message in the message display interface of the IM application.

9. A message display device, characterized in that: The device comprises: A configuration interface display module, used to display a card configuration interface, wherein the card configuration interface is used to configure a card message triggered by a card message sending operation based on a specified page; the card configuration interface includes configuration items for each card component; A parameter generation module, configured to generate a card component configuration parameter in response to a configuration operation on a configuration item of at least one card component among the card components; A parameter uploading module, used to upload the card component configuration parameters to the server of the IM application, so that the server generates card message data based on the card component configuration parameters in response to the card message sending operation triggered in the specified page, and sends the card message data to the target terminal installed with the IM application; the card message data contains card component information and card content data; the card component information is used to indicate at least one card component; the card component includes a header component, a body component and a footer component; the card component information includes the part type of at least one card component and the component attributes of at least one card component; the component attributes include at least one of the displayed data type, the behavior type in response to the triggering operation and the display style; the card message support is pre-set in the IM application. The target card component is any one of the at least one card component; the card message data is used to instruct the target terminal to determine the template set corresponding to the target card component based on the part type of the target card component, determine the component template of the target card component from the template set corresponding to the target card component based on the component attribute of the target card component, determine the border style of the at least one card component based on the position of the at least one card component in the card message, generate the at least one card component based on the border style of the at least one card component, the component template of the at least one card component, and the card content data, combine the at least one card component to generate the card message, and display the card message in the message display interface of the IM application.

10. A computer device, characterized in that: The computer device includes a processor and a memory, wherein the memory stores at least one instruction, at least one program, a code set or an instruction set, and the at least one instruction, the at least one program, the code set or the instruction set is loaded and executed by the processor to implement the message display method as described in any one of claims 1 to 7.

11. A computer-readable storage medium, characterized in that: The storage medium stores at least one instruction, at least one program, a code set or an instruction set, and the at least one instruction, the at least one program, the code set or the instruction set is loaded and executed by the processor to implement the message display method as described in any one of claims 1 to 7.

12. A computer program product, characterized in that The computer program product includes computer instructions, which are stored in a computer-readable storage medium. The processor of a computer device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions, so that the computer device executes to implement the message display method as described in any one of claims 1 to 7.