Input method and device

By using a generative model in instant messaging applications, generating reply content based on target input and historical session messages, the efficiency problem of users finding reply information in multiple historical session messages is solved, and more efficient conversation interaction is achieved.

CN119814715AActive Publication Date: 2025-04-11LENOVO (BEIJING) LTD
View PDF 8 Cites 0 Cited by

Patent Information

Application Number
CN202411996863.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-31
Publication Date
2025-04-11
Estimated Expiration
2044-12-31

AI Technical Summary

Technical Problem

In session applications such as instant messaging, users need to review multiple historical session messages to correctly enter reply information, resulting in users being unable to respond to session messages efficiently.

Method used

Through an input method, a generative model is used to reason based on the target input, the target first session message and the second information to generate the target output so that the user can quickly input the reply information. The method includes determining the target first session message and the second information in response to the target input of the first session end, thereby obtaining the target output of the generated model.

Benefits of technology

Improves the efficiency of session interaction, reduces the time for users to review historical session messages, and allows users to enter reply information more quickly.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119814715A_ABST
    Figure CN119814715A_ABST
Patent Text Reader

Abstract

The invention discloses an input method and device, and the method comprises the steps: obtaining first information in response to the target input of a first session end for a target session; the participating end of the target session comprises a first session end and at least one second session end, and the first information comprises at least one first session message of the at least one second session end in the target session; determining a target first session message from the at least one first session message based on the target input; determining second information based on the target first session message; the second information comprises at least one second session message in the target session; obtaining target output of the generative model, and performing input based on the target output; the generative model is capable of reasoning based on the target input, the target first session message, and the second information.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of input technology, and in particular to an input method and device. Background Art

[0002] The application scenarios of conversational interaction based on conversational applications such as instant messaging applications are becoming increasingly widespread.

[0003] When a user interacts with other users through a conversation application such as instant messaging, if there are multiple historical conversation messages in the conversation window, after the user determines the historical conversation message to be replied, the user needs to review the contents of other conversation messages before correctly entering the reply information, resulting in the user being unable to reply to the conversation message efficiently. Summary of the invention

[0004] In one aspect, the present application provides an input method, comprising:

[0005] In response to a target input of a first session end for a target session, first information is obtained; the participating ends of the target session include the first session end and at least one second session end, and the first information includes at least one first session message of the at least one second session end in the target session;

[0006] Based on the target input, determining a target first conversation message from the at least one first conversation message;

[0007] Determine second information based on the target first session message; the second information includes at least one second session message in the target session;

[0008] A target output of a generative model is obtained, and input is performed based on the target output; the generative model is capable of performing reasoning based on the target input, the target first conversation message, and the second information.

[0009] In a possible implementation, the input method further includes:

[0010] If no selection operation on the target output is detected and there is an update to the target input of the target session, based on the updated target input, return to execute the operation of obtaining the first information to regain the target output of the generative model.

[0011] In yet another possible implementation manner, obtaining the first information includes:

[0012] If the participating ends of the target session include the first session end and one second session end, each first session message of the second session end in the target session is obtained.

[0013] In yet another possible implementation manner, obtaining the first information includes:

[0014] If the participating ends of the target session include the first session end and multiple second session ends, at least one first session message mentioning the first session end is obtained from at least one session message of each second session end in the target session.

[0015] In yet another possible implementation, the determining, based on the target input, a target first conversation message from the at least one first conversation message includes at least one of the following:

[0016] Determining, from the at least one first conversation message, a target first conversation message whose corresponding message subject matches the target input;

[0017] Based on the session end identifier corresponding to the second session end to which each first session message belongs, determining, from the at least one first session message, a target first session message in which the session end identifier matches the target input;

[0018] A target question inferred by a generative model for the target input is obtained, and a target first conversation message matching the target question is determined from the at least one first conversation message.

[0019] In yet another possible implementation manner, determining the second information based on the target first conversation message includes:

[0020] If the participating ends of the target session include the first session end and one second session end, at least one second session message in the target session having the same message subject as the target first session message is determined.

[0021] In another possible implementation, if the participating ends of the target session include the first session end and multiple second session ends, determining the second information based on the target first session message includes at least one of the following:

[0022] Determine at least one second conversation message in the target conversation having the same message subject as the message subject of the target first conversation message;

[0023] At least one second session message from the target second session end in the target session is determined based on the target second session end to which the target first session message belongs.

[0024] In another possible implementation, the method further includes: determining a first user identity feature corresponding to the first session end and a second user identity feature associated with each second session message, wherein the second user identity feature is a user identity feature corresponding to the second session end to which the second session message belongs;

[0025] The target output is the reply content that conforms to the first user identity feature and is inferred by the generative model based on the target input, the target first conversation message, the second information, and the second user identity feature.

[0026] In yet another possible implementation, the method further includes: if there are multiple target first conversation messages, retaining the target first conversation message with the latest generation time.

[0027] In another aspect, the present application further provides an input device, comprising:

[0028] A first determining unit is configured to obtain first information in response to a target input of a first session end for a target session; the participating ends of the target session include the first session end and at least one second session end, and the first information includes at least one first session message of the at least one second session end in the target session;

[0029] a second determining unit, configured to determine a target first conversation message from the at least one first conversation message based on the target input;

[0030] A third determining unit, configured to determine second information based on the target first session message; the second information includes at least one second session message in the target session;

[0031] An input unit is used to obtain a target output of a generative model and to perform input based on the target output; the generative model can perform reasoning based on the target input, the target first conversation message and the second information. BRIEF DESCRIPTION OF THE DRAWINGS

[0032] The above and other features, advantages and aspects of the embodiments of the present disclosure will become more apparent with reference to the following detailed description in conjunction with the accompanying drawings. Throughout the accompanying drawings, the same or similar reference numerals represent the same or similar elements. It should be understood that the drawings are schematic and the originals and elements are not necessarily drawn to scale.

[0033] Figure 1 A schematic diagram of a flow chart of the input method provided by this application;

[0034] Figure 2 A schematic diagram of another flow chart of the input method provided by the present application;

[0035] Figure 3 A schematic diagram of another flow chart of the input method provided by the present application;

[0036] Figure 4 A schematic diagram of another flow chart of the input method provided by the present application;

[0037] Figure 5 An example diagram of a session interface of the first session end in the target session provided by the present application;

[0038] Figure 6 A schematic diagram of another flow chart of the input method provided by the present application;

[0039] Figure 7 Another example diagram of a session interface of a first session end in a target session provided by the present application;

[0040] Figure 8 A schematic diagram of the composition structure of an input device provided by the present application;

[0041] Fig. 9 A schematic diagram of the structure of an electronic device provided in this application. DETAILED DESCRIPTION

[0042] The embodiments of the present application are described below in conjunction with the drawings in the embodiments of the present application. The terms used in the implementation mode of the present application are only used to explain the specific embodiments of the present application, and are not intended to limit the present application. It is known to those skilled in the art that with the development of technology and the emergence of new scenarios, the technical solutions provided in the embodiments of the present application are also applicable to similar technical problems.

[0043] The terms "first", "second", etc. in the specification and claims of the present application and the above-mentioned drawings are used to distinguish similar objects, and need not be used to describe a specific order or sequential order. It should be understood that the terms used in this way can be interchangeable under appropriate circumstances, which is only to describe the distinction mode adopted by the objects of the same attributes when describing in the embodiments of the present application. In addition, the terms "including" and "having" and any of their variations are intended to cover non-exclusive inclusions, so that the process, method, system, product or equipment comprising a series of units need not be limited to those units, but may include other units that are not clearly listed or inherent to these processes, methods, products or equipment.

[0044] like Figure 1 , showing a flow chart of the input method provided in an embodiment of the present application. The scheme of the embodiment of the present application can be applied to an electronic device, which can be a terminal device where the first conversation end is located, or a server that provides conversation interaction services, without limitation.

[0045] The method of this embodiment may include:

[0046] S101, obtaining first information in response to a target input of a first conversation end for a target conversation.

[0047] The participating ends of the target session include a first session end and at least one second session end.

[0048] The target input is the content to be inputted generated by the input operation of the first session end for the target session, so the content of the target input at the current moment does not belong to the session message in the target session. For example, the target input of the first session end for the target session can be the information inputted by the first session end into the input field of the target session.

[0049] There are many possible specific forms of the content in the target input. For example, the content of the target input can be a character string, an expression descriptor, an animation, or an audio, etc., without limitation.

[0050] In the present application, the first information includes at least one first conversation message of at least one second conversation end in the target conversation. For example, the first message may include the first conversation messages of all second conversation ends in the target conversation. For another example, considering that during the conversation, the user of the first conversation end is more likely to reply to the conversation message recently sent by the second conversation end, the first information may include: at least one first conversation message of at least one second conversation end in the target conversation within a set time range before the current moment.

[0051] S102: Determine a target first conversation message from at least one first conversation message based on a target input.

[0052] The target first conversation message is the first conversation message that matches the target input. For example, the target first conversation message may be at least one of message content, expressed semantics, or associated conversation end, and the first conversation message that matches the content of the target input.

[0053] It is understandable that during the conversation interaction process, the user of the first conversation end needs to reply to the first conversation message sent by the second conversation end, so the target first conversation message may be a reply message to be replied by the user of the first conversation end. Considering that during the process of inputting reply information to a certain first conversation message by the user of the first conversation end, the target input of the user will be correlated with the first conversation message, therefore, based on the target input, the target first conversation message to which the user expects to reply can be determined from at least one first conversation message of at least one second conversation end.

[0054] S103: Determine second information based on the target first conversation message.

[0055] The second information includes at least one second session message in the target session. The second session message may be a session message from the first session end or a session message from the second session end.

[0056] In the present application, the second session message is a session message in the target session that is associated with the target first session message. For example, the second session message may be a session message that matches at least one of the message content, message subject, and belonging session end of the target first session message.

[0057] S104, obtaining a target output of the generative model, and performing input based on the target output.

[0058] The generative model can perform inference based on the target input, the target first session message and the second information. Based on this, the target output is the information to be input by the first session end inferred by the generative model based on the target input, the target first session message and the second information.

[0059] Among them, inputting based on the target output may include: if a selection operation for the target output is detected, inputting the target output into the target session. For example, the target output of the generative model is used as candidate input information for the user to select and input, and is displayed in the candidate input information display area. On this basis, if the user of the first session terminal confirms that the target output is the information that the user needs to input, the target output in the candidate input information display area is selected to trigger the input of the target output into the target session.

[0060] If the target output is not the information that the user wants to input, the user ignores the target output and continues to perform input operations on the target session to update the target input.

[0061] Of course, if the target output is not the information that the user wants to input, the user can also choose to input the target input into the target session. In this case, in response to the instruction to input the target input, the target input is input into the target session.

[0062] In this application, the generative model learns the characteristics and patterns of input information by training a large amount of diverse data. It usually has model parameters ranging from hundreds of millions to hundreds of billions (model parameters are variables that control the behavior of the target model) and can capture complex relationships and patterns in the input information. For example, the generative model can be a large language model or other machine learning model, without limitation.

[0063] It is understandable that the target output of the generative model can be one or more, which can be set according to needs without limitation.

[0064] From the above content, it can be seen that in the case where there is a target input for the target session at the first session end, the present application will first determine at least one first session message of at least one second session end from the target session. Since the content of the target input reflects the content to be input into the target session by the first session end, the target first session message that the first session end needs to reply to can be determined from at least one first session message based on the target input. On this basis, the present application combines the target input, the target first session message, and each second session message associated with the target first session message in the target session, and the target output inferred by the generative model can more accurately express the reply information that the first session end wants to input, so that the user of the first session end does not need to spend too much time reviewing historical session messages, editing and inputting information, and can complete the reply to the session message based on the target output of the generative model, thereby improving the efficiency of the session interaction.

[0065] It is understandable that if the target output of the generative model deviates from the information that the user of the first session terminal expects to input, the user will not choose to input the target input, but may continue to input the target input for the target session. On this basis, in order to continue to predict the information that the user may want to input into the target session, if the selection operation of the target output is not detected, and the target input for the target session is updated, based on the updated target input, the first information and subsequent operations can be returned to be executed to re-obtain the target output of the generative model.

[0066] It is understandable that, since the second session end of the target session may also generate a new second session message during the process of updating the target input by the user, when the first information is obtained based on the updated target input, the first information obtained may also change. Moreover, since the target input is the updated target input, the target first session message matched based on the updated target input may also be different, thereby changing the target output re-determined by the final generative model.

[0067] For example:

[0068] Assume that the target input of user A at the first session end for the target session is "Zhang San", and there are 5 first session messages sent by user B and user C in the target session. Then, it is necessary to match the target first session message from these 5 first session messages based on "Zhang San", and then determine at least one second session message in the target session based on the target first session message, and finally determine the target output using the generative model.

[0069] If user A at the first session end does not select the target output as the content of the session message, but continues to input information based on the input "Zhang San", assuming that the updated target input is "Zhang San, XX meeting". Then, if there are 7 first session messages sent by user B and user C in the target session at this time, it is necessary to match the target first session message from these 7 first session messages based on "Zhang San, XX meeting", and then re-determine at least one second session message from the target session based on the currently determined target first session message, and re-determine the target output using the generative model.

[0070] In the present application, there are many possible implementations for determining the target first conversation message based on the target input, and several possible implementations are described below as examples. In practical applications, determining the target first conversation message may adopt at least one of the following possible implementations:

[0071] In a possible implementation, the present application may determine, from the at least one first conversation message, a target first conversation message whose corresponding message subject matches the target input.

[0072] In the present application, the message subject of a conversation message is the subject expressed by the content of the conversation message.

[0073] For example, if one conversation message is "We need to go to XX place on a business trip next week", and another conversation message is "Remember to wear business clothes on a business trip", then the message subjects of the two conversation messages can both be "Business trip".

[0074] Of course, the message subject of the conversation message can be "work arrangement", "clothing" or "press conference", etc., which is related to the content of the conversation message and is not limited to this.

[0075] The message subject of the conversation message may be determined by semantically analyzing the conversation message; or the conversation messages containing the same segmentation may be classified as conversation messages belonging to the message subject represented by the segmentation by performing segmentation on multiple conversation messages.

[0076] Of course, there may be other implementations of determining the message subject of a session message, which are not limited thereto.

[0077] In the present application, there are many possibilities for determining the conversation topic of each conversation message in the target conversation, and there is no limitation on this. For example, the message topic of each conversation message in the target conversation can be determined in response to the target input of the first conversation end for the target conversation.

[0078] In particular, in order to reduce the delay in determining the target first conversation message due to determining the message subject of the conversation message, the present application can also predetermine the message subject of the conversation message in the target conversation. For example, the message subject of each conversation message generated in the target conversation is determined; or the message subject of each conversation message in the target conversation can be determined regularly or irregularly.

[0079] The message subject matches the target input in that the target input includes a keyword corresponding to the message subject, or the similarity between the target input and the message subject exceeds a set threshold, without any specific limitation.

[0080] It can be understood that if the message subject of the first conversation message matches the target input, it means that the target input is very likely to be a reply content to the message subject of the first conversation message. Therefore, determining the first conversation message whose message subject matches the target input as the target first conversation message is conducive to subsequently accurately determining from the target conversation each second conversation message related to the message subject to be replied to the target input.

[0081] In another possible implementation, the present application may determine, from the at least one first session message, a target first session message whose session end identifier matches the target input based on a session end identifier corresponding to the second session end to which each first session message belongs.

[0082] For any session end of the first session end or the second session end, the session end identifier corresponding to the session end is used to uniquely identify the session end. For example, the session end identifier of the session end may be a user name, a user nickname, or a job title that can uniquely identify the identity of the user (e.g., the person in charge of the XX project or the general manager of the department A, etc.) corresponding to the user of the session end.

[0083] The session end identifier matches the target input in that the target input includes the session end identifier; or the similarity between the session end identifier and the target input exceeds a set threshold.

[0084] It can be understood that if the session end identifier corresponding to the second session end to which the first session message belongs matches the target input, it means that the target input is very likely to be reply information to the second session message input. Therefore, the first session message can be determined as the target first session message to facilitate subsequent matching of related context session messages.

[0085] For example, the session end identifier of the second session end to which the first session message belongs is the user name of the user corresponding to the second session end: "Zhang San", and the target input content includes "Zhang San", then it means that the user of the first session end hopes to reply to the content of the first session message sent by the user named "Zhang San".

[0086] In yet another possible implementation, a target question inferred by the generative model for the target input may be obtained, and a target first conversation message matching the target question may be determined from the at least one first conversation message.

[0087] The target question is the question information that the target input may be targeted by inference from the generative model.

[0088] It can be understood that, during the conversation interaction process, the target input of the first conversation end for the target conversation is a reply message input for a first conversation message input by a second conversation end in the target conversation, and the target question is a question that the target input may target as inferred by the generative model. Therefore, the first conversation message targeted by the target input will inevitably match the target question.

[0089] It is understandable that, considering that the user is most likely to reply to the conversation message last input by the second conversation end in the target conversation, therefore, in any of the above embodiments, if it is determined based on the target input that there are multiple target first conversation messages, the present application can retain the target first conversation message with the latest generation time.

[0090] In the present application, there are multiple possible implementations of obtaining the first message, and when the specific scenarios of the target session are different, the specific implementation of obtaining the first message will also be different. The following is an explanation in combination with different scenarios of the target session.

[0091] First, for the case where the participating ends of the target session include a first session end and a second session end, the specific implementation of obtaining the first message is introduced. Figure 2 , shows a flow chart of an input method provided by an embodiment of the present application, and this embodiment is described by taking a scenario in which a first conversation end and a second conversation end have a conversation. This embodiment may include:

[0092] S201, in response to a target input of a first session end for a target session, if the participating ends of the target session include the first session end and a second session end, obtaining each first session message of the second session end in the target session.

[0093] Wherein, when the participating terminals of the target session only include the first session terminal and one second session terminal, each first session message sent by the second session terminal is a session message sent to the first session terminal. Accordingly, the first session terminal can reply to any first session message of the second session terminal. Based on this, each first session message of the second session terminal in the target session may be a session message to which the target input requires a reply.

[0094] It is understandable that in actual applications, the number of session messages of the second session end in the target session may be relatively large, and the generation time of many session messages is relatively long from the current moment, and the user of the first session end generally replies to the session message recently sent by the second session end. Based on this, in order to reduce the amount of data processing and to more accurately locate the session message targeted by the target input of the first session end, the present application can also obtain each first session message of the second session end in the target session within the target time before the current moment.

[0095] The target duration may be a preset duration, for example, the target duration may be 1 minute, 10 minutes or 1 hour.

[0096] The target duration can also be set based on the time from the generation time of the last conversation message of the second conversation end in the target conversation to the current moment. The target duration is greater than the time from the generation time of the last conversation message of the second conversation end to the current moment. For example, the target duration is greater than the time from the generation time of the last conversation message of the second conversation end to the current moment, and is less than the time plus the set duration threshold. For example, assuming that the duration threshold is 10 minutes, and the time from the generation time of the last conversation message of the second conversation end in the target conversation to the current moment is 1 hour, then the target duration can be set to 1 hour and 10 minutes.

[0097] S202: Determine a target first conversation message from the at least one first conversation message based on the target input.

[0098] The specific implementation of determining the target first conversation message may include referring to at least one implementation manner mentioned above, which is not specifically limited.

[0099] For example:

[0100] If the target input content includes the session end identifier of the second session end but does not include the session subject of any first session message, then since the second session end to which the first session messages belong is the same, the first session messages can be determined as target first session messages.

[0101] If the target input content includes a message topic to which a certain first conversation message belongs, then the first conversation message may be determined as the target first conversation message.

[0102] Furthermore, if there are multiple target first conversation messages, only the first conversation message with the latest generation time may be determined as the target first conversation message.

[0103] Of course, the implementation of obtaining the target question inferred by the generative pattern for the target input and determining the target first conversation message matching the target question is also applicable to this embodiment, and is not limited thereto.

[0104] S203: Determine second information based on the target first conversation message.

[0105] The second information includes at least one second session message in the target session.

[0106] S204, obtaining a target output of the generative model, and performing input based on the target output.

[0107] Among them, the generative model can perform reasoning based on the target input, the target first conversation message and the second information.

[0108] The above two steps S203 and S204 can refer to the relevant introduction of other embodiments of the present application and will not be repeated here.

[0109] The following describes the specific implementation of obtaining the first information in the case where the participating terminals of the target session include a first session terminal and multiple second session terminals. Figure 3 , shows another flow chart of the input method provided in an embodiment of the present application. The method of this embodiment may include:

[0110] S301, in response to a target input of a first session end for a target session, if the participating ends of the target session include the first session end and multiple second session ends, obtain at least one first session message that mentions the first session end from at least one session message of each second session end in the target session.

[0111] The first conversation message that mentions the first conversation end may be a first conversation message that prompts the first conversation end to reply or process. For example, taking the conversation end identifier of the first conversation end as the user name "Li Si" of the first conversation end as an example, if the conversation message generated by the second conversation end includes information that prompts Li Si to pay attention through a specific identifier, for example, the conversation message includes "@Li Si", it is determined that the conversation message is the first conversation message that mentions the first conversation end.

[0112] The first conversation message that mentions the first conversation end may also be a first conversation message whose message content includes the conversation end identifier of the first conversation end. For example, taking the conversation end identifier of the first conversation end as the user name "Li Si" of the first conversation end as an example, if the conversation message generated by the second conversation end includes content discussing or mentioning "Li Si", then the conversation message of the second conversation end belongs to the first conversation message.

[0113] It can be understood that, in a target session involving multiple session ends, if a session message in which a second session end mentions the first session end is a session message related to the first session end and is also a session message to which the first session end needs to respond, then each session message in each second session end that mentions the first session end is also a session message to which the target input of the first session end needs to respond.

[0114] Considering that the number of session messages of each second session end in the target session may be relatively large, and the user of the first session end generally replies to the session message recently sent by the second session end. Based on this, in a possible implementation, in order to reduce the amount of data processing and more accurately locate the session message targeted by the target input of the first session end, the present application can also obtain at least one first session message that mentions the first session end from at least one session message generated by each second session end within the target time length before the current moment.

[0115] S302: Determine a target first conversation message from the at least one first conversation message based on the target input.

[0116] In the present application, any one or several implementations of determining the target first conversation message mentioned above are applicable to the present embodiment. For example, at least one of the conversation message subject, the conversation end identifier of the second conversation end to which the subject belongs, and / or the target reply inferred by the generative pattern for the target input, and the first conversation message matching the target input can be determined as the target first conversation message.

[0117] In particular, if the target first conversation message does not exist in the at least one first conversation message that mentions the first conversation end, the present application may also determine at least one first conversation message that is sent by each second conversation end in the target conversation and does not mention the first conversation end. On this basis, based on the target input, the target first conversation message may be matched from the at least one first conversation message that does not mention the first conversation end, and the subsequent operations of steps S303 to S304 may be performed.

[0118] The specific implementation of matching the target first conversation message in at least one first conversation message that has never mentioned the first conversation end may adopt any of the aforementioned implementation methods of matching the target first conversation message. In an optional manner, the present application may determine the conversation message topic and / or the target reply inferred by the generative pattern for the target input from at least one first conversation message that has never mentioned the first conversation end, and the target first conversation message that matches the target input.

[0119] S303: Determine second information based on the target first conversation message.

[0120] The second information includes at least one second session message in the target session.

[0121] S304, obtaining a target output of the generative model, and performing input based on the target output.

[0122] Among them, the generative model can perform reasoning based on the target input, the target first conversation message and the second information.

[0123] For the above steps S303 and S304, reference may be made to the related introduction of the previous embodiment, which will not be described again here.

[0124] It can be understood that in the above embodiments, when each first conversation message in the first information is the first conversation message of the second conversation end within the target time length before the current moment, if the target first conversation message cannot be matched from at least one first conversation message, the present application can also increase the time length of the target time length, return to execute the operation of obtaining at least the first conversation message generated by each second conversation end in the target conversation within the target time length before the current moment, and re-execute the operation of matching the target first conversation message.

[0125] In any of the above embodiments of the present application, there are also many possibilities for the specific implementation of determining the second information based on the target first conversation message, which will be described below in conjunction with different conversation scenarios of the target conversation.

[0126] In a possible implementation, if the participating terminals of the target session include a first session terminal and a second session terminal, at least one second session message in the target session having the same message subject as the target first session message can be determined. The second session message having the same message subject as the target first session message can be from the first session terminal or from the second session terminal.

[0127] The following takes this possible implementation as an example and introduces the input method of the present application in combination with a specific implementation. Figure 4 , shows another flow chart of the input method provided in an embodiment of the present application. The method of this embodiment may include:

[0128] S401, in response to a target input of a first session end for a target session, if the participating ends of the target session include the first session end and a second session end, obtain at least one first session message in the target session that belongs to the second session end and has a generation time within a target duration from a current moment.

[0129] The target duration may be a fixed duration value, or a duration value determined according to the generation time of the last session message in the target session, as described above, which will not be described in detail here.

[0130] With the target duration of 10 minutes, assuming that the session end identifier of the first session end is user a, and the session end identifier of the second session end is user b, combined with Figure 5 An example diagram of a session interface of the first session end in the target session is shown for explanation:

[0131] Assume that the current time is 9:00, Figure 5 It can be seen from the session window 500 of the target session that when the first session end inputs the target input "in meeting TT" into the input field 501 of the session interface, it is necessary to determine each first session message from the second session end in the target session.

[0132] There are multiple conversation messages from both user a and user b in the target conversation. Combined with the generation time of each conversation message from user b, it can be seen that within 10 minutes before the current time (9:00), there are 3 conversation messages from user b, namely conversation message b1, conversation message b2 and conversation message b3, so these three conversation messages will be determined as the first conversation message.

[0133] It can be understood that this embodiment is explained by taking the first conversation message whose generation time is within the target time length from the current time as an example, but the situation where the generation time of the conversation message generated by the second conversation end is not taken into consideration and all conversation messages generated by the second conversation end are taken as the first conversation messages is also applicable to this embodiment.

[0134] S402, detecting whether there is a target first conversation message in the at least one first conversation message whose message subject matches the target input, if yes, executing step S404; if no, executing step S403.

[0135] It is understandable that, in the case where the participating ends of the target session include only the first session end and one second session end, each first session message belongs to the same second session end. Based on this, even if the session end identifier of the second session end is mentioned in the content of the target input, all the first session messages match the target input. Therefore, this embodiment does not need to consider whether the second session end to which each first session message belongs matches the target input, but only needs to detect whether the message subject corresponding to each first session message is mentioned in the content of the target input.

[0136] If there is a target first conversation message whose message subject matches the target input, it means that the target input includes content related to the message subject of the target first conversation message. Therefore, the target first conversation message is the conversation message that the target input hopes to reply to.

[0137] It is understandable that if there are multiple first conversation messages whose message subjects match the target input, the target first conversation message with the latest generation time can be determined from the multiple first conversation messages whose message subjects match the target input.

[0138] Still combined Figure 5 An example is given to illustrate:

[0139] Depend on Figure 5 It can be seen that the target input of the target session by user a of the first session end is "in meeting TT", and the at least one first session message of the second session end determined includes: session message b1, session message b2 and session message b3. Assuming that the message subject of session message b1 is "clothing", and the message subjects of session messages b2 and b3 are "meeting TT", the message subject "meeting TT" is consistent with the message subject mentioned in the target input, then the session message b2 with the latest generation time can be determined as the target first session message.

[0140] It should be noted that this embodiment takes an implementation method of determining the target first conversation message as an example. In actual applications, step S402 may also be replaced by: obtaining a target reply inferred by the generative pattern for the target input, and detecting whether there is a target first conversation message matching the target reply from at least one first conversation message. Alternatively, step S402 may be replaced by: detecting whether there is a target first conversation message whose message subject matches the target input, or a target first conversation message matching the target reply, in the at least one first conversation message. The details are not repeated here.

[0141] S403: Determine a target first conversation message having the latest generation time among the at least one first conversation message.

[0142] If the target input does not include content related to the message subject of any first conversation message, the user of the first conversation end most likely wishes to reply to the first conversation message generated latest at the second conversation end. Therefore, the first conversation message generated latest can be determined as the target first conversation message.

[0143] S404: Determine at least one second conversation message in the target conversation whose message subject is the same as the message subject of the target first conversation message.

[0144] In a possible implementation, in order to reduce the amount of data processing and ensure the accuracy of the generative model in predicting the target output, the present application may also determine at least one second conversation message in the target conversation whose generation time is within the target time from the current moment and whose message subject is the same as the message subject of the target first conversation message.

[0145] Still combined Figure 5 An example illustrates:

[0146] exist Figure 5 The target first conversation message determined in the example is conversation message b2 from user b, and the subject of conversation message b2 is "Conference TT". Then the present application can determine the conversation message with the subject "Conference TT" and the time of generation within 10 minutes from the current moment as the second conversation message. Assuming that the conversation message from user a is also a conversation message generated within the last 10 minutes, and its subject is also "Conference TT", then Figure 5 In addition to the conversation messages b2 and b3, the second conversation message also includes the conversation message a1 from user a.

[0147] S405, obtaining a target output of the generative model, and performing input based on the target output.

[0148] The generative model is capable of performing reasoning based on the target input, the target first conversation message and the second information.

[0149] The specific implementation of input based on the target input can refer to the related introduction of the previous embodiment, which will not be repeated here.

[0150] The following describes possible implementations of determining the second information for a case where the participants of the target conference include a first session end and multiple second session ends. In this case, determining the second information based on the target first session message may include at least one of the following possible implementations:

[0151] In a possible implementation manner, at least one second conversation message in the target conversation whose message subject is the same as the message subject of the target first conversation message is determined.

[0152] In this possible implementation, the second conversation message may be a conversation message from the first conversation end and having the same message subject as the target first conversation message; or may be a conversation message from the second conversation end and having the same message subject as the target first conversation message.

[0153] Further, with Figure 4 Similar to the embodiment, in order to reduce the amount of processing and improve the prediction accuracy of the generative model, the present application can also determine at least one second conversation message in the target conversation whose generation time is within the target time length from the current moment and whose message subject is the same as the message subject of the target first conversation message.

[0154] In yet another possible implementation, at least one second session message from the target second session end in the target session may be determined based on the target second session end to which the target first session message belongs.

[0155] In this possible implementation, each second session message in the target session belonging to the same second session end as the target first session end is taken as the second session message, and therefore, each second session message comes from the same second session end.

[0156] Further, with Figure 4 Similar to the embodiment, in order to reduce the amount of data processing and improve the prediction accuracy of the generative model, the present application can also determine that the duration between the generation time and the current time in the target session is within the target duration, and at least one second session message from the target second session end.

[0157] The following takes the determination of the second information by combining the above two possible implementation methods as an example, and introduces it in combination with a specific implementation of the input method. Figure 6 , shows another flow chart of the input method provided in an embodiment of the present application. The method of this embodiment may include:

[0158] S601, in response to a target input of a first session end for a target session, if the participating ends of the target session include the first session end and multiple second session ends, obtain at least one first session message that mentions the first session end from at least one session message of each second session end in the target session.

[0159] For ease of understanding, combined Figure 7 Another example diagram of a session interface of the first session end in the target session is shown for illustration.

[0160] exist Figure 7 In the session window 700 of the target session shown, it is taken as an example that the session end identifier of the first session end of the target session is user a, and the target session includes a second session end identifier of user b and a second session end identifier of user c.

[0161] exist Figure 7 In the example, the conversation message referring to the first conversation end is a conversation message including "@user a". Figure 7 It can be seen that the first conversation messages from each second conversation end and mentioning the first conversation end may include: conversation message b11 and conversation message b12 from user b, and conversation message c11 and conversation message c12 from user c.

[0162] In one possible implementation, as mentioned above Figure 3As described in the embodiment, in order to reduce the amount of data processing and to more accurately locate the conversation message targeted by the target input of the first conversation end, the present application can also obtain at least one first conversation message that mentions the first conversation end from at least one conversation message generated by each second conversation end within the target time length before the current moment.

[0163] S602: Determine, from at least one first conversation message, a target first conversation message whose corresponding message subject and / or conversation end identifier matches the target input.

[0164] In an optional manner, if there are multiple first conversation messages whose message subject and / or session end identifier matches the target input, the present application may determine the first conversation message whose message subject and / or session end identifier matches the target input and whose generation time is the latest as the target first conversation message.

[0165] Still combined Figure 7 An example is given to illustrate:

[0166] Depend on Figure 7 It can be seen that in input field 701, the target input of the first session end for the target session is "@user c". In this case, the target input actually needs to be a reply to the session message identified as user c by the session end. Based on this, Figure 7 The target first conversation message is determined by the conversation message with the conversation end identification as user c. Since there are multiple conversation messages with the conversation end identification as user c, the conversation message c12 with the latest generation time and the conversation end identification as user c can be determined as the target first conversation message.

[0167] It is understandable that in Figure 7 In the example, the target input includes the session end identifier of the second session end, and the case where the target input includes the session subject corresponding to the first session message of the second session end is similar. For example, if there are multiple first session messages whose session subjects match the target input, the first session message with the latest generation time among the multiple first session messages is determined as the target first session message, and the details are not repeated here.

[0168] It can be understood that, in step S602, the method of determining the target first conversation message is used as an example. In actual application, it is also possible to first obtain the target response inferred by the generative pattern for the target input, and then determine the target first conversation message matching the target response from the at least one first conversation message.

[0169] S603: Determine at least one second conversation message in the target conversation whose message subject is the same as the message subject of the target first conversation message.

[0170] S604: Determine at least one second session message from the target second session end in the target session based on the target second session end to which the target first session message belongs.

[0171] In the present application, for the sake of distinction, the second session end to which the target second session message belongs is referred to as the target second session end.

[0172] In a possible implementation, considering that the conversation messages generated earlier in the target conversation can provide relatively less effective information as the context of the target first conversation message, the present application can determine, from the conversation messages generated from the target conversation within the target duration from the current moment, each second conversation message having the same message subject as the target first conversation message; and determine each second conversation message from the target second conversation end.

[0173] Still combined Figure 7 An example illustrates:

[0174] Taking the target duration as 1 minute as an example, Figure 7 The target first conversation message is conversation message c12, which belongs to the second conversation end corresponding to user c, and assuming that the message subject of the conversation message c12 is "business trip", therefore, the present application can determine the second conversation messages in the target conversation that are generated within the last minute and whose message subject is "business trip" and the second conversation messages belonging to user c.

[0175] It should be noted that the order of the above steps S603 and S604 is not limited to Figure 6 As shown, in actual application, the order of these two steps can be interchanged or performed simultaneously, without restriction.

[0176] S605: Infer a target output using a generative model based on the target input, the target first session message, and each second session message.

[0177] S606, determining whether a selection operation on a target output is detected, if yes, executing step S607; if no, executing step S608;

[0178] S607: Input the target output into the target session as the session message of the first session end.

[0179] S608, determining whether a triggering operation of the target input is detected, if yes, executing step S609; if no, executing step S610.

[0180] S609: Input the target input into the target session as a session message of the first session end.

[0181] S610, if the selection operation on the target output is not detected and there is an update for the target input, the updated target input is used as the target input, and the process returns to step S601 to regain the target output of the generative model.

[0182] It is understandable that in any of the above embodiments of the present application, considering the different user identities of different session ends in the target session, the tone and data form of the session messages sent by each session end will be different. For example, if the user of the first session end is a teacher, and the users of each second session end are students, then the content of the session messages sent by each student is combined. The session message sent by the user of the first session end needs to pay more attention to the rigor of the wording, and the tone can be serious or kind, etc. Based on this, the present application can also determine the first user identity feature corresponding to the first session end and the second user identity feature associated with each second session message before obtaining the target output of the generative model. Among them, the second user identity feature is the user identity feature corresponding to the second session end to which the second session message belongs.

[0183] For example, the user identity feature may be the user's position, user relationship (eg, friend, classmate, or colleague), user education level, user age, and other feature information that can represent the user's identity.

[0184] The user identity feature can be determined by at least one of the session end identifier of the session end and the user attribute information associated with the session end, without limitation. For example, if the session end identifier of the session end is "Manager XX", the user identity of the session end can be determined to be a department manager.

[0185] Correspondingly, the target output may be reply content that conforms to the identity feature of the first user and is inferred by the generative model based on the target input, the target first conversation message, the second information, and the identity feature of the second user.

[0186] The reply content that meets the identity characteristics of the first user may be a target output whose semantics, tone or literary talent meet the identity characteristics of the first user.

[0187] It can be understood that in any of the above embodiments, if the target first conversation message cannot be determined from at least one first conversation message, the present application can also generate all conversation messages in the target conversation whose time from the current moment to the target time is within the target time, use the generative model to generate the target output, and input based on the target output, which will not be described in detail.

[0188] Corresponding to an input method of the present application, the present application also provides an input device.

[0189] like Figure 8, shows a schematic diagram of a composition structure of an input device provided by the present application. The device of this embodiment may include:

[0190] The first determining unit 801 is configured to obtain first information in response to a target input of a first session end for a target session; the participating ends of the target session include the first session end and at least one second session end, and the first information includes at least one first session message of the at least one second session end in the target session;

[0191] A second determining unit 802 is configured to determine a target first conversation message from the at least one first conversation message based on the target input;

[0192] A third determining unit 803 is configured to determine second information based on the target first session message; the second information includes at least one second session message in the target session;

[0193] The input unit 804 is used to obtain a target output of the generative model and perform input based on the target output; the generative model can perform reasoning based on the target input, the target first conversation message and the second information.

[0194] In one possible implementation, the device may also include: an update processing unit, which is used to return to execute the operation of the first determination unit based on the updated target input to regain the target output of the generative model if no selection operation on the target output is detected and there is an update to the target input of the target session.

[0195] In a possible implementation, the second determining unit includes at least one of the following:

[0196] A first target determination subunit is used to determine, from the at least one first conversation message, a target first conversation message whose corresponding message subject matches the target input;

[0197] A second target determination subunit is configured to determine, based on a session end identifier corresponding to a second session end to which each first session message belongs, a target first session message whose session end identifier matches the target input from the at least one first session message;

[0198] The third target determination subunit is configured to obtain a target problem inferred by the generative mode for the target input, and determine a target first conversation message matching the target problem from the at least one first conversation message.

[0199] In a possible implementation, the first determining unit includes:

[0200] The first obtaining subunit is used for obtaining each first session message of the second session end in the target session if the participating ends of the target session include the first session end and one second session end.

[0201] In yet another possible implementation, the first determining unit includes:

[0202] a second obtaining subunit, configured to obtain, if the participating ends of the target session include the first session end and a plurality of second session ends, at least one first session message mentioning the first session end from at least one session message of each second session end in the target session;

[0203] In yet another possible implementation, the third determining unit includes:

[0204] The first message determination subunit is used to determine at least one second session message in the target session with the same message subject as the target first session message if the participating ends of the target session include the first session end and a second session end.

[0205] In yet another possible implementation, the third determining unit includes at least one of the following:

[0206] A second message determining subunit, configured to determine at least one second conversation message in the target conversation having the same message subject as the message subject of the target first conversation message;

[0207] The third message determination subunit is configured to determine at least one second session message from the target second session end in the target session based on the target second session end to which the target first session message belongs.

[0208] In another possible implementation, the input device further includes: an identity determination unit, configured to determine a first user identity feature corresponding to the first session end and a second user identity feature associated with each second session message, wherein the second user identity feature is a user identity feature corresponding to the second session end to which the second session message belongs;

[0209] The target output obtained by the input unit is the reply content that conforms to the first user identity feature and is inferred by the generative model based on the target input, the target first conversation message, the second information, and the second user identity feature.

[0210] In yet another possible implementation, the input device further includes: a message retaining unit, configured to retain, if there are multiple target first conversation messages, a target first conversation message with the latest generation time.

[0211] The present application also provides an electronic device. Fig. 9 , which shows a schematic diagram of a composition structure of the electronic device, and the electronic device at least includes a processor 901 and a memory 902;

[0212] The processor 901 is used to execute the input method described in any one of the above embodiments;

[0213] The memory 902 is used to store the program required by the processor to perform operations

[0214] It can be understood that the electronic device may further include a display unit 903 and an input unit 904 .

[0215] Of course, the electronic device may also have Fig. 9 There may be more or fewer components, without limitation.

[0216] A computer program product is also provided in an embodiment of the present application, including computer-readable instructions. When the computer-readable instructions are executed on an electronic device, the electronic device implements any input method provided in the embodiment of the present application.

[0217] A computer-readable storage medium is also provided in an embodiment of the present application. The storage medium carries one or more computer programs. When the one or more computer programs are executed by an electronic device, the electronic device can implement any input method provided in the embodiment of the present application.

[0218] It should also be noted that the device embodiments described above are merely schematic, wherein the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed over multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the scheme of this embodiment. In addition, in the drawings of the device embodiments provided by the present application, the connection relationship between the modules indicates that there is a communication connection between them, which may be specifically implemented as one or more communication buses or signal lines.

[0219] Through the description of the above implementation mode, the technicians in the field can clearly understand that the present application can be implemented by means of software plus necessary general hardware, and of course, it can also be implemented by special hardware including special integrated circuits, special CPUs, special memories, special components, etc. In general, all functions completed by computer programs can be easily implemented by corresponding hardware, and the specific hardware structure used to implement the same function can also be various, such as analog circuits, digital circuits or special circuits. However, for the present application, software program implementation is a better implementation mode in more cases. Based on such an understanding, the technical solution of the present application is essentially or the part that contributes to the prior art can be embodied in the form of a software product, which is stored in a readable storage medium, such as a computer floppy disk, a U disk, a mobile hard disk, a ROM, a RAM, a disk or an optical disk, etc., including a number of instructions to enable a computer device (which can be a personal computer, a training device, or a network device, etc.) to execute the methods described in each embodiment of the present application.

[0220] In the above embodiments, all or part of the embodiments may be implemented by software, hardware, firmware or any combination thereof. When implemented by software, all or part of the embodiments may be implemented in the form of a computer program product.

[0221] The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, the process or function described in the embodiment of the present application is generated in whole or in part. The computer may be a general-purpose computer, a special-purpose computer, a computer network, or other programmable devices. The computer instructions may be stored in a computer-readable storage medium, or transmitted from one computer-readable storage medium to another computer-readable storage medium. For example, the computer instructions may be transmitted from a website site, a computer, a training device, or a data center by wired (e.g., coaxial cable, optical fiber, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) mode to another website site, computer, training device, or data center. The computer-readable storage medium may be any available medium that a computer can store or a data storage device such as a training device, a data center, etc. that includes one or more available media integrations. The available medium may be a magnetic medium, (e.g., a floppy disk, a hard disk, a tape), an optical medium (e.g., a DVD), or a semiconductor medium (e.g., a solid-state drive (SSD)), etc.

Claims

1. An input method, comprising: In response to a target input of the first conversation end for the target conversation, obtaining first information; The participating ends of the target session include the first session end and at least one second session end, and the first information includes at least one first session message of the at least one second session end in the target session; Based on the target input, determining a target first conversation message from the at least one first conversation message; determining second information based on the target first conversation message; The second information includes at least one second session message in the target session; Obtaining a target output of a generative model, and performing input based on the target output; The generative model is capable of performing reasoning based on the target input, the target first conversation message, and the second information.

2. The input method according to claim 1, further comprising: If no selection operation on the target output is detected and there is an update to the target input of the target session, based on the updated target input, return to execute the operation of obtaining the first information to regain the target output of the generative model.

3. The input method according to claim 1, wherein obtaining the first information comprises: If the participating ends of the target session include the first session end and one second session end, each first session message of the second session end in the target session is obtained.

4. The input method according to claim 1, wherein obtaining the first information comprises: If the participating ends of the target session include the first session end and multiple second session ends, at least one first session message mentioning the first session end is obtained from at least one session message of each second session end in the target session.

5. The input method according to any one of claims 1 to 4, wherein the step of determining a target first conversation message from the at least one first conversation message based on the target input comprises at least one of the following: Determining, from the at least one first conversation message, a target first conversation message whose corresponding message subject matches the target input; Based on the session end identifier corresponding to the second session end to which each first session message belongs, determining, from the at least one first session message, a target first session message in which the session end identifier matches the target input; A target question inferred by a generative model for the target input is obtained, and a target first conversation message matching the target question is determined from the at least one first conversation message.

6. The input method according to any one of claims 1 to 3, wherein determining the second information based on the target first conversation message comprises: If the participating ends of the target session include the first session end and one second session end, at least one second session message in the target session having the same message subject as the target first session message is determined.

7. The input method according to claim 1, 2 or 4, if the participating terminals of the target conversation include the first conversation terminal and a plurality of second conversation terminals, the determining of the second information based on the target first conversation message comprises at least one of the following: Determine at least one second conversation message in the target conversation having the same message subject as the message subject of the target first conversation message; At least one second session message from the target second session end in the target session is determined based on the target second session end to which the target first session message belongs.

8. The input method according to claim 1, further comprising: Determine a first user identity feature corresponding to the first session end and a second user identity feature associated with each second session message, wherein the second user identity feature is a user identity feature corresponding to the second session end to which the second session message belongs; The target output is the reply content that conforms to the first user identity feature and is inferred by the generative model based on the target input, the target first conversation message, the second information, and the second user identity feature.

9. The input method according to claim 5, further comprising: If there are multiple target first session messages, the target first session message with the latest generation time is retained.

10. An input device, comprising: A first determining unit, configured to obtain first information in response to a target input of a first conversation terminal for a target conversation; The participating ends of the target session include the first session end and at least one second session end, and the first information includes at least one first session message of the at least one second session end in the target session; a second determining unit, configured to determine a target first conversation message from the at least one first conversation message based on the target input; A third determining unit, configured to determine second information based on the target first conversation message; The second information includes at least one second session message in the target session; An input unit, used to obtain a target output of the generative model and to input based on the target output; The generative model is capable of performing reasoning based on the target input, the target first conversation message, and the second information.

Citation Information

Patent Citations

  • Reply information recommendation method and apparatus

    CN105095182A

  • Communication control method and device and storage medium

    CN109873745A

  • User question answering method and device, equipment and medium

    CN117251547A

  • Interaction method and device, equipment and storage medium

    CN117618894A

  • Auxiliary chat method and device of chat assistant, electronic equipment and storage medium

    CN118132740A