A message generation method, device, storage medium and electronic equipment
Patent Information
- Application Number
- CN202210995438.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-08-18
- Publication Date
- 2026-09-29
- Estimated Expiration
- 2042-08-18
AI Technical Summary
当需要针对一个用户群中的多个用户生成报文时,现有方法所生成的报文只会根据数据单独地去描述每个用户的特征
[0066]在本说明书提供的报文生成方法中,在获取到用户群中各用户的描述信息后,确定每个描述信息的属性和所属的用户;将描述信息输入到报文生成模型中,通过模型中的不同子网分别确定出描述信息的词特征、属性特征、归属特征;根据确定出的词特征、属性特征、归属特征确定出描述信息的综合特征;对各描述信息的综合特征进行编码,得到编码特征,并最终根据编码特征生成报文。采用本说明书提供的报文生成方法生成报文时,会在描述信息本身的含义的基础上,根据描述信息的属性以及所属的用户,额外考虑用户群中各用户之间的逻辑关系,最终生成能够反映出用户群中各用户之间的关联关系的报文。
Smart Images

Figure CN115422928B_ABST
Abstract
Description
Technical Field
[0001] This specification relates to the field of computer technology, and in particular to a method, apparatus, storage medium and electronic device for message generation. Background Technology
[0002] When executing many business operations, it is necessary to generate messages for the users involved in the business based on the business data. These users refer to the personnel participating in the business. Typically, the messages concisely and objectively describe the information related to the users in the business, so that the business can be evaluated or processed accordingly in subsequent processes.
[0003] Currently, most methods are not conducive to protecting user privacy data when generating messages. Typically, a group of users involved in the same business is considered as a user group, or a group of related users from different business areas is considered as a user group. When generating messages for multiple users within a user group, existing methods only describe the characteristics of each user individually based on the data.
[0004] Therefore, this specification provides a new method for message generation. Summary of the Invention
[0005] This specification provides a message generation method and a message generation apparatus to partially solve the aforementioned problems existing in the prior art.
[0006] The following technical solution is adopted in this specification:
[0007] This specification provides a method for message generation, including:
[0008] Obtain descriptive information about the business operations performed by each user in the user group;
[0009] For each description, determine the attributes of the description and the user identifier of the user to which the description belongs. For some attributes, the description information of the attribute is included in the description information of all users performing business.
[0010] Each descriptive information, its attributes, and the user identifier of the user to which each descriptive information belongs are input into a pre-trained message generation model. The word features, attribute features, and attribution features of each descriptive information are determined through the feature extraction subnet in the message generation model.
[0011] The word features, attribute features, and attribution features of each descriptive information are input into the fusion subnet of the message generation model. The word features, attribute features, and attribution features of each descriptive information are fused through the fusion subnet to determine the comprehensive features of each descriptive information.
[0012] The comprehensive features of each descriptive information are input into the encoding subnet of the message generation model. The comprehensive features of each descriptive information are encoded through the encoding subnet to obtain encoded features. The encoded features are at least used to characterize the relationship between users in the user group.
[0013] The encoded features are input into the decoding subnet of the message generation model, and messages describing the relationships between users in the user group are generated through the decoding subnet.
[0014] Optionally, the feature extraction subnetwork includes at least: a first extraction layer, a second extraction layer, and a third extraction layer;
[0015] The feature extraction subnet in the message generation model is used to determine the word features, attribute features, and attribution features of each descriptive information, respectively, specifically including:
[0016] The first extraction layer extracts word features from each descriptive information based on the descriptive information.
[0017] The second extraction layer extracts the attribute features of each descriptive information based on its attributes.
[0018] The third extraction layer extracts the attribution features of each descriptive information based on the user identifier of the user to whom each descriptive information belongs.
[0019] Optionally, the fused subnet includes at least: a first fused layer, a second fused layer, and a third fused layer;
[0020] The word features, attribute features, and attribution features of each descriptive information are fused through the fusion subnet to determine the comprehensive features of each descriptive information, specifically including:
[0021] For each descriptive information, the word features, attribute features, and attribution features of the descriptive information are fused through the first fusion layer to obtain the text features of the descriptive information;
[0022] The second fusion layer determines the logical features of the description information based on its attribute features, attribution features, and description information itself.
[0023] The third fusion layer determines the comprehensive features of the descriptive information based on its textual and logical features.
[0024] Optionally, based on the attribute characteristics and attribution characteristics of the descriptive information, and the descriptive information itself, the logical characteristics of the descriptive information are determined, specifically including:
[0025] When the description information is a numeric type, the logical characteristics of the description information are determined based on its numerical value, attribute characteristics, and attribution characteristics.
[0026] When the description information is a non-numeric type, the logical characteristic of the description information is zero.
[0027] Optionally, based on the textual and logical features of the descriptive information, a comprehensive feature is determined, specifically including:
[0028] Based on the description information, determine the first weight corresponding to the text features of the description information and the second weight corresponding to the logical features of the description information;
[0029] Based on the textual features, logical features, first weight, and second weight of the descriptive information, the comprehensive features of the descriptive information are determined.
[0030] Optionally, the encoded subnet includes: a sorting layer and an encoding layer;
[0031] The comprehensive features of each descriptive information are encoded through the encoding subnet to obtain encoded features, specifically including:
[0032] Select a specified attribute from the attributes of the description information, and determine the description information with the specified attribute as the specified description information;
[0033] Through the sorting layer, users are sorted according to the specified description information and the user to which the specified description information belongs, to obtain a user sequence;
[0034] Based on the description information of each user and the user sequence, determine the description information sequence;
[0035] Based on the sequence of description information and the comprehensive characteristics of each description information, the sequence characteristics of the description information sequence are determined;
[0036] The feature sequence is encoded by the coding layer to obtain the encoded features.
[0037] Optionally, the decoding subnet includes: a decoding layer and a generation layer;
[0038] Generating messages describing the relationships between users in the user group through the decoding subnet specifically includes:
[0039] The encoded features are decoded by the decoding layer to obtain the decoded features;
[0040] The generation layer determines, based on the decoding features, the messages describing the relationships between users in the user group.
[0041] Optionally, the decoding subnet includes: a first probability layer and a second probability layer;
[0042] The messages used to determine the relationships between users in the user group through the decoding subnet specifically include:
[0043] For each placeholder in the message to be generated, the probability of obtaining the word for that placeholder from the preset word library is determined by the first probability layer, and the probability of obtaining the word for that placeholder from the description information is determined by the second probability layer.
[0044] The word that occupies the space is determined based on the first probability and the second probability;
[0045] Based on the placeholder words, determine the messages describing the relationships between users in the user group.
[0046] Optionally, the message generation model is pre-trained, specifically including:
[0047] Obtain sample description information for each sample user in the sample user group;
[0048] Determine the annotation message for the sample description information;
[0049] For each sample description, determine the attributes of that sample description and the sample user to whom that description belongs;
[0050] The description information of each sample, the attributes of each sample description information, and the sample user to which each sample description information belongs are input into the message generation model to be trained. Through the feature extraction subnet in the message generation model, the word features to be optimized, the attribute features to be optimized, and the attribution features to be optimized of each sample description information are determined respectively.
[0051] The word features, attribute features, and attribution features of each sample description information to be optimized are input into the fusion subnet of the message generation model, so as to fuse the word features, attribute features, and attribution features of each sample description information through the fusion subnet and determine the comprehensive features to be optimized for each sample description information.
[0052] The comprehensive features to be optimized of the description information of each sample are input into the encoding subnet of the message generation model. The comprehensive features to be optimized of the description information of each sample are encoded through the encoding subnet to obtain the encoding features to be optimized.
[0053] The coding feature to be optimized is input into the decoding subnet of the message generation model, and the coding feature to be optimized is decoded through the decoding subnet to obtain the decoding feature to be optimized.
[0054] The decoding features to be optimized are input into the generation subnet of the message generation model, and the message to be optimized is generated through the generation subnet.
[0055] The message generation model is trained with the goal of minimizing the difference between the message to be optimized and the labeled message.
[0056] This specification provides a message generation apparatus, including:
[0057] The acquisition module retrieves descriptive information about the business processes performed by each user in the user group.
[0058] The determination module determines the attributes of each description and the user identifier of the user to which the description belongs. For some attributes, the description information of all users performing business includes the description information of that attribute.
[0059] The extraction module inputs each descriptive information, the attribute of each descriptive information, and the user identifier of the user to which each descriptive information belongs into a pre-trained message generation model. Through the feature extraction subnet in the message generation model, the word features, attribute features, and attribution features of each descriptive information are determined respectively.
[0060] The fusion module inputs the word features, attribute features, and attribution features of each descriptive information into the fusion subnet of the message generation model, and fuses the word features, attribute features, and attribution features of each descriptive information through the fusion subnet to determine the comprehensive features of each descriptive information;
[0061] The encoding module inputs the comprehensive features of each descriptive information into the encoding subnet in the message generation model, and encodes the comprehensive features of each descriptive information through the encoding subnet to obtain encoded features. The encoded features are at least used to characterize the association relationship between users in the user group.
[0062] The decoding module inputs the encoded features into the decoding subnet of the message generation model, and generates messages describing the relationships between users in the user group through the decoding subnet.
[0063] This specification provides a computer-readable storage medium storing a computer program that, when executed by a processor, implements the above-described message generation method.
[0064] This specification provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the program to implement the above-described message generation method.
[0065] The above-mentioned technical solutions adopted in this specification can achieve the following beneficial effects:
[0066] In the message generation method provided in this specification, after obtaining the description information of each user in the user group, the attributes and the user to which each description information belongs are determined; the description information is input into the message generation model, and the word features, attribute features, and attribution features of the description information are determined through different subnets in the model; the comprehensive features of the description information are determined based on the determined word features, attribute features, and attribution features; the comprehensive features of each description information are encoded to obtain encoded features, and finally, a message is generated based on the encoded features. When generating a message using the message generation method provided in this specification, in addition to the meaning of the description information itself, the logical relationships between users in the user group are considered based on the attributes of the description information and the user to which it belongs, ultimately generating a message that reflects the relationships between users in the user group. Attached Figure Description
[0067] The accompanying drawings, which are included to provide a further understanding of this specification and form part of this specification, illustrate exemplary embodiments and are used to explain this specification, but do not constitute an undue limitation thereof. In the drawings:
[0068] Figure 1 This is a flowchart illustrating a message generation method provided in this specification;
[0069] Figure 2 This is a schematic diagram of the structure of a message generation model provided in this specification;
[0070] Figure 3 This is a schematic diagram of a message generation device provided in this specification;
[0071] Figure 4 This specification provides a corresponding Figure 1 A schematic diagram of an electronic device. Detailed Implementation
[0072] To make the objectives, technical solutions, and advantages of this specification clearer, the technical solutions of this specification will be clearly and completely described below in conjunction with specific embodiments and corresponding drawings. Obviously, the described embodiments are only a part of the embodiments of this specification, and not all of them. Based on the embodiments in this specification, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this specification.
[0073] The technical solutions provided in the various embodiments of this specification are described in detail below with reference to the accompanying drawings.
[0074] Figure 1 This is a flowchart illustrating a message generation method provided in this specification, including the following steps:
[0075] S100: Obtain description information of the business operations performed by each user in the user group.
[0076] In this specification, the executing entity used to implement the message generation method can refer to a server, terminal, or other designated device set up on the business platform. For ease of description, this specification will only use the server as the executing entity as an example to illustrate one message generation method provided in this specification.
[0077] When generating messages for a user group, the descriptive information for each user in the user group when performing business operations can be obtained first. Here, a user can be a person involved in the business; a user group can be a collection of multiple users involved in a business, or a collection of multiple related users involved in different related businesses; the descriptive information can be information in the user group that describes various aspects of each user related to the business.
[0078] For example, in sports competitions, messages are generated based on the number of medals won by each country in various sports. In this case, the user group can be a collection of countries, and each user in the user group can be a country. The data can be descriptive text, such as "China" or "United States" representing country names, or "badminton" or "diving" representing sports, or it can be numeric data, such as "5," "8," or "11" representing the number of medals. Besides the above examples, there are other examples such as generating messages to calculate student scores in an exam, and generating messages targeting organized crime in the field of anti-money laundering, which will not be elaborated upon here.
[0079] S102: For each description information, determine the attribute of the description information and the user identifier of the user to which the description information belongs. For some attributes, the description information of the attribute is included in the description information of all users performing business.
[0080] In this step, the acquired user group description information can be organized to determine the attributes of each description and the user identifier of the user to which each description belongs. The attributes of the description information represent the category of the content it represents; the user identifier is used to confirm the user's identity. In a single message generation, each user has a different and unique user identifier, and the user described by the description information is the user to which the description information belongs. Typically, users in a user group are users performing the same business, or related users performing different associated businesses. Therefore, the description information of different users performing different businesses may contain description information with some identical attributes. For example, in the example in step S100, the description information of each user performing a business will contain description information with the attribute "country name," meaning it contains description information with the same attribute. In different specific application scenarios, the attributes of the description information and the user to which the description information belongs can be different. Continuing with the example in step S100, in the scenario of generating a message for the number of medals won by each country in various sports, the attributes of the description information may include the country name, event name, number of gold medals, number of silver medals, number of bronze medals, etc. The user to whom the description information belongs can usually be represented by user A, user B, user C or user 1, user 2, user 3, etc.
[0081] User A Canada 3 1 2 baseball User B Mexico 2 3 1 baseball User C Colombia 1 3 0 baseball
[0082] Table 1
[0083] For ease of representation, the identified attributes of each descriptive piece of information and the users to whom they belong can be represented in tabular form. Specifically, as shown in Table 1, Table 1 provides an example of the number of medals won by three countries in baseball. The first row represents multiple different attributes, and the first column represents multiple different users. The attributes for the descriptive information "Canada," "Mexico," and "Colombia" are country names; the attribute for "Baseball" is the sport name; and the attributes for each number are "Number of Gold Medals," "Number of Silver Medals," "Number of Bronze Medals," etc. Furthermore, the descriptive information "Canada," "3," "1," "2," and "Baseball" belongs to user A; the descriptive information "Mexico," "2," "3," "1," and "Baseball" belongs to user B; and the descriptive information "Colombia," "1," "3," "0," and "Baseball" belongs to user C. It should be noted that descriptive information with identical content is not necessarily the same descriptive information. For descriptions with the same content, the attributes and users to which the descriptions belong may be different. For example, in the table above, the description "3" belonging to user A and the description "3" belonging to user B have the same content, both being "3", but they belong to different users. Furthermore, the description "3" belonging to user A represents the number of gold medals, while the description "3" belonging to user B represents the number of silver medals. Therefore, they are not the same description.
[0084] It is worth mentioning that, in Table 1, for the sake of convenience in subsequent explanations and to keep the instruction manual concise, all the description information under the attribute "Item Name" is the same: "Baseball". However, it is understandable that in practical applications, there may be various other description information under the attribute "Item Name", such as "Tennis" or "Diving".
[0085] S104: Input each descriptive information, the attribute of each descriptive information, and the user identifier of the user to which each descriptive information belongs into the pre-trained message generation model. Through the feature extraction subnet in the message generation model, determine the word features, attribute features, and attribution features of each descriptive information.
[0086] In this step, the attributes of each descriptive information determined in step S102, the user to which each descriptive information belongs, and the descriptive information itself can be input into the pre-trained message generation model to generate a message. Alternatively, each descriptive information, its attributes, and the user to which it belongs can be input into the message generation model in the form of the table exemplified in step S102.
[0087] The structure of the message generation model used in the message generation method provided in this specification can be as follows: Figure 2 As shown, the model may include a feature extraction subnet, a fusion subnet, an encoding subnet, and a decoding subnet; the message generation model can exist on any electronic device with computing capabilities, and this specification uses a server as an example for illustration.
[0088] Each descriptive information, its attributes, and the user identifier of the user to which it belongs are input into the feature extraction subnetwork of the model. The feature extraction subnetwork can extract word features, attribute features, and attribution features from the descriptive information. Specifically, word features representing the meaning of the descriptive information are extracted based on its content; attribute features representing the category of the descriptive information are extracted based on its attributes; and attribution features representing the user to which the descriptive information belongs are extracted based on the user identifier of the user to which the descriptive information belongs.
[0089] For two descriptive pieces of information with identical content, their extracted word features can be the same; for two descriptive pieces of information with identical attributes, their extracted attribute features can be the same; for descriptive pieces of information belonging to the same user, their extracted attribution features can be the same. Taking the descriptive pieces of information in Table 1 as an example, for the descriptive pieces of information in the second row and third column and the third row and fourth column of Table 1, both contain the value "3", so their word features can be the same; for all descriptive pieces of information in any column of Table 1 excluding the header (first row and first column), if these descriptive pieces of information have the same attributes, then all of these descriptive pieces of information can have the same attribute features; similarly, for all descriptive pieces of information in any row of Table 1 excluding the header, if these descriptive pieces of information belong to the same user, then all of these descriptive pieces of information can have the same attribution features.
[0090] Word features, attribute features, and attribution features can be extracted through different network layers in the feature extraction subnet. For example... Figure 2 The feature extraction subnetwork shown in the diagram specifically includes at least a first extraction layer, a second extraction layer, and a third extraction layer. The first extraction layer extracts word features of each descriptive information based on its attributes; the second extraction layer extracts attribute features based on the attributes of each descriptive information; and the third extraction layer extracts attribution features based on the user identifier of the user to whom each descriptive information belongs.
[0091] When extracting features, the first, second, and third extraction layers can use different networks, or they can use networks with the same structure but different parameters to extract features, such as Long Short-Term Memory (LSTM) networks or Transformer networks; the dimensions of the features extracted by each extraction layer can be the same.
[0092] Even better, when the description information is recorded in a table, before inputting each description information into the message generation model, the description information in the generated table can be sorted and formed into a sequence from left to right and from top to bottom. The description information is then input into the message generation model in the form of a sequence, so that the message generation model can receive clearer description information, reduce the amount of retrieval and calculation on the device, and enable it to process the message faster.
[0093] S106: Input the word features, attribute features, and attribution features of each descriptive information into the fusion subnet of the message generation model, and fuse the word features, attribute features, and attribution features of each descriptive information through the fusion subnet to determine the comprehensive features of each descriptive information.
[0094] In this step, the word features, attribute features, and attribution features of the descriptive information obtained in step S104 can be input into the fusion subnet of the model to obtain the comprehensive features of the descriptive information. For example... Figure 2 The fusion subnet shown may specifically include at least a first fusion layer, a second fusion layer, and a third fusion layer. For each descriptive information, the first fusion layer fuses the word features, attribute features, and attribution features of the descriptive information to obtain the text features of the descriptive information. The second fusion layer determines the logical features of the descriptive information based on its attribute features, attribution features, and the descriptive information itself. The third fusion layer determines the comprehensive features of the descriptive information based on its text features and logical features.
[0095] Through the first layer of the fusion subnet, for each descriptive information, the word features, attribute features, and attribution features of that descriptive information can be fused to obtain text features that characterize the content that the descriptive information should present in the message. The fusion of word features, attribute features, and attribution features can be achieved by adding the word features, attribute features, and attribution features together to obtain the text features. Through the second layer of the fusion subnet, for each descriptive information, the logical features of that descriptive information can be determined based on its content, attribute features, and attribution features. Logical features are used to characterize the logical relationships between descriptive information with the same attribute belonging to different users. When determining logical features, the data type of the descriptive information can be considered. Specifically, when the descriptive information is numeric, its logical features are determined based on its numerical value, attribute features, and attribution features; when the descriptive information is non-numeric, its logical features are zero.
[0096] When the descriptive information is in the form of numbers, the logical characteristics of the descriptive information can be determined according to the following formula, based on the descriptive information itself, attribute characteristics, and attribution characteristics.
[0097] E L =M×E P +E C
[0098] Where E L Representing logical characteristics, E P E represents attribute characteristics. CLet M represent the value of the numerical description information itself, and M represent the attribution feature. In this scheme, in processing the content of the description information, in addition to extracting word features that characterize the original content of the description information, the meaning that the content of the description information should present in the context of the user group is also considered. Taking the data in Table 1 as an example, the attribute of the description information in the third column of Table 1 is "number of gold medals," meaning that the attribute feature of the description information in the third column should be the attribute feature E representing "gold medals." P1 Similarly, the user to which the second line of description belongs is user A, meaning that the attribution characteristic of the second line of description should be the attribution characteristic E representing "user A". C1 At this point, the logical characteristic of the description information "3" in the second row and third column can be E. L1 =3×E P1 +E C1 .
[0099] When the description information is of a non-numeric type, there is no logical relationship between the description information of the same attribute for different users. Therefore, for non-numeric description information, the zero feature can be directly used as the logical feature of the description information.
[0100] After determining the textual and logical features of a descriptive information, the textual and logical features of the descriptive information can be added together to obtain the comprehensive features of the descriptive information.
[0101] Additionally, for descriptive information with different attributes, the logical and textual features of the descriptive information may have varying degrees of importance when generating messages. Therefore, before merging the textual and logical features of the descriptive information into a comprehensive feature, a first weight and a second weight can be assigned to the textual and logical features of the descriptive information, respectively. The first weight corresponds to the textual features, and the second weight corresponds to the logical features. Depending on the attributes of the descriptive information, the first and second weights can be changed accordingly, and their values can be the same or different.
[0102] Specifically, a first weight corresponding to the textual features of the descriptive information and a second weight corresponding to the logical features of the descriptive information can be determined based on the descriptive information. A comprehensive feature of the descriptive information can be determined based on the textual features, logical features, first weight, and second weight of the descriptive information using the following formula:
[0103] E C =W1×E T +W2×E L
[0104] Among them, E CE represents the comprehensive characteristics of the descriptive information. T E represents the textual features that describe information. L W1 represents the logical feature describing the information; W2 represents the first weight corresponding to the text feature and W1 represents the second weight corresponding to the logical feature.
[0105] It is worth mentioning that in the fusion subnet of the message generation model used in this scheme, an additional weighting layer can exist to determine the first weight and the second weight, as well as the comprehensive features. The methods for determining the first weight and the second weight can be changed by adjusting the parameters of the weighting layer in the model during training.
[0106] S108: Input the comprehensive features of each descriptive information into the encoding subnet in the message generation model, and encode the comprehensive features of each descriptive information through the encoding subnet to obtain encoding features. The encoding features are used to characterize the relationship between users in the user group.
[0107] Typically, to generate better messages, when generating messages based on the comprehensive features of various descriptive information, the encoder first converts the comprehensive features of the dispersed descriptive information into encoded features to generate superior messages. During the encoding process of the comprehensive features of various descriptive information, all user information can be integrated into the final encoded features, allowing the encoded features to additionally include the relationships between users. This enables the generation of messages that reflect the relationships between users based on the encoded features.
[0108] Specifically, the generation subnet includes: an encoding subnet, a decoding layer, and a generation layer; the encoding subnet encodes the comprehensive features of each descriptive information to obtain encoded features; the decoding layer decodes the encoded features to obtain decoded features; and the generation layer generates a message based on the decoded features.
[0109] More preferably, before the encoding subnet encodes the comprehensive features of each descriptive information, the comprehensive features of each descriptive information can be logically sorted according to the needs of message generation. Specifically, the encoding subnet includes: a sorting layer and an encoding layer; selecting a specified attribute from the attributes of the descriptive information, and determining the descriptive information with the specified attribute as the specified descriptive information; through the sorting layer, sorting each user according to the specified descriptive information and the user to which the specified descriptive information belongs, obtaining a user sequence; determining a descriptive information sequence according to the descriptive information of each user and the user sequence; determining the sequence features of the descriptive information sequence according to the descriptive information sequence and the comprehensive features of each descriptive information; and encoding the feature sequence through the encoding layer to obtain encoded features.
[0110] During sorting, specific attributes can be selected from the various attributes of the description information according to specific needs. Description information with the specified attribute is then used as the specified description information. Based on the content of the specified description information itself, the users to which the specified description information belongs are sorted to obtain a user sequence. Simultaneously, for each user, the description information belonging to that user can be assembled into a single information sequence for that user according to a preset method. The single information sequences of each user are then sorted according to the user sequence's order; that is, a single information sequence for that user is placed at each position in the user sequence to form a description information sequence. Subsequently, the comprehensive features of that description information are placed at each position in the description information sequence to obtain the sequence features of the description information sequence.
[0111] Taking the descriptive information in Table 1 as an example, assuming that the comprehensive features corresponding to the descriptive information "Canada", "3", "1", "2", and "Baseball" for user A are "A1", "A2", "A3", "A4", and "A5" respectively, sorting the attributes in the header of Table 1 from left to right, we obtain the single feature of user A [A1A2A3A4A5]. Using the same method, we can obtain the single feature of user B [B1B2B3B4B5] and the single feature of user C [C1C2C3C4C5]. Simultaneously, we can select a specific attribute from each attribute. In this embodiment, we select the attribute "Number of Gold Medals". Therefore, the descriptive information "3", "2", and "1" with the attribute "Number of Gold Medals" are the specified descriptive information. Following the ascending order of the specified descriptive information, we obtain the user sequence [User C, User B, User A]. Based on the user sequence, we sort the single features of each user to obtain the sequence features [C1C2C3C4C5B1B2B3B4B5A1A2A3A4A5].
[0112] At this point, the sequence characteristics contain the logical relationship of the number of gold medals obtained by each user, and more purposeful messages can be generated based on the sequence characteristics.
[0113] Encoded features can be obtained by encoding the sequence features obtained in the sorting layer through the coding layer.
[0114] S110: Input the encoded features into the decoding subnet of the message generation model, and generate a message describing the association relationship between users in the user group through the decoding subnet.
[0115] The encoded features obtained in step S108 are input into the decoding subnet of the message generation model, and the final message can be generated through the decoding subnet. In this scheme, the generated message can be a string or a complete sentence.
[0116] More preferably, upon receiving encoded features, the decoding subnet can first convert the encoded features into better features and generate a message based on the obtained better features. Specifically, the decoding subnet includes: a decoding layer and a generation layer; the decoding layer decodes the encoded features to obtain decoded features; and the generation layer determines messages describing the association relationships of users in the user group based on the decoded features.
[0117] In this process, both the encoding layer in step S108 and the decoding layer in step S110 can use Transformer networks. It should be noted that the encoding method of the encoding subnet and the decoding method of the decoding layer should correspond to each other. That is, the Transformer in the encoding subnet and the Transformer in the decoding layer should correspond to each other, so that the encoded features obtained through the encoding subnet can be successfully decoded through the decoding layer.
[0118] Additionally, due to the limited number of words in the lexicon, not all content in the generated message can usually be obtained from the lexicon. Some content in the message needs to be directly taken from the input descriptive information, such as names of people, places, and countries. Specifically, the decoding subnet includes: a first probability layer and a second probability layer; for each placeholder in the message to be generated, the first probability layer determines the probability of obtaining the word for that placeholder from the preset lexicon, and the second probability layer determines the probability of obtaining the word for that placeholder from the descriptive information; based on the first probability and the second probability, the word for that placeholder is determined; based on the words for each placeholder, the message describing the association relationship between users in the user group is determined. The second probability layer can be implemented using a network such as a Point Network. The first probability and the second probability can be determined based on the part-of-speech of the word to be generated in the placeholder, and the specific determination method can be adjusted through training the model. Obtaining words from the preset lexicon and obtaining words from the descriptive information can both be implemented using mature networks, which will not be elaborated on here.
[0119] The message generation model used in the message generation method provided in this specification can be pre-trained. Specifically, sample description information of each sample user in the sample user group can be obtained; the labeled message of the sample description information can be determined; for each sample description information, the attributes of the sample description information and the sample user to which the description information belongs can be determined; each sample description information, its attributes, and the sample user to which the description information belongs can be input into the message generation model to be trained, and through the feature extraction subnet in the message generation model, the word features to be optimized, the attribute features to be optimized, and the attribution features to be optimized of each sample description information can be determined respectively; the word features to be optimized, the attribute features to be optimized, and the attribution features to be optimized of each sample description information can be input into the fusion subnet in the message generation model, so as to process the message description information through the fusion subnet. The descriptive information's unoptimized word features, unoptimized attribute features, and unoptimized attribution features are fused to determine the unoptimized comprehensive features of each sample's descriptive information. These unoptimized comprehensive features are then input into the encoding subnet of the message generation model, where they are encoded to obtain unoptimized encoded features. These unoptimized encoded features are then input into the decoding subnet of the message generation model, where they are decoded to obtain unoptimized decoded features. These unoptimized decoded features are then input into the generation subnet of the message generation model, where an unoptimized message is generated. The message generation model is trained with the optimization objective of minimizing the difference between the unoptimized message and the labeled message.
[0120] The sample user group can be selected based on actual application needs. Selecting a sample user group from the same domain or business as the actual application can achieve better training results. Furthermore, to ensure training quality, the labeled messages can be manually written. During training, the optimization objective is to use the same message to be optimized generated by the model as the same as the manually written labeled message, and the parameters in each subnet of the model are adjusted.
[0121] Additionally, when a ranking layer exists in the encoding subnet of the message generation model, the ranking layer can be trained separately using subtasks. Specifically, a sample attribute can be selected from the attributes of the sample description information, and the description information with the attribute of the sample attribute is determined as the specified sample description information; a labeled user sequence is determined based on the specified sample description information; through the ranking layer, each sample user is ranked according to the specified sample description information and the sample user to which the specified sample description information belongs, to obtain the user sequence to be optimized; the parameters in the ranking layer are adjusted with the goal of minimizing the difference between the user sequence to be optimized and the labeled user sequence.
[0122] In the subtask used to train the ranking layer, the sample user group, sample users, and sample description information can be directly taken from the sample user group, sample users, and sample description information used to train the entire message generation model. Similarly, the determination of the labeled user sequence can also be achieved through manual annotation.
[0123] Typically, message generation models generate messages in sentence form; in other words, a message generated by a message generation model can be a single sentence. However, in practical applications, multiple messages may be needed to reflect the complete information of each user within a user group. Therefore, during training, multiple different message generation models can be trained using different annotations, following the training methods provided in this manual. Each trained message generation model can have the same structure but different parameters. In practical applications, the same descriptive information can be input into multiple different models to obtain multiple messages that reflect the various relationships between users within a user group.
[0124] Taking Table 1 in this manual as an example, when the descriptive information in Table 1 is input into different trained message generation models, multiple different messages can be obtained depending on the annotations used when training each message generation model. For example, a message reflecting the relationship between two users, such as "Canada won one more gold medal than Mexico," might be obtained, or a message highlighting the position of one user among all users, such as "Colombia won the fewest gold medals," might be obtained. Similarly, in addition to the above messages, other annotations can be used to train the model to obtain more other messages, which will not be elaborated on here.
[0125] The above describes one or more methods for message generation in this specification. Based on the same approach, this specification also provides corresponding message generation devices, such as... Figure 3 As shown.
[0126] Figure 3 A schematic diagram of a message generation apparatus provided in this specification includes:
[0127] Module 200 retrieves description information of the business operations performed by each user in the user group;
[0128] The determination module 202 determines the attributes of each description information and the user identifier of the user to which the description information belongs. For some attributes, the description information of the attribute is included in the description information of all users performing business.
[0129] The extraction module 204 inputs each descriptive information, the attribute of each descriptive information, and the user identifier of the user to which each descriptive information belongs into a pre-trained message generation model. Through the feature extraction subnet in the message generation model, it determines the word features, attribute features, and attribution features of each descriptive information.
[0130] The fusion module 206 inputs the word features, attribute features, and attribution features of each descriptive information into the fusion subnet in the message generation model, and fuses the word features, attribute features, and attribution features of each descriptive information through the fusion subnet to determine the comprehensive features of each descriptive information;
[0131] Encoding module 208 inputs the comprehensive features of each descriptive information into the encoding subnet in the message generation model, and encodes the comprehensive features of each descriptive information through the encoding subnet to obtain encoding features. The encoding features are used to characterize the relationship between users in the user group at least.
[0132] The decoding module 210 inputs the encoded features into the decoding subnet of the message generation model, and generates messages describing the association relationships of users in the user group through the decoding subnet.
[0133] Optionally, the feature extraction subnetwork includes at least: a first extraction layer, a second extraction layer, and a third extraction layer;
[0134] The extraction module 204 is specifically used to extract word features of each description information based on the description information through the first extraction layer; extract attribute features of each description information based on the attributes of each description information through the second extraction layer; and extract the attribution features of each description information based on the user identifier of the user to which each description information belongs through the third extraction layer.
[0135] Optionally, the fused subnet includes at least: a first fused layer, a second fused layer, and a third fused layer;
[0136] The fusion module 206 is specifically used to, for each piece of descriptive information, fuse the word features, attribute features, and attribution features of the descriptive information through the first fusion layer to obtain the text features of the descriptive information; determine the logical features of the descriptive information through the second fusion layer based on the attribute features, attribution features, and the descriptive information itself; and determine the comprehensive features of the descriptive information through the third fusion layer based on the text features and logical features of the descriptive information.
[0137] Optionally, the fusion module 206 is specifically used to determine the logical features of the description information based on its numerical value, attribute characteristics, and attribution characteristics when the description information is a numeric type; and to determine the logical features of the description information as zero features when the description information is a non-numeric type.
[0138] Optionally, the fusion module 206 is specifically used to determine the first weight corresponding to the text features of the description information and the second weight corresponding to the logical features of the description information based on the description information; and to determine the comprehensive features of the description information based on the text features, logical features, first weight, and second weight.
[0139] Optionally, the encoded subnet includes: a sorting layer and an encoding layer;
[0140] The encoding module 208 is specifically configured to: select a specified attribute from the attributes of the description information; determine the description information whose attribute is the specified attribute as the specified description information; sort the users according to the specified description information and the user to which the specified description information belongs, through the sorting layer, to obtain a user sequence; determine a description information sequence according to the description information of each user and the user sequence; determine the sequence features of the description information sequence according to the description information sequence and the comprehensive features of each description information; and encode the feature sequence through the encoding layer to obtain encoded features.
[0141] Optionally, the decoding subnet includes: a decoding layer and a generation layer;
[0142] The decoding module 210 is specifically used to decode the encoded features through the decoding layer to obtain decoded features; and through the generation layer, to determine the messages describing the association relationship of users in the user group based on the decoded features.
[0143] Optionally, the decoding subnet includes: a first probability layer and a second probability layer;
[0144] The decoding module 210 is specifically used to sequentially determine the probability of obtaining the word for each placeholder in the message to be generated from the preset word library through the first probability layer, and to determine the probability of obtaining the word for the placeholder from the description information through the second probability layer; determine the word for the placeholder based on the first probability and the second probability; and determine the message describing the association relationship of users in the user group based on the words for each placeholder.
[0145] Optionally, the apparatus further includes a training module 212, specifically configured to: acquire sample description information of each sample user in the sample user group; determine the labeled message of the sample description information; for each sample description information, determine the attribute of the sample description information and the sample user to which the description information belongs; input each sample description information, the attribute of each sample description information, and the sample user to which each sample description information belongs into the message generation model to be trained; through the feature extraction subnet in the message generation model, determine the word features to be optimized, the attribute features to be optimized, and the attribution features to be optimized for each sample description information; input the word features to be optimized, the attribute features to be optimized, and the attribution features to be optimized for each sample description information into the fusion subnet in the message generation model, so as to achieve the desired result through the fusion subnet. The fusion subnet integrates the word features, attribute features, and attribution features of the description information of each sample to determine the comprehensive features to be optimized for each sample description information. These comprehensive features are then input into the encoding subnet of the message generation model to encode the comprehensive features of each sample description information, resulting in the encoded features to be optimized. The encoded features are then input into the decoding subnet of the message generation model to decode the encoded features, resulting in the decoded features to be optimized. The decoded features are then input into the generation subnet of the message generation model to generate the message to be optimized. Finally, the message generation model is trained with the optimization objective of minimizing the difference between the message to be optimized and the labeled message.
[0146] This specification also provides a computer-readable storage medium storing a computer program that can be used to execute the above-described... Figure 1 This provides a method for message generation.
[0147] This instruction manual also provides Figure 4 One of the corresponding Figure 1 A schematic diagram of the structure of an electronic device. (e.g.) Figure 4 At the hardware level, the electronic device includes a processor, internal bus, network interface, memory, and non-volatile memory, and may also include other hardware required for the business operations. The processor reads the corresponding computer program from the non-volatile memory into memory and then runs it to achieve the above-mentioned functions. Figure 1 The method for generating the message is described above. Of course, in addition to the software implementation, this specification does not exclude other implementation methods, such as logic devices or a combination of hardware and software, etc. That is to say, the execution subject of the following processing flow is not limited to each logic unit, but can also be hardware or logic devices.
[0148] In the 1990s, improvements to a technology could be clearly distinguished as either hardware improvements (e.g., improvements to the circuit structure of diodes, transistors, switches, etc.) or software improvements (improvements to the methodology). However, with technological advancements, many methodological improvements today can be considered direct improvements to the hardware circuit structure. Designers almost always obtain the corresponding hardware circuit structure by programming the improved methodology into the hardware circuit. Therefore, it cannot be said that a methodological improvement cannot be implemented using hardware physical modules. For example, a Programmable Logic Device (PLD) (such as a Field Programmable Gate Array (FPGA)) is such an integrated circuit whose logic function is determined by the user programming the device. Designers can program and "integrate" a digital system onto a PLD themselves, without needing chip manufacturers to design and manufacture dedicated integrated circuit chips. Furthermore, nowadays, instead of manually manufacturing integrated circuit chips, this programming is mostly implemented using "logic compiler" software. Similar to the software compiler used in program development, the original code before compilation must be written in a specific programming language, called a Hardware Description Language (HDL). There are many HDLs, such as ABEL (Advanced Boolean Expression Language), AHDL (Altera Hardware Description Language), Confluence, CUPL (Cornell University Programming Language), HDCal, JHDL (Java Hardware Description Language), Lava, Lola, MyHDL, PALASM, and RHDL (Ruby Hardware Description Language). Currently, the most commonly used are VHDL (Very-High-Speed Integrated Circuit Hardware Description Language) and Verilog. Those skilled in the art should understand that by simply performing some logic programming on the method flow using one of these hardware description languages and programming it into an integrated circuit, the hardware circuit implementing the logical method flow can be easily obtained.
[0149] The controller can be implemented in any suitable manner. For example, it can take the form of a microprocessor or processor and a computer-readable medium storing computer-readable program code (e.g., software or firmware) executable by the (micro)processor, logic gates, switches, application-specific integrated circuits (ASICs), programmable logic controllers, and embedded microcontrollers. Examples of controllers include, but are not limited to, the following microcontrollers: ARC625D, Atmel AT91SAM, Microchip PIC18F26K20, and Silicon Labs C8051F320. A memory controller can also be implemented as part of the control logic of the memory. Those skilled in the art will also recognize that, in addition to implementing the controller in purely computer-readable program code form, the same functionality can be achieved by logically programming the method steps to make the controller take the form of logic gates, switches, ASICs, programmable logic controllers, and embedded microcontrollers. Therefore, such a controller can be considered a hardware component, and the means included therein for implementing various functions can also be considered as structures within the hardware component. Alternatively, the means for implementing various functions can be considered as both software modules implementing the method and structures within the hardware component.
[0150] The systems, devices, modules, or units described in the above embodiments can be implemented by computer chips or entities, or by products with certain functions. A typical implementation device is a computer. Specifically, a computer can be, for example, a personal computer, laptop computer, cellular phone, camera phone, smartphone, personal digital assistant, media player, navigation device, email device, game console, tablet computer, wearable device, or any combination of these devices.
[0151] For ease of description, the above devices are described in terms of function, divided into various units. Of course, in implementing this specification, the functions of each unit can be implemented in one or more software and / or hardware components.
[0152] Those skilled in the art will understand that embodiments of this specification can be provided as methods, systems, or computer program products. Therefore, this specification may take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, this specification may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0153] This specification is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of this specification. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create a machine for implementing the flowchart illustrations and / or block diagrams. Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.
[0154] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.
[0155] These computer program instructions may also be loaded onto a computer or other programmable data processing equipment to cause a series of operational steps to be performed on the computer or other programmable equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.
[0156] In a typical configuration, a computing device includes one or more processors (CPU), input / output interfaces, network interfaces, and memory.
[0157] Memory may include non-persistent storage in computer-readable media, such as random access memory (RAM) and / or non-volatile memory, such as read-only memory (ROM) or flash RAM. Memory is an example of computer-readable media.
[0158] Computer-readable media includes both permanent and non-permanent, removable and non-removable media that can store information using any method or technology. Information can be computer-readable instructions, data structures, modules of programs, or other data. Examples of computer storage media include, but are not limited to, phase-change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technologies, CD-ROM, digital versatile optical disc (DVD) or other optical storage, magnetic tape, magnetic magnetic disk storage or other magnetic storage devices, or any other non-transferable medium that can be used to store information accessible by a computing device. As defined herein, computer-readable media does not include transient computer-readable media, such as modulated data signals and carrier waves.
[0159] It should also be noted that the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes said element.
[0160] Those skilled in the art will understand that the embodiments of this specification can be provided as methods, systems, or computer program products. Therefore, this specification may take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, this specification may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0161] This specification can be described in the general context of computer-executable instructions that are executed by a computer, such as program modules. Generally, program modules include routines, programs, users, components, data structures, etc., that perform a specific task or implement a specific abstract data type. This specification can also be practiced in distributed computing environments, where tasks are performed by remote processing devices connected via a communication network. In distributed computing environments, program modules can reside in local and remote computer storage media, including storage devices.
[0162] The various embodiments in this specification are described in a progressive manner. Similar or identical parts between embodiments can be referred to mutually. Each embodiment focuses on describing the differences from other embodiments. In particular, the system embodiments are basically similar to the method embodiments, so the description is relatively simple; relevant parts can be referred to the descriptions in the method embodiments.
[0163] The above description is merely an embodiment of this specification and is not intended to limit this specification. Various modifications and variations can be made to this specification by those skilled in the art. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of this specification should be included within the scope of the claims of this specification.
Claims
1. A method for generating a message, comprising: Obtain descriptive information about the business operations performed by each user in the user group; For each description, determine the attributes of the description and the user identifier of the user to which the description belongs. For some attributes, the description information of the attribute is included in the description information of all users performing business. Each descriptive information, its attributes, and the user identifier of the user to which each descriptive information belongs are input into a pre-trained message generation model. The word features, attribute features, and attribution features of each descriptive information are determined through the feature extraction subnet in the message generation model. The word features, attribute features, and attribution features of each descriptive information are input into the fusion subnet of the message generation model. The word features, attribute features, and attribution features of each descriptive information are fused through the fusion subnet to determine the comprehensive features of each descriptive information. The comprehensive features of each descriptive information are input into the encoding subnet of the message generation model. The comprehensive features of each descriptive information are encoded through the encoding subnet to obtain encoded features. The encoded features are at least used to characterize the relationship between users in the user group. The encoded features are input into the decoding subnet of the message generation model, and a message describing the relationship between users in the user group is generated through the decoding subnet.
2. The method of claim 1, wherein the feature extraction subnetwork comprises at least: First extraction layer, second extraction layer, third extraction layer; The feature extraction subnet in the message generation model is used to determine the word features, attribute features, and attribution features of each descriptive information, respectively, specifically including: The first extraction layer extracts word features from each descriptive information based on the descriptive information. The second extraction layer extracts the attribute features of each descriptive information based on its attributes. The third extraction layer extracts the attribution features of each descriptive information based on the user identifier of the user to whom each descriptive information belongs.
3. The method of claim 1, wherein the fusion subnet comprises at least: First fusion layer, second fusion layer, third fusion layer; The word features, attribute features, and attribution features of each descriptive information are fused through the fusion subnet to determine the comprehensive features of each descriptive information, specifically including: For each descriptive information, the word features, attribute features, and attribution features of the descriptive information are fused through the first fusion layer to obtain the text features of the descriptive information; The second fusion layer determines the logical features of the description information based on its attribute features, attribution features, and description information itself. The third fusion layer determines the comprehensive features of the descriptive information based on its textual and logical features.
4. The method as described in claim 3, wherein determining the logical features of the descriptive information based on its attribute features, attribution features, and the descriptive information itself, specifically includes: When the description information is a numeric type, the logical characteristics of the description information are determined based on its numerical value, attribute characteristics, and attribution characteristics. When the description information is a non-numeric type, the logical characteristic of the description information is zero.
5. The method as described in claim 3, wherein determining the comprehensive features of the descriptive information based on its textual and logical features specifically includes: Based on the description information, determine the first weight corresponding to the text features of the description information and the second weight corresponding to the logical features of the description information; Based on the textual features, logical features, first weight, and second weight of the descriptive information, the comprehensive features of the descriptive information are determined.
6. The method of claim 1, wherein the coded subnet comprises: Sorting layer, encoding layer; The comprehensive features of each descriptive information are encoded through the encoding subnet to obtain encoded features, specifically including: Select a specified attribute from the attributes of the description information, and determine the description information with the specified attribute as the specified description information; Through the sorting layer, users are sorted according to the specified description information and the user to which the specified description information belongs, to obtain a user sequence; Based on the description information of each user and the user sequence, determine the description information sequence; Based on the sequence of description information and the comprehensive characteristics of each description information, the sequence characteristics of the description information sequence are determined; The sequence features are encoded by the coding layer to obtain the encoded features.
7. The method of claim 1, wherein the decoding subnet comprises: Decoding layer, generation layer; Generating messages describing the relationships between users in the user group through the decoding subnet specifically includes: The encoded features are decoded by the decoding layer to obtain the decoded features; The generation layer determines, based on the decoding features, the messages describing the relationships between users in the user group.
8. The method of claim 1, wherein the decoding subnet comprises: First probability layer, second probability layer; The messages used to determine the relationships between users in the user group through the decoding subnet specifically include: For each placeholder in the message to be generated, the probability of obtaining the word for that placeholder from the preset word library is determined by the first probability layer, and the probability of obtaining the word for that placeholder from the description information is determined by the second probability layer. The word that occupies the space is determined based on the first probability and the second probability; Based on the placeholder words, determine the messages describing the relationships between users in the user group.
9. The method as described in claim 1, wherein pre-training the message generation model specifically includes: Obtain sample description information for each sample user in the sample user group; Determine the annotation message for the sample description information; For each sample description, determine the attributes of that sample description and the sample user to whom that description belongs; The description information of each sample, the attributes of each sample description information, and the sample user to which each sample description information belongs are input into the message generation model to be trained. Through the feature extraction subnet in the message generation model, the word features to be optimized, the attribute features to be optimized, and the attribution features to be optimized of each sample description information are determined respectively. The word features, attribute features, and attribution features of each sample description information to be optimized are input into the fusion subnet of the message generation model, so as to fuse the word features, attribute features, and attribution features of each sample description information through the fusion subnet and determine the comprehensive features to be optimized for each sample description information. The comprehensive features to be optimized of the description information of each sample are input into the encoding subnet of the message generation model. The comprehensive features to be optimized of the description information of each sample are encoded through the encoding subnet to obtain the encoding features to be optimized. The coding feature to be optimized is input into the decoding subnet of the message generation model, and the coding feature to be optimized is decoded through the decoding subnet to obtain the decoding feature to be optimized. The decoding features to be optimized are input into the generation subnet of the message generation model, and the message to be optimized is generated through the generation subnet. The message generation model is trained with the goal of minimizing the difference between the message to be optimized and the labeled message.
10. A message generation apparatus, comprising: The acquisition module retrieves descriptive information about the business processes performed by each user in the user group. The determination module determines the attributes of each description and the user identifier of the user to which the description belongs. For some attributes, the description information of all users performing business includes the description information of that attribute. The extraction module inputs each descriptive information, the attribute of each descriptive information, and the user identifier of the user to which each descriptive information belongs into a pre-trained message generation model. Through the feature extraction subnet in the message generation model, the word features, attribute features, and attribution features of each descriptive information are determined respectively. The fusion module inputs the word features, attribute features, and attribution features of each descriptive information into the fusion subnet of the message generation model, and fuses the word features, attribute features, and attribution features of each descriptive information through the fusion subnet to determine the comprehensive features of each descriptive information; The encoding module inputs the comprehensive features of each descriptive information into the encoding subnet in the message generation model, and encodes the comprehensive features of each descriptive information through the encoding subnet to obtain encoded features. The encoded features are at least used to characterize the association relationship between users in the user group. The decoding module inputs the encoded features into the decoding subnet of the message generation model, and generates a message describing the relationship between users in the user group through the decoding subnet.
11. A computer-readable storage medium storing a computer program that, when executed by a processor, implements the method described in any one of claims 1 to 9.
12. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the program to implement the method described in any one of claims 1 to 9.
Citation Information
Patent Citations
User relation recognition method and device
CN108280115A
Anti-fraud identification method and device based on big data and related equipment
CN114861746A