CN110460512B - System message generation method, device, server and storage medium - Google Patents

System message generation method, device, server and storage medium Download PDF

Info

Publication number
CN110460512B
CN110460512B CN201910708961.0A CN201910708961A CN110460512B CN 110460512 B CN110460512 B CN 110460512B CN 201910708961 A CN201910708961 A CN 201910708961A CN 110460512 B CN110460512 B CN 110460512B
Authority
CN
China
Prior art keywords
state
user
guest
target user
preset
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.)
Active
Application number
CN201910708961.0A
Other languages
Chinese (zh)
Other versions
CN110460512A (en
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.)
Beijing Dajia Internet Information Technology Co Ltd
Original Assignee
Beijing Dajia Internet Information Technology 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 Beijing Dajia Internet Information Technology Co Ltd filed Critical Beijing Dajia Internet Information Technology Co Ltd
Priority to CN201910708961.0A priority Critical patent/CN110460512B/en
Publication of CN110460512A publication Critical patent/CN110460512A/en
Application granted granted Critical
Publication of CN110460512B publication Critical patent/CN110460512B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • 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/04Real-time or near real-time messaging, e.g. instant messaging [IM]
    • H04L51/046Interoperability with other network applications or services

Abstract

The disclosure relates to a system message generation method, a system message generation device, a server and a storage medium. After determining the language state of each target user needing to receive the system message corresponding to the application scene, correspondingly filling the placeholder corresponding to the master state and the identifier of the first target user in the master state into a preset user identifier list according to a preset metadata protocol, and correspondingly filling the placeholder corresponding to the guest state and the identifier of the second target user in the guest state into a preset user identifier list, so that even if the application scene changes, a metadata protocol does not need to be correspondingly set for a new application scene to store the identifier of the user related to the current operation, and the compatibility of the metadata protocol on the generation of the system message under different application scenes is improved.

Description

System message generation method, device, server and storage medium
Technical Field
The present disclosure relates to the field of instant messaging technologies, and in particular, to a method, an apparatus, a server, and a storage medium for generating a system message.
Background
In an IM (Instant Messaging) system, some information with notification meaning is often presented to a user in the form of a system message.
Generally, the content of the system information is generated according to the specific language state of the user receiving the system message. When generating system messages for users in different languages, the server needs to obtain parameter information according to a preset metadata protocol in a current application scene, and then fills the parameter information into preset documents corresponding to the different languages to obtain the system messages issued to the users. However, the kind of system messages in the IM system increases with the changing application requirements, and in the above method, whenever a new application scenario appears, a metadata protocol for storing parameter information needs to be correspondingly set for the application scenario.
Therefore, in the related art, the metadata protocol has poor compatibility with the generation of system messages in different application scenarios.
Disclosure of Invention
The present disclosure provides a method, an apparatus, a server and a storage medium for generating a system message, so as to at least solve the problem in the related art that the compatibility of a metadata protocol for generating a system message in different application scenarios is poor. The technical scheme of the disclosure is as follows:
according to a first aspect of the embodiments of the present disclosure, there is provided a system message generation method, applied to a server, including:
determining at least one target user needing to receive the system message corresponding to the application scene according to the current application scene;
determining the language state of each target user; the morphemes include: a master mode, a guest mode and another person mode;
correspondingly filling a placeholder corresponding to the master status and an identifier of a first target user in the master status into a preset user identifier list, and correspondingly filling a placeholder corresponding to the guest status and an identifier of a second target user in the guest status into a preset user identifier list according to a preset metadata protocol; the preset user identification list is set to be empty before generating the system message each time;
and according to the user identification list, respectively rendering the master-mode, guest-mode or other-mode patterns preset in the application scene by using the placeholder corresponding to the master mode and the placeholder corresponding to the guest mode, and generating a system message for the first target user in the master mode, a system message for the second target user in the guest mode or a system message for the third target user in the other-mode.
Optionally, the step of determining the language state of each target user includes:
if the target user is the operation initiating user in the current application scene, determining the language state of the target user as a main state;
if the target user is the operation target user in the current application scene, determining the language state of the target user as a guest state;
and if the target user is the other users except the operation initiating user and the operation target user under the current application scene, determining the language state of the target user as the other language state.
Optionally, before the step of rendering the master-state, guest-state, or other-state document preset in the application scene by using the placeholder corresponding to the master state and the placeholder corresponding to the guest state respectively according to the user identifier list, the method further includes:
obtaining a preset unique file identifier corresponding to the current operation;
matching the unique file identification corresponding to the current operation with the unique file identification of each preset file, and determining the preset file in the current application scene;
and selecting preset texts in a master mode, a guest mode or another person mode from the preset texts in the current application scene according to the language mode of the target user.
Optionally, the step of rendering, according to the user identifier list, a master-state, guest-state, or other-state pattern preset in the application scene by using a placeholder corresponding to the master state and a placeholder corresponding to the guest state, respectively, and generating a system message for a first target user in the master state, a system message for a second target user in the guest state, and a system message for a third target user in the other-state includes:
when the selected file is a preset main status file, deleting the identification of the target user from the user identification list to obtain an updated user identification list corresponding to the main status user; rendering the main status pattern by using the placeholder corresponding to the guest status according to the updated user identification list corresponding to the main status user, and generating a system message for a first target user in the main status;
when the selected file is a preset guest state file, deleting the identification of the target user from the user identification list to obtain an updated user identification list corresponding to the guest state user; rendering the guest-state file by using a placeholder corresponding to the host state according to the updated user identification list corresponding to the guest-state user to generate a system message for a second target user in the guest state;
and when the selected file is a preset other-person-state file, rendering the other-person-state file by using the placeholder corresponding to the main state and the placeholder corresponding to the guest state according to the user identification list, and generating a system message for a third target user in the other person state.
According to a second aspect of the embodiments of the present disclosure, there is provided a system message generating apparatus, applied to a server, including:
the target user determining unit is configured to determine at least one target user needing to receive the system message corresponding to the application scene according to the current application scene;
the language state determining unit is configured to determine the language state of each target user; the morphemes include: a master mode, a guest mode and another person mode;
the identifier filling unit is configured to perform corresponding filling of a placeholder corresponding to the master status and an identifier of a first target user in the master status into a preset user identifier list and corresponding filling of a placeholder corresponding to the guest status and an identifier of a second target user in the guest status into a preset user identifier list according to a preset metadata protocol; the preset user identification list is set to be empty before generating the system message each time;
and the system message generating unit is configured to render the preset host-state, guest-state or other-state file in the application scene by using the placeholder corresponding to the host state and the placeholder corresponding to the guest state respectively according to the user identification list, and generate a system message for the first target user in the host state, a system message for the second target user in the guest state or a system message for the third target user in the other-state.
Optionally, the speech state determining unit includes:
a main status determining module configured to determine the target user's language status as a main status if the target user is the operation initiating user in the current application scenario;
a guest state determining module configured to determine a morphism of the target user as a guest state if the target user is an operation target user in the current application scene;
and the other-person-state determining module is configured to determine the language state of the target user as the other-person state if the target user is the other users except the operation initiating user and the operation target user in the current application scene.
Optionally, the system message generating apparatus further includes:
the identification obtaining unit is configured to execute to obtain a preset unique identification of the file corresponding to the current operation before the step of rendering the preset file in the master mode, the guest mode or the other mode in the application scene by using the placeholder corresponding to the master mode and the placeholder corresponding to the guest mode respectively according to the user identification list;
the identification matching unit is configured to match the unique file identification corresponding to the current operation with the unique file identification of each preset file, and determine the preset file in the current application scene;
and the file selection unit is configured to select preset files in a main mode, a guest mode or another mode from preset files in the current application scene according to the language mode of the target user.
Optionally, the system message generating unit includes:
the first system message generation module is configured to delete the identifier of the target user from the user identifier list when the selected file is a preset main status file, so as to obtain an updated user identifier list corresponding to the main status user; rendering the main status pattern by using the placeholder corresponding to the guest status according to the updated user identification list corresponding to the main status user, and generating a system message for a first target user in the main status;
the second system message generation module is configured to delete the identifier of the target user from the user identifier list to obtain an updated user identifier list corresponding to the guest-state user when the selected file is a preset guest-state file; rendering the guest-state file by using a placeholder corresponding to the host state according to the updated user identification list corresponding to the guest-state user to generate a system message for a second target user in the guest state;
and the third system message generation module is configured to render the other-person-state file by using the placeholder corresponding to the main state and the placeholder corresponding to the guest state according to the user identification list when the selected file is a preset other-person-state file, and generate a system message for a third target user in the other person state.
According to a third aspect of the embodiments of the present disclosure, there is provided a server, including:
a processor;
a memory for storing the processor-executable instructions;
wherein the processor is configured to execute the instructions to implement the system message generation method of any of the first aspect.
According to a fourth aspect of embodiments of the present disclosure, there is provided a storage medium, wherein instructions of the storage medium, when executed by a processor of a server, enable the server to perform the system message generation method according to any one of the first aspect.
According to a fifth aspect of embodiments of the present disclosure, there is provided a computer program product, which, when executed by a processor of a server, enables the server to perform the system message generation method of any one of the above first aspects.
The technical scheme provided by the embodiment of the disclosure at least brings the following beneficial effects: after determining the language state of each target user needing to receive the system message corresponding to the application scene, correspondingly filling the placeholder corresponding to the master state and the identifier of the first target user in the master state into a preset user identifier list according to a preset metadata protocol, and correspondingly filling the placeholder corresponding to the guest state and the identifier of the second target user in the guest state into the preset user identifier list, so that even if the application scene changes, a metadata protocol does not need to be correspondingly set for a new application scene to store the identifier of the user related to the current operation, and the compatibility of the metadata protocol on the generation of the system message under different application scenes is improved.
It is to be understood that both the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the disclosure.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present disclosure and, together with the description, serve to explain the principles of the disclosure and are not to be construed as limiting the disclosure.
Fig. 1 is a flow diagram illustrating a system message generation method in accordance with an exemplary embodiment.
Fig. 2 is another flow chart illustrating a system message generation method in accordance with an exemplary embodiment.
Fig. 3a is an exemplary diagram of a system message received by a first target user in a master status in an application scenario of the embodiment shown in fig. 2.
Fig. 3b is an exemplary diagram of a system message received by a second target user in the guest state in an application scenario of the embodiment shown in fig. 2.
Fig. 3c is an exemplary diagram of a system message received by another second target user in a guest state in an application scenario of the embodiment shown in fig. 2.
Fig. 3d is an exemplary diagram of a system message received by a third target user in another modality in an application scenario of the embodiment shown in fig. 2.
Fig. 3e is an exemplary diagram of a system message received by another third target user in another modality in an application scenario of the embodiment shown in fig. 2.
Fig. 4 is a block diagram illustrating a system message generation apparatus according to an example embodiment.
FIG. 5 is a block diagram illustrating a server in accordance with an example embodiment.
Detailed Description
In order to make the technical solutions of the present disclosure better understood by those of ordinary skill in the art, the technical solutions in the embodiments of the present disclosure will be clearly and completely described below with reference to the accompanying drawings.
It should be noted that the terms "first," "second," and the like in the description and claims of the present disclosure and in the above-described drawings are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used is interchangeable under appropriate circumstances such that the embodiments of the disclosure described herein are capable of operation in sequences other than those illustrated or otherwise described herein. The implementations described in the exemplary embodiments below are not intended to represent all implementations consistent with the present disclosure. Rather, they are merely examples of apparatus and methods consistent with certain aspects of the present disclosure, as detailed in the appended claims.
Fig. 1 is a flow diagram illustrating a system message generation method in accordance with an exemplary embodiment. As shown in fig. 1, the system message generating method is applied to a server, and includes the following steps:
in step S101, at least one target user that needs to receive a system message corresponding to the application scenario is determined according to the current application scenario.
For example, the current application scenario in this step may be: inviting a user to join the group chat, actively quitting the group chat, modifying the name of the group chat and the like; the target user receiving the system message corresponding to the application scenario may be determined according to a specific application scenario. For example, in a scenario of inviting a new user to join a group chat, the target users may be the user who sent the invitation, the user who was invited to the group, and other users who previously joined the group chat.
In step S102, determining the language state of each target user; the language state includes: a master mode, a guest mode, and another mode.
Specifically, if the target user is the operation initiating user in the current application scene, determining the language state of the target user as the main state; if the target user is the operation target user in the current application scene, determining the language state of the target user as a guest state; and if the target user is the other users except the operation initiating user and the operation target user in the current application scene, determining the language state of the target user as the other language state.
In step S103, according to a preset metadata protocol, correspondingly filling a placeholder corresponding to the master status and an identifier of a first target user in the master status into a preset user identifier list, and correspondingly filling a placeholder corresponding to the guest status and an identifier of a second target user in the guest status into a preset user identifier list; the preset list of subscriber identities is set to null each time before a system message is generated.
The preset metadata protocol defines a data storage rule, the preset user identification list can be a two-dimensional array, a first dimension of the array stores placeholders corresponding to a master state and placeholders corresponding to a guest state, and a second dimension stores an identification of a first target user in the master state and an identification of a second target user in the guest state.
In step S104, rendering the preset host-state, guest-state or other-state patterns in the application scene according to the user identifier list by using the placeholder corresponding to the host state and the placeholder corresponding to the guest state, respectively, and generating a system message for the first target user in the host state, a system message for the second target user in the guest state or a system message for the third target user in the other-state.
In this step, a preset unique document identifier corresponding to the current operation may be obtained, the unique document identifier corresponding to the current operation is matched with the unique document identifiers of the preset documents, the preset document in the current application scene is determined, and then, according to the language state of the target user, the preset document in the master state, the guest state, or the other person state is selected from the preset documents in the current application scene.
Specifically, when the selected file is a preset main status file, the identifier of the target user is deleted from the user identifier list, and an updated user identifier list corresponding to the main status user is obtained; rendering the main status pattern by using the placeholder corresponding to the guest status according to the updated user identification list corresponding to the main status user, and generating a system message for a first target user in the main status; when the selected file is a preset guest state file, deleting the identification of the target user from the user identification list to obtain an updated user identification list corresponding to the guest state user; rendering the guest-state file by using a placeholder corresponding to the host state according to the updated user identification list corresponding to the guest-state user, and generating a system message for a second target user in the guest state; and when the selected file is a preset other-person-state file, rendering the other-person-state file by using the placeholder corresponding to the main state and the placeholder corresponding to the guest state according to the user identification list, and generating a system message aiming at a third target user in the other person state.
It can be understood that what needs to be rendered in the host-state pattern is information of the target user in the guest state, so that the host-state pattern can be rendered with the placeholder corresponding to the guest state, and what needs to be rendered in the guest-state pattern is information of the target user in the host state, so that the guest-state pattern can be rendered with the placeholder corresponding to the host state.
In one specific example, the preset metadata protocol may be as follows:
CustomNotice{
string copywriting_key;
long[][]Uid_Param;
string[]String_Param;
}
based on the metadata protocol, the system message generation method of this example is shown in fig. 2. The system message generation method is applied to a server, and as shown in fig. 2, includes the following steps:
in step S201, it is determined whether the length of Uid _ Param is greater than 0; if yes, go to step S202; if not, step S210 is performed.
In this embodiment, based on the above metadata structure, the Uid _ Param represents a preset user identifier list, which may be a two-dimensional array.
When the length of Uid _ Param is not 0, it indicates that the system message corresponding to the current application scene is associated with the target user, namely: the content of the system message is generated according to the language state of the target user receiving the message; on the contrary, when the length of the Uid _ Param is 0, it indicates that the system message corresponding to the current application scenario is not associated with the target user, and at this time, the content of the system message received by each target user is the same.
In step S202, whether the identification of the target user is an element in Uid _ Param [0] is judged; if yes, go to step S203; if not, step S204 is performed.
In this step, it is determined whether the identifier of the target user is an element in the Uid _ Param [0], that is, whether the language state of the target user is the main language state.
Based on the above metadata structure, in a possible implementation manner, according to a preset metadata protocol, a first row Uid _ Param [0] of the two-dimensional array Uid _ Param is used for storing a placeholder corresponding to the master state and an identifier of a first target user in the master state, and a second row Uid _ Param [1] is used for storing a placeholder corresponding to the guest state and an identifier of a second target user in the guest state. Thus, if the target user's identity is an element in Uid _ Param [0], the target user is a host-modal case.
In step S203, a preset primary status pattern is selected from the preset patterns in the current application scenario, and the identification of the target user is selected from Uid _ Param [ x ]](x>0) to yield Uid _ Param1(ii) a Using the obtained Uid _ Param1And rendering the preset master-mode file.
In this step, if the identification of the target user is an element in Uid _ Param [0], a preset primary-state file is correspondingly selected.
In step S204, it is determined whether the length of Uid _ Param is greater than 1; if yes, go to step S205; if not, step S207 is performed.
It can be understood that, if it is determined in step S201 that the length of Uid _ Param is greater than 0, which indicates that the system message corresponding to the current application scenario is associated with the target user, it should be further determined whether the user associated with the current application scenario includes a second target user in the guest state in addition to the first target user in the host state and the third target user in the other state, that is, it should be further determined whether an operation target user exists in the current application scenario.
If the length of Uid _ Param is judged to be not more than 1, it can be known that only the identification of the first target user in the master mode is stored in the first row Uid _ Param [0] of Uid _ Param, but not the identification of the second target user in the guest mode is stored in Uid _ Param [1], namely, only the operation initiating user but not the operation target user exists in the current application scene, so that the preset file in the other mode is correspondingly selected.
In step S205, it is determined whether the identifier of the target user is an element in Uid _ Param [1 ]; if yes, go to step S206; if not, step S207 is performed.
Since it is determined in step S202 that the identifier of the target user is not an element in the Uid _ Param [0], and it is determined in step S204 that the length of the Uid _ Param is greater than 1, it is known that the language state in which the target user is located is not the main state, and the operation initiating user and the operation target user exist at the same time in the current application scenario. Then, when the identification of the target user is an element in Uid _ Param [1], a preset guest-state file should be selected for the target user; on the contrary, when the identification of the target user is not an element in Uid _ Param [1], a preset other-mode file should be selected for the target user.
In step S206, a predetermined guest-state document is selected from the predetermined documents in the current application scenario, and the identifier of the target user is selected from Uid _ Param [ x ]](x>1) to yield Uid _ Param2(ii) a Using the obtained Uid _ Param2Rendering the preset guest-state file, and executing step S208.
In step S207, a preset different-person-state document is selected from the preset documents in the current application scene; and rendering the file of the preset guest-state file by using Uid _ Param.
In step S208, it is determined whether the system message generated for the target user in the current application scenario relates to dynamic data; if so, go to step S209; if not, step S210 is performed.
In step S209, the rendered main personal pattern, guest personal pattern, and other personal pattern are filled in with the String parameters in the String parameter list String _ Param.
In this embodiment, the String parameter list String _ Param is used to store dynamic data when generating a system message. For example, since the user a approves the work 123 of the user B, and a link including the work 123 is required in the system message sent to the user a or the user B, the work link < a href ═ http:// link _ to/id ═ 123' > may be stored in String _ Param, and the character String parameter filling may be performed on the rendered text according to the String _ Param when the system message is generated.
In step S210, a system message for each target user is generated.
As can be seen, according to the method in steps S201 to S207 in the embodiment shown in fig. 2, the preset document corresponding to each target user in a different language state can be determined more quickly and accurately from the plurality of documents preset in the current application scene.
In order to facilitate understanding of the technical solution of the present disclosure, the following describes the system message generation method in the embodiment shown in fig. 1 and fig. 2 in detail with reference to a specific application scenario.
In one possible application scenario, user a invites user B and user C to join a group chat at the same time, and user D and user E previously joined the group chat. Then, the users associated with the system message corresponding to the application scenario at this time include: the target users, which need to receive the system message corresponding to the application scenario, of the user a, the user B, and the user C include: user a, user B, user C, user D, and user E. Because the user A initiates the user for sending the invitation operation, the language state of the user A is the master state; the user B and the user C are invited users, namely, operation target users, so the speech states of the user B and the user C are guest states; and user D and user E are in other modalities. According to a preset metadata protocol, correspondingly filling the placeholder corresponding to the master state and the identification of the first target user (user A) in the master state into a preset user identification list, and correspondingly filling the placeholder corresponding to the guest state and the identification of the second target user (user B, user C) in the guest state into a preset user identification list. As shown in table 1, the specific user identifier list may be:
TABLE 1
Placeholder Array element Value of element
${0} Uid_Param[0] 111
${1} Uid_Param[1] 222,333
In the above table, $ {0} represents a placeholder corresponding to the master status, and $ 1} represents a placeholder corresponding to the guest status, and since the user identifier list is a two-dimensional array Uid _ Param [2] [2], the array element Uid _ Param [0], that is, the first row of the array, may be used to store the identifier 111 of the user a in the master status; the array element Uid _ Param [1], i.e., the second line of the array, may be used to store the identities of user B and user C in the guest state, 222 and 333, respectively.
According to invitation information sent by a user A, acquiring a unique file identification Key1 corresponding to the current operation of 'inviting the user to join group chat', matching the unique file identification Key1 with the unique file identification of each preset file, and determining the preset file with the unique file identification Key1 as the preset file in the current application scene; specifically, as shown in table 2, the preset documents may include a preset main-state document "you invite $ {1} to join the group chat", a preset guest-state document "$ {0} inviting you and $ {1} to join the group chat", and a preset other-state document "$ {0} inviting $ {1} to join the group chat".
TABLE 2
Figure BDA0002153065180000101
When generating a system message for the user a in the master status, the identifier of the user a may be deleted from the user list to obtain an updated user identifier list corresponding to the master status user, as shown in table 3, rendering a preset master status pattern "you invite $ {1} to join a chat group" with a placeholder $ {1} corresponding to the guest status according to the list, and generating the system message for the user a as shown in fig. 3 a: "you invite B, C to join group chat"; when generating a system message for the user B in the guest state, deleting the identifier of the user B from the user list to obtain an updated user identifier list corresponding to the guest state user as shown in table 4, and rendering a preset guest state file "$ {0} invitation you and $ {1} join group chat" with a placeholder $ {0} and a placeholder $ {1} according to the list, as shown in fig. 3B, generating a system message for the user B: "A invites you and C to join a group chat"; the step of generating the system message for the user C is the same as the step of generating the system message for the user B, the updated user identifier list corresponding to the guest-state user obtained after deleting the identifier of the user C from the list is shown in table 5, and then rendering is performed according to the list, and the generated system message is shown in fig. 3C and is: "A invites you and B to join a group chat". When generating system messages for a user D and a user E in a different-person state, rendering a preset different-person-state pattern "$ {0} invitation $ {1} to join in a group chat" by using a placeholder corresponding to a main state and a placeholder corresponding to a guest state according to the user identifier list, and as shown in fig. 3D and fig. 3E, generating system messages for the user D and the user E: "A invite B, C joined the group chat".
TABLE 3
Placeholder Array element Value of element
${0} Uid_Param[0]
${1} Uid_Param[1] 222,333
TABLE 4
Placeholder Array element Value of element
${0} Uid_Param[0] 111
${1} Uid_Param[1] 333
TABLE 5
Placeholder Array element Value of element
${0} Uid_Param[0] 111
${1} Uid_Param[1] 222
Here, when generating the system messages for the main-mode user a, the guest-mode user B, and the user C, the identifiers of the user a, the user B, and the user C may be deleted from the user identifier list, respectively, so as to avoid the occurrence of the own information in the system message received by the target user.
In one possible application scenario, if dynamic data may also be involved in the system message generated for the target user, the dynamic data may be obtained from the current operation in the application scenario and filled into a preset character string parameter list. After the host-state, guest-state or other-state patterns preset in the application scene are rendered according to the user identifier list by using the placeholder corresponding to the host state and the placeholder corresponding to the guest state, respectively, character string parameter filling is performed according to the character string parameter list.
For example, user a approves the work 123 of user B, and a is the master-mode user and B is the guest-mode user. If the guest-state file preset in the application scene is "$ {0} and a praise is applied to the work $ [1] of $ [0], wherein $ {0} is a placeholder corresponding to the master state, and $ [0] and $ [1] are placeholders corresponding to the character string parameters. Then, after rendering the document according to the user identifier list, the obtained message is "a gives $ 0 your work $ [1] with like; then, < a href ═ http:// link _ to/id ═ 123' > in the string parameter list is filled to $ [0], 123 is filled to $ [1 ]; wherein, the < a href ═ http:// link _ to/id ═ 123456' > is a jump link of the work, which can be obtained from the operation of "like", 123 is the number of the work, and the message generated after filling is the system message generated for the user B in the guest state: "A gives you 123 up like".
In another possible application scenario, if the user a invites the user B to join the group chat, but the group turns on the authentication function, the invited user must be confirmed by the group owner to join the group chat. At this time, in the application scenario, the operation of inviting the user to join the group chat is not successful yet, and only a system message that "group members can invite friends to enter the group only with group owner confirmation" is sent to the invited user, so that the language state problem is not involved. Therefore, without the step of determining the language state and the document rendering of the target user, the document 'group members can invite friends to enter the group only after group owner confirmation' preset according to the application scene can be taken as a system message and directly issued to the user B.
The technical scheme provided by the embodiment of the disclosure at least brings the following beneficial effects: after determining the language state of each target user needing to receive the system message corresponding to the application scene, correspondingly filling the placeholder corresponding to the master state and the identifier of the first target user in the master state into a preset user identifier list according to a preset metadata protocol, and correspondingly filling the placeholder corresponding to the guest state and the identifier of the second target user in the guest state into the preset user identifier list, so that even if the application scene changes, a metadata protocol does not need to be correspondingly set for a new application scene to store the identifier of the user related to the current operation, and the compatibility of the metadata protocol on the generation of the system message under different application scenes is improved.
Fig. 4 is a block diagram illustrating a system message generation apparatus according to an example embodiment. Referring to fig. 4, the apparatus includes a target user determining unit 410, a morphism determining unit 420, an identification filling-in unit 430, and a system message generating unit 440.
The target user determining unit 410 is configured to determine, according to a current application scenario, at least one target user that needs to receive a system message corresponding to the application scenario;
the morphism determining unit 420 is configured to determine the morphism of each target user; the language state includes: a master mode, a guest mode and another person mode;
the identifier filling unit 430 is configured to perform filling, according to a preset metadata protocol, a placeholder corresponding to the master status and an identifier of a first target user in the master status into a preset user identifier list correspondingly, and a placeholder corresponding to the guest status and an identifier of a second target user in the guest status into a preset user identifier list correspondingly; the preset user identification list is set to be empty before generating the system message each time;
the system message generating unit 440 is configured to perform rendering on a preset host-state, guest-state or other-state document in the application scene by using a placeholder corresponding to the host state and a placeholder corresponding to the guest state respectively according to the user identifier list, and generate a system message for a first target user in the host state, a system message for a second target user in the guest state or a system message for a third target user in the other-state.
The technical scheme provided by the embodiment of the disclosure at least brings the following beneficial effects: after determining the language state of each target user needing to receive the system message corresponding to the application scene, correspondingly filling the placeholder corresponding to the master state and the identifier of the first target user in the master state into a preset user identifier list according to a preset metadata protocol, and correspondingly filling the placeholder corresponding to the guest state and the identifier of the second target user in the guest state into the preset user identifier list, so that even if the application scene changes, a metadata protocol does not need to be correspondingly set for a new application scene to store the identifier of the user related to the current operation, and the compatibility of the metadata protocol on the generation of the system message under different application scenes is improved.
Optionally, in this embodiment, the speech state determining unit 420 may include:
the master status determining module is configured to determine the language status of the target user as the master status if the target user is the operation initiating user in the current application scene;
the guest state determining module is configured to determine the language state of the target user as the guest state if the target user is the operation target user in the current application scene;
and the other-person-state determining module is configured to determine the language state of the target user as the other-person state if the target user is the other users except the operation initiating user and the operation target user in the current application scene.
Optionally, in this embodiment, the system message generating apparatus may further include:
the identifier obtaining unit is configured to execute, according to the user identifier list, obtaining a preset unique identifier of the file corresponding to the current operation before the step of rendering the preset file in the master mode, the guest mode or the other mode in the application scene by using the placeholder corresponding to the master mode and the placeholder corresponding to the guest mode respectively by the system message generating unit 440;
the identification matching unit is configured to match the unique file identification corresponding to the current operation with the unique file identification of each preset file, and determine the preset file in the current application scene;
and the file selection unit is configured to select a preset host state, a guest state or other person state file from preset files in the current application scene according to the language state of the target user.
Optionally, in this embodiment, the system message generating unit 440 may include:
the first system message generation module is configured to delete the identifier of the target user from the user identifier list when the selected file is a preset main dynamic file, so as to obtain an updated user identifier list corresponding to the main dynamic user; rendering the main status pattern by using the placeholder corresponding to the guest status according to the updated user identification list corresponding to the main status user, and generating a system message for a first target user in the main status;
the second system message generation module is configured to delete the identifier of the target user from the user identifier list when the selected file is a preset guest-state file, so as to obtain an updated user identifier list corresponding to the guest-state user; rendering the guest-state file by using a placeholder corresponding to the host state according to the updated user identification list corresponding to the guest-state user, and generating a system message for a second target user in the guest state;
and the third system message generation module is configured to render the other-person-state file by using the placeholder corresponding to the master state and the placeholder corresponding to the guest state according to the user identification list when the selected file is the preset other-person-state file, and generate a system message for a third target user in the other person state.
With regard to the apparatus in the above-described embodiment, the specific manner in which each module performs the operation has been described in detail in the embodiment related to the method, and will not be elaborated here.
The present disclosure also provides a server, as shown in fig. 5, including a processor 501, a communication interface 502, a memory 503 and a communication bus 504, wherein the processor 501, the communication interface 502 and the memory 503 are communicated with each other via the communication bus 504,
a memory 503 for storing a computer program;
the processor 501, when executing the program stored in the memory 503, implements the following steps:
determining at least one target user needing to receive the system message corresponding to the application scene according to the current application scene;
determining the language state of each target user; the language state includes: a master mode, a guest mode and another person mode;
correspondingly filling a placeholder corresponding to the master status and an identifier of a first target user in the master status into a preset user identifier list, and correspondingly filling a placeholder corresponding to the guest status and an identifier of a second target user in the guest status into a preset user identifier list according to a preset metadata protocol; the preset user identification list is set to be empty before generating the system message each time;
according to the user identification list, respectively using the placeholder corresponding to the master mode and the placeholder corresponding to the guest mode to render the preset master mode, guest mode or other mode file in the application scene, and generating the system message aiming at the first target user in the master mode, the second target user in the guest mode or the third target user in the other mode.
The communication bus mentioned in the above server may be a Peripheral Component Interconnect (PCI) bus, an Extended Industry Standard Architecture (EISA) bus, or the like. The communication bus may be divided into an address bus, a data bus, a control bus, etc. For ease of illustration, only one thick line is shown, but this does not mean that there is only one bus or one type of bus.
The communication interface is used for communication between the server and other devices.
The Memory may include a Random Access Memory (RAM) or a Non-Volatile Memory (NVM), such as at least one disk Memory. Optionally, the memory may also be at least one memory device located remotely from the processor.
The Processor may be a general-purpose Processor, including a Central Processing Unit (CPU), a Network Processor (NP), and the like; but also Digital Signal Processors (DSPs), Application Specific Integrated Circuits (ASICs), Field Programmable Gate Arrays (FPGAs) or other Programmable logic devices, discrete Gate or transistor logic devices, discrete hardware components.
In yet another embodiment provided by the present disclosure, a computer-readable storage medium is further provided, in which a computer program is stored, and the computer program, when executed by a processor, implements the steps of any of the above system message generation methods.
In yet another embodiment, a computer program product containing instructions is provided, which when run on a computer causes the computer to perform any of the above-described system message generation methods.
In the above embodiments, the implementation may be wholly or partially realized by software, hardware, firmware, or any combination thereof. When implemented in software, may be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When loaded and executed on a computer, cause the processes or functions described in accordance with the embodiments of the invention to occur, in whole or in part. The computer may be a general purpose computer, a special purpose computer, a network of computers, or other programmable device. The computer instructions may be stored in a computer readable storage medium or transmitted from one computer readable storage medium to another, for example, from one website site, computer, server, or data center to another website site, computer, server, or data center via wired (e.g., coaxial cable, fiber optic, Digital Subscriber Line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.). The computer-readable storage medium can be any available medium that can be accessed by a computer or a data storage device, such as a server, a data center, etc., that incorporates one or more of the available media. The usable medium may be a magnetic medium (e.g., floppy Disk, hard Disk, magnetic tape), an optical medium (e.g., DVD), or a semiconductor medium (e.g., Solid State Disk (SSD)), among others.
Other embodiments of the disclosure will be apparent to those skilled in the art from consideration of the specification and practice of the disclosure disclosed herein. This application is intended to cover any variations, uses, or adaptations of the disclosure following, in general, the principles of the disclosure and including such departures from the present disclosure as come within known or customary practice within the art to which the disclosure pertains. It is intended that the specification and examples be considered as exemplary only, with a true scope and spirit of the disclosure being indicated by the following claims.
It will be understood that the present disclosure is not limited to the precise arrangements described above and shown in the drawings and that various modifications and changes may be made without departing from the scope thereof. The scope of the present disclosure is limited only by the appended claims.

Claims (8)

1. A system message generation method is applied to a server and comprises the following steps:
determining at least one target user needing to receive the system message corresponding to the application scene according to the current application scene;
determining the language state of each target user; the morphemes include: a master mode, a guest mode and another person mode;
the step of determining the language state of each target user comprises:
if the target user is the operation initiating user in the current application scene, determining the language state of the target user as a main state;
if the target user is the operation target user in the current application scene, determining the language state of the target user as a guest state;
if the target user is the other users except the operation initiating user and the operation target user under the current application scene, determining the language state of the target user as the other language state;
correspondingly filling a placeholder corresponding to the master status and an identifier of a first target user in the master status into a preset user identifier list, and correspondingly filling a placeholder corresponding to the guest status and an identifier of a second target user in the guest status into a preset user identifier list according to a preset metadata protocol; the preset user identification list is set to be empty before generating the system message each time;
according to the user identification list, a preset master-state, guest-state or other-state file in the application scene is rendered by using a placeholder corresponding to the master state and a placeholder corresponding to the guest state respectively, and a system message for a first target user in the master state, a system message for a second target user in the guest state or a system message for a third target user in the other-state is generated.
2. The method for generating system messages according to claim 1, wherein before the step of rendering the master-mode, guest-mode or other-mode text in the application scene by using the placeholder corresponding to the master mode and the placeholder corresponding to the guest mode respectively according to the user identifier list, the method further comprises:
obtaining a preset unique file identifier corresponding to the current operation;
matching the unique file identification corresponding to the current operation with the unique file identification of each preset file, and determining the preset file in the current application scene;
and selecting preset texts in a master mode, a guest mode or another person mode from the preset texts in the current application scene according to the language mode of the target user.
3. The method according to claim 2, wherein the step of generating the system message for the first host-state target user, the second guest-state target user, and the third guest-state target user according to the user identifier list by rendering a host-state, guest-state, or other-state scenario preset in the application scenario with a placeholder corresponding to the host state and a placeholder corresponding to the guest state, respectively, comprises:
when the selected file is a preset main status file, deleting the identification of the target user from the user identification list to obtain an updated user identification list corresponding to the main status user; rendering the main status pattern by using the placeholder corresponding to the guest status according to the updated user identification list corresponding to the main status user, and generating a system message for a first target user in the main status;
when the selected file is a preset guest state file, deleting the identification of the target user from the user identification list to obtain an updated user identification list corresponding to the guest state user; rendering the guest-state file by using a placeholder corresponding to the host state according to the updated user identification list corresponding to the guest-state user to generate a system message for a second target user in the guest state;
and when the selected file is a preset other-person-state file, rendering the other-person-state file by using the placeholder corresponding to the main state and the placeholder corresponding to the guest state according to the user identification list, and generating a system message for a third target user in the other person state.
4. A system message generating apparatus, applied to a server, comprising:
the target user determining unit is configured to determine at least one target user needing to receive the system message corresponding to the application scene according to the current application scene;
the language state determining unit is configured to determine the language state of each target user; the morphemes include: a master mode, a guest mode and another person mode;
the identifier filling unit is configured to perform corresponding filling of a placeholder corresponding to the master status and an identifier of a first target user in the master status into a preset user identifier list and corresponding filling of a placeholder corresponding to the guest status and an identifier of a second target user in the guest status into a preset user identifier list according to a preset metadata protocol; the preset user identification list is set to be empty before generating the system message each time;
a system message generating unit, configured to perform rendering on a preset host-state, guest-state or other-state pattern in the application scene according to the user identification list by using a placeholder corresponding to the host state and a placeholder corresponding to the guest state respectively, and generate a system message for a first target user in the host state, a system message for a second target user in the guest state or a system message for a third target user in the other state, where the host-state pattern needs to render information of the target users in the guest state, the guest-state pattern needs to render information of the target users in the host state, and the other-state pattern needs to render information of the target users in the host state and the guest state;
the speech state determining unit includes:
a main status determining module configured to determine the target user's language status as a main status if the target user is the operation initiating user in the current application scenario;
a guest state determining module configured to determine a morphism of the target user as a guest state if the target user is an operation target user in the current application scene;
and the other-person-state determining module is configured to determine the language state of the target user as the other-person state if the target user is the other users except the operation initiating user and the operation target user in the current application scene.
5. The system message generation apparatus of claim 4, further comprising:
the identification obtaining unit is configured to execute to obtain a preset unique identification of the file corresponding to the current operation before the step of rendering the preset file in the master mode, the guest mode or the other mode in the application scene by using the placeholder corresponding to the master mode and the placeholder corresponding to the guest mode respectively according to the user identification list;
the identification matching unit is configured to match the unique file identification corresponding to the current operation with the unique file identification of each preset file, and determine the preset file in the current application scene;
and the file selection unit is configured to select preset files in a main mode, a guest mode or another mode from preset files in the current application scene according to the language mode of the target user.
6. The system message generation apparatus of claim 5, wherein the system message generation unit comprises:
the first system message generation module is configured to delete the identifier of the target user from the user identifier list when the selected file is a preset main status file, so as to obtain an updated user identifier list corresponding to the main status user; rendering the main status pattern by using the placeholder corresponding to the guest status according to the updated user identification list corresponding to the main status user, and generating a system message for a first target user in the main status;
the second system message generation module is configured to delete the identifier of the target user from the user identifier list to obtain an updated user identifier list corresponding to the guest-state user when the selected file is a preset guest-state file; rendering the guest-state file by using a placeholder corresponding to the host state according to the updated user identification list corresponding to the guest-state user to generate a system message for a second target user in the guest state;
and the third system message generation module is configured to render the other-person-state file by using the placeholder corresponding to the main state and the placeholder corresponding to the guest state according to the user identification list when the selected file is a preset other-person-state file, and generate a system message for a third target user in the other person state.
7. A server, comprising:
a processor;
a memory for storing the processor-executable instructions;
wherein the processor is configured to execute the instructions to implement the system message generation method of any of claims 1 to 3.
8. A computer readable storage medium, instructions in which, when executed by a processor of a server, enable the server to perform the system message generation method of any one of claims 1 to 3.
CN201910708961.0A 2019-08-01 2019-08-01 System message generation method, device, server and storage medium Active CN110460512B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910708961.0A CN110460512B (en) 2019-08-01 2019-08-01 System message generation method, device, server and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910708961.0A CN110460512B (en) 2019-08-01 2019-08-01 System message generation method, device, server and storage medium

Publications (2)

Publication Number Publication Date
CN110460512A CN110460512A (en) 2019-11-15
CN110460512B true CN110460512B (en) 2021-10-22

Family

ID=68484504

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910708961.0A Active CN110460512B (en) 2019-08-01 2019-08-01 System message generation method, device, server and storage medium

Country Status (1)

Country Link
CN (1) CN110460512B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114047963A (en) * 2021-11-26 2022-02-15 南方电网科学研究院有限责任公司 Online monitoring device configuration method, device, equipment and storage medium

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101611602A (en) * 2007-02-20 2009-12-23 斯凯普有限公司 Instant messaging activity notification
CN103973461A (en) * 2013-02-06 2014-08-06 阿里巴巴集团控股有限公司 Notification message pushing method and message server
CN104461548A (en) * 2014-12-15 2015-03-25 北京国双科技有限公司 Code fragment adding method and device
CN104579917A (en) * 2014-12-18 2015-04-29 四川联友电讯技术有限公司 Group-based method for realizing customized group instant messaging through enterprise mobile office system
CN107623624A (en) * 2016-07-15 2018-01-23 阿里巴巴集团控股有限公司 The method and device of notification message is provided
CN109543008A (en) * 2018-10-17 2019-03-29 北京达佳互联信息技术有限公司 A kind of notification method of instant messaging, device, electronic equipment and storage medium
CN109561013A (en) * 2018-10-15 2019-04-02 北京达佳互联信息技术有限公司 The management method and device of instant messaging

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20100159871A1 (en) * 2008-12-22 2010-06-24 Nortel Networks Limited Predictive notification system for emergency services
US20180040030A1 (en) * 2016-08-05 2018-02-08 International Business Machines Corporation Central trusted electronic commerce platform that leverages social media services

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101611602A (en) * 2007-02-20 2009-12-23 斯凯普有限公司 Instant messaging activity notification
CN103973461A (en) * 2013-02-06 2014-08-06 阿里巴巴集团控股有限公司 Notification message pushing method and message server
CN104461548A (en) * 2014-12-15 2015-03-25 北京国双科技有限公司 Code fragment adding method and device
CN104579917A (en) * 2014-12-18 2015-04-29 四川联友电讯技术有限公司 Group-based method for realizing customized group instant messaging through enterprise mobile office system
CN107623624A (en) * 2016-07-15 2018-01-23 阿里巴巴集团控股有限公司 The method and device of notification message is provided
CN109561013A (en) * 2018-10-15 2019-04-02 北京达佳互联信息技术有限公司 The management method and device of instant messaging
CN109543008A (en) * 2018-10-17 2019-03-29 北京达佳互联信息技术有限公司 A kind of notification method of instant messaging, device, electronic equipment and storage medium

Also Published As

Publication number Publication date
CN110460512A (en) 2019-11-15

Similar Documents

Publication Publication Date Title
US10834037B2 (en) Systems and methods for image sharing
CN105530175B (en) Message processing method, device and system
JP6683387B2 (en) Resource sharing method, terminal, and storage medium
WO2018108059A1 (en) Method and device for processing template data, requesting for template data and presenting template data
US10243889B2 (en) Keyword based automatic reply generation in a messaging application
WO2019019645A1 (en) Method and apparatus for executing information pushing task, and computer device and storage medium
CN104125143B (en) Recommend the method and device of group
WO2015085917A1 (en) Method, apparatus and system for processing information
CN107294832B (en) Method and device for adding friends
WO2019100986A1 (en) Information sending method and apparatus
KR102128667B1 (en) Transaction processing method and system
CN110120908B (en) Group message processing method and device and server
CN104679824A (en) Webpage generating method and webpage generating system of network platform
CN104484482A (en) Webpage information updating method and system of network platform
CN110460512B (en) System message generation method, device, server and storage medium
KR102066802B1 (en) Business processing method and device
CN105187399A (en) Resource processing method and device
CN112818654B (en) Message storage method, message generation method, device, electronic equipment and computer readable medium
CN114520830A (en) Message pushing method, device and system
CN112788090B (en) Network resource transmission method, device and system
CN107623620B (en) Processing method of random interaction data, network server and intelligent dialogue system
CN105187508A (en) User relationship processing method and system
US9294536B2 (en) Method and system of communicating delivery status of an XDM resource in an XDM environment
WO2017143931A1 (en) Method and apparatus for identifying smart card, method and apparatus for processing smart card identification data, and device
WO2023134255A1 (en) Information insertion method and apparatus, device, medium, and computer program product

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
GR01 Patent grant
GR01 Patent grant