A message push method and related device

By generating the target message template and rendering the layout components using mapping rules, the problem of needing to update the communication software version to add layout components is solved, thus improving the user experience.

CN115757930BActive Publication Date: 2025-10-03TENCENT TECHNOLOGY (SHENZHEN) CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202111028496.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-09-02
Publication Date
2025-10-03
Estimated Expiration
2041-09-02

AI Technical Summary

Technical Problem

In the prior art, adding layout components in a graphical UI editor requires updating the version of the communication software in the terminal device, resulting in a poor user experience.

Method used

By obtaining the layout submission request of the template customization terminal device, the target message template is generated, and the target layout component is converted into the target message template using the mapping rule, and sent to the message receiving terminal device for rendering, avoiding directly updating the communication software version.

Benefits of technology

It achieves the rendering of customized messages that meet user needs without updating the communication software version of the terminal device, thereby improving the user experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115757930B_ABST
    Figure CN115757930B_ABST
Patent Text Reader

Abstract

The embodiment of the present application discloses a message push method and related devices. According to the template customization terminal device submits a layout request for the message style, obtains the target layout component for describing the message style layout, and uses the mapping rule to generate a target message template for rendering the target layout component. Since the mapping rule includes the rendering information corresponding to the rendering of multiple layout components by the terminal device, the target message template can fully express the target layout component for describing the message style layout. Moreover, the mapping rule will adjust the rendering information accordingly as the layout component set changes. Even if the target layout component includes a changed layout component, the corresponding rendering information can be generated based on the mapping rule. Therefore, there is no need to update the version of the communication software in the message receiving terminal device. It is also possible to render a customized message that meets the message style requirements of the template customization terminal device, thereby pushing customized messages to the message receiving terminal device and improving the user experience.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of data processing technology, and in particular to a message push method and related devices. Background Art

[0002] When users use communication software on their terminal devices, they often encounter a variety of messages, such as text messages, file messages, and text card messages. Message pushers often want to customize the style of messages, for example, setting the message display background to red or green.

[0003] In order to meet the diverse needs of users, the relevant technology provides a graphical user interface (UI) editor. The message pusher customizes the style of the message by selecting a variety of layout components provided by the graphical UI editor, and sends the customized message to the terminal device held by the message recipient through the server. The communication software in the terminal device parses the customized message into content that the communication software can perform subsequent rendering operations, and renders and displays it to the message recipient.

[0004] In practice, the graphical UI editor expands its layout component types to meet the growing needs of users. If a customized message includes a new layout component, the messaging software must be updated to support parsing the new layout component for subsequent rendering. However, constant messaging software updates can be inconvenient for users. Without updates, the software cannot render the new layout component, resulting in a poor user experience. Summary of the Invention

[0005] In order to solve the above technical problems, the present application provides a message push method and related devices, so as to achieve the expansion of layout components without updating the version of the communication software in the terminal device, thereby improving the user experience.

[0006] The embodiments of this application disclose the following technical solutions:

[0007] In one aspect, an embodiment of the present application provides a message push method, the method comprising:

[0008] Obtain template customization terminal device layout submission request for message style;

[0009] Obtaining, according to the layout submission request, a target layout component for describing the message style layout;

[0010] generating a target message template for rendering the target layout component based on the target layout component and a mapping rule, wherein the mapping rule includes rendering information corresponding to multiple layout components in a terminal device rendering layout component set, and the mapping rule adjusts the rendering information accordingly as the layout component set changes, and the target layout component is one or more layout components in the layout component set;

[0011] The target message template is sent to a message receiving terminal device so that the message terminal device pushes a customized message using the message style.

[0012] On the other hand, an embodiment of the present application provides a message push method, the method comprising:

[0013] Receiving a target message template for rendering a target layout component, the target layout component being used to describe a template-customized layout of a terminal device for a message style, the target message template being generated based on the target layout component and a mapping rule, the mapping rule including rendering information corresponding to respective layout components in a terminal device rendering layout component set, the mapping rule adjusting the rendering information accordingly as the layout component set changes, the target layout component being one or more layout components in the layout component set;

[0014] Parsing the layout according to the target message template to obtain a view structure for describing the layout of the message style, wherein the view structure includes the size of one or more layout components in the target layout component and the relative positions of the one or more layout components;

[0015] Calling an unencapsulated rendering component to perform rendering according to the view structure, and generating a customized message using the message style;

[0016] Push the customized message.

[0017] On the other hand, an embodiment of the present application provides a message pushing device, the device comprising: an acquiring unit, a generating unit, and a pushing unit;

[0018] The acquisition unit is configured to acquire a layout submission request for a message style from a template customization terminal device; and acquire a target layout component for describing the message style layout according to the layout submission request;

[0019] The generating unit is configured to generate a target message template for rendering the target layout component based on the target layout component and a mapping rule, wherein the mapping rule includes rendering information corresponding to multiple layout components in a terminal device rendering layout component set, and the mapping rule adjusts the rendering information accordingly as the layout component set changes, and the target layout component is one or more layout components in the layout component set;

[0020] The pushing unit is configured to send the target message template to a message receiving terminal device so that the message terminal device pushes a customized message using the message style.

[0021] On the other hand, an embodiment of the present application provides a message pushing device, the device comprising: a receiving unit, a parsing unit, a rendering unit, and a pushing unit;

[0022] The receiving unit is configured to receive a target message template for rendering a target layout component, the target layout component being used to describe a layout of a message style of a template-customized terminal device, the target message template being generated based on the target layout component and a mapping rule, the mapping rule including rendering information corresponding to a plurality of layout components in a terminal device rendering layout component set, the mapping rule adjusting the rendering information accordingly as the layout component set changes, the target layout component being one or more layout components in the layout component set;

[0023] The parsing unit is configured to parse the layout according to the target message template to obtain a view structure for describing the layout of the message style, wherein the view structure includes the size of one or more layout components in the target layout component and the relative positions of the one or more layout components;

[0024] The rendering unit is configured to call an unencapsulated rendering component to perform rendering according to the view structure, and generate a customized message using the message style;

[0025] The pushing unit is configured to push the customized message.

[0026] In another aspect, an embodiment of the present application provides a computer device, comprising a processor and a memory.

[0027] The memory is used to store program code and transmit the program code to the processor;

[0028] The processor is configured to execute the method described above according to the instructions in the program code.

[0029] On the other hand, an embodiment of the present application provides a computer-readable storage medium, which is used to store a computer program, and the computer program is used to execute the method described in the above aspects.

[0030] In another aspect, embodiments of the present application provide a computer program product or computer program, which includes computer instructions stored in a computer-readable storage medium. A processor of a computer device reads the computer instructions from the computer-readable storage medium and executes the computer instructions, causing the computer device to perform the method described in the above aspects.

[0031] As can be seen from the above technical solution, after a template customization terminal device submits a request for a message style layout and obtains a target layout component used to describe the message style layout, the target layout component is no longer sent directly to the message receiving terminal device for parsing. Instead, a target message template for rendering the target layout component is generated based on the target layout component and mapping rules. Since the mapping rules include rendering information corresponding to the terminal device rendering multiple layout components, the target message template generated based on the mapping rules can fully express the target layout component used to describe the message style layout. Therefore, the message receiving terminal device can clarify the template customization terminal device's message style requirements based on the rendering information corresponding to the target layout component in the target message template and push a customized message using the message style. Moreover, the mapping rules will adjust the rendering information accordingly as the layout component set changes. Even if the target layout component includes a changed layout component, the mapping rules can still generate corresponding rendering information, thereby pushing a customized message based on the target message template to the message receiving terminal device. Therefore, by adjusting the mapping rules according to changes in the layout component set, customized messages that meet the template customization terminal device's message style requirements can be rendered without updating the version of the communication software in the message receiving terminal device, thereby improving the user experience. BRIEF DESCRIPTION OF THE DRAWINGS

[0032] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without any creative work.

[0033] Figure 1 Schematic diagram of an application scenario of the message push method provided in an embodiment of the present application;

[0034] Figure 2 A flowchart of a message push method provided in an embodiment of the present application;

[0035] Figure 3a A schematic diagram of opening a communication software provided in an embodiment of the present application;

[0036] Figure 3bA schematic diagram of entering a template editing platform provided in an embodiment of the present application;

[0037] Figure 3c A schematic diagram of a template editing platform provided in an embodiment of the present application;

[0038] Figure 4 A schematic diagram of generating a target message template provided in an embodiment of the present application;

[0039] Figure 5 A schematic diagram of a customized message provided in an embodiment of the present application;

[0040] Figure 6a A schematic diagram of a message template provided in an embodiment of the present application;

[0041] Figure 6b A method provided in the embodiment of the present application Figure 6a Schematic diagram of message templates with different message contents;

[0042] Figure 7 A schematic diagram of an overall framework for expression calculation provided in an embodiment of the present application;

[0043] Figure 8 A schematic diagram of a rendering engine rendering a customized message provided in an embodiment of the present application;

[0044] Figure 9 A schematic diagram of different terminal devices displaying the same target message template provided in an embodiment of the present application;

[0045] Figure 10 A schematic diagram of a scenario of a message push method provided in an embodiment of the present application;

[0046] Figure 11 A schematic diagram of a message push device provided in an embodiment of the present application;

[0047] Figure 12 A schematic diagram of the structure of the server provided in the embodiment of the present application;

[0048] Figure 13 A schematic diagram of the structure of a terminal device provided in an embodiment of the present application;

[0049] Figure 14 A flowchart of a message push method provided in an embodiment of the present application;

[0050] Figure 15 A schematic diagram of a message push device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0051] The embodiments of the present application are described below with reference to the accompanying drawings.

[0052] In view of the fact that in the related art, each time a layout component is added to the graphical UI editor, the version of the communication software in the terminal device needs to be updated, and the continuous release of versions leads to a poor user experience, the embodiment of the present application provides a message push method and related devices, which can render customized messages without updating the version of the communication software in the terminal device, thereby improving the user experience.

[0053] The message push method provided in this application can be applied to message push devices with data processing capabilities, such as terminal devices and servers. Specifically, the terminal device can be a smartphone, tablet computer, laptop computer, desktop computer, smart speaker, smart watch, car terminal, smart TV, etc., but is not limited thereto; the server can be an independent physical server, or a server cluster or distributed system composed of multiple physical servers, or a cloud server providing cloud computing services. The terminal device and the server can be connected directly or indirectly via wired or wireless communication, and this application does not impose any restrictions on this.

[0054] As disclosed in the message push method of this application, the data involved, such as layout component sets, mapping rules, message templates, etc., can be stored on the blockchain.

[0055] In order to facilitate understanding of the technical solution of the present application, the message push method provided in the embodiment of the present application is introduced below in combination with actual application scenarios.

[0056] See also Figure 1 , which is a schematic diagram of an application scenario of the message push method provided by the embodiment of the present application. Figure 1 In the application scenario, the aforementioned message pushing device is the server 120, which is used to generate a target message template from the message style set by the template customization terminal device 110 and send it to the message receiving terminal device 130, and the message receiving terminal device 130 pushes the customized message based on the target message template.

[0057] The message pusher can customize the message style through the template customization terminal device 110. The template customization terminal device 110 displays the layout components that may be used to set the message template through the display interface 111. The user selects the layout component by clicking, dragging, etc. to complete the customization of the message style. The template customization terminal device 110 can also provide functions such as layout preview and layout component parameter configuration through the display interface 111 to meet user needs.

[0058] exist Figure 1In the illustrated application scenario, display interface 111 displays a layout component area 111a and a layout preview area 111b. Layout component area 111a is used to display various layout components from a layout component set, such as basic text, buttons, and selectors, for setting message styles. Layout preview area 111b is used to display the message style set by the user, such as the "OK button" set by the user using the "Button" layout component. After the user sets the message style, they can trigger the Submit button in layout preview area 111b to generate a layout submission request, submitting the set message style to server 120.

[0059] The server 120 obtains the target layout component used to describe the message style layout according to the layout submission request. Although the target layout component can express the layout component selected by the user through the template customization terminal device 110, this expression is not detailed enough for subsequent rendering operations, so that the message receiving terminal device 130 cannot directly render the corresponding message style according to the target layout component. Figure 1 Taking the "OK button" as an example, the target layout component is a Json (a programming language) file, which can only express the text and text color of the "OK button". During subsequent rendering operations, it is impossible to clearly determine the button size, text size, border color, background color, background radius and other specific parameters of the "OK button" layout component used for subsequent rendering operations.

[0060] Therefore, the server 120 stores a mapping rule, which includes rendering information corresponding to the rendering of multiple layout components by the terminal device, and the mapping rule can adjust the rendering information accordingly as the layout component set changes. The server 120 can generate a target message template for rendering the target layout component based on the target layout component and the mapping rule. The target message template can fully express the target layout component used to describe the message style layout situation, which is a machine-oriented expression. Figure 1 Taking the "OK button" as an example, the target message template can be an XML (a programming language) file. Compared with the Json file, the XML file includes more detailed information for subsequent rendering operations, such as the layout width, layout height, text size, border color, background color, background corner radius of the "OK button" and other specific parameters for subsequent rendering operations.

[0061] Moreover, the mapping rules can adjust the rendering information accordingly as the layout component set changes. For example, if an expanded layout component appears in the layout component set, the mapping rules will also add rendering information corresponding to the newly added layout component, so that even if the target layout component includes the changed layout component, the corresponding rendering information can be generated based on the mapping rules.

[0062] The server 120 sends the target message template to the message receiving terminal device 130. The message receiving terminal device 130 can clarify the template customization terminal device's demand for the message style based on the rendering information of the target layout component in the target message template, and can render the customized message using the message style, thereby realizing the push of the customized message. Figure 1 In the application scenario shown, the display interface 131 of the message receiving terminal device 130 displays a message related to the item preparation meeting in the aforementioned message style.

[0063] Therefore, the mapping rules stored in the server 120 are adjusted accordingly based on the changes in the layout components. The server 120 can generate a target message template based on the mapping rules and the target layout components, so that the message receiving terminal device 130 can push customized messages according to the target message template, so that the version of the communication software in the message receiving terminal device 130 does not need to be updated, and it can also render customized messages that meet the message style requirements of the template customization terminal device 110, thereby improving the user experience.

[0064] In the following, in conjunction with the accompanying drawings, a message push method provided by an embodiment of the present application is introduced with a server as a message push device.

[0065] See also Figure 2 , which is a flow chart of a message push method provided by an embodiment of the present application. Figure 2 As shown, the message push method includes the following steps:

[0066] S201: Obtain a template to customize the layout submission request of the terminal device for the message style.

[0067] In actual applications, users can set message styles through template customization terminal devices. Template customization terminal devices can be, for example, smartphones, tablet computers, laptop computers, desktop computers, etc., and this application does not impose specific restrictions on this. The following description uses a smartphone as an example of a template customization terminal device.

[0068] The communication software is installed in the smart phone, and the user opens the communication software by clicking, such as Figure 3a As shown; users enter the template editing platform through the interface provided by the robot configuration page built into the communication software, such as Figure 3b The present application embodiment does not specifically limit the template editing platform, for example, it can be WebotBuilder (an open source multi-platform robot simulation software), the template editing platform can provide users with visual UI editing, and provide users with the functions required to set message styles, such as one or more combinations of layout component collection, layout preview, layout component parameter configuration, etc. Figure 3cAs shown, the template editing platform is divided into three areas from left to right: layout component collection, layout preview, and layout component parameter configuration. The following describes each of these areas.

[0069] (1) Layout component set: including multiple layout components. Users can select the corresponding layout component to add to the message style. Table 1 shows Figure 3c Functional description of various layout controls. It should be noted that layout components are not limited to those shown in Table 1 and can be continuously adjusted according to user needs, for example, modifying existing layout components, deleting existing layout components, adding layout components, etc.

[0070] Table 1

[0071]

[0072] (2) Layout preview: used to show the overall effect of the user setting the message style.

[0073] (3) Layout component parameter configuration: You can adjust the parameter configuration of some layout components.

[0074] After completing the message style settings, users can click Figure 3c The submit button in sends a layout submission request to upload the currently set message style to the server.

[0075] S202: According to the layout submission request, a target layout component for describing the message style layout is obtained.

[0076] After receiving the layout submission request, the server obtains a target layout component for describing the message style layout based on the layout submission request. The target layout component can be a code file, and the embodiments of the present application do not specifically limit the code language, such as JSON, C / C++, Python, Java, MATLAB, etc.

[0077] For example, if the target layout component includes Figure 1 The "OK button" shown can be represented as the following Json file expressed in Json language:

[0078] 1.{

[0079] 2.“type”:“button”,

[0080] 3. "style": "red",

[0081] 4. "text": "OK",

[0082] 5. "interaction": {}

[0083] 6.}

[0084] This JSON file describes the "OK button" as a button, with a red color and the text "OK." JSON is user-oriented and easier for users to understand. Users can modify the generated JSON file or write it directly on the server instead of generating it through the layout component in the template editing platform. This provides more flexibility in how the server retrieves the target layout component.

[0085] Although the target layout component can express the message style set by the user through the template customization terminal device, this expression is too abstract for the message receiving terminal device. The user-oriented expression is not conducive to the understanding of the message receiving terminal device, or it is not detailed enough for subsequent rendering operations. The message receiving terminal device cannot directly render the corresponding message style based on the target layout component.

[0086] In order to render the corresponding message style, the relevant technology sends the target layout component directly to the message receiving terminal device. The communication software installed in the message receiving terminal device stores the specific rendering information corresponding to the target layout component, and can parse the target layout component into content that can perform subsequent rendering operations so that the rendering engine of the communication software can render it. However, if the layout component set including multiple layout components changes, the communication software installed on the terminal device needs to be updated to modify the rendering information corresponding to the layout component. However, constantly updating the version of the communication software will bring a lot of inconvenience to the user. If the version of the communication software is not updated, the communication software cannot render the newly added layout components. As a result, the user experience is poor.

[0087] Based on this, the embodiment of the present application no longer directly sends the target layout component to the message receiving terminal device, but converts the target layout component into a target message template and then sends it to the message receiving terminal device. The target message template is a machine-oriented expression. For the message receiving terminal device, the target message template can fully describe the layout of the message style, so that the message terminal device determines the message style according to the target message template, thereby completing the push of the customized message, which is explained in detail below.

[0088] S203: Based on the target layout component and the mapping rule, generate a target message template for rendering the target layout component.

[0089] The mapping rules include rendering information corresponding to various layout components in a rendering layout component set for a terminal device (such as multiple message-receiving terminal devices, template-customized terminal devices, etc.). Based on the mapping rules, a target layout component that is too abstract for rendering operations on the message-receiving terminal device can be converted into a target message template that can be used to render the target layout component. Compared to the target layout component, the target message template includes more detailed information for rendering operations, allowing the target message template to fully describe the layout of the message style, thereby enabling the rendering engine of the communication software in the message-receiving terminal device to perform rendering operations based on the target message template.

[0090] The target message template can be a file in code format. The embodiment of the present application does not specifically limit the language of the code, such as XML, C / C++, Python, Java, MATLAB, etc. The content and structure of the XML file are completely separated, which is easy for the message receiving terminal device to understand. The following example uses the conversion of the Json file in S202 into an XML file expressed in XML as an example. The XML file can be expressed as:

[0091] 1. <Button < / button>

[0092] 2. layout_width="match_parent"

[0093] 3. layout_height="wrap_content"

[0094] 4. text = "Confirm"

[0095] 5. textSize="16dp"

[0096] 6. textColor="#FFFF6963"

[0097] 7. background="#0FFF6963"

[0098] 8. radius = "5dp"

[0099] 9. strokeColor="#CFCFCF"

[0100] 10.strokeWidth="1px"

[0101] 11. gravity = "center"

[0102] 12.onClick="@{button.action}"

[0103] ​13. / >

[0104] Therefore, based on the mapping rules, on the basis that the type of the "OK button" is a button, the style is red, and the displayed text is "OK", the layout width, layout height, text size, text color, background color, background corner radius, border color, border width, gravity, events and other specific parameters for subsequent rendering operations of the "OK button" rendered in the message receiving terminal can be obtained, so that the target message template can fully express the layout of the message style, so that the message receiving terminal device can render according to the target message template.

[0105] Moreover, the mapping rules can adjust the rendering information accordingly as the layout component set changes. For example, after an expanded specific layout component appears in the layout component set, the mapping rules will also add rendering information corresponding to the specific layout component. For another example, after an existing layout component in the layout component set changes, the mapping rules will also modify the existing rendering information corresponding to the changed layout component. Therefore, if the layout component set changes, the target layout component is one or more layout components in the layout component set, and the target layout component may include the changed layout component. The target message template generated based on the mapping rules can also include the rendering information corresponding to the changed layout component, so that the version of the communication software in the message receiving terminal device does not need to be updated, and customized messages that meet the message style requirements of the template customization terminal device can be rendered, thereby improving the user experience.

[0106] As a possible implementation method, considering that the target message template includes many fields and may occupy a large volume, the volume occupied by the target message template can be reduced by compression. The following uses two methods as examples to illustrate the compression operation.

[0107] Method 1: See Figure 4 , this figure is a schematic diagram of a target message template generated according to an embodiment of the present application. Take the target layout component as a Json file as an example for explanation. Based on the Json file and the mapping rules, an XML file is generated. Since the XML file includes many fields and occupies a large volume, the XML file is not used as the target message template. Instead, the XML file is serialized using Protocol Buffer, and the resulting Protocol Buffer file is used as the target message template. If some target layout components require image materials, the corresponding image materials can also be obtained and added to the Protocol Buffer file to generate the target message template.

[0108] Method 2: The target message template includes many fields. Find the repeated character strings and replace them with shorter symbols to shorten the character strings and reduce the size of the target message template.

[0109] S204: Send the target message template to the message receiving terminal device, so that the message terminal device pushes the customized message using the message style.

[0110] After a user generates a target message template through a template customization terminal device, the server can store the target message template. When the user triggers an operation to send a customized message using the target message template, the server can push the customized message based on the target message template to the corresponding message receiving terminal device. The message receiving terminal device can then render the customized message using the message style corresponding to the target message template, so that the customized message can be presented based on the message style.

[0111] It should be noted that the message receiving terminal device may be, for example, a smart phone, tablet computer, laptop computer, desktop computer, etc., and this application does not impose any specific restrictions on this. The template customization terminal device mentioned above may also be used as a message receiving terminal device.

[0112] As can be seen from the above technical solution, after a template customization terminal device submits a request for a message style layout and obtains a target layout component used to describe the message style layout, the target layout component is no longer sent directly to the message receiving terminal device for parsing. Instead, a target message template for rendering the target layout component is generated based on the target layout component and mapping rules. Since the mapping rules include rendering information corresponding to the terminal device rendering multiple layout components, the target message template generated based on the mapping rules can fully express the target layout component used to describe the message style layout. Therefore, the message receiving terminal device can clarify the template customization terminal device's message style requirements based on the rendering information corresponding to the target layout component in the target message template and push a customized message using the message style. Moreover, the mapping rules will adjust the rendering information accordingly as the layout component set changes. Even if the target layout component includes a changed layout component, the mapping rules can still generate corresponding rendering information, thereby pushing a customized message based on the target message template to the message receiving terminal device. Therefore, by adjusting the mapping rules according to changes in the layout component set, customized messages that meet the template customization terminal device's message style requirements can be rendered without updating the version of the communication software in the message receiving terminal device, thereby improving the user experience.

[0113] The embodiments of the present application do not specifically limit the sending form of the target message template to the message receiving terminal. For example, the target message template itself can be sent directly to the message receiving terminal device so that the message receiving terminal device can render it according to the target message template to achieve the push of customized messages. For another example, the target message template can also be stored, and the storage address and template identifier can be sent to the message receiving terminal device, so that the message receiving terminal device can first determine whether the target message template has been rendered by the template identifier and the rendering result has not been deleted, that is, the rendered target message template. If so, the rendering result is directly obtained according to the template identifier to achieve the push of customized messages; if not, the target message template is obtained according to the storage address. As a result, the message receiving terminal device reduces the number of repeated acquisitions of the target message template and the number of repeated renderings of the target message template, that is, reduces the server's sending cost and the message receiving terminal device's parsing and rendering cost, and improves the push efficiency of customized messages.

[0114] This application does not specifically limit the method of sending the target message template to the message receiving terminal device. The following two methods are used as examples for explanation.

[0115] The customized message pushed by the server to the message receiving terminal device includes two parts: the target message template and the message content of the customized message. The server implements the push of the customized message based on the target message template. The message content of the customized message can be embedded in the target message template and sent to the message receiving terminal device, as shown in the following method one. The message content of the customized message and the target message template can also be sent to the message receiving terminal device without embedding the message content in the target message template, as shown in the following method two.

[0116] Method 1: The message content of the customized message is embedded in the target message template.

[0117] When users customize the message style of terminal devices through template customization, they can also set the message content of the customized message displayed using the message style. That is, the server can obtain not only the target layout component but also the message content of the customized message according to the layout submission request. The server obtains the rendering information corresponding to the target layout component according to the mapping rule, embeds the message content into the rendering information, and generates a target message template as the customized message. That is, the message content of the customized message has been embedded in the target message template, which is a static layout template, such as Figure 5 Birthday party invitation template shown.

[0118] Therefore, the message template belonging to the static layout template can be stored in the server. When the corresponding message template is needed, the corresponding message template can be called from the server and used as the target message template. The customized message can be pushed to the message receiving terminal device based on the target message template.

[0119] After the server stores the target message template as a customized message, it will not actively modify the target message template, but will directly send it to one or more message receiving terminal devices to complete the push of the customized message. If the user wants to change the target message template, or change the message content of the customized message, such as Figure 5 If the "No gift required" option is changed to "Gift required," the user will need to initiate a new layout submission request for the message style and content of the customized message through the template customization terminal. Upon receiving the new layout submission request, the server will regenerate an updated target message template and push the updated customized message based on the updated target message template to the receiving terminal. This allows the customized message content to be reused without being embedded in the target message template, as described in Method 2 below.

[0120] Method 2: The message content of the customized message is not embedded in the target message template.

[0121] In the first method, the message content of the customized message is inseparable from the target message template. Once the message content of the customized message needs to be modified, the user needs to re-customize the target message template as the customized message through the template customization terminal device, that is, embed the modified message content in the target message template. However, in actual applications, it is often encountered that only the message content is different but the message template is the same, such as Figure 6a and Figure 6b As shown, when a message template of a customer contact data profile is pushed to multiple message receiving terminal devices, the message content of the customized message corresponding to different message receiving terminal devices is different, such as Figure 6a The number of new customers is 56, and the number of single chats with customers is 12. Figure 6b The number of new customers is 53, and the number of one-on-one chats with customers is 0.

[0122] To enable reuse of target message templates, the customized message content can be left un-embedded in the target message template. When modifying the customized message content, there's no need to re-customize the target message template; only the customized message content can be modified. In this case, before pushing the customized message to a message terminal, the customized message content is retrieved, and the target message template and content are sent to the receiving terminal to push the customized message.

[0123] Therefore, when the content of a customized message needs to be modified, there's no need to re-customize the target message template through the template customization terminal. Instead, the stored target message template is directly called to obtain the modified message content. This modified message content and the target message template are then sent to the message receiving terminal to push the modified customized message. This allows the same target message template to be bound to different message contents, resulting in different customized messages. This reuse of target message templates enables dynamic updates of customized messages, reduces the workload of repeatedly customizing target message templates, and improves the user experience.

[0124] Sending the target message template and message content to the message receiving terminal device can be divided into two scenarios. Scenario 1: The server adds the customized message content to the target message template to obtain the customized message, and then pushes the customized message to the message receiving terminal device. Scenario 2: The server sends the customized message content and the target message template to the message receiving terminal device. The message receiving terminal device then adds the message content to the target message template to obtain the customized message, thereby pushing the customized message.

[0125] There are two situations when the server pushes customized messages to the message receiving terminal device based on the target message template. One is that the server actively pushes customized messages to the message receiving terminal device, and the other is that the server passively pushes customized messages to the message receiving terminal device. They are explained below respectively.

[0126] Case 1: The server passively pushes a customized message to the message receiving terminal device.

[0127] The server receives a push request for a customized message to be pushed to a receiving terminal device. The push request includes the content of the customized message. Each time the server receives a push request, it extracts the content of the customized message from the push request and, based on the target message template and the content, pushes the customized message to the receiving terminal device.

[0128] Case 2: The server proactively pushes a customized message to the message receiving terminal device.

[0129] The server receives a push request for a customized message to be pushed to a message receiving terminal device. The push request carries the template identifier of the target message template and the push period for the customized message. The server stores multiple message templates. The template identifier determines whether the target message template corresponding to the template identifier is used for this customized message push. When the push period reaches its limit, the server retrieves the corresponding target message template and message content based on the template identifier. Based on the target message template and message content, the customized message is pushed to the message receiving terminal device designated by the user who sent the customized message.

[0130] For example, the server receives a push request that includes the template identifier of message template A and a customized message to be pushed at 8:00 a.m. every morning. At 8:00 a.m. every day, the server proactively triggers the operation of pushing the customized message to the message receiving terminal device. Based on the template identifier of message template A, the server determines that message template A is a template for today's weather conditions. Therefore, the server obtains today's weather data as the message content of the customized message. Based on this message content and message template A, the server pushes the customized message, namely, today's weather conditions, to the message receiving terminal device.

[0131] The following is combined Figure 7 and Figure 6b , describes how the server obtains the message content of the customized message.

[0132] To enable the reuse of message templates, the changed local areas can be marked with dynamic layout components. For example, when users customize the message style of terminal devices through templates, in addition to configuring regular constant values ​​for layout component parameters, they can also bind layout components to variable expressions. By using variable expressions, multiple customized messages using the same message style can be pushed, enabling the reuse of message templates.

[0133] For example, when a user customizes a message style on a terminal device through a template, the user can customize the message content, such as Figure 6b The "number of new customers" and "number of customer private chats" are laid out through two dynamic layout components, and the two dynamic layout components are bound to variable expressions respectively.

[0134] When the push cycle is reached, the server determines the target message template required for the customized message to be pushed based on the template identifier, identifies the target dynamic layout component in the target message template, and the target dynamic layout component is bound to a variable expression. The corresponding message content is obtained according to the variables in the variable expression, and based on the target message template and message content, the customized message is pushed to the message receiving terminal device.

[0135] For example, in Figure 6b In the message template shown, the number representing the number of newly added customers (53) and the number representing the number of customer single chats (0) correspond to dynamic layout components, such as digital display components. Figure 6b When the message template shown is the target message template, the target dynamic components are array display component I corresponding to 53 and digital display component II corresponding to 0. The variable expression bound to digital display component I is identified as ${customer.add_cnt}, and the variable expression bound to digital display component II is identified as ${customer.chat_cnt}. Therefore, the desired message content can be retrieved using the variable expressions ${customer.add_cnt} and ${customer.chat_cnt}, as shown below:

[0136]

[0137] If the expression corresponding to the target dynamic layout component is complex and involves expression calculation, it is necessary to first obtain the final calculation result through expression calculation as the message content of the customized message. In this case, the acquisition of the message content depends on the expression calculation. In this embodiment, it is wrapped with ${}. For example, the syntax set calculation supported by expression calculation can be seen in Table 2:

[0138] Table 2

[0139] Grammar Set Example Variable access ${customer.add_cnt} Array access ${data.people[0]} Addition, subtraction, multiplication and division ${data.stu.size+6} Size equal to ${student.age==18} round brackets ${3*(data.stu.size+6)} Ternary Operation ${student.age==18? `visible`:`gone`}

[0140] Referring to Figure 6, this figure is a framework diagram of an expression calculation provided by an embodiment of the present application. First, the variable expression is divided into various tokens (tokens) through this method analysis, and the divided tokens are grammatically analyzed and pushed onto a stack to form an operand stack and an operator stack. Then, the operand stack and the operator stack are used to perform a single basic operation. Specifically, the type and priority of the basic operation are determined, and the corresponding operands are taken out. Mathematical operations or comparison operations are performed on the operands, and a single result is returned, and the single result is pushed onto the stack. Finally, the previous operation is repeated until all operators in the operator stack are consumed to obtain the final calculation result.

[0141] Taking a+b*c as an example, first, scan from front to back. When a is encountered, it is pushed onto the operand stack. When + is encountered, it is pushed onto the operator stack. Similarly, when b and c are encountered, they are pushed onto the operand stack, and when * is encountered, it is pushed onto the operator stack. Next, * is removed from the operator stack. Then, the operator stack multiplies the operands b and c. The product is recorded as d and placed back on the operand stack. Next, the operator stack multiplies the operands +. Then, the operator stack multiplies a and d. The result of the addition operation is the content of the customized message.

[0142] The server sends the target message template to the message receiving terminal device, which renders the target message template to generate a customized message and displays the customized message to the user.

[0143] See also Figure 14 , which is a flow chart of a message push method provided by an embodiment of the present application. Figure 14 As shown, the message push method includes the following steps:

[0144] S1401: Receive a target message template for rendering a target layout component.

[0145] Among them, the target message template is generated based on the target layout component and mapping rules. The target layout component is used to describe the layout of the message style of the template customized terminal device. The mapping rule includes the rendering information corresponding to the various layout components in the terminal device rendering layout component set. The mapping rule adjusts the rendering information accordingly as the layout component set changes. The target layout component is one or more layout components in the layout component set. For relevant matters, please refer to the above description.

[0146] The following combination Figure 8 See Figure 8 , this figure is a schematic diagram of a rendering engine rendering a customized message provided in an embodiment of the present application.

[0147] The process of rendering a customized message by a message receiving terminal device includes three steps: (1) receiving data, (2) parsing the layout, and (3) rendering the customized message. These steps are described in detail below.

[0148] (1) Receiving data: The message receiving terminal device receives the target message template used to render the target layout component.

[0149] As can be seen from the above, the message content of the customized message can be included in the target message template and sent to the message receiving terminal device, or it can be sent to the message receiving terminal device independently. If the message content is not embedded in the target message template, the message content must also be received when receiving data.

[0150] Message receiving terminal devices correspond to various systems, such as Android, iOS, MacOS, Windows, etc. In related technologies, message receiving terminal devices of different operating systems need to be equipped with different target message templates for subsequent parsing, rendering and other operations, which requires a large amount of adaptation work.

[0151] Based on this, an embodiment of the present application provides a rendering engine, which is located in the communication software of the message receiving terminal device, and the message receiving terminal device realizes the display of customized messages through the rendering engine. The parsing function in the rendering engine is written by Kotlin Multiplatform (a set of technical frameworks for multi-platform development based on the Kotlin language), which can compile different types of files from the same message template. For example, the target message template of the xml file is compiled into an aar file for use by the message receiving terminal device of the Andorid operating system, a framework file for use by the message receiving terminal device of the IOS operating system and the MacOS operating system, and a dll file for use by the message receiving terminal device of the Windows operating system.

[0152] Therefore, there is no need to write multiple target message templates for different operating systems. Only one target message template is needed. Through the same rendering engine, message receiving terminal devices with different operating systems can parse the view structure suitable for the current operating system based on the target message template. This not only reduces the adaptation cost, but also ensures the consistency of rendering results of message receiving terminal devices with different operating systems. Figure 9 As shown, the message styles of customized messages displayed by the message receiving terminal devices of the four operating systems are basically consistent.

[0153] The following is a detailed description of the parsing and rendering of the target message template.

[0154] S1402: Parse the layout according to the target message template to obtain a view structure for describing the layout of the message style.

[0155] Corresponding to Figure 8 (2) Parsing layout: The message receiving terminal device can perform layout parsing according to the target message template to obtain a view structure for describing the layout of the message style.

[0156] After receiving the target message template, the message receiving terminal uses its rendering engine to perform layout parsing on the target message template, obtaining a view structure suitable for the operating system of the message receiving terminal device. This view structure is used to describe the layout of the message style, including the size and relative position of one or more layout components in the target layout component. In other words, the view structure includes the most basic description of the layout components. For example, a layout component in the target layout component occupies one-quarter of the message receiving terminal device screen and is located in the upper left corner of the message receiving terminal device screen, or a layout component in the target layout component occupies 10 pixels.

[0157] This application does not specifically limit the layout analysis method, and an example is used below to illustrate.

[0158] First, a view structure in the form of a view tree is generated through layout parsing. The target message template is parsed to obtain the target layout component that describes the message style layout in the target message template. The corresponding view tree is generated. The view tree includes multiple tree nodes, each of which corresponds to the properties of a layout component in the target layout component.

[0159] As a possible implementation method, if the received target message template has been serialized through Protocol Buffer, it is necessary to deserialize the target message template (Protocol Buffer file) to obtain layout information such as XML files and image materials.

[0160] The View tree is then measured and positioned. This involves measuring and positioning each node based on its attributes, determining the size and relative position of each node. This allows us to determine the size and relative position of each layout component within the target layout component. Furthermore, the size of the view structure can be determined, resulting in a View tree containing the view structure size, the position of the target layout component, and its style description.

[0161] S1403: Calling an unencapsulated rendering component to perform rendering according to the view structure, and obtaining a customized message in a message style.

[0162] Corresponding to Figure 8 (3) Rendering customized messages. Rendering is strongly related to the operating system. Taking the Android system as an example, the Android system will encapsulate the basic rendering components according to the Android system's encapsulation rules. For example, the rendering components are encapsulated based on different categories such as shape, attribute, and character, so that the Android system can call further encapsulated rendering components to quickly render the customized messages required by the user. The same is true for other systems, which all encapsulate the basic rendering components according to the encapsulation rules of the corresponding system. Therefore, the relevant technology needs to generate view structures suitable for different operating systems for different operating systems, and the adaptation workload is relatively large.

[0163] Based on this, the embodiments of the present application no longer call the encapsulated rendering components of different operating systems, but call the unencapsulated rendering components, that is, the underlying rendering components, and render based on the view structure through basic rendering capabilities, such as point rendering, line rendering, shadow rendering, etc. For example, a unified interface can be provided by the rendering engine to call the unencapsulated rendering components in the message receiving terminal devices of different operating systems for rendering. The embodiments of the present application do not specifically limit the rendering method. For example, the drawing tool of the message receiving terminal device is used for rendering. The following two methods are used as examples for illustration.

[0164] Method 1: Canvas drawing.

[0165] It directly uses canvas and paint to draw text, lines, pictures and other effects. It has good performance and is used in Android operating systems and Windows operating systems.

[0166] Method 2: Map to native controls.

[0167] Use the message content of the custom message and the target message template to construct the native View space, specify the original coordinates, and add it to the native layout for iOS and MacOS operating systems.

[0168] S1404: Pushing a customized message: After rendering the target message template to obtain a customized message, the customized message can be pushed to the user.

[0169] It can be seen from the above technical solution that after receiving the target message template, the message receiving terminal device parses and lays out the target message template to obtain a view structure for describing the layout of the message style. The view structure includes the size and relative position of one or more layout components in the target layout component. Thus, the unencapsulated rendering component in the message receiving device can be called for rendering, and a customized message using the message style can be generated and pushed. Therefore, there is no need to generate multiple corresponding view structures for different operating systems of the message receiving terminal device. Only one view structure including the size and relative position of the target layout component needs to be generated. Through this view structure, the unencapsulated rendering component can be called, so that the message receiving terminal devices with different operating systems can display customized messages with consistent message styles as much as possible.

[0170] As a possible implementation method, if the target message template is sent in the form of the storage address and template identifier of the target message template, after receiving the target message template used to render the target layout component, it is determined based on the template identifier whether the rendering result of the target message template is stored in the message receiving terminal device, such as whether it is stored in the cache of the message receiving terminal device. The corresponding different methods of generating customized messages are explained below.

[0171] If yes, then the rendered target message template is obtained from the message receiving terminal device according to the template identifier, the message content is embedded into the rendered target message template, and a customized message using the message style is generated. If no, the aforementioned S1402-S1403 is executed to obtain a customized message using the message style.

[0172] It should be noted that if the target message template contains the content of a customized message, the rendered target message template will be a customized message using the message style. If the target message template does not contain the content of a customized message, you can obtain the content of the customized message and embed it into the rendered target message template to generate a customized message using the message style.

[0173] As a result, the message receiving terminal device reduces the number of times it repeatedly obtains the target message template and the number of times it repeatedly renders the target message template, which reduces the server's sending cost and the message receiving terminal device's parsing and rendering cost, and improves the push efficiency of customized messages.

[0174] In order to better understand the message push method provided in the embodiment of the present application, the following is combined with Figure 10, taking the server automatically pushing customized messages to the message receiving terminal device as an example, the message pushing method provided in the embodiment of the present application is explained.

[0175] See also Figure 10 , which is a scene diagram of a message push method provided by an embodiment of the present application. Enterprise A customizes the message style through the template editing platform (WebotBuilder) and submits a layout submission request, such as Figure 3c shown.

[0176] The server obtains the Json file used to describe the message style layout according to the layout submission request. The Protocol Buffer file is generated using the packaging tool, which has two functions: parsing and compression. For details, see Figure 4 Based on the mapping rules, the Json file is parsed into an XML file, and the XML file is serialized through Protocol Buffer to generate a Protocol Buffer file. If some layout components require image resources, they are also added to the Protocol Buffer file, and the target message template is generated and stored in the background service.

[0177] Company A can set up a push request for customer contact status overviews to be sent to its employees at 9:00 AM every weekday. At 9:00 AM every weekday, the server retrieves the message content and customer contact status overview message template corresponding to the number of new customers and the number of one-on-one chats with customers based on the customer contact status template ID. The server then pushes the message content, the customer contact status overview message template ID, and the download link for the customer contact status overview message template to the corresponding employee's message receiving terminal device.

[0178] The corresponding customized message. For example, the customized message for employee B can be as follows Figure 6a As shown, employee C's customized message can be as follows Figure 6b shown.

[0179] Taking one of the message receiving terminal devices as an example, after receiving the message content, the customer contact status overview message template ID and the download link of the customer contact status overview message template, the message receiving terminal device searches the cache based on the customer contact status overview message template ID to see whether the rendering result of the customer contact status overview message template is stored. If so, the rendering result is directly obtained from the cache based on the customer contact status overview message template ID, the message content is embedded in the rendering result, a customized message is generated, and displayed to the user; if not, the customer contact status overview message template is downloaded based on the download link.

[0180] The message receiving terminal device includes a cross-platform rendering engine built on Kotlin Multiplatform. This engine parses the customer contact profile message template, generates a corresponding View tree, measures and locates the nodes of the View tree, invokes the unencapsulated rendering component in the operating system of the message receiving terminal device for rendering, embeds the message content into the rendered result, and generates a customized message in the message style for display to the user. This cross-platform rendering engine utilizes cross-platform technology and can run on multiple terminal devices. Using a cross-platform rendering engine compiled from the same code not only saves development manpower but also ensures a high degree of consistency in the rendered customized message effects across all terminal devices.

[0181] This allows us to build a cross-platform rendering engine based on Kotlin Multiplatform, enabling multiple devices to render the target message template with consistent rendering effects. For user convenience, this embodiment also provides a rich set of Json components and a corresponding template editing platform, allowing users to easily build customized message styles using this solution.

[0182] In response to the message push method provided in the above embodiment, an embodiment of the present application also provides a message push device.

[0183] See also Figure 11 , which is a schematic diagram of a message push device provided by an embodiment of the present application. Figure 11 As shown, the message pushing device 1100 includes: an acquiring unit 1101, a generating unit 1102 and a pushing unit 1103;

[0184] The acquisition unit 1101 is configured to acquire a layout submission request for a message style from a template customization terminal device; and acquire a target layout component for describing the message style layout according to the layout submission request.

[0185] The generating unit 1102 is configured to generate a target message template for rendering the target layout component based on the target layout component and a mapping rule, wherein the mapping rule includes rendering information corresponding to multiple layout components in a terminal device rendering layout component set, and the mapping rule adjusts the rendering information accordingly as the layout component set changes. The target layout component is one or more layout components in the layout component set;

[0186] The pushing unit 1103 is configured to send the target message template to a message receiving terminal device so that the message terminal device pushes a customized message using the message style.

[0187] As a possible implementation manner, the target message template is sent in the form of a storage address and a template identifier of the target message template.

[0188] As a possible implementation, the layout submission request further includes the message content of the customized message, and the generating unit 1102 is configured to:

[0189] According to the mapping rule, obtaining rendering information corresponding to the target layout component;

[0190] The message content is embedded into the rendering information to generate a target message template as a customized message. As a possible implementation, the acquisition unit 1101 is further configured to:

[0191] Obtaining the message content of the customized message;

[0192] The pushing unit 1103 is used to:

[0193] The target message template and the message content are sent to a message receiving terminal device.

[0194] As a possible implementation, the pushing unit 1103 is configured to:

[0195] Adding the message content to the target message template to obtain the customized message;

[0196] The customized message is pushed to the message receiving terminal device.

[0197] As a possible implementation, the pushing unit 1103 is configured to:

[0198] The target message template and the message content are sent to a message receiving terminal device, so that the message receiving terminal device adds the message content to the target message template and pushes the obtained customized message.

[0199] As a possible implementation manner, the acquiring unit 1101 is further configured to:

[0200] Obtaining a push request for pushing a customized message to a message receiving terminal device, wherein the push request carries a template identifier of the target message template and a push cycle of the customized message;

[0201] When the push cycle is reached, the corresponding message content is obtained according to the template identifier.

[0202] As a possible implementation manner, the target layout component includes a target dynamic layout component, and the acquiring unit 1101 is configured to:

[0203] When the push cycle is reached, determining a target message template according to the template identifier;

[0204] Identifying a variable expression corresponding to the target dynamic layout component in the target message template;

[0205] Obtain the corresponding message content according to the variable expression.

[0206] As a possible implementation, the acquiring unit 1101 is configured to:

[0207] A push request for pushing the customized message to a message receiving terminal device is obtained, where the push request includes message content of the customized message.

[0208] As a possible implementation manner, the message receiving terminal device is configured to:

[0209] generating a view structure suitable for the operating system of the message receiving terminal device from the target message template according to the parsed template, wherein the view structure includes view size information, position information of the target layout component in the view, and style description of the target layout component;

[0210] The customized message using the message style is generated according to the view structure rendering.

[0211] As a possible implementation manner, if a specific layout component is newly added to the layout component set, rendering information corresponding to the specific layout component is newly added to the mapping rule.

[0212] As can be seen from the above technical solution, after a template customization terminal device submits a request for a message style layout and obtains a target layout component used to describe the message style layout, the target layout component is no longer sent directly to the message receiving terminal device for parsing. Instead, a target message template for rendering the target layout component is generated based on the target layout component and mapping rules. Since the mapping rules include rendering information corresponding to the terminal device rendering multiple layout components, the target message template generated based on the mapping rules can fully express the target layout component used to describe the message style layout. Therefore, the message receiving terminal device can clarify the template customization terminal device's message style requirements based on the rendering information corresponding to the target layout component in the target message template and push a customized message using the message style. Moreover, the mapping rules will adjust the rendering information accordingly as the layout component set changes. Even if the target layout component includes a changed layout component, the mapping rules can still generate corresponding rendering information, thereby pushing a customized message based on the target message template to the message receiving terminal device. Therefore, by adjusting the mapping rules according to changes in the layout component set, customized messages that meet the template customization terminal device's message style requirements can be rendered without updating the version of the communication software in the message receiving terminal device, thereby improving the user experience.

[0213] In response to the message push method provided in the above embodiment, an embodiment of the present application also provides a message push device.

[0214] See also Figure 15 , which is a schematic diagram of a message push device provided by an embodiment of the present application. Figure 15 As shown, the message pushing device 1500 includes: a receiving unit 1501, a parsing unit 1502, a rendering unit 1503 and a pushing unit 1504;

[0215] The receiving unit 1501 is configured to receive a target message template for rendering a target layout component, the target layout component being used to describe a template-customized layout of a terminal device for a message style, the target message template being generated based on the target layout component and a mapping rule, the mapping rule including rendering information corresponding to multiple layout components in a terminal device rendering layout component set, the mapping rule adjusting the rendering information accordingly as the layout component set changes, the target layout component being one or more layout components in the layout component set;

[0216] The parsing unit 1502 is configured to parse the layout according to the target message template to obtain a view structure for describing the layout of the message style, wherein the view structure includes the size of one or more layout components in the target layout component and the relative positions of the one or more layout components;

[0217] The rendering unit 1503 is configured to call an unencapsulated rendering component to perform rendering according to the view structure, and generate a customized message using the message style;

[0218] The pushing unit 1504 is configured to push the customized message.

[0219] As a possible implementation, if the target message template is sent in the form of the storage address and template identifier of the target message template, after receiving the target message template for rendering the target layout component, the message push device 1500 further includes an acquisition unit for:

[0220] If it is determined according to the template identifier that the rendering result of the target message template is stored in the message receiving terminal device, obtaining the rendering result from the message receiving terminal device according to the template identifier, and generating a customized message using the message style;

[0221] If it is determined according to the template identifier that the rendering result of the target message template is not stored in the message receiving terminal device, the parsing unit 1502 is used to parse the layout according to the target message template to obtain a view structure for describing the layout of the message style, wherein the view structure includes the size of one or more layout components in the target layout component and the relative positions of the one or more layout components; the rendering unit 1503 is used to call the unencapsulated rendering component for rendering according to the view structure to generate a customized message using the message style.

[0222] As can be seen from the above technical solution, after receiving the target message template, the message receiving terminal device parses and lays out the target message template to obtain a view structure for describing the layout of the message style. The view structure includes the size and relative position of one or more layout components in the target layout component. Thus, the unencapsulated rendering component in the message receiving device can be called for rendering, generating a customized message using the message style, and pushing the customized message. Therefore, there is no need to generate a view structure required by different operating systems of the message receiving terminal device. It is only necessary to generate a view structure including the size and relative position of the target layout component. Through this view structure, the unencapsulated rendering component can be called, so that the message receiving terminal devices with different operating systems can display customized messages with consistent message styles as much as possible.

[0223] The aforementioned message push device can be a computer device, which can be a server or a terminal device. The following will introduce the computer device provided by the embodiment of the present application from the perspective of hardware entity. Figure 12 The following is a schematic diagram of the server structure. Figure 13 Shown is a schematic diagram of the structure of the terminal equipment.

[0224] See also Figure 12 , Figure 12 This is a schematic diagram of a server structure provided by an embodiment of the present application. The server 1400 may have relatively large differences due to different configurations or performances, and may include one or more central processing units (CPUs) 1422 (for example, one or more processors) and a memory 1432, and one or more storage media 1430 (for example, one or more massive storage devices) for storing application programs 1442 or data 1444. Among them, the memory 1432 and the storage medium 1430 can be short-term storage or persistent storage. The program stored in the storage medium 1430 may include one or more modules (not shown in the figure), and each module may include a series of instruction operations on the server. Furthermore, the CPU 1422 can be configured to communicate with the storage medium 1430 to execute a series of instruction operations in the storage medium 1430 on the server 1400.

[0225] The server 1400 may also include one or more power supplies 1426, one or more wired or wireless network interfaces 1450, one or more input and output interfaces 1458, and / or one or more operating systems 1441, such as Windows Server 2003. TM , Mac OS X TM , Unix TM ,Linux TM , FreeBSD TM etc.

[0226] The steps performed by the server in the above embodiment can be based on the Figure 12 The server structure shown.

[0227] The CPU 1422 is configured to execute the following steps:

[0228] Obtain template customization terminal device layout submission request for message style;

[0229] Obtaining, according to the layout submission request, a target layout component for describing the message style layout;

[0230] generating a target message template for rendering the target layout component based on the target layout component and a mapping rule, wherein the mapping rule includes rendering information corresponding to multiple layout components in a terminal device rendering layout component set, and the mapping rule adjusts the rendering information accordingly as the layout component set changes, and the target layout component is one or more layout components in the layout component set;

[0231] The target message template is sent to a message receiving terminal device so that the message terminal device pushes a customized message using the message style.

[0232] The CPU 1422 is further configured to execute the following steps:

[0233] Receiving a target message template for rendering a target layout component, the target layout component being used to describe a template-customized layout of a terminal device for a message style, the target message template being generated based on the target layout component and a mapping rule, the mapping rule including rendering information corresponding to respective layout components in a terminal device rendering layout component set, the mapping rule adjusting the rendering information accordingly as the layout component set changes, the target layout component being one or more layout components in the layout component set;

[0234] Parsing the layout according to the target message template to obtain a view structure for describing the layout of the message style, wherein the view structure includes the size of one or more layout components in the target layout component and the relative positions of the one or more layout components;

[0235] Calling an unencapsulated rendering component to perform rendering according to the view structure, and generating a customized message using the message style;

[0236] Push the customized message.

[0237] Optionally, the CPU 1422 may also execute the method steps of any specific implementation of the message push method in the embodiments of the present application.

[0238] See also Figure 13 , Figure 13 A schematic diagram of the structure of a terminal device provided in an embodiment of the present application. Figure 13 The block diagram shows a partial structure of a smartphone related to the terminal device provided in an embodiment of the present application. The smartphone includes: a radio frequency (RF) circuit 1510, a memory 1520, an input unit 1530, a display unit 1540, a sensor 1550, an audio circuit 1560, a wireless fidelity (WiFi) module 1570, a processor 1580, and a power supply 1590. Those skilled in the art will understand that Figure 13 The structure of the smartphone shown in the figure does not constitute a limitation on the smartphone, and may include more or fewer components than shown in the figure, or combine certain components, or arrange the components differently.

[0239] The following combination Figure 13 A detailed introduction to the various components of a smartphone:

[0240] The RF circuit 1510 can be used to receive and send signals during information transmission or calls. In particular, after receiving downlink information from the base station, it is sent to the processor 1580 for processing. In addition, the designed uplink data is sent to the base station. Generally, the RF circuit 1510 includes but is not limited to an antenna, at least one amplifier, a transceiver, a coupler, a low noise amplifier (LNA), a duplexer, etc. In addition, the RF circuit 1510 can also communicate with the network and other devices through wireless communication. The above-mentioned wireless communication can use any communication standard or protocol, including but not limited to Global System of Mobile Communication (GSM), General Packet Radio Service (GPRS), Code Division Multiple Access (CDMA), Wideband Code Division Multiple Access (WCDMA), Long Term Evolution (LTE), email, Short Messaging Service (SMS), etc.

[0241] The memory 1520 can be used to store software programs and modules. The processor 1580 implements various functional applications and data processing of the smartphone by running the software programs and modules stored in the memory 1520. The memory 1520 may mainly include a program storage area and a data storage area. The program storage area may store an operating system, at least one application required for a function (such as a sound playback function, an image playback function, etc.), etc.; the data storage area may store data created based on the use of the smartphone (such as audio data, a phone book, etc.). In addition, the memory 1520 may include a high-speed random access memory and may also include a non-volatile memory, such as at least one disk storage device, a flash memory device, or other volatile solid-state storage device.

[0242] The input unit 1530 can be used to receive input digital or character information, and to generate key signal input related to the user settings and function control of the smartphone. Specifically, the input unit 1530 may include a touch panel 1531 and other input devices 1532. The touch panel 1531, also known as a touch screen, can collect user touch operations on or near it (such as operations performed by the user using a finger, stylus, or any other suitable object or accessory on or near the touch panel 1531) and drive the corresponding connection device according to a pre-set program. Optionally, the touch panel 1531 may include two parts: a touch detection device and a touch controller. The touch detection device detects the user's touch direction and detects the signal generated by the touch operation, and transmits the signal to the touch controller; the touch controller receives the touch information from the touch detection device and converts it into touch point coordinates, which are then sent to the processor 1580. It can also receive commands sent by the processor 1580 and execute them. In addition, the touch panel 1531 can be implemented using various types such as resistive, capacitive, infrared, and surface acoustic wave. In addition to the touch panel 1531, the input unit 1530 may further include other input devices 1532. Specifically, the other input devices 1532 may include, but are not limited to, one or more of a physical keyboard, function keys (such as volume control keys, power keys, etc.), a trackball, a mouse, and a joystick.

[0243] The display unit 1540 can be used to display information input by the user or information provided to the user and various menus of the smartphone. The display unit 1540 may include a display panel 1541. Optionally, the display panel 1541 may be configured in the form of a liquid crystal display (LCD), an organic light-emitting diode (OLED), etc. Further, the touch panel 1531 may cover the display panel 1541. When the touch panel 1531 detects a touch operation on or near it, it is transmitted to the processor 1580 to determine the type of touch event. Subsequently, the processor 1580 provides corresponding visual output on the display panel 1541 according to the type of touch event. Although in Figure 13 In the embodiment, the touch panel 1531 and the display panel 1541 are used as two independent components to realize the input and output functions of the smartphone, but in some embodiments, the touch panel 1531 and the display panel 1541 can be integrated to realize the input and output functions of the smartphone.

[0244] The smartphone may also include at least one sensor 1550, such as a light sensor, a motion sensor, and other sensors. Specifically, the light sensor may include an ambient light sensor and a proximity sensor, wherein the ambient light sensor may adjust the brightness of the display panel 1541 according to the brightness of the ambient light, and the proximity sensor may turn off the display panel 1541 and / or the backlight when the smartphone is moved to the ear. As a type of motion sensor, the accelerometer sensor can detect the magnitude of acceleration in all directions (generally three axes), and can detect the magnitude and direction of gravity when stationary. It can be used for applications that identify the posture of the smartphone (such as horizontal and vertical screen switching, related games, magnetometer posture calibration), vibration recognition related functions (such as pedometer, tapping), etc.; as for other sensors that can be configured in the smartphone, such as gyroscopes, barometers, hygrometers, thermometers, infrared sensors, etc., they will not be described here.

[0245] Audio circuit 1560, speaker 1561, and microphone 1562 provide an audio interface between the user and the smartphone. Audio circuit 1560 converts received audio data into electrical signals and transmits them to speaker 1561, which then converts them into sound signals for output. Microphone 1562, on the other hand, converts collected sound signals into electrical signals, which are then received by audio circuit 1560 and converted into audio data. The audio data is then processed by processor 1580 and transmitted to, for example, another smartphone via RF circuit 1510, or stored in memory 1520 for further processing.

[0246] WiFi is a short-range wireless transmission technology. Smartphones can help users send and receive emails, browse the web, and access streaming media through the WiFi module 1570. It provides users with wireless broadband Internet access. Figure 13 A WiFi module 1570 is shown, but it is understandable that it is not an essential component of the smartphone and can be omitted as needed without changing the essence of the invention.

[0247] Processor 1580 is the control center of the smartphone, connecting all components of the smartphone using various interfaces and circuits. It executes software programs and / or modules stored in memory 1520 and accesses data stored in memory 1520 to perform various smartphone functions and process data. Optionally, processor 1580 may include one or more processing units. Preferably, processor 1580 integrates an application processor and a modem processor. The application processor primarily handles the operating system, user interface, and application programs, while the modem processor primarily handles wireless communications. It is understood that the modem processor may not be integrated into processor 1580.

[0248] The smartphone also includes a power supply 1590 (such as a battery) for supplying power to various components. Preferably, the power supply can be logically connected to the processor 1580 through a power management system, thereby managing functions such as charging, discharging, and power consumption through the power management system.

[0249] Although not shown, the smartphone may also include a camera, a Bluetooth module, etc., which will not be described in detail here.

[0250] In the embodiment of the present application, the memory 1520 included in the smart phone can store program codes and transmit the program codes to the processor.

[0251] The processor 1580 included in the smart phone can execute the message push method provided in the above embodiment according to the instructions in the program code.

[0252] An embodiment of the present application also provides a computer-readable storage medium for storing a computer program, which is used to execute the message push method provided in the above embodiment.

[0253] The present application also provides a computer program product or computer program, which includes computer instructions stored in a computer-readable storage medium. A processor of a computer device reads the computer instructions from the computer-readable storage medium and executes the computer instructions, causing the computer device to perform the message push method provided in various optional implementations of the above aspects.

[0254] Those skilled in the art will understand that all or part of the steps of implementing the above-mentioned method embodiment can be completed by hardware related to program instructions, and the above-mentioned program can be stored in a computer-readable storage medium. When the program is executed, it executes the steps of the above-mentioned method embodiment; and the above-mentioned storage medium can be at least one of the following media: read-only memory (English: Read-Only Memory, abbreviated: ROM), RAM, magnetic disk or optical disk, etc., various media that can store program codes.

[0255] It should be noted that the various embodiments in this specification are described in a progressive manner, and the same or similar parts between the various embodiments can be referred to each other, and each embodiment focuses on the differences from other embodiments. In particular, for the device and system embodiments, since they are basically similar to the method embodiments, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiments. The device and system embodiments described above are merely schematic, wherein the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the modules can be selected according to actual needs to achieve the purpose of the scheme of this embodiment. A person of ordinary skill in the art can understand and implement it without expending creative work.

[0256] The above is merely one specific embodiment of the present application, but the scope of protection of the present application is not limited thereto. Any changes or substitutions that can be easily conceived by a person skilled in the art within the technical scope disclosed in this application should be included in the scope of protection of the present application. Therefore, the scope of protection of the present application should be based on the scope of protection of the claims.

Claims

1. A message push method, characterized in that: The method comprises: Obtaining a layout submission request for a message style from a template customization terminal device; the layout submission request is generated after a user selects a layout component on a display interface provided by the template customization terminal device to complete setting of the message style; Obtaining, according to the layout submission request, a target layout component for describing the message style layout to the user; Based on the target layout component and the mapping rule, a target message template for rendering the target layout component is generated, wherein the mapping rule includes rendering information corresponding to multiple layout components in the terminal device rendering layout component set, and the mapping rule adjusts the rendering information accordingly as the layout component set changes. The target layout component is one or more layout components in the layout component set; the target message template is used to describe the message style layout in a machine-oriented manner; the target message template includes the rendering information of the target layout component; The target message template is sent to a message receiving terminal device, so that the message receiving terminal device can render the message by calling an unencapsulated rendering component, thereby obtaining and pushing a customized message using the message style.

2. The method according to claim 1, characterized in that The sending form of the target message template is the storage address and template identifier of the target message template.

3. The method according to claim 1, characterized in that The layout submission request also includes the message content of the customized message. The generating, based on the target layout component and the mapping rule, a target message template for rendering the target layout component includes: According to the mapping rule, obtaining rendering information corresponding to the target layout component; The message content is embedded into the rendering information to generate a target message template as a customized message.

4. The method according to claim 1, wherein The method further comprises: Obtaining the message content of the customized message; The sending the target message template to the message receiving terminal device includes: The target message template and the message content are sent to a message receiving terminal device.

5. The method according to claim 4, characterized in that The sending the target message template and the message content to the message receiving terminal device includes: Adding the message content to the target message template to obtain the customized message; The customized message is pushed to the message receiving terminal device.

6. The method according to claim 4, characterized in that The sending the target message template and the message content to the message receiving terminal device includes: The target message template and the message content are sent to a message receiving terminal device, so that the message receiving terminal device adds the message content to the target message template and pushes the obtained customized message.

7. The method according to claim 4, characterized in that The method further comprises: Obtaining a push request for pushing a customized message to a message receiving terminal device, wherein the push request carries a template identifier of the target message template and a push cycle of the customized message; The obtaining of the message content of the customized message includes: When the push cycle is reached, the corresponding message content is obtained according to the template identifier.

8. The method according to claim 7, characterized in that The target layout component includes a target dynamic layout component, and when the push cycle is reached, obtaining corresponding message content according to the template identifier includes: When the push cycle is reached, determining a target message template according to the template identifier; Identifying a variable expression corresponding to the target dynamic layout component in the target message template; Obtain the corresponding message content according to the variable expression.

9. The method according to claim 4, characterized in that The obtaining of the message content of the customized message includes: A push request for pushing the customized message to a message receiving terminal device is obtained, where the push request includes message content of the customized message.

10. The method according to any one of claims 1 to 9, characterized in that: If a specific layout component is newly added to the layout component set, rendering information corresponding to the specific layout component is newly added to the mapping rule.

11. A message push method, characterized in that: The method comprises: A target message template for rendering a target layout component is received, the target layout component being used to describe a layout of a message style of a template-customized terminal device to a user, the target message template being generated based on the target layout component and a mapping rule, the mapping rule comprising rendering information corresponding to a plurality of layout components in a terminal device rendering layout component set, the mapping rule adjusting the rendering information accordingly as the layout component set changes, the target layout component being one or more layout components in the layout component set; the target message template being used to describe the message style layout to a machine; the target message template comprising rendering information of the target layout component; the target layout component being obtained based on a layout submission request, the layout submission request being generated after the user selects a layout component on a display interface provided by the template customization terminal device to complete the setting of the message style; Parsing the layout according to the target message template to obtain a view structure for describing the layout of the message style, wherein the view structure includes the size of one or more layout components in the target layout component and the relative positions of the one or more layout components; Calling an unencapsulated rendering component to perform rendering according to the view structure, and generating a customized message using the message style; Push the customized message.

12. The method according to claim 11, characterized in that If the target message template received by the message receiving terminal device is sent in the form of a storage address and a template identifier of the target message template, after receiving the target message template for rendering the target layout component, the method further includes: If it is determined according to the template identifier that the rendering result of the target message template is stored in the message receiving terminal device, obtaining the rendering result from the message receiving terminal device according to the template identifier, and generating a customized message using the message style; If it is determined according to the template identifier that the rendering result of the target message template is not stored in the message receiving terminal device, layout parsing is performed according to the target message template to obtain a view structure for describing the layout of the message style, and according to the view structure, an unencapsulated rendering component in the operating system of the message receiving terminal device is called for rendering to generate a customized message using the message style.

13. A message push device, characterized in that: The device comprises: an acquisition unit, a generation unit and a push unit; The acquisition unit is configured to acquire a layout submission request for a message style from a template customization terminal device; the layout submission request is generated after a user selects a layout component on a display interface provided by the template customization terminal device to complete setting of the message style; and based on the layout submission request, acquire a target layout component for describing the message style layout to the user; The generating unit is configured to generate a target message template for rendering the target layout component based on the target layout component and a mapping rule, wherein the mapping rule includes rendering information corresponding to multiple layout components in a terminal device rendering layout component set, and the mapping rule adjusts the rendering information accordingly as the layout component set changes. The target layout component is one or more layout components in the layout component set; the target message template is configured to describe the message style layout in a machine-oriented manner; and the target message template includes the rendering information of the target layout component. The push unit is used to send the target message template to a message receiving terminal device, so that the message receiving terminal device can render by calling an unencapsulated rendering component to obtain and push a customized message using the message style.

14. A message push device, characterized in that: The device includes: a receiving unit, a parsing unit, a rendering unit and a pushing unit; The receiving unit is configured to receive a target message template for rendering a target layout component, the target layout component being used to describe a template-customized layout of a message style on a terminal device for a user-oriented manner, the target message template being generated based on the target layout component and a mapping rule, the mapping rule comprising rendering information corresponding to a plurality of layout components in a terminal device rendering layout component set, the mapping rule adjusting the rendering information accordingly as the layout component set changes, the target layout component being one or more layout components in the layout component set; the target message template being used to describe the message style layout on a machine-oriented manner; the target message template comprising rendering information of the target layout component; the target layout component being obtained based on a layout submission request, the layout submission request being generated after the user selects a layout component on a display interface provided by the template customization terminal device to complete the setting of the message style; The parsing unit is configured to parse the layout according to the target message template to obtain a view structure for describing the layout of the message style, wherein the view structure includes the size of one or more layout components in the target layout component and the relative positions of the one or more layout components; The rendering unit is configured to call an unencapsulated rendering component to perform rendering according to the view structure, and generate a customized message using the message style; The pushing unit is configured to push the customized message.

15. A computer device, characterized in that: The device includes a processor and a memory: The memory is used to store program code and transmit the program code to the processor; The processor is configured to execute the method of any one of claims 1 to 10, or execute the method of claim 11 or 12, according to the instructions in the program code.

16. A computer-readable storage medium, characterized in that The computer-readable storage medium is used to store a computer program, and the computer program is used to execute the method according to any one of claims 1 to 10, or execute the method according to claim 11 or 12.

17. A computer program product, characterized in that The method comprises a computer program or an instruction; when the computer program or the instruction is executed by a processor, the method according to any one of claims 1 to 10 is executed, or the method according to claim 11 or 12 is executed.

Citation Information

Patent Citations

  • Information processing method and system, information server and information display client

    CN112446725A

  • Message display method

    CN112583695A