Message generation method, device and electronic device

By automatically replacing the placeholder tags with message templates and text libraries in office management applications, the problem of users needing manual editing of notification messages is solved, achieving a more efficient message sending process and a better user experience.

CN112329416BActive Publication Date: 2024-11-26VIVO MOBILE COMM CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202011168401.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2020-10-27
Publication Date
2024-11-26
Estimated Expiration
2040-10-27

AI Technical Summary

Technical Problem

In office management applications, users need to manually edit each time they send notification messages, resulting in wasted time and energy and reducing user experience.

Method used

Automatically replace the placeholder tags to generate and send notification messages by generating message templates and using placeholder tags in the templates, combined with a pre-set text library.

Benefits of technology

Save users' time and energy, improve the efficiency of sending notification messages, and improve the user experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN112329416B_ABST
    Figure CN112329416B_ABST
Patent Text Reader

Abstract

The present application discloses a message generation method, device and electronic device, belonging to the field of communication technology. It includes: generating a message template according to a received editing operation, the message template includes a message body and a placeholder tag set in the message body; determining a target text library corresponding to the placeholder tag according to the correspondence between the preset placeholder tag and the text library, and selecting a target text from the target text library; replacing the placeholder tag in the message template with the target text to obtain a notification message. In the present application, each time a notification message is generated, since the target text can be determined from the preset target text library, and the placeholder tag in the message template is replaced with the target text, the notification message can be automatically generated and sent, and there is no need to generate and send the notification message through manual input by the user, which saves the user's time and energy, improves the efficiency of the notification message sending process, and improves the user's use experience.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application belongs to the field of communication technology, and specifically relates to a message generation method, device and electronic device. Background Art

[0002] With the development of mobile communication technology, using office management applications in electronic devices for instant messaging has become one of the ways for people to communicate at work.

[0003] At present, in daily work, more and more users will choose to establish a chat group in office management applications that includes group members such as their department, team members, partners, and business members, and notify group members of relevant matters by sending notification information in the chat group. For example, the on-duty personnel of this week are announced to group members every week. When the user edits and sends notification information about the on-duty personnel of this week multiple times, even if the content of each notification information is similar, the user still needs to edit different notification information and send it to the chat group every week according to the specific on-duty personnel targeted by this notification information, so that group members in the chat group can obtain the relevant matters contained in the notification information.

[0004] However, in the current solution, since the content of each notification message sent needs to be re-determined based on the transaction and specific personnel targeted by the notification message, each notification message sent by the user needs to be re-edited, which wastes the user's time and energy and reduces the user's experience. Summary of the invention

[0005] The embodiments of the present application provide a message generation method, device and electronic device, which can solve the problem in the prior art that each time a user sends a notification message, the user needs to manually re-edit and generate the notification message, thereby wasting the user's time and energy.

[0006] In order to solve the above technical problems, this application is implemented as follows:

[0007] In a first aspect, an embodiment of the present application provides a method for generating a message, the method comprising:

[0008] Generate a message template according to the received editing operation, wherein the message template includes a message body and a placeholder tag set at a preset position in the message body;

[0009] According to the correspondence between the preset placeholder tag and the text library, determining a target text library corresponding to the placeholder tag, and selecting a target text from the target text library, wherein the target text library contains at least one text preset corresponding to the placeholder tag;

[0010] The placeholder tag in the message template is replaced with the target text to obtain a notification message.

[0011] In a second aspect, an embodiment of the present application provides a message generating device, the device comprising:

[0012] A first generating module, configured to generate a message template according to the received editing operation, wherein the message template includes a message body and a placeholder tag set at a preset position in the message body;

[0013] A first selection module is used to determine a target text library corresponding to the placeholder tag according to a correspondence relationship between the preset placeholder tag and the text library, and select a target text from the target text library, wherein the target text library contains at least one text that is preset and corresponds to the placeholder tag;

[0014] The second generating module is used to replace the placeholder tag in the message template with the target text to obtain a notification message.

[0015] In a third aspect, an embodiment of the present application further provides an electronic device comprising a processor, a memory, and a program or instruction stored in the memory and executable on the processor, wherein the program or instruction, when executed by the processor, implements the steps of the method described in the first aspect.

[0016] In a fourth aspect, an embodiment of the present application further provides a readable storage medium, on which a program or instruction is stored, and when the program or instruction is executed by a processor, the steps of the method described in the first aspect are implemented.

[0017] In a fifth aspect, an embodiment of the present application provides a chip, comprising a processor and a communication interface, wherein the communication interface is coupled to the processor, and the processor is used to run a program or instruction to implement the method described in the first aspect.

[0018] In an embodiment of the present application, a message template is generated according to a received editing operation, the message template including a message body and a placeholder tag set at a preset position in the message body; according to the correspondence between the preset placeholder tag and the text library, a target text library corresponding to the placeholder tag is determined, and a target text is selected from the target text library, the target text library including at least one text preset corresponding to the placeholder tag; the placeholder tag in the message template is replaced with the target text to obtain a notification message. In the present application, after receiving an editing operation, the electronic device generates a message template according to the editing operation including a message body and a placeholder tag. Each time a notification message is generated, since the target text can be determined from the preset target text library and the placeholder tag in the message template is replaced with the target text, the notification message can be automatically generated and sent. There is no need to generate and send the notification message through manual input by the user, which saves the user's time and energy, improves the efficiency of the notification message sending process, and enhances the user's usage experience. BRIEF DESCRIPTION OF THE DRAWINGS

[0019] Figure 1 It is a flowchart of a method for generating a message provided by an embodiment of the present application;

[0020] Figure 2 is a schematic diagram of an editing interface for a notification message provided in an embodiment of the present application;

[0021] Figure 3 It is a flowchart of another method for generating a message provided in an embodiment of the present application;

[0022] Figure 4 is a schematic diagram of a group chat interface provided in an embodiment of the present application;

[0023] Figure 5 is a schematic diagram of a time setting interface provided in an embodiment of the present application;

[0024] Figure 6 It is a block diagram of a message generating device provided in an embodiment of the present application;

[0025] Figure 7 An electronic device provided by an embodiment of the present application;

[0026] Figure 8 It is a schematic diagram of the hardware structure of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0027] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.

[0028] The terms "first", "second", etc. in the specification and claims of the present application are used to distinguish similar objects, and are not used to describe a specific order or sequence. It should be understood that the data used in this way can be interchangeable under appropriate circumstances, so that the embodiments of the present application can be implemented in an order other than those illustrated or described here, and the objects distinguished by "first", "second", etc. are generally of one type, and the number of objects is not limited. For example, the first object can be one or more. In addition, "and / or" in the specification and claims represents at least one of the connected objects, and the character " / " generally indicates that the objects associated with each other are in an "or" relationship.

[0029] The generation of the message provided in the embodiment of the present application is described in detail below through specific embodiments and their application scenarios in conjunction with the accompanying drawings.

[0030] Figure 1 is a flow chart of the steps of a method for generating a message provided in an embodiment of the present application, such as Figure 1 As shown, the method may include:

[0031] Step 101: Generate a message template according to a received editing operation, wherein the message template includes a message body and a placeholder tag set at a preset position in the message body.

[0032] In this step, when an editing operation is received, a message template may be generated according to the received editing operation.

[0033] Among them, the message template includes a message body and a placeholder tag set at a preset position in the message body. The message template can be a template for generating and sending similar notification messages multiple times. Accordingly, the message body is the same content in similar notification messages generated and sent multiple times, and the placeholder tag is used to fill in the preset text, that is, the placeholder tag corresponds to the label corresponding to the variable text in similar notification messages generated and sent multiple times.

[0034] Specifically, in daily work, more and more users will choose to establish a chat group in the office management application that includes group members such as the department, team members, partners, and business party members. The manager needs to send a group announcement in the chat group every Monday to notify the group members in the chat group of the person on duty this week. In this office business, the group announcement sent by the manager every Monday is a similar notification message that needs to be generated and sent multiple times. Since the main content of the group announcement sent by the manager every week remains unchanged, only the content about the person on duty this week in the group announcement needs to be changed. Therefore, the corresponding label of the person on duty this week in the group announcement can be determined as a placeholder label.

[0035] Figure 2 is a schematic diagram of an editing interface for a notification message provided in an embodiment of the present application, such as Figure 2 As shown, when receiving an operation to start editing a notification message, the electronic device may display an editing interface for the notification message in the display interface, and receive an editing operation input by the user in the editing interface for displaying the notification message, thereby generating a message template:

[0036] “@Everyone

[0037] Staff on duty this week: @{}

[0038] Usage Guidelines:

[0039] FAQ: http: / / xxx.com / pageid=654321”

[0040] In this message template, “{}” is the placeholder tag in the message template, and the content other than “{}” is the message body in the message template. Each time a notification message is generated and sent subsequently, the placeholder tag in the message template is replaced with the specific information of the on-duty personnel to obtain the notification message.

[0041] In an embodiment of the present application, the message template may include multiple placeholder tags, and different placeholder tags represent multiple pieces of information that need to be changed in each generated notification message.

[0042] Step 102: According to the correspondence between the preset placeholder tag and the text library, determine a target text library corresponding to the placeholder tag, and select a target text from the target text library, wherein the target text library contains at least one text preset corresponding to the placeholder tag.

[0043] In this step, the target text library corresponding to the placeholder tag can be determined based on the correspondence between the preset placeholder tag and the text library, and the target text corresponding to the placeholder tag can be further selected from the target text library containing at least one text preset corresponding to the placeholder tag, so that the placeholder tag in the message template can be further replaced with the target text in the current notification message, thereby generating a notification message.

[0044] Specifically, since the message template may include multiple placeholder tags, a corresponding text library may be pre-set for each placeholder tag, a correspondence between the placeholder tag and the text library may be established, and each text library may pre-store at least one text matching the placeholder tag corresponding to the text library.

[0045] For example, the message template may include a personnel information placeholder tag {}, a time information placeholder tag [] and an event content information placeholder tag (), then a personnel information text library, a time information text library and an event content information text library may be established respectively, and a corresponding relationship between the placeholder tags and the corresponding text libraries may be established, wherein the personnel information text library includes at least one pre-set text corresponding to the personnel information placeholder tag; the time information text library includes at least one pre-set text corresponding to the time information placeholder tag; and the event content information text library includes at least one pre-set text corresponding to the event content information placeholder tag.

[0046] Step 103: Replace the placeholder tag in the message template with the target text to obtain a notification message.

[0047] In this step, the placeholder tag in the message template can be replaced with the target text determined in the above step, thereby obtaining a notification message containing a message body and the target text, so that the generated notification message can be sent to at least one client and displayed, so that the user can obtain the notification message through the client and thereby obtain the information recorded in the notification message.

[0048] In an embodiment of the present application, when the message template includes multiple placeholder tags, the target text corresponding to each placeholder tag is determined in turn, and the multiple placeholder tags in the message template are replaced with the corresponding target texts to obtain a notification message.

[0049] For example, the message template including a placeholder tag "{}" is:

[0050] “@Everyone

[0051] Staff on duty this week: @{}

[0052] Usage Guidelines:

[0053] Frequently Asked Questions (FAQ): http: / / xxx.com / pageid=654321”

[0054] When the target text selected from the target text library corresponding to this placeholder tag is "Zhang San", replace the placeholder tag "{}" in the message template with the target text "Zhang San", so that the notification message to be sent finally is:

[0055] "@All

[0056] This week's on-duty personnel: @Zhang San

[0057] User Guide:

[0058] Frequently Asked Questions (FAQ): http: / / xxx.com / pageid=654321”

[0059] In summary, a method for generating a message provided by an embodiment of the present application includes: generating a message template according to a received editing operation, where the message template includes a message body and a placeholder tag set at a preset position in the message body; determining a target text library corresponding to the placeholder tag according to a preset correspondence between the placeholder tag and the text library, and selecting a target text from the target text library, where the target text library includes at least one text preset corresponding to the placeholder tag; replacing the placeholder tag in the message template with the target text to obtain a notification message. In the present application, after the electronic device receives an editing operation, the message template generated according to the editing operation includes a message body and a placeholder tag. Each time a notification message is generated, since the target text can be determined from the preset target text library and the placeholder tag in the message template is replaced with the target text, the notification message can be automatically generated and sent, and there is no need to generate and send the notification message through the user's manual input, saving the user's time and energy, improving the efficiency of the process of sending the notification message, and enhancing the user experience.

[0060] Figure 3 It is a step flowchart of another method for generating a message provided by an embodiment of the present application. As Figure 3 shown, the method may include:

[0061] Step 201, generate a message template according to a received editing operation, where the message template includes a message body and a placeholder tag set at a preset position in the message body.

[0062] The implementation manner of this step is similar to the implementation process of step 101 above, and will not be elaborated here.

[0063] Step 202: When a text library selection operation for the placeholder tag is received, select part of identification information from the group member identification information of the message group according to the text library selection operation as at least one text corresponding to the placeholder tag.

[0064] Optionally, the notification message includes a message generated and displayed in a message group. Figure 4 is a schematic diagram of a group chat interface provided in an embodiment of the present application, such as Figure 4 As shown, the group chat interface of the message group includes a contact and group display area, a group chat message display area, a notification message announcement area and a group member display area, wherein the contact and group display area is used to display the identification information of the user's multiple contacts and message groups, the group chat message display area is used to display the group chat messages generated in the current message group, the notification message announcement area is used to display the received notification messages, and the group member display area is used to display the identification information of the group members included in the current message group. In addition, the group chat interface of the message group also includes an edit button, so that when a click operation on the edit button is received, the display interface of the electronic device can be changed from Figure 4 The displayed group chat interface jumps to Figure 2 The editing interface of the notification message shown is provided so that the user can receive editing operations in the editing interface of the notification message, thereby generating a notification message.

[0065] Therefore, when a text library selection operation for the placeholder tag is received, part of identification information can be selected from the group member identification information of the message group according to the text library selection operation as at least one text corresponding to the placeholder tag.

[0066] Reference Figure 2 The editing interface of the notification message may include a button for selecting group members. Therefore, when the electronic device detects a click operation on the button for selecting group members in the editing interface of the notification message, the electronic device may display Figure 4 The group member display area contains identification information of group members contained in the current message group.

[0067] Correspondingly, the text library selection operation can be a selection operation for the identification information of the group members contained in the current message group, thereby selecting part or all of the identification information of the group members contained in the current message group, and using the selected group member's identification information as the text corresponding to the placeholder tag, so that the determined text can be further stored in the text library, thereby generating a text library corresponding to the placeholder tag.

[0068] Optionally, the step of selecting part of identification information from the group member identification information of the message group as at least one text corresponding to the placeholder tag may specifically include:

[0069] Sub-step 2021: Select part of the identification information of the group members of the message group and the identification information of the group members of other message groups as at least one text corresponding to the placeholder tag.

[0070] In this step, if the office management application of the electronic device includes multiple message groups, when a click operation on the button for selecting group members is detected in the editing interface of the notification message, the notification message group can be displayed. Figure 4 The identification information of the group members included in each of the multiple message groups included in the contact and group display area.

[0071] Correspondingly, the text library selection operation can be a selection operation for the identification information of the group members included in the current message group and other message groups, thereby selecting part or all of the identification information of the group members included in the current message group and the identification information of the group members included in other message groups, and using the selected group members' identification information as the text corresponding to the placeholder tag, thereby realizing the establishment of a text library corresponding to the placeholder tag across message groups.

[0072] Step 203: Generate a text library corresponding to the placeholder tag according to at least one text corresponding to the placeholder tag, and establish a corresponding relationship between the placeholder tag and the text library.

[0073] In this step, at least one text corresponding to the placeholder tag determined in the above step is added to the text library to generate a text library corresponding to the placeholder tag, and a corresponding relationship between the placeholder tag and the text library is established.

[0074] Step 204: Determine a target text library corresponding to the placeholder tag according to a preset correspondence relationship between the placeholder tag and the text library.

[0075] In this step, the target text library corresponding to the placeholder tag in the message template may be determined according to the correspondence between the placeholder tag and the text library preset in step 203 .

[0076] Optionally, the target text library contains at least one pre-set text corresponding to the placeholder tag, including one or more of personnel information, time information, and event content information corresponding to the notification message.

[0077] In an embodiment of the present application, the message template may include multiple placeholder tags, for example: a personnel information placeholder tag {}, a time information placeholder tag [] and an event content information placeholder tag (), and accordingly, the target text library corresponding to the personnel information placeholder tag {} contains the personnel information corresponding to the notification message; the target text library corresponding to the time information placeholder tag [] contains the time information corresponding to the notification message; the target text library corresponding to the event content information placeholder tag () contains the time content information corresponding to the notification message.

[0078] For example, the pre-set target text library corresponding to the personnel information placeholder tag {} is text library 1, and the personnel information contained in text library 1 is specifically shown in the first column of Table 1 below; the target text library corresponding to the time information placeholder tag [] is text library 2, and the time information contained in text library 2 is specifically shown in the second column of Table 1 below; the target text library corresponding to the event content information placeholder tag () is text library 3, and the event content information contained in text library 3 is specifically shown in the third column of Table 1 below.

[0079] Text library 1 (personnel information) Text library 2 (time information) Text library 3 (event content information) Zhang San Monday Power consumption monitoring Li Si Tuesday Water use monitoring Wang Wu Wednesday Power consumption monitoring Zhao Liu Thursday Water use monitoring Liu Qi Friday Power consumption monitoring

[0080] Table 1

[0081] The message template is:

[0082] “@Everyone

[0083] Staff on duty this week: @{}

[0084] Usage Guidelines:

[0085] In the case of "FAQ: http: / / xxx.com / pageid=654321", the placeholder tag in the message template is first determined: "{}". According to the preset corresponding relationship between the placeholder tag and the text library, the target text library corresponding to the placeholder tag "{}" is text library 1.

[0086] Step 205: When the notification message is generated for the first time, the start text preset in the target text library is determined as the target text corresponding to the placeholder tag in the notification message generated for the first time.

[0087] In this step, when a notification message is generated for the first time according to a message template, the process of determining the target text from the target text library is specifically to determine the starting text preset in the target text library as the target text corresponding to the placeholder tag in the notification message generated for the first time.

[0088] Specifically, the target text library contains multiple pre-set texts corresponding to the placeholder tag, and the multiple texts are arranged in a preset order in the target text library. For example, if the target text library corresponding to the placeholder tag "{}" is text library 1 listed in Table 1, and the target text library contains multiple texts listed in the first column of Table 1, then the preset order can be the order from top to bottom along the first column of Table 1, and the starting text can be the text "Zhang San" in the second row of the first column of Table 1. Therefore, when a notification message is generated for the first time according to the message template, the text "Zhang San" in text library 1 can be determined as the target text corresponding to the placeholder tag "{}".

[0089] Step 206: When the notification message is not generated for the first time, determine the historical target text corresponding to the placeholder tag in the notification message generated last time, and determine the next text adjacent to the historical target text in the target text library as the target text corresponding to the placeholder tag in the notification message that is not generated for the first time.

[0090] In this step, when it is not the first time that a notification message is generated according to a message template, the process of determining the target text from the target text library is specifically to determine the historical target text corresponding to the placeholder tag in the notification message generated last time, and to determine the next text adjacent to the historical target text in the target text library as the target text corresponding to the placeholder tag in the notification message generated not for the first time.

[0091] Specifically, since the target text library contains multiple pre-set texts corresponding to the placeholder tag, and the multiple texts are arranged in a preset order in the target text library, for example, if the target text library corresponding to the placeholder tag "{}" is text library 1 listed in Table 1, and the target text library contains multiple texts listed in the first column of Table 1, then the preset order can be the order from top to bottom along the first column of Table 1. If the historical target text corresponding to the placeholder tag in the notification message generated last time is the text "Zhang San" in the second row of the first column of Table 1, then the text "Li Si" in the third row of the first column of Table 1 can be determined as the target text corresponding to the placeholder tag in the notification message that is not generated for the first time.

[0092] In an embodiment of the present application, a text polling mechanism is implemented by pre-setting placeholder tags and a text library corresponding to the placeholder tags, wherein the text library contains texts arranged in a preset order, so that the text corresponding to the placeholder tag in the notification message can be the text determined in turn in the text library. Therefore, when the notification message is automatically generated and sent, it is possible to automatically send multiple notification messages, and automatically change the part that needs to be replaced in each notification message sent, further saving the user's time and energy. For example, weekly personnel can be automatically assigned, and it is ensured that there will be no work errors caused by human factors such as duplication and omission.

[0093] Step 207: When the historical target text is the last text in the preset sequence, the target text is selected starting from the start text.

[0094] In this step, if the historical target text corresponding to the placeholder tag in the notification message generated last time is the last text in the preset sequence, the target text can be selected again starting from the starting text in the target text library.

[0095] For example, if the target text library corresponding to the placeholder tag "{}" is the text library 1 listed in Table 1, the preset order can be the order from top to bottom along the first column in Table 1, and the starting text is the text "Zhang San" in the second row of the first column in Table 1. Then, when the historical target text is the last row of the first column in Table 1, that is, the last text "Liu Qi" in the preset order, the target text can be selected again starting from the starting text "Zhang San".

[0096] Step 208: Replace the placeholder tag in the message template with the target text to obtain a notification message.

[0097] The implementation of this step is similar to the implementation process of the above step 103, and will not be repeated here.

[0098] Step 209: When receiving a sending time selection operation for the notification message, determine the sending time of the notification message according to the sending time selection operation.

[0099] In this step, if a sending time selection operation for the notification message is received, the sending time of the notification message can be determined according to the sending time selection operation, so that the notification message can be sent according to the sending time.

[0100] Figure 5 is a schematic diagram of a time setting interface provided in an embodiment of the present application, referring to Figure 2 The editing interface of the notification message may include a button for selecting a time. Therefore, the electronic device may display a notification message when a click operation on the button for selecting a time is detected in the editing interface of the notification message. Figure 5 The time setting interface is displayed.

[0101] like Figure 5 As shown, in the time setting interface, the user can determine the sending time of the notification message by selecting the sending time.

[0102] In an embodiment of the present application, the user can set the time for scheduled sending of notification messages, where hours and minutes are required items, and there are two options for sending frequency. According to actual needs, you can choose to send weekly or daily. If you choose to send weekly, you need to further select the day of the week to send, so as to realize the scheduled sending of notification messages.

[0103] In addition, after completing the settings, the user can click the OK button to return to the editing interface of the notification message, so that the user can further edit the notification message.

[0104] Step 210: Send the notification message to at least one client according to the sending time and display it.

[0105] In this step, the notification message may be sent to at least one client and displayed according to the sending time determined in the above step, so that the user may obtain the notification message through the client and thereby learn the information recorded in the notification message.

[0106] In an embodiment of the present application, an office management application in an electronic device can automatically record information such as message templates, placeholder tags, correspondence between placeholder tags and text libraries, and sending times set by users, and upload and save this information to a cloud server. The cloud server can automatically generate a list, store texts in the order in which users select texts in the text library, and use a pointer to point to the target text that needs to be filled in when a notification message is generated next time. When a notification message is generated for the first time, the first text in the list can be determined as the target text, so the pointer automatically points to the first text.

[0107] Correspondingly, if the message template has n placeholder tags, the application generates n corresponding lists to store the corresponding texts. Each list has an independent pointer pointing to the target text that needs to be filled in when the notification message is generated next time.

[0108] Specifically, after the time meets the set sending time, the cloud server can automatically fill in the placeholder tag according to the message template, using the target text pointed to by the corresponding pointer for each placeholder tag in the message template, generate an instance of this notification message, and automatically send it to the message group.

[0109] After the notification message is sent successfully, on the cloud server side, for each text list corresponding to the placeholder tag, the pointer points to the next text. If the current text is the last text, the pointer is reset to point to the first text.

[0110] In summary, a message generation method provided by an embodiment of the present application includes: generating a message template according to a received editing operation, the message template including a message body and a placeholder tag set at a preset position in the message body; determining a target text library corresponding to the placeholder tag according to a correspondence between a preset placeholder tag and a text library, and selecting a target text from the target text library, the target text library including at least one text preset corresponding to the placeholder tag; replacing the placeholder tag in the message template with the target text to obtain a notification message. In the present application, after receiving an editing operation, the electronic device generates a message template according to the editing operation including a message body and a placeholder tag. Each time a notification message is generated, since the target text can be determined from the preset target text library and the placeholder tag in the message template is replaced with the target text, the notification message can be automatically generated and sent. There is no need to generate and send the notification message through manual input by the user, which saves the user's time and energy, improves the efficiency of the notification message sending process, and enhances the user's usage experience.

[0111] In addition, a text polling mechanism can be implemented through pre-set placeholder tags and a text library corresponding to the placeholder tags, which contains texts arranged in a preset order, so that the text corresponding to the placeholder tag in the notification message can be the text determined in turn in the text library. Therefore, when the notification message is automatically generated and sent, multiple notification messages can be automatically sent, and the part that needs to be replaced is automatically changed in each notification message sent, which further saves the user's time and energy and improves the user's experience.

[0112] It should be noted that the execution subject of the message generation method provided in the embodiment of the present application can be a message generation device, or a control module in the message generation device for executing the message generation method. In the embodiment of the present application, the message generation device provided in the embodiment of the present application is described by taking the execution of the message generation method by the message generation device as an example.

[0113] Figure 6 is a block diagram of a message generating device provided in an embodiment of the present application, such as Figure 6 As shown, the device 300 includes:

[0114] A first generating module 301 is used to generate a message template according to the received editing operation, wherein the message template includes a message body and a placeholder tag set at a preset position in the message body;

[0115] A first selection module 302 is used to determine a target text library corresponding to the placeholder tag according to a correspondence relationship between the preset placeholder tag and the text library, and select a target text from the target text library, wherein the target text library contains at least one text preset corresponding to the placeholder tag;

[0116] The second generating module 303 is used to replace the placeholder tag in the message template with the target text to obtain a notification message.

[0117] Optionally, the target text library contains a plurality of texts arranged in a preset order;

[0118] The first selection module 302 includes:

[0119] A first determination submodule is used to determine, when the notification message is generated for the first time, the start text preset in the target text library as the target text corresponding to the placeholder tag in the notification message generated for the first time;

[0120] The second determination submodule is used to determine the historical target text corresponding to the placeholder tag in the notification message generated last time when the notification message is not generated for the first time, and determine the next text adjacent to the historical target text in the target text library as the target text corresponding to the placeholder tag in the notification message generated for the non-first time.

[0121] Optionally, the device further comprises:

[0122] The second selection module is used to select the target text starting from the starting text when the historical target text is the last text in the preset sequence.

[0123] Optionally, the notification message includes a message generated and displayed in a message group;

[0124] The device also includes:

[0125] a third selection module, configured to, upon receiving a text library selection operation for the placeholder tag, select part of identification information from the group member identification information of the message group according to the text library selection operation as at least one text corresponding to the placeholder tag;

[0126] The third generating module is used to generate a text library corresponding to the placeholder tag according to at least one text corresponding to the placeholder tag, and establish a corresponding relationship between the placeholder tag and the text library.

[0127] Optionally, the device further comprises:

[0128] a determination module, configured to, upon receiving a sending time selection operation for the notification message, determine a sending time of the notification message according to the sending time selection operation;

[0129] The sending module is used to send the notification message to at least one client and display it according to the sending time.

[0130] In summary, a message generating device provided by an embodiment of the present application includes: generating a message template according to a received editing operation, the message template including a message body and a placeholder tag set at a preset position in the message body; determining a target text library corresponding to the placeholder tag according to a correspondence between a preset placeholder tag and a text library, and selecting a target text from the target text library, the target text library including at least one text preset corresponding to the placeholder tag; replacing the placeholder tag in the message template with the target text to obtain a notification message. In the present application, after receiving an editing operation, the electronic device generates a message template according to the editing operation including a message body and a placeholder tag. Each time a notification message is generated, since the target text can be determined from the preset target text library and the placeholder tag in the message template is replaced with the target text, the notification message can be automatically generated and sent, and there is no need to generate and send the notification message through manual input by the user, which saves the user's time and energy, improves the efficiency of the notification message sending process, and enhances the user's usage experience.

[0131] The message generating device in the embodiment of the present application can be a device, or a component, integrated circuit, or chip in a terminal. The device can be a mobile electronic device or a non-mobile electronic device. Exemplarily, the mobile electronic device can be a mobile phone, a tablet computer, a laptop computer, a PDA, an in-vehicle electronic device, a wearable device, an ultra-mobile personal computer (ultra-mobile personal computer, UMPC), a netbook or a personal digital assistant (personal digital assistant, PDA), etc., and the non-mobile electronic device can be a server, a network attached storage (Network Attached Storage, NAS), a personal computer (personal computer, PC), a television (television, TV), a teller machine or a self-service machine, etc., which is not specifically limited in the embodiment of the present application.

[0132] The message generating device in the embodiment of the present application may be a device having an operating system. The operating system may be an Android operating system, an iOS operating system, or other possible operating systems, which are not specifically limited in the embodiment of the present application.

[0133] The message generation device provided in the embodiment of the present application can achieve Figure 1 and Figure 3 To avoid repetition, the various processes implemented by the method embodiment are not described here.

[0134] Optional, such as Figure 7 As shown, an embodiment of the present application also provides an electronic device 400, including a processor 401, a memory 402, and a program or instruction stored in the memory 402 and executable on the processor 401. When the program or instruction is executed by the processor 401, each process of the above-mentioned message generation method embodiment is implemented, and the same technical effect can be achieved. To avoid repetition, it will not be repeated here.

[0135] It should be noted that the electronic devices in the embodiments of the present application include the mobile electronic devices and non-mobile electronic devices mentioned above.

[0136] Figure 8 A schematic diagram of the hardware structure of an electronic device to implement an embodiment of the present application.

[0137] The electronic device 500 includes but is not limited to: a radio frequency unit 501, a network module 502, an audio output unit 503, an input unit 504, a sensor 505, a display unit 506, a user input unit 507, an interface unit 508, a memory 509, and a processor 510.

[0138] Those skilled in the art will appreciate that the electronic device 500 may also include a power source (such as a battery) for supplying power to various components, and the power source may be logically connected to the processor 510 through a power management system, thereby implementing functions such as managing charging, discharging, and power consumption management through the power management system. Figure 8 The electronic device structure shown in the figure does not constitute a limitation on the electronic device. The electronic device may include more or fewer components than shown in the figure, or combine certain components, or arrange the components differently, which will not be described in detail here.

[0139] The processor 510 is configured to generate a message template according to the received editing operation, wherein the message template includes a message body and a placeholder tag set at a preset position in the message body;

[0140] According to the correspondence between the preset placeholder tag and the text library, determining a target text library corresponding to the placeholder tag, and selecting a target text from the target text library, wherein the target text library contains at least one text preset corresponding to the placeholder tag;

[0141] The placeholder tag in the message template is replaced with the target text to obtain a notification message.

[0142] In the present application, after receiving an editing operation, the electronic device generates a message template according to the editing operation, which includes a message body and a placeholder tag. Each time a notification message is generated, since the target text can be determined from a pre-set target text library and the placeholder tag in the message template is replaced with the target text, the notification message can be automatically generated and sent. There is no need to generate and send the notification message through manual input by the user, which saves the user's time and energy, improves the efficiency of the notification message sending process, and enhances the user's usage experience.

[0143] Optionally, the processor 510 is further configured to, when the notification message is generated for the first time, determine the start text preset in the target text library as the target text corresponding to the placeholder tag in the notification message generated for the first time;

[0144] When the notification message is not generated for the first time, the historical target text corresponding to the placeholder tag in the notification message generated last time is determined, and the next text adjacent to the historical target text in the target text library is determined as the target text corresponding to the placeholder tag in the notification message that is not generated for the first time.

[0145] Optionally, the processor 510 is further configured to select the target text starting from the start text when the historical target text is the last text in the preset sequence.

[0146] Optionally, the processor 510 is further configured to, when receiving a text library selection operation for the placeholder tag, select part of identification information from the group member identification information of the message group according to the text library selection operation as at least one text corresponding to the placeholder tag;

[0147] According to at least one text corresponding to the placeholder tag, a text library corresponding to the placeholder tag is generated, and a corresponding relationship between the placeholder tag and the text library is established.

[0148] Optionally, the processor 510 is further configured to, upon receiving a sending time selection operation for the notification message, determine a sending time of the notification message according to the sending time selection operation;

[0149] According to the sending time, the notification message is sent to at least one client and displayed.

[0150] In the present application, after receiving an editing operation, the electronic device generates a message template according to the editing operation, which includes a message body and a placeholder tag. Each time a notification message is generated, since the target text can be determined from a pre-set target text library and the placeholder tag in the message template is replaced with the target text, the notification message can be automatically generated and sent. There is no need to generate and send the notification message through manual input by the user, which saves the user's time and energy, improves the efficiency of the notification message sending process, and enhances the user's usage experience.

[0151] It should be understood that in the embodiment of the present application, the input unit 504 may include a graphics processor (Graphics Processing Unit, GPU) 5041 and a microphone 5042, and the graphics processor 5041 processes the image data of the static picture or video obtained by the image capture device (such as a camera) in the video capture mode or the image capture mode. The display unit 506 may include a display panel 5061, and the display panel 5061 may be configured in the form of a liquid crystal display, an organic light emitting diode, etc. The user input unit 507 includes a touch panel 5071 and other input devices 5072. The touch panel 5071 is also called a touch screen. The touch panel 5071 may include two parts: a touch detection device and a touch controller. Other input devices 5072 may include but are not limited to a physical keyboard, a function key (such as a volume control button, a switch button, etc.), a trackball, a mouse, and a joystick, which will not be repeated here. The memory 509 can be used to store software programs and various data, including but not limited to applications and operating systems. The processor 510 can integrate an application processor and a modem processor, wherein the application processor mainly processes the operating system, the user interface, and the application program, etc., and the modem processor mainly processes wireless communication. It is understandable that the above-mentioned modem processor may not be integrated into the processor 510.

[0152] An embodiment of the present application also provides a readable storage medium, on which a program or instruction is stored. When the program or instruction is executed by a processor, the various processes of the above-mentioned message generation method embodiment are implemented, and the same technical effect can be achieved. To avoid repetition, it will not be repeated here.

[0153] The processor is a processor in the electronic device described in the above embodiment. The readable storage medium includes a computer readable storage medium, such as a computer read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk.

[0154] An embodiment of the present application further provides a chip, which includes a processor and a communication interface, wherein the communication interface is coupled to the processor, and the processor is used to run programs or instructions to implement the various processes of the above-mentioned message generation method embodiment, and can achieve the same technical effect. To avoid repetition, it will not be repeated here.

[0155] It should be understood that the chip mentioned in the embodiments of the present application can also be called a system-level chip, a system chip, a chip system or a system-on-chip chip, etc.

[0156] It should be noted that, in this article, the terms "comprise", "include" or any other variant thereof are intended to cover non-exclusive inclusion, so that the process, method, article or device including a series of elements includes not only those elements, but also includes other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "comprise one..." do not exclude the presence of other identical elements in the process, method, article or device including the element. In addition, it should be pointed out that the scope of the methods and devices in the embodiments of the present application is not limited to performing functions in the order shown or discussed, and may also include performing functions in a substantially simultaneous manner or in reverse order according to the functions involved, for example, the described method may be performed in an order different from that described, and various steps may also be added, omitted, or combined. In addition, the features described with reference to certain examples may be combined in other examples.

[0157] Through the description of the above implementation methods, those skilled in the art can clearly understand that the above-mentioned embodiment methods can be implemented by means of software plus a necessary general hardware platform, and of course by hardware, but in many cases the former is a better implementation method. Based on such an understanding, the technical solution of the present application, or the part that contributes to the prior art, can be embodied in the form of a software product, which is stored in a storage medium (such as ROM / RAM, a magnetic disk, or an optical disk), and includes a number of instructions for a terminal (which can be a mobile phone, a computer, a server, an air conditioner, or a network device, etc.) to execute the methods described in each embodiment of the present application.

[0158] The embodiments of the present application are described above in conjunction with the accompanying drawings, but the present application is not limited to the above-mentioned specific implementation methods. The above-mentioned specific implementation methods are merely illustrative and not restrictive. Under the guidance of the present application, ordinary technicians in this field can also make many forms without departing from the purpose of the present application and the scope of protection of the claims, all of which are within the protection of the present application.

Claims

1. A method for generating a message, characterized in that: The method comprises: When an edit button in the group chat interface receives a click operation, the display interface jumps from the group chat interface to the edit interface, and receives an edit operation input by the user in the edit interface; Generate a message template according to the received editing operation, wherein the message template includes a message body and a placeholder tag set at a preset position in the message body; According to the correspondence between the preset placeholder tag and the text library, determining a target text library corresponding to the placeholder tag, and selecting a target text from the target text library, wherein the target text library contains at least one text preset corresponding to the placeholder tag; Replace the placeholder tag in the message template with the target text to obtain a notification message; and display the notification message on the group chat interface; Wherein, the target text library contains a plurality of texts arranged in a preset order; The step of selecting a target text from the target text library comprises: In the case where the notification message is generated for the first time, determining the start text pre-set in the target text library as the target text corresponding to the placeholder tag in the notification message generated for the first time; In the case where the notification message is not generated for the first time, determining the historical target text corresponding to the placeholder tag in the notification message generated last time, and determining the next text adjacent to the historical target text in the target text library as the target text corresponding to the placeholder tag in the notification message generated for the first time; In the case where the historical target text is the last text in the preset sequence, the target text is selected starting from the start text.

2. The method according to claim 1, characterized in that: Before the step of determining a target text library corresponding to the placeholder tag according to the preset correspondence between the placeholder tag and the text library, the method further includes: In the case of receiving a text library selection operation for the placeholder tag, selecting part of identification information from group member identification information of the message group according to the text library selection operation as at least one text corresponding to the placeholder tag; According to at least one text corresponding to the placeholder tag, a text library corresponding to the placeholder tag is generated, and a corresponding relationship between the placeholder tag and the text library is established.

3. The method according to claim 1, characterized in that: After the step of obtaining the notification message, the method further includes: In case of receiving a sending time selection operation for the notification message, determining a sending time of the notification message according to the sending time selection operation; According to the sending time, the notification message is sent to at least one client and displayed.

4. A message generating device, characterized in that: The device comprises: When an edit button in the group chat interface receives a click operation, the display interface jumps from the group chat interface to the edit interface, and receives an edit operation input by the user in the edit interface; A first generating module, configured to generate a message template according to the received editing operation, wherein the message template includes a message body and a placeholder tag set at a preset position in the message body; A first selection module is used to determine a target text library corresponding to the placeholder tag according to a correspondence relationship between the preset placeholder tag and the text library, and select a target text from the target text library, wherein the target text library contains at least one text that is preset and corresponds to the placeholder tag; A second generating module, used for replacing the placeholder tag in the message template with the target text, obtaining a notification message, and displaying the notification message in the group chat interface; Wherein, the target text library contains a plurality of texts arranged in a preset order; The first selection module includes: A first determination submodule is used to determine, when the notification message is generated for the first time, the start text preset in the target text library as the target text corresponding to the placeholder tag in the notification message generated for the first time; A second determination submodule is used to determine, when the notification message is not generated for the first time, a historical target text corresponding to the placeholder tag in the notification message generated last time, and determine the next text adjacent to the historical target text in the target text library as the target text corresponding to the placeholder tag in the notification message generated for the non-first time; The second selection module is used to select the target text starting from the starting text when the historical target text is the last text in the preset sequence.

5. The device according to claim 4, characterized in that The device also includes: a third selection module, configured to, upon receiving a text library selection operation for the placeholder tag, select part of identification information from group member identification information of the message group according to the text library selection operation as at least one text corresponding to the placeholder tag; The third generating module is used to generate a text library corresponding to the placeholder tag according to at least one text corresponding to the placeholder tag, and establish a corresponding relationship between the placeholder tag and the text library.

6. The device according to claim 4, characterized in that The device also includes: a determination module, configured to, upon receiving a sending time selection operation for the notification message, determine a sending time of the notification message according to the sending time selection operation; The sending module is used to send the notification message to at least one client and display it according to the sending time.

7. An electronic device, characterized in that: The method comprises a processor, a memory, and a program or instruction stored in the memory and executable on the processor, wherein the program or instruction, when executed by the processor, implements the steps of the message generation method as described in any one of claims 1 to 3.