CN115422928A - Message generation method and device, storage medium and electronic equipment - Google Patents

Message generation method and device, storage medium and electronic equipment Download PDF

Info

Publication number
CN115422928A
CN115422928A CN202210995438.2A CN202210995438A CN115422928A CN 115422928 A CN115422928 A CN 115422928A CN 202210995438 A CN202210995438 A CN 202210995438A CN 115422928 A CN115422928 A CN 115422928A
Authority
CN
China
Prior art keywords
description information
attribute
subnet
user
coding
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202210995438.2A
Other languages
Chinese (zh)
Inventor
李怀松
黄涛
张天翼
贾娟
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Alipay Hangzhou Information Technology Co Ltd
Original Assignee
Alipay Hangzhou 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 Alipay Hangzhou Information Technology Co Ltd filed Critical Alipay Hangzhou Information Technology Co Ltd
Priority to CN202210995438.2A priority Critical patent/CN115422928A/en
Publication of CN115422928A publication Critical patent/CN115422928A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F40/00Handling natural language data
    • G06F40/20Natural language analysis
    • G06F40/279Recognition of textual entities
    • G06F40/289Phrasal analysis, e.g. finite state techniques or chunking
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/04Architecture, e.g. interconnection topology
    • G06N3/049Temporal neural networks, e.g. delay elements, oscillating neurons or pulsed inputs
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/08Learning methods

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Health & Medical Sciences (AREA)
  • Health & Medical Sciences (AREA)
  • Artificial Intelligence (AREA)
  • General Physics & Mathematics (AREA)
  • Computational Linguistics (AREA)
  • General Engineering & Computer Science (AREA)
  • Biomedical Technology (AREA)
  • Evolutionary Computation (AREA)
  • Molecular Biology (AREA)
  • Computing Systems (AREA)
  • Data Mining & Analysis (AREA)
  • Biophysics (AREA)
  • Mathematical Physics (AREA)
  • Software Systems (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Audiology, Speech & Language Pathology (AREA)
  • Information Transfer Between Computers (AREA)

Abstract

The specification provides a message generation method, a message generation device, a storage medium and electronic equipment. In the message generation method provided in this specification, after the description information of each user in a user group is acquired, the attribute of each description information and the user to which the description information belongs are determined; inputting the description information into a message generation model, and respectively determining word characteristics, attribute characteristics and attribution characteristics of the description information through different subnets in the model; determining comprehensive characteristics of the description information according to the determined word characteristics, attribute characteristics and attribution characteristics; and coding the comprehensive characteristics of the description information to obtain coding characteristics, and finally generating a message according to the coding characteristics. When the message is generated by using the message generation method provided by the present specification, based on the meaning of the description information itself, the logical relationship between users in the user group is additionally considered according to the attribute of the description information and the belonging user, and finally, a message capable of reflecting the association relationship between users in the user group is generated.

Description

Message generation method and device, storage medium and electronic equipment
Technical Field
The present disclosure relates to the field of computer technologies, and in particular, to a method and an apparatus for generating a message, a storage medium, and an electronic device.
Background
When executing many services, messages need to be generated for users involved in the services according to the data of the services, wherein the users involved in the services refer to the persons participating in the services. Generally, the message can be used for simply and objectively describing information related to the user in the service, so that the service can be correspondingly evaluated or processed according to the message in a subsequent process.
At present, most methods are not beneficial to protecting user privacy data when generating messages. In general, a set of a plurality of users involved in the same service is regarded as a user group, or a set of a plurality of users involved in different related services and having an association relationship is regarded as a user group. When messages need to be generated for a plurality of users in a user group, the messages generated by the existing method only describe the characteristics of each user individually according to data.
Therefore, the present specification provides a new message generation method.
Disclosure of Invention
The present specification provides a message generation method and a message generation apparatus, which partially solve the above problems in the prior art.
The technical scheme adopted by the specification is as follows:
this specification provides a method for generating a packet, including:
acquiring description information of service executed by each user in a user group;
determining the attribute of the description information and the user identification of the user to which the description information belongs aiming at each description information, wherein the description information of all the users for executing the service comprises the description information of the attribute aiming at partial attribute;
inputting each description information, the attribute of each description information and the user identification of the user to which each description information belongs into a pre-trained message generation model, and respectively determining the word characteristic of each description information, the attribute characteristic of each description information and the attribution characteristic of each description information through a characteristic extraction subnet in the message generation model;
inputting the word characteristics, the attribute characteristics and the attribution characteristics of the description information into a fusion subnet in the message generation model, fusing the word characteristics, the attribute characteristics and the attribution characteristics of the description information through the fusion subnet, and determining the comprehensive characteristics of the description information;
inputting the comprehensive characteristics of the description information into a coding subnet in the message generation model, and coding the comprehensive characteristics of the description information through the coding subnet to obtain coding characteristics, wherein the coding characteristics are at least used for representing the incidence relation among the users in the user group;
and inputting the coding characteristics into a decoding subnet in the message generation model, and generating a message describing the association relationship of the users in the user group through the decoding subnet.
Optionally, the feature extraction sub-network at least comprises: a first extraction layer, a second extraction layer and a third extraction layer;
respectively determining the word characteristics of each description information, the attribute characteristics of each description information and the attribution characteristics of each description information by extracting a subnet according to the characteristics in the message generation model, and specifically comprising the following steps:
extracting word features of the description information according to the description information through the first extraction layer;
extracting attribute features of the description information according to the attributes of the description information through the second extraction layer;
and extracting attribution characteristics of the description information according to the user identification of the user to which the description information belongs through the third extraction layer.
Optionally, the converged subnet at least includes: the first fusion layer, the second fusion layer and the third fusion layer;
fusing the word characteristics, the attribute characteristics and the attribution characteristics of the description information through the fusion subnet, and determining the comprehensive characteristics of the description information, which specifically comprises the following steps:
for each description information, the word characteristics, the attribute characteristics and the attribution characteristics of the description information are fused through the first fusion layer to obtain the text characteristics of the description information;
determining the logic characteristics of the description information according to the attribute characteristics, the attribution characteristics and the description information of the description information through the second fusion layer;
and determining the comprehensive characteristics of the description information according to the text characteristics and the logic characteristics of the description information through the third fusion layer.
Optionally, determining the logical characteristic of the description information according to the attribute characteristic, the attribution characteristic of the description information and the description information specifically includes:
when the description information is digital type description information, determining the logic characteristics of the description information according to the numerical value, the attribute characteristics and the attribution characteristics of the description information;
when the description information is the non-number type description information, the logic characteristic of the description information is the zero characteristic.
Optionally, determining the comprehensive characteristics of the description information according to the text characteristics and the logic characteristics of the description information specifically includes:
determining a first weight corresponding to the text characteristic of the description information and a second weight corresponding to the logic characteristic of the description information according to the description information;
and determining the comprehensive characteristics of the description information according to the text characteristics and the logic characteristics of the description information and the first weight and the second weight.
Optionally, the encoding subnet comprises: a sorting layer and a coding layer;
coding the comprehensive characteristics of each description information through the coding subnet to obtain coding characteristics, which specifically comprises the following steps:
selecting a specified attribute from the attributes of the description information, and determining the description information with the attribute as the specified description information;
sequencing all users through the sequencing layer according to the specified description information and the users to which the specified description information belongs to obtain a user sequence;
determining a description information sequence according to the description information of each user and the user sequence;
determining the sequence characteristics of the description information sequence according to the description information sequence and the comprehensive characteristics of the description information;
and coding the characteristic sequence through the coding layer to obtain coding characteristics.
Optionally, the decoding subnet comprises: a decoding layer and a generating layer;
generating a message describing the association relationship of the users in the user group through the decoding subnet, which specifically includes:
decoding the coding characteristics through the decoding layer to obtain decoding characteristics;
and determining a message describing the association relationship of the users in the user group according to the decoding characteristics through the generation layer.
Optionally, the decoding subnet comprises: a first probability layer and a second probability layer;
determining the message of each user relationship in the user group through the decoding subnet specifically includes:
sequentially aiming at each occupation in the message to be generated, determining the probability of acquiring the occupied word from a preset word library through the first probability layer, and determining the probability of acquiring the occupied word from the description information through the second probability layer;
determining the occupied words according to the first probability and the second probability;
and determining a message describing the association relationship of the users in the user group according to each occupied word.
Optionally, the training the packet generation model in advance specifically includes:
acquiring sample description information of each sample user in a sample user group;
determining a marking message of the sample description information;
for each sample description information, determining the attribute of the sample description information and a sample user to which the description information belongs;
inputting each sample description information, each sample description information attribute, each sample description information sample user into a message generation model to be trained, and respectively determining each sample description information word feature to be optimized, each sample description information attribute feature to be optimized and each sample description information attribute feature to be optimized through a feature extraction subnet in the message generation model;
inputting the word feature to be optimized, the attribute feature to be optimized and the attribution feature to be optimized of each sample description information into a fusion subnet in the message generation model, so as to fuse the word feature to be optimized, the attribute feature to be optimized and the attribution feature to be optimized of each sample description information through the fusion subnet, and determine the comprehensive feature to be optimized of each sample description information;
inputting the comprehensive features to be optimized of the sample description information into a coding subnet in the message generation model, and coding the comprehensive features to be optimized of the sample description information through the coding subnet to obtain the coding features to be optimized;
inputting the coding features to be optimized into a decoding subnet in the message generation model, and decoding the coding features to be optimized through the decoding subnet to obtain the decoding features to be optimized;
inputting the decoding characteristics to be optimized into a generation subnet in the message generation model, and generating a message to be optimized through the generation subnet;
and training the message generation model by taking the minimum difference between the message to be optimized and the labeled message as an optimization target.
This specification provides a message generating apparatus, including:
the acquisition module is used for acquiring the description information of the service executed by each user in the user group;
the determining module is used for determining the attribute of the description information and the user identification of the user to which the description information belongs aiming at each piece of description information, wherein the description information of all user execution services contains the description information of the attribute aiming at part of the attribute;
the extraction module is used for inputting the description information, the attribute of the description information and the user identification of the user to which the description information belongs into a pre-trained message generation model, extracting a sub-network through the characteristics in the message generation model, and respectively determining the word characteristics of the description information, the attribute characteristics of the description information and the attribution characteristics of the description information;
the fusion module is used for inputting the word characteristics, the attribute characteristics and the attribution characteristics of the description information into a fusion subnet in the message generation model, fusing the word characteristics, the attribute characteristics and the attribution characteristics of the description information through the fusion subnet and determining the comprehensive characteristics of the description information;
the coding module is used for inputting the comprehensive characteristics of the description information into a coding subnet in the message generation model, coding the comprehensive characteristics of the description information through the coding subnet to obtain coding characteristics, wherein the coding characteristics are at least used for representing the incidence relation among the users in the user group;
and the decoding module is used for inputting the coding characteristics into a decoding subnet in the message generation model and generating a message describing the association relationship of the users in the user group through the decoding subnet.
The present specification provides a computer-readable storage medium storing a computer program which, when executed by a processor, implements the above-described message generation method.
The present specification provides an electronic device, which includes a memory, a processor, and a computer program stored in the memory and executable on the processor, and when the processor executes the computer program, the processor implements the message generation method.
The technical scheme adopted by the specification can achieve the following beneficial effects:
in the message generation method provided in this specification, after the description information of each user in the user group is obtained, the attribute of each description information and the user to which it belongs are determined; inputting the description information into a message generation model, and respectively determining word characteristics, attribute characteristics and attribution characteristics of the description information through different subnets in the model; determining comprehensive characteristics of the description information according to the determined word characteristics, attribute characteristics and attribution characteristics; and coding the comprehensive characteristics of the description information to obtain coding characteristics, and finally generating a message according to the coding characteristics. When the message is generated by using the message generation method provided by the present specification, based on the meaning of the description information itself, the logical relationship between users in the user group is additionally considered according to the attribute of the description information and the belonging user, and finally, a message capable of reflecting the association relationship between users in the user group is generated.
Drawings
The accompanying drawings, which are included to provide a further understanding of the specification and are incorporated in and constitute a part of this specification, illustrate embodiments of the specification and together with the description serve to explain the specification and not to limit the specification in a non-limiting sense. In the drawings:
fig. 1 is a schematic flow chart of a message generation method provided in this specification;
fig. 2 is a schematic structural diagram of a message generation model provided in this specification;
fig. 3 is a schematic diagram of a message generation apparatus provided in this specification;
fig. 4 is a schematic diagram of an electronic device corresponding to fig. 1 provided in this specification.
Detailed Description
To make the objects, technical solutions and advantages of the present specification clearer and more complete, the technical solutions of the present specification will be described in detail and completely with reference to the specific embodiments of the present specification and the accompanying drawings. It is to be understood that the embodiments described are only a few embodiments of the present disclosure, and not all embodiments. All other embodiments obtained by a person of ordinary skill in the art based on the embodiments in the present specification without any creative effort belong to the protection scope of the present specification.
The technical solutions provided by the embodiments of the present description are described in detail below with reference to the accompanying drawings.
Fig. 1 is a schematic flowchart of a method for generating a packet provided in this specification, and includes the following steps:
s100: and obtaining the description information of the service executed by each user in the user group.
In this specification, an execution subject for implementing the message generation method may refer to a designated device such as a server and a terminal, which is installed on a service platform, and for convenience of description, the present specification only takes the server as the execution subject to illustrate a message generation method provided in the present specification.
When generating a message for a user group, description information of the user group for each user in executing a service may be obtained first. Wherein, the user can be a person participating in the service; the user group may be a set of multiple users involved in one service or a set of multiple related users involved in different related services, and the description information may be information describing various aspects related to the service for each user in the user group.
For example, in a sports game, a message is generated for the number of medals obtained in each sports by each country. At this time, the user group may be a set of countries, and each user in the user group may be each country; data describing text type of information, such as "china" and "usa" representing information of country names, or "badminton", "diving" and the like representing information of sports items, may also be data of numeric type, such as "5", "8", "11" and the like representing information of number of medals. In addition to the above examples, there are also examples of message generation of scores of statistical students in an examination, message generation for group-partner crime in the anti-money laundering field, and the like, and this description is not repeated here.
S102: and for each piece of description information, determining the attribute of the description information and the user identification of the user to which the description information belongs, wherein for part of the attributes, the description information of all the users for executing the service comprises the description information of the attribute.
In this step, the obtained description information of the user group may be sorted, and the attribute of each description information and the user identifier of the user to which each description information belongs may be determined. The attribute of the description information represents the category of the content represented by the description information; the user identification is used for confirming the identity of the user, each user has different and unique user identification in one message generation, and the user described by the description information is the user to which the description information belongs. In general, users in a user group are users who execute the same service or related users who execute related different services, and therefore, description information of services executed by different users may include description information with the same part of attributes. For example, in the example of step S100, the description information of each user executing the service includes description information with an attribute of "country name", that is, description information including the same attribute. In different specific application scenarios, the attribute of the description information and the user to which the description information belongs may be different. Continuing with the example in step S100, in a scenario where a message is generated for the number of medals obtained in each movement of each country, the attributes of the description information may include attributes such as a country name, a project name, a gold medal number, a silver medal number, and a bronze medal number, and the user to which the description information belongs may be generally represented in the form of user a, user B, user C, or user 1, user 2, user 3, and the like.
Name of country Number of gold medals Number of silver cards Number of copper plate Name of item
User A Canada 3 1 2 Baseball
User B Mexico (Mexico) 2 3 1 Baseball
User C Columbia 1 3 0 Baseball
TABLE 1
For convenience of representation, the determined attribute of each piece of description information and the user to which the piece of description information belongs may be represented in a table form. Specifically, as shown in table 1, the number of medals obtained in the baseball game in three countries is exemplarily given in table 1. The first row is a plurality of different attributes, and the first column is a plurality of different users. The attribute of the description information "canada", "mexico", "columbia" is a country name, the attribute of "baseball" is an item name, and the attribute of each number is "gold number", "silver number", "bronze number", and the like. Meanwhile, the description information "canada", "3", "1", "2", "baseball" belongs to the user a; the descriptive information "mexican", "2", "3", "1", "baseball" belongs to the user B; the descriptive information "columbia", "1", "3", "0", "baseball" belongs to the user C. It should be noted that the description information having the same content is not necessarily the same description information. For the description information with the same content, the attribute of the description information and the user to which the description information belongs may be different, for example, in the above table, the description information "3" belonging to the user a and the description information "3" belonging to the user B have the same content, both are "3", but both belong to different users, and the description information "3" belonging to the user a represents the number of gold cards, the description information "3" belonging to the user B represents the number of silver cards, and both are not the same description information.
It is to be noted that, in table 1, for convenience of the following description and for clarity of the description, description information under the attribute "item name" is all description information "baseball" of the same content. It is understood that in practical applications, there may be various other contents described information under the attribute "item name", such as "tennis", "diving", etc.
S104: inputting each description information, the attribute of each description information and the user identification of the user to which each description information belongs into a pre-trained message generation model, and respectively determining the word feature of each description information, the attribute feature of each description information and the attribution feature of each description information through a feature extraction subnet in the message generation model.
In this step, the attributes of the description information, the user to which the description information belongs, and the description information themselves determined in step S102 may be input into a message generation model that has been trained in advance, so as to generate a message. Additionally, each description information, the attribute of each description information, and the user to which each description information belongs may be input into the message generation model in the form of the table illustrated in step S102.
The structure of the message generation model adopted in the message generation method provided by the present specification can be as shown in fig. 2, wherein the model can include a feature extraction subnet, a fusion subnet, an encoding subnet, and a decoding subnet; the message generation model may exist on any electronic device with a computing function, and is described in the specification by taking a server as an example.
And inputting the description information, the attribute of the description information and the user identification of the user to which the description information belongs into a feature extraction subnet in the model, wherein the feature extraction subnet can respectively extract word features, attribute features and attribution features of the description information. The word characteristics used for representing the meaning of the description information can be extracted according to the content of the description information; extracting attribute features for representing the category of the content of the description information according to the attributes of the description information; and according to the user identification of the user to which the description information belongs, the attribution characteristics of the user to which the representation description information belongs can be extracted.
For two pieces of description information with the same content, the extracted word features of the two pieces of description information can be the same; for two pieces of description information with the same attribute, the extracted attribute characteristics of the two pieces of description information can be the same; for the description information that the users belong to the same, the extracted attribution characteristics of the users and the extracted attribution characteristics of the users can be the same. Still taking the description information in table 1 as an example, for the description information in the third column of the second row and the description information in the fourth column of the third row in table 1, the contents of both are "3", and then the word features of both may be the same; for all the description information in any column except the header (first row and first column) in table 1, the attributes of the description information are the same, and the attribute characteristics of the description information may be all the same; similarly, for all the descriptors in any row of table 1 except the header, the users to which the descriptors belong may be the same, and the attribution characteristics of the descriptors may be the same.
The word feature, the attribute feature and the attribution feature can be extracted through different network layers in the feature extraction sub-network respectively. As shown in fig. 2, the feature extraction subnet specifically includes at least: a first extraction layer, a second extraction layer and a third extraction layer; the word features of the description information can be extracted through the first extraction layer according to the description information; extracting attribute features of the description information according to the attributes of the description information through the second extraction layer; and extracting attribution characteristics of the description information according to the user identification of the user to which the description information belongs through the third extraction layer.
When extracting each feature, the first extraction layer, the second extraction layer and the third extraction layer may adopt different networks, or may adopt the same structure and networks with different parameters to extract the feature, such as a Long-Short Term Memory (LSTM) network or a transform network; the dimensions of the features extracted by each extraction layer may be the same.
Preferably, when the description information is recorded in a table manner, before the description information is input into the message generation model, the description information in the table may be sorted and sequenced from left to right and from top to bottom in the generated table, and the description information may be input into the message generation model in a sequence manner, so that the message generation model can receive clearer description information, reduce the retrieval amount and calculation amount of the device, and make the device perform processing faster.
S106: and inputting the word characteristics, the attribute characteristics and the attribution characteristics of the description information into a fusion subnet in the message generation model, and fusing the word characteristics, the attribute characteristics and the attribution characteristics of the description information through the fusion subnet to determine the comprehensive characteristics of the description information.
In this step, the word feature, the attribute feature, and the attribution feature of each description information obtained in step S104 may be input into the fused subnet in the model to obtain the comprehensive feature of each description information. As shown in fig. 2, the converged subnet may specifically include at least: the first fusion layer, the second fusion layer and the third fusion layer; the word features, the attribute features and the attribution features of the description information can be fused through the first fusion layer aiming at each description information to obtain the text features of the description information; determining the logic characteristic of the description information according to the attribute characteristic, the attribution characteristic and the description information of the description information through the second fusion layer; and determining the comprehensive characteristics of the description information according to the text characteristics and the logic characteristics of the description information through the third fusion layer.
Through the first layer of the fusion subnet, the word characteristics, the attribute characteristics and the attribution characteristics of the description information can be fused aiming at each description information, and the text characteristics used for representing the contents of the description information which should be presented in the message are obtained. The method for fusing the word features, the attribute features and the attribution features may be to add the word features, the attribute features and the attribution features to obtain text features. By fusing the second layer of the subnet, the logical characteristics of the description information can be determined according to the content of the description information per se, the attribute characteristics and the attribution characteristics of the description information, wherein the logical characteristics are used for representing the logical relationship of the description information which belongs to different users and has the same attribute. In determining the logical characteristics, the logical characteristics of the descriptive information may be determined according to a data type of the descriptive information. Specifically, when the description information is digital type description information, the logic characteristics of the description information can be determined according to the numerical value, the attribute characteristics and the attribution characteristics of the description information; when the description information is the non-number type description information, the logic characteristic of the description information is the zero characteristic.
When the description information is a digital type, the logical characteristics of the description information can be determined according to the description information itself, the attribute characteristics, and the attribution characteristics according to the following formula.
E L =M×E P +E C
Wherein E L Representing a logical characteristic, E P Representing attribute features, E C Denotes the attribution attribute, and M denotes the value of the number type description information itself. In the scheme, in addition to extracting word features capable of representing the original content of the description information, the meaning that the content of the description information should present in the environment of the user group is additionally considered in the process of processing the content of the description information. Taking the data in Table 1 as an example, the third column in Table 1 describes the attributes of the informationThe attribute is "gold medal quantity", that is, the attribute characteristic of the third column description information is the attribute characteristic E for characterizing "gold medal P1 . Similarly, the user to which the second line of description information belongs is user a, that is, the attribution feature of the second line of description information should be attribution feature E characterizing "user a C1 . At this time, the logical feature of the descriptor "3" of the second row and the third column may be E L1 =3×E P1 +E C1
When the description information is the non-digital type description information, no logical relationship exists between the description information of the same attribute for different users, so that the zero feature can be directly used as the logical feature of the description information for the non-digital type description information.
After the text feature and the logic feature of one description information are determined, the text feature and the logic feature of the description information can be added to obtain the comprehensive feature of the description information.
Additionally, for the description information with different attributes, the importance degree of the logical characteristic and the text characteristic of the description information in generating the message may not be the same. Therefore, before the text feature and the logic feature of the description information are fused into the comprehensive feature, a first weight and a second weight can be respectively set for the text feature and the logic feature of the description information, wherein the first weight corresponds to the text feature, and the second weight corresponds to the logic feature. The first weight and the second weight may be changed according to the attribute of the description information, and the values of the first weight and the second weight may be the same or different.
Specifically, a first weight corresponding to a text feature of the description information and a second weight corresponding to a logic feature of the description information may be determined according to the description information; and determining the comprehensive characteristics of the description information according to the text characteristics and the logic characteristics of the description information and the first weight and the second weight. The comprehensive characteristics of the description information can be determined according to the text characteristics, the logic characteristics, the first weight and the second weight of the description information according to the following formula:
E C =W 1 ×E T +W 2 ×E L
wherein, E C Representing an integrated feature of the description, E T Text features representing descriptive information, E L Representing a logical characteristic describing the information; w 1 Representing a first weight, W, corresponding to a feature of the text 2 A second weight corresponding to the logical characteristic is represented.
It is worth mentioning that in the fusion subnet of the message generation model adopted in the scheme, a weighting layer may additionally exist to realize the determination of the first weight and the second weight and the determination of the comprehensive characteristics, and the determination modes of the first weight and the second weight can be changed by adjusting the parameters of the weighting layer in the model during the model training.
S108: and inputting the comprehensive characteristics of the description information into a coding subnet in the message generation model, and coding the comprehensive characteristics of the description information through the coding subnet to obtain coding characteristics, wherein the coding characteristics are at least used for representing the incidence relation among the users in the user group.
In general, in order to generate a message with better effect, when a message is generated according to the comprehensive characteristics of each description information, the comprehensive characteristics of each description information dispersed by an encoder are firstly converted into coding characteristics to generate a better message. In the process of coding the comprehensive characteristics of the description information, the information of each user can be completely fused into the finally obtained coding characteristics, so that the coding characteristics can additionally contain the association relationship among the users, and a message capable of reflecting the association relationship among the users can be generated according to the coding characteristics.
Specifically, the generating the subnet includes: a coding subnet, a decoding layer and a generating layer; coding the comprehensive characteristics of the description information through the coding sub-network to obtain coding characteristics; decoding the coding characteristics through the decoding layer to obtain decoding characteristics; and generating a message according to the decoding characteristics through the generation layer.
Preferably, before the coding subnet codes the comprehensive features of each description information, the comprehensive features of each description information can be logically ordered according to the requirement of generating the message. Specifically, the encoding subnet includes: a sorting layer and a coding layer; selecting a specified attribute from the attributes of the description information, and determining the description information with the attribute as the specified description information; sequencing all users through the sequencing layer according to the specified description information and the users to which the specified description information belongs to obtain a user sequence; determining a description information sequence according to the description information of each user and the user sequence; determining the sequence characteristics of the description information sequence according to the description information sequence and the comprehensive characteristics of the description information; and coding the characteristic sequence through the coding layer to obtain coding characteristics.
When sequencing is performed, the specified attribute can be selected from the attributes of the description information according to specific requirements, the description information with the attribute being the specified attribute is used as the specified description information, and the users to which the specified description information belongs are sequenced according to the content of the specified description information, so that a user sequence is obtained. Meanwhile, for each user, the description information belonging to the user can be combined into a single information sequence of the user according to a preset mode. And sequencing the single information sequence of each user according to the sequence of the user sequence, namely, putting the single information sequence of each user in the user sequence to form a description information sequence. Subsequently, at the position of each description information of the description information sequence, the comprehensive characteristics of the description information are put in, and the sequence characteristics of the description information sequence can be obtained.
Taking the description information in table 1 as an example, it is assumed that the comprehensive characteristics corresponding to the description information "canada", "3", "1", "2", and "baseball" corresponding to the user a are "a" respectively 1 ”、“A 2 ”、“A 3 ”、“A 4 ”、“A 5 ", the attributes at the head of the table in table 1 are sorted from left to right to obtain the single characteristic [ A ] of the user A 1 A 2 A 3 A 4 A 5 ]. In the same way, a single feature of user B [ B ] can be obtained 1 B 2 B 3 B 4 B 5 ]Single feature of user C [ C 1 C 2 C 3 C 4 C 5 ]. Meanwhile, a designated attribute may be selected from the attributes, and in this embodiment, the attribute "gold medal number" is selected, so that the description information "3", "2" and "1" with the attribute "gold medal number" are designated description information, and according to the sequence of the contents of the designated description information from small to large, the user sequence [ user C, user B, user a ] may be obtained]According to the user sequence, the single characteristics of each user are sequenced to obtain the sequence characteristics [ C ] 1 C 2 C 3 C 4 C 5 B 1 B 2 B 3 B 4 B 5 A 1 A 2 A 3 A 4 A 5 ]。
At this time, the sequence characteristics include the logical relationship of the number of gold medals obtained by each user, and more purposeful messages can be generated according to the sequence characteristics.
And coding the sequence characteristics obtained in the sequencing layer through the coding layer to obtain the coding characteristics.
S110: and inputting the coding characteristics into a decoding subnet in the message generation model, and generating a message describing the association relationship of the users in the user group through the decoding subnet.
The coding characteristics obtained in step S108 are input into the decoding subnet of the message generation model, and a final message can be generated by the decoding subnet. In the scheme, the generated message can be a character string or a complete sentence.
Preferably, when receiving the encoding characteristic, the decoding subnet may first convert the encoding characteristic into a more optimal characteristic, and generate the packet according to the obtained more optimal characteristic. Specifically, the decoding subnet includes: a decoding layer and a generating layer; decoding the coding characteristics through the decoding layer to obtain decoding characteristics; and determining a message describing the association relationship of the users in the user group according to the decoding characteristics through the generation layer.
It should be noted that, the encoding layer in step S108 and the decoding layer in step S110 may both employ a transform network, and the encoding manner of the encoding subnet and the decoding manner of the decoding layer should correspond to each other, that is, the transform in the encoding subnet and the transform in the decoding layer should correspond to each other, so that the encoding characteristics obtained through the encoding subnet can smoothly obtain the decoding characteristics through the decoding layer.
Additionally, in the generated message, due to the limitation of the number of words in the lexicon, not all the content can be obtained according to the lexicon, and part of the content in the message needs to be directly taken from the input description information, such as the name of a person, the name of a place, the name of a country, and the like. Specifically, the decoding subnet includes: a first probability layer and a second probability layer; sequentially aiming at each occupation in the message to be generated, determining the probability of acquiring the occupied word from a preset word library through the first probability layer, and determining the probability of acquiring the occupied word from the description information through the second probability layer; determining the position-occupying word according to the first probability and the second probability; and determining a message describing the association relationship of the users in the user group according to each occupied word. The second probability layer can be implemented by using a Network such as a Point Network. The first probability and the second probability may be determined according to the part of speech of the word to be generated in the place holder, and the specific determination manner may be adjusted by training the model. The words are obtained from the preset word bank and the words are obtained from the description information by using a mature network, which is not described herein again.
The message generation model used in the message generation method provided in this specification may be trained in advance. Specifically, sample description information of each sample user in the sample user group can be obtained; determining a marking message of the sample description information; for each sample description information, determining the attribute of the sample description information and a sample user to which the description information belongs; inputting each sample description information, each sample description information attribute, each sample description information sample user into a message generation model to be trained, and respectively determining each sample description information word feature to be optimized, each sample description information attribute feature to be optimized and each sample description information attribute feature to be optimized through a feature extraction subnet in the message generation model; inputting the word feature to be optimized, the attribute feature to be optimized and the attribution feature to be optimized of each sample description information into a fusion subnet in the message generation model, so as to fuse the word feature to be optimized, the attribute feature to be optimized and the attribution feature to be optimized of each sample description information through the fusion subnet, and determine the comprehensive feature to be optimized of each sample description information; inputting the comprehensive features to be optimized of the sample description information into a coding subnet in the message generation model, and coding the comprehensive features to be optimized of the sample description information through the coding subnet to obtain the coding features to be optimized; inputting the coding features to be optimized into a decoding subnet in the message generation model, and decoding the coding features to be optimized through the decoding subnet to obtain the decoding features to be optimized; inputting the decoding characteristics to be optimized into a generation subnet in the message generation model, and generating a message to be optimized through the generation subnet; and training the message generation model by taking the minimum difference between the message to be optimized and the labeled message as an optimization target.
The sample user group can be selected according to actual application requirements, and a good training effect can be obtained when the sample user group in the same field or in the same business as the actual application is selected; further, in order to ensure the quality of training, the marking message may be a manually written message. During training, the model is trained by taking the message to be optimized generated by the model and the manually written marking message as the same optimization target, and parameters in each subnet in the model are adjusted.
Additionally, when a sequencing layer exists in the coding sub-network of the adopted message generation model, the sequencing layer can be trained independently by using the subtask. Specifically, one sample attribute may be selected from the attributes of the sample description information, and the description information whose attribute is the sample attribute is determined as the specified sample description information; determining a labeling user sequence according to the specified sample description information; sequencing all sample users through the sequencing layer according to the specified sample description information and the sample users to which the specified sample description information belongs to obtain a user sequence to be optimized; and adjusting the parameters in the sequencing layer by taking the minimum difference between the user sequence to be optimized and the labeled user sequence as an optimization target.
In the subtasks used for training the sequencing layer, the sample user group, the sample user and the sample description information can be directly obtained from the sample user group, the sample user and the sample description information for training the whole message generation model. Similarly, the determination of the annotation user sequence can be performed by manual annotation.
Generally, the message generation model generates the message in the form of a sentence, in other words, one message generated by the message generation model may be one sentence. In practical application, for a user group, multiple messages are likely to be required to reflect more complete information of each user in the user group. Therefore, during training, a plurality of different message generating models can be trained by using different labels according to the training method provided in the specification, and each trained message generating model can have the same structure and different parameters. In practical application, the same description information can be respectively input into a plurality of different models to obtain a plurality of messages capable of reflecting a plurality of different relationships among users in a user group.
Table 1 in this specification is still used as an example. When the description information in table 1 is input into the message generating models that have been trained differently, a plurality of different messages can be obtained according to the difference of the labels used in training each message generating model, for example, a message "one gold medal is obtained more in canada than in mexico" that reflects the association between two users may be obtained, and a message "gold medal obtained in columbia that highlights the status of one of the users among all the users is the least possible to be obtained. Similarly, in addition to the above messages, other labels may be used to train the model, so as to obtain more other messages through the model, which is not described in detail herein.
Based on the same idea, the present specification also provides a corresponding message generating apparatus, as shown in fig. 3.
Fig. 3 is a schematic diagram of a message generating apparatus provided in this specification, including:
the obtaining module 200 obtains description information of service executed by each user in the user group;
a determining module 202, configured to determine, for each piece of description information, an attribute of the piece of description information and a user identifier of a user to which the piece of description information belongs, where, for a part of the attributes, description information of all user-executed services includes the piece of description information of the attribute;
the extracting module 204 is configured to input each piece of description information, an attribute of each piece of description information, and a user identifier of a user to which each piece of description information belongs into a pre-trained message generation model, extract a subnet through features in the message generation model, and determine a word feature of each piece of description information, an attribute feature of each piece of description information, and an attribution feature of each piece of description information, respectively;
the fusion module 206 is configured to input the word feature, the attribute feature, and the attribution feature of each description information into a fusion subnet in the message generation model, and fuse the word feature, the attribute feature, and the attribution feature of each description information through the fusion subnet to determine a comprehensive feature of each description information;
the encoding module 208 is configured to input the comprehensive characteristics of each piece of description information into an encoding subnet in the message generation model, and encode the comprehensive characteristics of each piece of description information through the encoding subnet to obtain encoding characteristics, where the encoding characteristics are at least used to represent an association relationship between users in the user group;
the decoding module 210 inputs the coding characteristics into a decoding subnet in the message generation model, and generates a message describing the association relationship of the user in the user group through the decoding subnet.
Optionally, the feature extraction subnet at least includes: a first extraction layer, a second extraction layer and a third extraction layer;
the extracting module 204 is specifically configured to extract, by the first extracting layer, the word feature of each piece of description information according to each piece of description information; extracting attribute features of the description information according to the attributes of the description information through the second extraction layer; and extracting attribution characteristics of the description information according to the user identification of the user to which the description information belongs through the third extraction layer.
Optionally, the converged subnet at least includes: the first fusion layer, the second fusion layer and the third fusion layer;
the fusion module 206 is specifically configured to fuse, by using the first fusion layer, the word feature, the attribute feature, and the attribution feature of each piece of description information to obtain a text feature of the piece of description information; determining the logic characteristics of the description information according to the attribute characteristics, the attribution characteristics and the description information of the description information through the second fusion layer; and determining the comprehensive characteristics of the description information according to the text characteristics and the logic characteristics of the description information through the third fusion layer.
Optionally, the fusion module 206 is specifically configured to, when the description information is digital description information, determine a logic feature of the description information according to a numerical value, an attribute feature, and an attribution feature of the description information; when the description information is the non-digital type description information, the logic characteristic of the description information is a zero characteristic.
Optionally, the fusion module 206 is specifically configured to determine, according to the description information, a first weight corresponding to a text feature of the description information and a second weight corresponding to a logic feature of the description information; and determining the comprehensive characteristics of the description information according to the text characteristics and the logic characteristics of the description information and the first weight and the second weight.
Optionally, the encoding subnet comprises: a sorting layer and a coding layer;
the encoding module 208 is specifically configured to select a specific attribute from the attributes of the description information, and determine the description information whose attribute is the specific attribute as the specific description information; sequencing all users through the sequencing layer according to the specified description information and the users to which the specified description information belongs to obtain a user sequence; determining a description information sequence according to the description information of each user and the user sequence; determining the sequence characteristics of the description information sequence according to the description information sequence and the comprehensive characteristics of the description information; and coding the characteristic sequence through the coding layer to obtain coding characteristics.
Optionally, the decoding subnet comprises: a decoding layer and a generating layer;
the decoding module 210 is specifically configured to decode the coding feature through the decoding layer to obtain a decoding feature; and determining a message describing the association relationship of the users in the user group according to the decoding characteristics through the generation layer.
Optionally, decoding the subnet comprises: a first probability layer and a second probability layer;
the decoding module 210 is specifically configured to determine, for each place-occupying in the message to be generated, a probability of obtaining a word of the place-occupying from a preset word bank through the first probability layer, and determine a probability of obtaining the word of the place-occupying from the description information through the second probability layer; determining the occupied words according to the first probability and the second probability; and determining a message describing the association relationship of the users in the user group according to each occupied word.
Optionally, the apparatus further includes a training module 212, specifically configured to obtain sample description information of each sample user in the sample user group; determining a marking message of the sample description information; for each sample description information, determining the attribute of the sample description information and a sample user to which the description information belongs; inputting each sample description information, each sample description information attribute, each sample description information sample user into a message generation model to be trained, and respectively determining each sample description information word feature to be optimized, each sample description information attribute feature to be optimized and each sample description information attribute feature to be optimized through a feature extraction subnet in the message generation model; inputting the word feature to be optimized, the attribute feature to be optimized and the attribution feature to be optimized of each sample description information into a fusion subnet in the message generation model, so as to fuse the word feature to be optimized, the attribute feature to be optimized and the attribution feature to be optimized of each sample description information through the fusion subnet, and determine the comprehensive feature to be optimized of each sample description information; inputting the comprehensive features to be optimized of the sample description information into a coding subnet in the message generation model, and coding the comprehensive features to be optimized of the sample description information through the coding subnet to obtain the coding features to be optimized; inputting the coding features to be optimized into a decoding subnet in the message generation model, and decoding the coding features to be optimized through the decoding subnet to obtain the decoding features to be optimized; inputting the decoding characteristics to be optimized into a generation subnet in the message generation model, and generating a message to be optimized through the generation subnet; and training the message generation model by taking the minimum difference between the message to be optimized and the labeled message as an optimization target.
The present specification also provides a computer-readable storage medium storing a computer program, which can be used to execute a message generation method provided in fig. 1.
This specification also provides a schematic block diagram of an electronic device corresponding to that of figure 1, shown in figure 4. As shown in fig. 4, at the hardware level, the electronic device includes a processor, an internal bus, a network interface, a memory, and a non-volatile memory, and may also include hardware required for other services. The processor reads a corresponding computer program from the nonvolatile memory into the memory and then runs the computer program, so as to implement the message generation method described in fig. 1. Of course, besides the software implementation, the present specification does not exclude other implementations, such as logic devices or a combination of software and hardware, and the like, that is, the execution subject of the following processing flow is not limited to each logic unit, and may be hardware or logic devices.
In the 90 s of the 20 th century, improvements in a technology could clearly distinguish between improvements in hardware (e.g., improvements in circuit structures such as diodes, transistors, switches, etc.) and improvements in software (improvements in process flow). However, as technology advances, many of today's process flow improvements have been seen as direct improvements in hardware circuit architecture. Designers almost always obtain a corresponding hardware circuit structure by programming an improved method flow into the hardware circuit. Thus, it cannot be said that an improvement in the process flow cannot be realized by hardware physical modules. For example, a Programmable Logic Device (PLD) (e.g., a Field Programmable Gate Array (FPGA)) is an integrated circuit whose Logic functions are determined by a user programming the Device. A digital system is "integrated" on a PLD by the designer's own programming without requiring the chip manufacturer to design and fabricate application-specific integrated circuit chips. Furthermore, nowadays, instead of manually manufacturing an Integrated Circuit chip, such Programming is often implemented by "logic compiler" software, which is similar to a software compiler used in program development and writing, but the original code before compiling is also written by a specific Programming Language, which is called Hardware Description Language (HDL), and HDL is not only one but many, such as ABEL (Advanced Boolean Expression Language), AHDL (alternate Hardware Description Language), traffic, CUPL (core universal Programming Language), HDCal, jhddl (Java Hardware Description Language), lava, lola, HDL, PALASM, rhyd (Hardware Description Language), and vhigh-Language (Hardware Description Language), which is currently used in most popular applications. It will also be apparent to those skilled in the art that hardware circuitry that implements the logical method flows can be readily obtained by merely slightly programming the method flows into an integrated circuit using the hardware description languages described above.
The controller may be implemented in any suitable manner, for example, the controller may take the form of, for example, 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, an Application Specific Integrated Circuit (ASIC), a programmable logic controller, and an embedded microcontroller, examples of which include, but are not limited to, the following microcontrollers: ARC625D, atmel AT91SAM, microchip PIC18F26K20, and Silicone Labs C8051F320, the memory controller may also be implemented as part of the control logic for the memory. Those skilled in the art will also appreciate that, in addition to implementing the controller in purely computer readable program code means, the same functionality can be implemented by logically programming method steps such that the controller is in the form of logic gates, switches, application specific integrated circuits, programmable logic controllers, embedded microcontrollers and the like. Such a controller may thus be considered a hardware component, and the means included therein for performing the various functions may also be considered as a structure within the hardware component. Or even means for performing the functions may be regarded as being both a software module for performing the method and a structure within a hardware component.
The systems, devices, modules or units illustrated in the above embodiments may be implemented by a computer chip or an entity, or by a product with certain functions. One typical implementation device is a computer. In particular, the computer may be, for example, a personal computer, a laptop computer, a cellular telephone, a camera phone, a smartphone, a personal digital assistant, a media player, a navigation device, an email device, a game console, a tablet computer, a wearable device, or a combination of any of these devices.
For convenience of description, the above devices are described as being divided into various units by function, respectively. Of course, the functions of the various elements may be implemented in the same one or more software and/or hardware implementations of the present description.
As will be appreciated by one skilled in the art, embodiments of the present description may be provided as a method, system, or computer program product. Accordingly, the description may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the description 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, and the like) having computer-usable program code embodied therein.
The description has been presented with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the description. It will be understood that each flow and/or block of the flow diagrams and/or block diagrams, and combinations of flows and/or blocks in the flow diagrams and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may 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 means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
In a typical configuration, a computing device includes one or more processors (CPUs), input/output interfaces, network interfaces, and memory.
The memory may include forms of volatile memory in a computer readable medium, random Access Memory (RAM) and/or non-volatile memory, such as Read Only Memory (ROM) or flash memory (flash RAM). Memory is an example of a computer-readable medium.
Computer-readable media, including both non-transitory and non-transitory, removable and non-removable media, may implement information storage by any method or technology. The information may be computer readable instructions, data structures, modules of a program, 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 technology, compact disc read only memory (CD-ROM), digital Versatile Discs (DVD) or other optical storage, magnetic cassettes, magnetic tape magnetic disk storage or other magnetic storage devices, or any other non-transmission medium that can be used to store information that can be accessed by a computing device. As defined herein, a computer readable medium does not include a transitory computer readable medium such as a modulated data signal and a carrier wave.
It should also be noted that the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising a … …" does not exclude the presence of another identical element in a process, method, article, or apparatus that comprises the element.
As will be appreciated by one skilled in the art, embodiments of the present description may be provided as a method, system, or computer program product. Accordingly, the description may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the description 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, and the like) having computer-usable program code embodied therein.
This description may be described in the general context of computer-executable instructions, such as program modules, being executed by a computer. Generally, program modules include routines, programs, users, components, data structures, etc. that perform particular tasks or implement particular abstract data types. The specification may also be practiced in distributed computing environments where tasks are performed by remote processing devices that are linked through a communications network. In a distributed computing environment, program modules may be located in both local and remote computer storage media including memory storage devices.
The embodiments in the present specification are described in a progressive manner, and the same and similar parts among the embodiments are referred to each other, and each embodiment focuses on the differences from the other embodiments. In particular, for the system embodiment, since it is substantially similar to the method embodiment, the description is simple, and for the relevant points, reference may be made to the partial description of the method embodiment.
The above description is only an example of the present specification, and is not intended to limit the present specification. Various modifications and alterations to this description will become apparent to those skilled in the art. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present specification should be included in the scope of the claims of the present specification.

Claims (12)

1. A method for generating a message comprises the following steps:
acquiring description information of service executed by each user in a user group;
determining the attribute of the description information and the user identification of the user to which the description information belongs aiming at each description information, wherein the description information of all the users for executing the service comprises the description information of the attribute aiming at partial attribute;
inputting each description information, the attribute of each description information and the user identification of the user to which each description information belongs into a pre-trained message generation model, and respectively determining the word characteristic of each description information, the attribute characteristic of each description information and the attribution characteristic of each description information through a characteristic extraction subnet in the message generation model;
inputting the word characteristics, the attribute characteristics and the attribution characteristics of the description information into a fusion subnet in the message generation model, fusing the word characteristics, the attribute characteristics and the attribution characteristics of the description information through the fusion subnet, and determining the comprehensive characteristics of the description information;
inputting the comprehensive characteristics of the description information into a coding subnet in the message generation model, and coding the comprehensive characteristics of the description information through the coding subnet to obtain coding characteristics, wherein the coding characteristics are at least used for representing the incidence relation among the users in the user group;
and inputting the coding characteristics into a decoding subnet in the message generation model, and generating a message describing the association relationship of the users in the user group through the decoding subnet.
2. The method of claim 1, the feature extraction subnet comprising at least: a first extraction layer, a second extraction layer and a third extraction layer;
respectively determining the word characteristics of each description information, the attribute characteristics of each description information and the attribution characteristics of each description information through the characteristic extraction sub-network in the message generation model, which specifically comprises the following steps:
extracting word features of the description information according to the description information through the first extraction layer;
extracting attribute features of the description information according to the attributes of the description information through the second extraction layer;
and extracting attribution characteristics of the description information according to the user identification of the user to which the description information belongs through the third extraction layer.
3. The method of claim 1, the converged subnet comprising at least: the first fusion layer, the second fusion layer and the third fusion layer;
fusing the word characteristics, the attribute characteristics and the attribution characteristics of the description information through the fusion subnet, and determining the comprehensive characteristics of the description information, which specifically comprises the following steps:
for each description information, the word characteristics, the attribute characteristics and the attribution characteristics of the description information are fused through the first fusion layer to obtain the text characteristics of the description information;
determining the logic characteristics of the description information according to the attribute characteristics, the attribution characteristics and the description information of the description information through the second fusion layer;
and determining the comprehensive characteristics of the description information according to the text characteristics and the logic characteristics of the description information through the third fusion layer.
4. The method according to claim 3, wherein determining the logical characteristics of the description information according to the attribute characteristics, the attribution characteristics, and the description information specifically comprises:
when the description information is digital type description information, determining the logic characteristics of the description information according to the numerical value, the attribute characteristics and the attribution characteristics of the description information;
when the description information is the non-number type description information, the logic characteristic of the description information is the zero characteristic.
5. The method of claim 3, wherein determining the comprehensive characteristics of the description information according to the text characteristics and the logic characteristics of the description information specifically comprises:
determining a first weight corresponding to the text characteristic of the description information and a second weight corresponding to the logic characteristic of the description information according to the description information;
and determining the comprehensive characteristics of the description information according to the text characteristics and the logic characteristics of the description information and the first weight and the second weight.
6. The method of claim 1, the encoding subnet comprising: a sorting layer and a coding layer;
coding the comprehensive characteristics of each description information through the coding subnet to obtain coding characteristics, which specifically comprises the following steps:
selecting a specified attribute from the attributes of the description information, and determining the description information with the attribute as the specified description information;
sequencing all users through the sequencing layer according to the specified description information and the users to which the specified description information belongs to obtain a user sequence;
determining a description information sequence according to the description information of each user and the user sequence;
determining the sequence characteristics of the description information sequence according to the description information sequence and the comprehensive characteristics of the description information;
and coding the characteristic sequence through the coding layer to obtain coding characteristics.
7. The method of claim 1, the decoding a subnet comprising: a decoding layer and a generating layer;
generating a message describing the association relationship of the users in the user group through the decoding subnet, which specifically includes:
decoding the coding characteristics through the decoding layer to obtain decoding characteristics;
and determining a message describing the association relationship of the users in the user group according to the decoding characteristics through the generation layer.
8. The method of claim 1, the decoding a subnet comprising: a first probability layer and a second probability layer;
determining the message of each user relationship in the user group through the decoding subnet, which specifically includes:
sequentially aiming at each occupation in the message to be generated, determining the probability of acquiring the occupied word from a preset word library through the first probability layer, and determining the probability of acquiring the occupied word from the description information through the second probability layer;
determining the position-occupying word according to the first probability and the second probability;
and determining a message describing the association relationship of the users in the user group according to each occupied word.
9. The method according to claim 1, wherein the pre-training of the message generation model specifically comprises:
acquiring sample description information of each sample user in a sample user group;
determining a labeling message of the sample description information;
for each sample description information, determining the attribute of the sample description information and a sample user to which the description information belongs;
inputting each sample description information, each sample description information attribute, each sample description information sample user into a message generation model to be trained, and respectively determining each sample description information word feature to be optimized, each sample description information attribute feature to be optimized and each sample description information attribute feature to be optimized through a feature extraction subnet in the message generation model;
inputting the word feature to be optimized, the attribute feature to be optimized and the attribution feature to be optimized of each sample description information into a fusion subnet in the message generation model, so as to fuse the word feature to be optimized, the attribute feature to be optimized and the attribution feature to be optimized of each sample description information through the fusion subnet, and determine the comprehensive feature to be optimized of each sample description information;
inputting the comprehensive features to be optimized of the sample description information into a coding subnet in the message generation model, and coding the comprehensive features to be optimized of the sample description information through the coding subnet to obtain the coding features to be optimized;
inputting the coding features to be optimized into a decoding subnet in the message generation model, and decoding the coding features to be optimized through the decoding subnet to obtain the decoding features to be optimized;
inputting the decoding characteristics to be optimized into a generation subnet in the message generation model, and generating a message to be optimized through the generation subnet;
and training the message generation model by taking the minimum difference between the message to be optimized and the labeled message as an optimization target.
10. A message generating apparatus, comprising:
the acquisition module is used for acquiring the description information of the service executed by each user in the user group;
the determining module is used for determining the attribute of the description information and the user identification of the user to which the description information belongs aiming at each piece of description information, wherein the description information of all user execution services contains the description information of the attribute aiming at part of the attribute;
the extraction module is used for inputting the description information, the attribute of the description information and the user identification of the user to which the description information belongs into a pre-trained message generation model, extracting a subnet through the characteristics in the message generation model, and respectively determining the word characteristics of the description information, the attribute characteristics of the description information and the attribution characteristics of the description information;
the fusion module is used for inputting the word characteristics, the attribute characteristics and the attribution characteristics of the description information into a fusion subnet in the message generation model, fusing the word characteristics, the attribute characteristics and the attribution characteristics of the description information through the fusion subnet and determining the comprehensive characteristics of the description information;
the coding module is used for inputting the comprehensive characteristics of the description information into a coding subnet in the message generation model, coding the comprehensive characteristics of the description information through the coding subnet to obtain coding characteristics, wherein the coding characteristics are at least used for representing the incidence relation among the users in the user group;
and the decoding module is used for inputting the coding characteristics into a decoding subnet in the message generation model and generating a message describing the association relationship of the users in the user group through the decoding subnet.
11. A computer-readable storage medium, in which a computer program is stored which, when being executed by a processor, carries out the method of any one of the preceding claims 1 to 9.
12. An electronic device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, the processor implementing the method of any of the preceding claims 1 to 9 when executing the program.
CN202210995438.2A 2022-08-18 2022-08-18 Message generation method and device, storage medium and electronic equipment Pending CN115422928A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210995438.2A CN115422928A (en) 2022-08-18 2022-08-18 Message generation method and device, storage medium and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210995438.2A CN115422928A (en) 2022-08-18 2022-08-18 Message generation method and device, storage medium and electronic equipment

Publications (1)

Publication Number Publication Date
CN115422928A true CN115422928A (en) 2022-12-02

Family

ID=84197511

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210995438.2A Pending CN115422928A (en) 2022-08-18 2022-08-18 Message generation method and device, storage medium and electronic equipment

Country Status (1)

Country Link
CN (1) CN115422928A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116720124A (en) * 2023-08-11 2023-09-08 之江实验室 Educational text classification method and device, storage medium and electronic equipment

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116720124A (en) * 2023-08-11 2023-09-08 之江实验室 Educational text classification method and device, storage medium and electronic equipment

Similar Documents

Publication Publication Date Title
US10515155B2 (en) Conversational agent
CN104735468B (en) A kind of method and system that image is synthesized to new video based on semantic analysis
JP6163607B2 (en) Method and apparatus for constructing event knowledge database
CN113297396B (en) Method, device and equipment for updating model parameters based on federal learning
CN111414166B (en) Code generation method, device, equipment and storage medium
CN110674188A (en) Feature extraction method, device and equipment
CN111258995A (en) Data processing method, device, storage medium and equipment
CN115952272A (en) Method, device and equipment for generating dialogue information and readable storage medium
CN109710732A (en) Information query method, device, storage medium and electronic equipment
CN111767394A (en) Abstract extraction method and device based on artificial intelligence expert system
CN114332873A (en) Training method and device for recognition model
CN109903122A (en) House prosperity transaction information processing method, device, equipment and storage medium
CN115422928A (en) Message generation method and device, storage medium and electronic equipment
CN113157941B (en) Service characteristic data processing method, service characteristic data processing device, text generating method, text generating device and electronic equipment
CN113079201B (en) Information processing system, method, device and equipment
CN113408254A (en) Page form information filling method, device, equipment and readable medium
CN113032001A (en) Intelligent contract classification method and device
CN115130621B (en) Model training method and device, storage medium and electronic equipment
CN111538925A (en) Method and device for extracting Uniform Resource Locator (URL) fingerprint features
CN112686059B (en) Text translation method, device, electronic equipment and storage medium
CN115358777A (en) Advertisement putting processing method and device of virtual world
CN114840642A (en) Event extraction method, device, equipment and storage medium
CN113344590A (en) Method and device for model training and complaint rate estimation
CN112652294B (en) Speech synthesis method, device, computer equipment and storage medium
CN110149810A (en) Limit the transmission of operating content in a network environment

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