CN112329416A - Message generation method and device and electronic equipment - Google Patents

Message generation method and device and electronic equipment Download PDF

Info

Publication number
CN112329416A
CN112329416A CN202011168401.XA CN202011168401A CN112329416A CN 112329416 A CN112329416 A CN 112329416A CN 202011168401 A CN202011168401 A CN 202011168401A CN 112329416 A CN112329416 A CN 112329416A
Authority
CN
China
Prior art keywords
message
target text
text
notification message
placeholder
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202011168401.XA
Other languages
Chinese (zh)
Inventor
刘艺原
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Vivo Mobile Communication Co Ltd
Original Assignee
Vivo Mobile Communication Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Vivo Mobile Communication Co Ltd filed Critical Vivo Mobile Communication Co Ltd
Priority to CN202011168401.XA priority Critical patent/CN112329416A/en
Publication of CN112329416A publication Critical patent/CN112329416A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F40/00Handling natural language data
    • G06F40/10Text processing
    • G06F40/166Editing, e.g. inserting or deleting
    • G06F40/186Templates
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/30Information retrieval; Database structures therefor; File system structures therefor of unstructured textual data
    • G06F16/33Querying
    • G06F16/3331Query processing
    • G06F16/334Query execution
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q10/00Administration; Management
    • G06Q10/10Office automation; Time management
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L51/00User-to-user messaging in packet-switching networks, transmitted according to store-and-forward or real-time protocols, e.g. e-mail
    • H04L51/04Real-time or near real-time messaging, e.g. instant messaging [IM]
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L51/00User-to-user messaging in packet-switching networks, transmitted according to store-and-forward or real-time protocols, e.g. e-mail
    • H04L51/52User-to-user messaging in packet-switching networks, transmitted according to store-and-forward or real-time protocols, e.g. e-mail for supporting social networking services

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Business, Economics & Management (AREA)
  • General Physics & Mathematics (AREA)
  • Signal Processing (AREA)
  • Human Resources & Organizations (AREA)
  • Entrepreneurship & Innovation (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Computational Linguistics (AREA)
  • Data Mining & Analysis (AREA)
  • General Engineering & Computer Science (AREA)
  • Strategic Management (AREA)
  • Audiology, Speech & Language Pathology (AREA)
  • General Health & Medical Sciences (AREA)
  • Artificial Intelligence (AREA)
  • Health & Medical Sciences (AREA)
  • Computing Systems (AREA)
  • Economics (AREA)
  • Marketing (AREA)
  • Operations Research (AREA)
  • Quality & Reliability (AREA)
  • Tourism & Hospitality (AREA)
  • General Business, Economics & Management (AREA)
  • Databases & Information Systems (AREA)
  • Information Transfer Between Computers (AREA)

Abstract

The application discloses a message generation method and device and electronic equipment, and belongs to the technical field of communication. The method comprises the following steps: generating a message template according to the received editing operation, wherein the message template comprises a message main body and an occupancy label arranged in the message main body; determining a target text library corresponding to the placeholder labels according to a preset corresponding relation between the placeholder labels and the text library, and selecting target texts from the target text library; in the method and the device, the target text can be determined from the preset target text library and the placeholder tag in the message template is replaced by the target text every time the notification message is generated, so that the notification message can be automatically generated and sent, the notification message does not need to be generated and sent through manual input of a user, the time and the energy of the user are saved, the efficiency of the process of sending the notification message is improved, and the use experience of the user is improved.

Description

Message generation method and device and electronic equipment
Technical Field
The application belongs to the technical field of communication, and particularly relates to a message generation method and device and electronic equipment.
Background
With the development of mobile communication technology, instant messaging using office management applications in electronic devices has become one of the ways for people to communicate.
At present, in daily work, more and more users will choose to establish a chat group including group members of this department, team members, partners, business members, and the like in office management application, and notify the group members of relevant matters by sending notification information in the chat group, for example, a user notices the group members of this week to the group members every week, and when the user edits and sends notification information about the people on duty of this week, even if the content of the notification information is similar every time, the user still needs to edit different notification information and send the notification information to the chat group according to the specific people on duty and the like targeted by the notification information every week, so that the group members in the chat group can obtain relevant matters contained in the notification information.
However, in the conventional scheme, since the content of the notification information transmitted each time needs to be redetermined according to the affairs, specific personnel, and the like to which the notification information is addressed this time, the notification information transmitted each time by the user needs to be rededified, which consumes time and effort of the user and reduces the user experience.
Disclosure of Invention
The embodiment of the application provides a message generation method and device and electronic equipment, and can solve the problem that in the prior art, when a user sends a notification message each time, the notification message needs to be manually re-edited to generate the notification message, so that the time and the energy of the user are consumed.
In order to solve the technical problem, the present application is implemented as follows:
in a first aspect, an embodiment of the present application provides a method for generating a message, where the method includes:
generating a message template according to the received editing operation, wherein the message template comprises a message main body and an occupancy label arranged at a preset position in the message main body;
determining a target text library corresponding to the placeholder tag according to a preset corresponding relation between the placeholder tag and the text library, and selecting a target text from the target text library, wherein the target text library comprises at least one preset text corresponding to the placeholder tag;
and replacing the placeholder in the message template with the target text to obtain a notification message.
In a second aspect, an embodiment of the present application provides an apparatus for generating a message, where the apparatus includes:
the first generation module is used for generating a message template according to the received editing operation, wherein the message template comprises a message main body and an occupancy label arranged at a preset position in the message main body;
the device comprises a first selection module, a second selection module and a third selection module, wherein the first selection module is used for determining a target text library corresponding to an occupancy tag according to a preset corresponding relation between the occupancy tag and the text library, and selecting a target text from the target text library, and the target text library comprises at least one preset text corresponding to the occupancy tag;
and the second generation module is used for replacing the placeholder in the message template with the target text to obtain the notification message.
In a third aspect, an embodiment of the present application further provides an electronic device, which includes a processor, a memory, and a program or instructions stored on the memory and executable on the processor, where the program or instructions, when executed by the processor, implement the steps of the method according to the first aspect.
In a fourth aspect, the present embodiments also provide a readable storage medium, on which a program or instructions are stored, which when executed by a processor implement the steps of the method according to the first aspect.
In a fifth aspect, an embodiment of the present application provides a chip, where the chip includes a processor and a communication interface, where the communication interface is coupled to the processor, and the processor is configured to execute a program or instructions to implement the method according to the first aspect.
In the embodiment of the application, a message template is generated according to the received editing operation, wherein the message template comprises a message main body and an occupancy label arranged at a preset position in the message main body; determining a target text library corresponding to the placeholder labels according to a preset corresponding relation between the placeholder labels and the text library, and selecting target texts from the target text library, wherein the target text library comprises at least one preset text corresponding to the placeholder labels; the method comprises the steps that after the electronic equipment receives an editing operation, the message template generated according to the editing operation comprises a message main body and an occupation tag, when the notification message is generated each time, the target text can be determined from a preset target text library, and the occupation tag in the message template is replaced by the target text, so that the notification message can be automatically generated and sent, the notification message does not need to be generated and sent through manual input of a user, the time and the energy of the user are saved, the efficiency of the process of sending the notification message is improved, and the use experience of the user is improved.
Drawings
Fig. 1 is a flowchart illustrating steps of a method for generating a message according to an embodiment of the present application;
FIG. 2 is a schematic diagram of an editing interface of a notification message provided in an embodiment of the present application;
fig. 3 is a flowchart illustrating steps of another message generation method according to an embodiment of the present application;
fig. 4 is a schematic diagram of a group chat interface provided in an embodiment of the present application;
FIG. 5 is a schematic diagram of a time setting interface provided by an embodiment of the present application;
fig. 6 is a block diagram of a message generation apparatus according to an embodiment of the present application;
fig. 7 is an electronic device provided in an embodiment of the present application;
fig. 8 is a schematic diagram of a hardware structure of an electronic device according to an embodiment of the present application.
Detailed Description
The technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are some, but not all, embodiments of the present application. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.
The terms first, second and the like in the description and in the claims of the present application are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order. It will be appreciated that the data so used may be interchanged under appropriate circumstances such that embodiments of the application may be practiced in sequences other than those illustrated or described herein, and that the terms "first," "second," and the like are generally used herein in a generic sense and do not limit the number of terms, e.g., the first term can be one or more than one. In addition, "and/or" in the specification and claims means at least one of connected objects, a character "/" generally means that a preceding and succeeding related objects are in an "or" relationship.
The following describes in detail the generation of messages provided by the embodiments of the present application through specific embodiments and application scenarios thereof with reference to the accompanying drawings.
Fig. 1 is a flowchart of steps of a method for generating a message according to an embodiment of the present application, and as shown in fig. 1, the method may include:
step 101, generating a message template according to the received editing operation, wherein the message template comprises a message body and an occupancy label arranged at a preset position in the message body.
In this step, in the case where an editing operation is received, a message template may be generated according to the received editing operation.
The message template comprises a message main body and an occupancy label arranged at a preset position in the message main body, the message template can be a template used for generating and sending similar notification messages for multiple times, correspondingly, the message main body is the same content in the similar notification messages generated and sent for multiple times, and the occupancy label is used for filling a preset text, namely, the occupancy label corresponds to a label corresponding to a variable text in the similar notification messages generated and sent for multiple times.
Specifically, in daily work, more and more users will choose to establish a chat group including group members of the department, team members, partners, business members, and the like in office management application, and the manager needs to notify the group members in the chat group of the on-duty personnel of the week in a manner of sending group announcements every week. In this office service, the group announcement sent by the manager every week is the similar notification message that needs to be generated and sent many times, and as the main content in the group announcement sent by the manager every week is not changed, only the content of the person on duty in the group announcement needs to be changed, so that the corresponding tag of the person on duty in the week in the group announcement can be determined as the station occupancy tag.
Fig. 2 is a schematic diagram of an editing interface of a notification message according to an embodiment of the present application, and as shown in fig. 2, an electronic device may display the editing interface of the notification message in a display interface in a case that an operation to start editing the notification message is received, and receive an editing operation input by a user in the editing interface of the notification message, so as to generate a message template:
"@ all people
The person on duty in the week: @ { }
The instruction for use:
the common problem, FAQ: http:// xxx. com/pageid 654321 "
In the message template, "{ }" is an occupancy tag in the message template, and the content except "{ }" is a message body in the message template, wherein the occupancy tag in the message template is replaced by specific information of an attendant every time a notification message is generated and sent, so that the notification message is obtained.
In this embodiment of the present application, the message template may include a plurality of placeholder tags, and different placeholder tags represent a plurality of pieces of information that needs to be changed in each generated notification message.
Step 102, according to a preset corresponding relation between the placeholder tag and a 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 comprises at least one preset text corresponding to the placeholder tag.
In this step, a target text library corresponding to the placeholder tag may be determined according to a preset correspondence between the placeholder tag and the text library, and a target text corresponding to the placeholder tag is further selected from the target text library including at least one preset text corresponding to the placeholder tag, so that the placeholder tag in the message template may be further replaced with the target text in the current notification message, thereby generating the notification message.
Specifically, since the message template may include a plurality of placeholder tags, a corresponding text library may be preset for each placeholder tag, a corresponding relationship between the placeholder tag and the text library is established, and at least one text matched with the placeholder tag corresponding to the text library is stored in each text library in advance.
For example, the message template may include a personnel information occupation tag { }, a time information occupation tag [ ] and an event content information occupation tag (), a personnel information text library, a time information text library and an event content information text library may be respectively established, and a correspondence between the occupation tag and the corresponding text library is established, where the personnel information text library includes at least one preset text corresponding to the personnel information occupation tag; the time information text base comprises at least one preset text corresponding to the time information placeholder tag; the event content information text base comprises at least one preset text corresponding to the event content information placeholder tag.
And 103, replacing the placeholder in the message template with the target text to obtain a notification message.
In this step, the placeholder in the message template may be replaced with the target text determined in the above step, so as to obtain a notification message including a message body and the target text, so that the generated notification message is sent to at least one client and displayed, so that a user can obtain the notification message through the client, thereby obtaining information recorded in the notification message.
In the embodiment of the application, when the message template includes a plurality of placeholder tags, the target text corresponding to each placeholder tag is sequentially determined, and the plurality of placeholder tags in the message template are respectively replaced with the corresponding target texts, so that the notification message is obtained.
For example, the message template containing an placeholder "{ }" is:
"@ all people
The person on duty in the week: @ { }
The instruction for use:
the common problem, FAQ: http:// xxx. com/pageid 654321 "
When the target text selected from the target text library corresponding to the placeholder label is 'zhang san', replacing the placeholder label '{ }' in the message template with the target text 'zhang san', and finally obtaining the notification message to be sent as follows:
"@ all people
The person on duty in the week: ' Zhang three
The instruction for use:
the common problem, FAQ: http:// xxx. com/pageid 654321 "
To sum up, a method for generating a message provided in an embodiment of the present application includes: generating a message template according to the received editing operation, wherein the message template comprises a message main body and an occupancy label arranged at a preset position in the message main body; determining a target text library corresponding to the placeholder labels according to a preset corresponding relation between the placeholder labels and the text library, and selecting target texts from the target text library, wherein the target text library comprises at least one preset text corresponding to the placeholder labels; the method comprises the steps that after the electronic equipment receives an editing operation, the message template generated according to the editing operation comprises a message main body and an occupation tag, when the notification message is generated each time, the target text can be determined from a preset target text library, and the occupation tag in the message template is replaced by the target text, so that the notification message can be automatically generated and sent, the notification message does not need to be generated and sent through manual input of a user, the time and the energy of the user are saved, the efficiency of the process of sending the notification message is improved, and the use experience of the user is improved.
Fig. 3 is a flowchart of steps of another method for generating a message according to an embodiment of the present application, and as shown in fig. 3, the method may include:
step 201, generating a message template according to the received editing operation, wherein the message template comprises a message body and an occupancy label arranged at a preset position in the message body.
The implementation of this step is similar to the implementation of step 101 described above, and is not described here again.
Step 202, under the condition that a text library selection operation for the placeholder tag is received, selecting a part of identification information from the group member identification information of the message group as at least one text corresponding to the placeholder tag according to the text library selection operation.
Optionally, the notification message includes a message generated and displayed in a message group, and fig. 4 is a schematic view of a group chat interface provided in an embodiment of the present application, and as shown in fig. 4, 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, where the contact and group display area is configured to display identification information of a plurality of contacts and message groups of a user, the group chat message display area is configured to display a group chat message generated in a current message group, the notification message announcement area is configured to display a received notification message, and the group member display area is configured to display identification information of a group member included in the current message group. In addition, the group chat interface of the message group further includes an edit button, so that when a click operation is received for the edit button, the display interface of the electronic device may jump from the group chat interface shown in fig. 4 to the edit interface of the notification message shown in fig. 2, so that the user may receive the edit operation in the edit interface of the notification message, thereby generating the notification message.
Therefore, when a text library selection operation for the placeholder tag is received, a part of identification information can be selected from the group member identification information of the message group as at least one text corresponding to the placeholder tag according to the text library selection operation.
Referring to fig. 2, a button for selecting a group member may be included in the editing interface of the notification message, and thus, the electronic device may display the identification information of the group member included in the current message group included in the group member display area of fig. 4 in a case where a click operation for the button for selecting the group member is detected in the editing interface of the notification message.
Correspondingly, the text base selecting operation may be a selecting operation for the identification information of the group member included in the current message group, so that part or all of the identification information is selected from the identification information of the group member included in the current message group, and the selected identification information of the group member is used as the text corresponding to the placeholder tag, so that the determined text may be further stored in the text base, and the text base corresponding to the placeholder tag is generated.
Optionally, the step of selecting a part of the identification information from the group member identification information of the message group as the at least one text corresponding to the placeholder tag may specifically include:
substep 2021, selecting part of the identification information as at least one text corresponding to the placeholder tag from the group member identification information of the message group and the group member identification information of other message groups.
In this step, if a plurality of message groups are included in the office management application of the electronic device, the identification information of the group member included in each of the plurality of message groups included in the contact and group display area in fig. 4 may be displayed when a click operation on the button for selecting the group member is detected in the edit interface of the notification message.
Correspondingly, the text library selecting operation may be a selecting operation for the identification information of the group members included in the current message group and the other message groups, so that part or all of the identification information is selected from the identification information of the group members included in the current message group and the identification information of the group members included in the other message groups, and the selected identification information of the group members is used as a text corresponding to the placeholder tag, thereby realizing the establishment of the text library corresponding to the placeholder tag across the message groups.
Step 203, generating a text library corresponding to the placeholder tag according to the at least one text corresponding to the placeholder tag, and establishing a corresponding relationship between the placeholder tag and the text library.
In this step, at least one text corresponding to the placeholder tag determined in the above step is added to a text library, the text library corresponding to the placeholder tag is generated, and a corresponding relationship between the placeholder tag and the text library is established.
And 204, determining a target text library corresponding to the placeholder tag according to a preset corresponding relation between the placeholder tag and the text library.
In this step, a 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.
Optionally, the step of including at least one preset text corresponding to the placeholder tag in the target text library includes: and the notification message corresponds to one or more of personnel information, time information and event content information.
In this embodiment of the application, the message template may include a plurality of placeholder tags, for example: a personnel information occupation tag { }, a time information occupation tag [ ] and an event content information occupation tag (), wherein correspondingly, personnel information corresponding to the notification message is contained in a target text library corresponding to the personnel information occupation tag { }; the target text library corresponding to the time information occupancy label [ ] contains time information corresponding to the notification message; the target text library corresponding to the event content information placeholder () contains time content information corresponding to the notification message.
For example, a preset target text library corresponding to the people information placeholder tag { } is a text library 1, the people information included in the text library 1 is specifically shown in a first column in the following table 1, a target text library corresponding to the time information placeholder tag [ ] is a text library 2, the time information included in the text library 2 is specifically shown in a second column in the following table 1, a target text library corresponding to the event content information placeholder tag () is a text library 3, and the event content information included in the text library 3 is specifically shown in a third column in the following table 1.
Text library 1 (personnel information) Text library 2 (time information) Text library 3 (event content information)
Zhang three Monday Power usage monitoring
Li four Tuesday Water usage monitoring
Wangwu tea Wednesday Power usage monitoring
Zhao liu xi Thursday Water usage monitoring
Liuqi (Liuqi) Friday of week Power usage monitoring
TABLE 1
The message template is as follows:
"@ all people
The person on duty in the week: @ { }
The instruction for use:
the common problem, FAQ: in the case of http:// xxx. com/pageid ═ 654321 ", the placeholder tag in the message template is first determined: and the target text library corresponding to the occupation label is the text library 1 according to the preset corresponding relation between the occupation label and the text library.
Step 205, under the condition that the notification message is generated for the first time, determining the starting text preset in the target text library as the target text corresponding to the placeholder in the notification message generated for the first time.
In this step, in the case that the notification message is generated according to the message template for the first time, a process of determining the target text from the target text library is performed, specifically, a starting text preset in the target text library is determined as the target text corresponding to the placeholder in the notification message generated for the first time.
Specifically, the target text library includes a plurality of preset texts corresponding to the placeholder tags, and the plurality of texts are arranged in the target text library in a preset order, for example, if the target text library corresponding to the placeholder tag "{ }" is the text library 1 listed in table 1, and the target text library includes a plurality of texts listed in a first column in table 1, the preset order may be an order from top to bottom along the first column in table 1, and the starting text may be "zhang san" in a second row in the first column in table 1, so that when a notification message is first generated according to the message template, the "zhang san" in the text library 1 may be determined as the target text corresponding to the placeholder tag "{ }".
Step 206, under the condition that the notification message is not generated for the first time, determining a historical target text corresponding to the placeholder in the notification message generated for the previous time, and determining a next text adjacent to the historical target text in the target text library as a target text corresponding to the placeholder in the notification message not generated for the first time.
In this step, in a case that the notification message is not generated according to the message template for the first time, a process of determining a target text from the target text library, specifically, determining a historical target text corresponding to an placeholder in the notification message generated for the previous time, and determining a next text adjacent to the historical target text in the target text library as the target text corresponding to the placeholder in the notification message not generated for the first time.
Specifically, the target text library includes a plurality of preset texts corresponding to the placeholder tags, and the plurality of texts are arranged in the target text library in a preset order, for example, if the target text library corresponding to the placeholder tag "{ }" is the text library 1 listed in table 1, and the target text library includes a plurality of texts listed in a first column in table 1, the preset order may be an order from top to bottom along the first column in table 1, and if a historical target text corresponding to the placeholder tag in the notification message generated at the previous time is a text "zhang" in a second row in the first column in table 1, a text "lie" in a third row in the first column in table 1 may be determined as a target text corresponding to the placeholder tag in the notification message generated at the current time.
In the embodiment of the application, through the preset placeholder tags and the text library corresponding to the placeholder tags, the text library contains texts arranged according to a preset sequence, a polling mechanism of the texts is realized, so that the texts corresponding to the placeholder tags in the notification message can be texts determined by turns in the text library, therefore, the notification message is automatically generated and sent, the notification message can be automatically sent for multiple times, and parts needing to be replaced are automatically changed in the notification message sent each time, so that the time and energy of a user are further saved, for example, people on duty can be automatically allocated, and the working errors caused by human factors such as repetition and omission can be avoided.
And step 207, selecting the target text from the starting text under the condition that the historical target text is the last text in the preset sequence.
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 may be selected again from the start text in the target text library.
For example, if the target text library corresponding to the placeholder tag "{ }" is the text library 1 listed in table 1, the preset order may be from top to bottom along the first column in table 1, and the starting text is the text "zhang san" in the second row in the first column in table 1, when the historical target text is the last row in the first column in table 1, that is, the last text "liuqi" in the preset order, the selection of the target text may be performed again from the beginning text zhang.
And step 208, replacing the placeholder in the message template with the target text to obtain a notification message.
The implementation of this step is similar to the implementation process of step 103, and is not described here again.
Step 209, when receiving the transmission time selection operation for the notification message, determines the transmission time of the notification message according to the transmission time selection operation.
In this step, if a sending time selection operation for the notification message is received, the sending time of the notification message may be determined according to the sending time selection operation, so that the notification message may be sent according to the sending time.
Fig. 5 is a schematic diagram of a time setting interface provided in an embodiment of the present application, and referring to fig. 2, a button for selecting a time may be included in an editing interface of the notification message, so that the electronic device may present the time setting interface in fig. 5 in a case that a click operation of the button for selecting the time is detected in the editing interface of the notification message.
As shown in fig. 5, in the time setting interface, the user can determine the transmission time of the notification message through a transmission time selection operation.
In the embodiment of the application, a user can set the time for sending the notification message at fixed time, wherein hours and minutes are necessary items, the sending frequency has two selectable items, and the user can select to send the notification message every week or every day according to actual requirements.
In addition, after the setting is finished, the user can click the determination button and return to the editing interface of the notification message, so that the editing operation of the notification message can be further performed.
And step 210, sending the notification message to at least one client and displaying the notification message according to the sending time.
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 a user may obtain the notification message through the client, thereby obtaining information recorded in the notification message.
In the embodiment of the application, an office management application in the electronic device can automatically record information such as a message template, an occupancy tag, a correspondence between the occupancy tag and a text library, sending time and the like set by a user, and upload and store the information to the cloud server, the cloud server can automatically generate a list, store texts in a selection order of the texts in the text library selected by the user, and use a pointer to point to a target text which needs to be filled when a notification message is generated next time, when the notification message is generated for the first time, a first text in the list can be determined as the target text, and therefore, the pointer automatically points to the first text.
Correspondingly, if the message template has n place-occupying labels, the application generates corresponding n lists and stores corresponding texts. Each list has a separate pointer to the target text that needs to be filled in the next time the notification message is generated.
Specifically, after the time meets the set sending time, the cloud server may automatically fill each place-occupying tag in the message template with the target text pointed by the corresponding pointer according to the message template, generate an instance of the notification message, and automatically send the instance to the message group.
After the notification message is successfully sent, at the cloud server, for the text list corresponding to each placeholder tag, the pointer points to the next text, and if the current text is the last text, the pointer is reset and points to the first text.
To sum up, a method for generating a message provided in an embodiment of the present application includes: generating a message template according to the received editing operation, wherein the message template comprises a message main body and an occupancy label arranged at a preset position in the message main body; determining a target text library corresponding to the placeholder labels according to a preset corresponding relation between the placeholder labels and the text library, and selecting target texts from the target text library, wherein the target text library comprises at least one preset text corresponding to the placeholder labels; the method comprises the steps that after the electronic equipment receives an editing operation, the message template generated according to the editing operation comprises a message main body and an occupation tag, when the notification message is generated each time, the target text can be determined from a preset target text library, and the occupation tag in the message template is replaced by the target text, so that the notification message can be automatically generated and sent, the notification message does not need to be generated and sent through manual input of a user, the time and the energy of the user are saved, the efficiency of the process of sending the notification message is improved, and the use experience of the user is improved.
In addition, a polling mechanism of the text can be realized by the preset placeholder tags and the text library corresponding to the placeholder tags, the text library contains the texts arranged according to the preset sequence, so that the text corresponding to the placeholder tags in the notification message can be the text determined by the alternate flow in the text library, therefore, the notification message can be automatically generated and sent, the notification message can be automatically sent for multiple times, the part needing to be replaced is automatically changed in the notification message sent every time, the time and the energy of a user are further saved, and the use experience of the user is improved.
It should be noted that, in the message generation method provided in the embodiment of the present application, the execution subject may be a message generation apparatus, or a control module in the message generation apparatus for executing the message generation method. The message generation device provided in the embodiment of the present application will be described with reference to an example in which a message generation device executes a message generation method.
Fig. 6 is a block diagram of an apparatus for generating a message according to an embodiment of the present application, and as shown in fig. 6, the apparatus 300 includes:
the first generating module 301 is configured to generate a message template according to a received editing operation, where the message template includes a message body and an occupancy label set at a preset position in the message body;
a first selection module 302, configured to determine, according to a preset correspondence between an occupancy tag and a text library, a target text library corresponding to the occupancy tag, and select a target text from the target text library, where the target text library includes at least one preset text corresponding to the occupancy tag;
a second generating module 303, configured to replace the placeholder in the message template with the target text to obtain a notification message.
Optionally, the target text library includes a plurality of texts arranged according to a preset sequence;
the first selecting module 302 includes:
the first determining submodule is used for determining a starting text preset in the target text library as a target text corresponding to an occupancy tag in the notification message generated for the first time under the condition that the notification message is generated for the first time;
and the second determining submodule is used for determining the historical target text corresponding to the placeholder in the notification message generated at the previous time under the condition that the notification message is not generated for the first 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 in the notification message generated for the non-first time.
Optionally, the apparatus further comprises:
and the second selection module is used for selecting the target text from the starting text under the condition that the historical target text is the last text in the preset sequence.
Optionally, the notification message includes a message generated and displayed in a message group;
the device further comprises:
a third selecting module, configured to select, according to a text library selecting operation when a text library selecting operation for the placeholder tag is received, a part of identification information from the group member identification information of the message group as at least one text corresponding to the placeholder tag;
and the third generation module is used for generating a text library corresponding to the placeholder tag according to at least one text corresponding to the placeholder tag and establishing a corresponding relation between the placeholder tag and the text library.
Optionally, the apparatus further comprises:
a determining module, configured to determine, when receiving a transmission time selection operation for the notification message, a transmission time of the notification message according to the transmission time selection operation;
and the sending module is used for sending the notification message to at least one client side according to the sending time and displaying the notification message.
To sum up, an apparatus for generating a message provided in an embodiment of the present application includes: generating a message template according to the received editing operation, wherein the message template comprises a message main body and an occupancy label arranged at a preset position in the message main body; determining a target text library corresponding to the placeholder labels according to a preset corresponding relation between the placeholder labels and the text library, and selecting target texts from the target text library, wherein the target text library comprises at least one preset text corresponding to the placeholder labels; the method comprises the steps that after the electronic equipment receives an editing operation, the message template generated according to the editing operation comprises a message main body and an occupation tag, when the notification message is generated each time, the target text can be determined from a preset target text library, and the occupation tag in the message template is replaced by the target text, so that the notification message can be automatically generated and sent, the notification message does not need to be generated and sent through manual input of a user, the time and the energy of the user are saved, the efficiency of the process of sending the notification message is improved, and the use experience of the user is improved.
The message generation device in the embodiment of the present application may be a device, or may be a component, an integrated circuit, or a chip in a terminal. The device can be mobile electronic equipment or non-mobile electronic equipment. By way of example, the mobile electronic device may be a mobile phone, a tablet computer, a notebook computer, a palm top computer, a vehicle-mounted electronic device, a wearable device, an ultra-mobile personal computer (UMPC), a netbook or a Personal Digital Assistant (PDA), and the like, and the non-mobile electronic device may be a server, a Network Attached Storage (NAS), a Personal Computer (PC), a Television (TV), a teller machine or a self-service machine, and the like, and the embodiments of the present application are not particularly limited.
The message generation device in the embodiment of the present application may be a device having an operating system. The operating system may be an Android (Android) operating system, an ios operating system, or other possible operating systems, and embodiments of the present application are not limited specifically.
The message generation apparatus provided in the embodiment of the present application can implement each process implemented by the method embodiments of fig. 1 and fig. 3, and is not described here again to avoid repetition.
Optionally, as shown in fig. 7, an electronic device 400 is further provided in this embodiment of the present application, and includes a processor 401, a memory 402, and a program or an instruction stored in the memory 402 and executable on the processor 401, where the program or the instruction is executed by the processor 401 to implement each process of the above-mentioned message generation method embodiment, and can achieve the same technical effect, and in order to avoid repetition, details are not repeated here.
It should be noted that the electronic device in the embodiment of the present application includes the mobile electronic device and the non-mobile electronic device described above.
Fig. 8 is a schematic diagram of a hardware structure of an electronic device implementing an embodiment of the present application.
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, a processor 510, and the like.
Those skilled in the art will appreciate that the electronic device 500 may further include a power supply (e.g., a battery) for supplying power to various components, and the power supply may be logically connected to the processor 510 via a power management system, so as to implement functions of managing charging, discharging, and power consumption via the power management system. The electronic device structure shown in fig. 8 does not constitute a limitation of the electronic device, and the electronic device may include more or less components than those shown, or combine some components, or arrange different components, and thus, the description is omitted here.
The processor 510 is configured to generate a message template according to a received editing operation, where the message template includes a message body and an 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 corresponding relation between the placeholder tag and the text library, and selecting a target text from the target text library, wherein the target text library comprises at least one preset text corresponding to the placeholder tag;
and replacing the placeholder in the message template with the target text to obtain a notification message.
In the application, after the electronic equipment receives the editing operation, according to the message template generated by the editing operation, the message main body and the placeholder tag are contained, when the notification message is generated each time, the target text can be determined from the preset target text library, and the placeholder tag in the message template is replaced by the target text, so that the notification message can be automatically generated and sent, the notification message does not need to be generated and sent through manual input of a user, the time and the energy of the user are saved, the efficiency of the process of sending the notification message is improved, and the use experience of the user is improved.
Optionally, the processor 510 is further configured to, in a case that the notification message is generated for the first time, determine a starting text preset in the target text library as a target text corresponding to an placeholder in the notification message generated for the first time;
and under the condition that the notification message is not generated for the first time, determining a historical target text corresponding to the placeholder in the notification message generated for the previous 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 in the notification message not generated for the first time.
Optionally, the processor 510 is further configured to, when the historical target text is the last text in the preset sequence, select the target text from the starting text.
Optionally, the processor 510 is further configured to, when a text library selection operation for the placeholder tag is received, select, according to the text library selection operation, a part of identification information from the group member identification information of the message group as at least one text corresponding to the placeholder tag;
and generating a text library corresponding to the placeholder tag according to at least one text corresponding to the placeholder tag, and establishing a corresponding relation between the placeholder tag and the text library.
Optionally, the processor 510 is further configured to, in a case that a sending time selection operation for the notification message is received, determine a sending time of the notification message according to the sending time selection operation;
and sending the notification message to at least one client side according to the sending time and displaying the notification message.
In the application, after the electronic equipment receives the editing operation, according to the message template generated by the editing operation, the message main body and the placeholder tag are contained, when the notification message is generated each time, the target text can be determined from the preset target text library, and the placeholder tag in the message template is replaced by the target text, so that the notification message can be automatically generated and sent, the notification message does not need to be generated and sent through manual input of a user, the time and the energy of the user are saved, the efficiency of the process of sending the notification message is improved, and the use experience of the user is improved.
It should be understood that in the embodiment of the present application, the input Unit 504 may include a Graphics Processing Unit (GPU) 5041 and a microphone 5042, and the Graphics processor 5041 processes image data of still pictures or videos obtained by an image capturing device (such as a camera) in a video capturing mode or an image capturing 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, or the like. The user input unit 507 includes a touch panel 5071 and other input devices 5072. A touch panel 5071, also referred to as a touch screen. The touch panel 5071 may include two parts of a touch detection device and a touch controller. Other input devices 5072 may include, but are not limited to, a physical keyboard, function keys (e.g., volume control keys, switch keys, etc.), a trackball, a mouse, and a joystick, which are not described in further detail herein. The memory 509 may be used to store software programs as well as various data including, but not limited to, application programs and operating systems. Processor 510 may integrate an application processor, which primarily handles operating systems, user interfaces, applications, etc., and a modem processor, which primarily handles wireless communications. It will be appreciated that the modem processor described above may not be integrated into processor 510.
The embodiment of the present application further provides a readable storage medium, where a program or an instruction is stored on the readable storage medium, and when the program or the instruction is executed by a processor, the program or the instruction implements each process of the above-mentioned message generation method embodiment, and can achieve the same technical effect, and in order to avoid repetition, details are not repeated here.
The processor is the processor in the electronic device described in the above embodiment. The readable storage medium includes a computer readable storage medium, such as a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk or an optical disk, and so on.
The embodiment of the present application further provides a chip, where the chip includes a processor and a communication interface, the communication interface is coupled to the processor, and the processor is configured to run a program or an instruction to implement each process of the above message generation method embodiment, and can achieve the same technical effect, and in order to avoid repetition, the details are not repeated here.
It should be understood that the chips mentioned in the embodiments of the present application may also be referred to as system-on-chip, system-on-chip or system-on-chip, etc.
It should be noted that, in this document, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other like elements in a process, method, article, or apparatus that comprises the element. Further, it should be noted that the scope of the methods and apparatus of the embodiments of the present application is not limited to performing the functions in the order illustrated or discussed, but may include performing the functions in a substantially simultaneous manner or in a reverse order based on the functions involved, e.g., the methods described may be performed in an order different than that described, and various steps may be added, omitted, or combined. In addition, features described with reference to certain examples may be combined in other examples.
Through the above description of the embodiments, those skilled in the art will clearly understand that the method of the above embodiments can be implemented by software plus a necessary general hardware platform, and certainly can also be implemented by hardware, but in many cases, the former is a better implementation manner. Based on such understanding, the technical solutions of the present application may be embodied in the form of a software product, which is stored in a storage medium (such as ROM/RAM, magnetic disk, optical disk) and includes instructions for enabling a terminal (such as a mobile phone, a computer, a server, an air conditioner, or a network device) to execute the method according to the embodiments of the present application.
While the present embodiments have been described with reference to the accompanying drawings, it is to be understood that the invention is not limited to the precise embodiments described above, which are meant to be illustrative and not restrictive, and that various changes may be made therein by those skilled in the art without departing from the spirit and scope of the invention as defined by the appended claims.

Claims (11)

1. A method for generating a message, the method comprising:
generating a message template according to the received editing operation, wherein the message template comprises a message main body and an occupancy label arranged at a preset position in the message main body;
determining a target text library corresponding to the placeholder tag according to a preset corresponding relation between the placeholder tag and the text library, and selecting a target text from the target text library, wherein the target text library comprises at least one preset text corresponding to the placeholder tag;
and replacing the placeholder in the message template with the target text to obtain a notification message.
2. The method according to claim 1, wherein the target text library comprises a plurality of texts arranged in a preset order;
the step of selecting the target text from the target text library comprises:
under the condition that the notification message is generated for the first time, determining a starting text preset in the target text library as a target text corresponding to an occupancy label in the notification message generated for the first time;
and under the condition that the notification message is not generated for the first time, determining a historical target text corresponding to the placeholder in the notification message generated for the previous 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 in the notification message not generated for the first time.
3. The method of claim 2, further comprising:
and under the condition that the historical target text is the last text in the preset sequence, selecting the target text from the starting text.
4. The method of claim 1, wherein the notification message comprises a message generated and displayed in a group of messages;
before the step of determining the target text library corresponding to the placeholder tag according to the preset corresponding relationship between the placeholder tag and the text library, the method further includes:
under the condition that a text library selection operation aiming at the placeholder tag is received, selecting partial identification information from the group member identification information of the message group as at least one text corresponding to the placeholder tag according to the text library selection operation;
and generating a text library corresponding to the placeholder tag according to at least one text corresponding to the placeholder tag, and establishing a corresponding relation between the placeholder tag and the text library.
5. The method of claim 1, wherein after the step of obtaining the notification message, the method further comprises:
determining the sending time of the notification message according to the sending time selection operation when the sending time selection operation aiming at the notification message is received;
and sending the notification message to at least one client side according to the sending time and displaying the notification message.
6. An apparatus for generating a message, the apparatus comprising:
the first generation module is used for generating a message template according to the received editing operation, wherein the message template comprises a message main body and an occupancy label arranged at a preset position in the message main body;
the device comprises a first selection module, a second selection module and a third selection module, wherein the first selection module is used for determining a target text library corresponding to an occupancy tag according to a preset corresponding relation between the occupancy tag and the text library, and selecting a target text from the target text library, and the target text library comprises at least one preset text corresponding to the occupancy tag;
and the second generation module is used for replacing the placeholder in the message template with the target text to obtain the notification message.
7. The apparatus according to claim 6, wherein the target text library comprises a plurality of texts arranged in a preset order;
the first selecting module comprises:
the first determining submodule is used for determining a starting text preset in the target text library as a target text corresponding to an occupancy tag in the notification message generated for the first time under the condition that the notification message is generated for the first time;
and the second determining submodule is used for determining the historical target text corresponding to the placeholder in the notification message generated at the previous time under the condition that the notification message is not generated for the first 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 in the notification message generated for the non-first time.
8. The apparatus of claim 7, further comprising:
and the second selection module is used for selecting the target text from the starting text under the condition that the historical target text is the last text in the preset sequence.
9. The apparatus of claim 1, wherein the notification message comprises a message generated and displayed in a group of messages; the device further comprises:
a third selecting module, configured to select, according to a text library selecting operation when a text library selecting operation for the placeholder tag is received, a part of identification information from the group member identification information of the message group as at least one text corresponding to the placeholder tag;
and the third generation module is used for generating a text library corresponding to the placeholder tag according to at least one text corresponding to the placeholder tag and establishing a corresponding relation between the placeholder tag and the text library.
10. The apparatus of claim 1, further comprising:
a determining module, configured to determine, when receiving a transmission time selection operation for the notification message, a transmission time of the notification message according to the transmission time selection operation;
and the sending module is used for sending the notification message to at least one client side according to the sending time and displaying the notification message.
11. An electronic device comprising a processor, a memory and a program or instructions stored on the memory and executable on the processor, the program or instructions, when executed by the processor, implementing the steps of the method of generating a message according to any one of claims 1-5.
CN202011168401.XA 2020-10-27 2020-10-27 Message generation method and device and electronic equipment Pending CN112329416A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011168401.XA CN112329416A (en) 2020-10-27 2020-10-27 Message generation method and device and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011168401.XA CN112329416A (en) 2020-10-27 2020-10-27 Message generation method and device and electronic equipment

Publications (1)

Publication Number Publication Date
CN112329416A true CN112329416A (en) 2021-02-05

Family

ID=74297100

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011168401.XA Pending CN112329416A (en) 2020-10-27 2020-10-27 Message generation method and device and electronic equipment

Country Status (1)

Country Link
CN (1) CN112329416A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113239003A (en) * 2021-05-21 2021-08-10 携程商旅信息服务(上海)有限公司 Automatic message prompting method, system, equipment and medium

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106407344A (en) * 2016-09-06 2017-02-15 努比亚技术有限公司 Method and system for generating search engine optimization label
CN107943775A (en) * 2017-11-24 2018-04-20 泰康保险集团股份有限公司 Method, apparatus, storage medium and the electronic equipment of message push
CN108632459A (en) * 2018-04-13 2018-10-09 青岛海信移动通信技术股份有限公司 Notification method, device and the computer readable storage medium of communication information
CN110263317A (en) * 2019-06-27 2019-09-20 中国石油集团东方地球物理勘探有限责任公司 A kind of method and device generating document template
CN110321544A (en) * 2019-07-08 2019-10-11 北京百度网讯科技有限公司 Method and apparatus for generating information
CN110401925A (en) * 2019-05-07 2019-11-01 杭州迪普科技股份有限公司 A kind of generation method and device of communication message
US20200081969A1 (en) * 2018-09-06 2020-03-12 Infocredit Services Private Limited Automated pattern template generation system using bulk text messages

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106407344A (en) * 2016-09-06 2017-02-15 努比亚技术有限公司 Method and system for generating search engine optimization label
CN107943775A (en) * 2017-11-24 2018-04-20 泰康保险集团股份有限公司 Method, apparatus, storage medium and the electronic equipment of message push
CN108632459A (en) * 2018-04-13 2018-10-09 青岛海信移动通信技术股份有限公司 Notification method, device and the computer readable storage medium of communication information
US20200081969A1 (en) * 2018-09-06 2020-03-12 Infocredit Services Private Limited Automated pattern template generation system using bulk text messages
CN110401925A (en) * 2019-05-07 2019-11-01 杭州迪普科技股份有限公司 A kind of generation method and device of communication message
CN110263317A (en) * 2019-06-27 2019-09-20 中国石油集团东方地球物理勘探有限责任公司 A kind of method and device generating document template
CN110321544A (en) * 2019-07-08 2019-10-11 北京百度网讯科技有限公司 Method and apparatus for generating information

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113239003A (en) * 2021-05-21 2021-08-10 携程商旅信息服务(上海)有限公司 Automatic message prompting method, system, equipment and medium

Similar Documents

Publication Publication Date Title
CN111913629A (en) Information sending method and device and electronic equipment
CN113364668B (en) Message reminding method and device and electronic equipment
CN107861982A (en) It is dynamically determined method, terminal, server and the system of application program page layout
CN112671635B (en) Sending method, device and electronic equipment
CN113596555B (en) Video playing method and device and electronic equipment
CN113300938A (en) Message sending method and device and electronic equipment
CN113285866B (en) Information sending method and device and electronic equipment
CN112272138B (en) Group joining method and device and electronic equipment
CN112260937A (en) Message processing method and device, electronic equipment and storage medium
CN113568699A (en) Content display method, device, equipment and storage medium
CN112511412A (en) Information sending method and device, electronic equipment and readable storage medium
CN112329416A (en) Message generation method and device and electronic equipment
CN112911052B (en) Information sharing method and device
CN113342755A (en) Display control method and device
CN112269504B (en) Information display method and device and electronic equipment
CN112333329B (en) Unread information reminding method and device and electronic equipment
CN112232779A (en) Schedule management method and device
CN111865765A (en) Notification display method and device and electronic equipment
CN113872849B (en) Message interaction method and device and electronic equipment
CN113852540B (en) Information transmission method, information transmission device and electronic equipment
CN112134987B (en) Information processing method and device and electronic equipment
CN112583694B (en) Message pushing method, device, storage medium and control terminal
CN109739598B (en) Terminal screen lightening method and device, equipment and storage medium
CN113806313A (en) Information processing method and device
CN113824627A (en) Group chat message display method and device, electronic equipment and storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination