An input method and apparatus

By using generative models to infer conversational messages in instant messaging applications, the problem of users needing to review other content when replying to historical messages is solved, thus achieving efficient conversational interaction.

CN119814715BActive Publication Date: 2026-05-26LENOVO (BEIJING) LTD
View PDF 1 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
LENOVO (BEIJING) LTD
Filing Date
2024-12-31
Publication Date
2026-05-26

AI Technical Summary

Technical Problem

In instant messaging applications, users need to review other conversation messages when replying to historical messages, resulting in low reply efficiency.

Method used

By using a generative model to infer accurate response content based on the target input, the target's first conversation message, and second information, the time users spend reviewing historical conversation messages is reduced.

Benefits of technology

It improves the efficiency of conversational interaction, allowing users to respond directly using the output of the generative model without spending too much time reviewing and editing information.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119814715B_ABST
    Figure CN119814715B_ABST
Patent Text Reader

Abstract

This application discloses an input method and apparatus. The method includes: obtaining first information in response to target input from a first session terminal for a target session; the participating terminals of the target session include the first session terminal and at least one second session terminal, and the first information includes at least one first session message from the at least one second session terminal 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 includes at least one second session message in the target session; obtaining a target output of a generative model, and inputting based on the target output; the generative model is capable of inference 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] This application relates to the field of input technology, and more particularly to an input method and apparatus. Background Technology

[0002] Application scenarios for conversational interaction based on instant messaging applications and other conversational applications are becoming increasingly widespread.

[0003] When users interact with other users through instant messaging and other conversational applications, if there are multiple historical conversation messages in the conversation window, after the user determines which historical conversation message needs to be replied to, they still need to review the content of other conversation messages in order to correctly enter the reply information, which makes it impossible for the user to reply to conversation messages efficiently. Summary of the Invention

[0004] On the one hand, this application provides an input method, including:

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

[0006] Based on the target input, determine the target first session message from the at least one first session message;

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

[0008] The target output of the generative model is obtained, and input is made based on the target output; the generative model is capable of inference based on the target input, the target first session message, and the second information.

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

[0010] If no selection operation for the target output is detected, and the target input for the target session is updated, the operation of obtaining the first information is returned based on the updated target input to re-obtain the target output of the generative model.

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

[0012] If the participating ends of the target session include the first session end and a second session end, obtain each of the first session messages of the second session end in the target session.

[0013] In yet another possible implementation, 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 in the target session by each second session end.

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

[0016] From the at least one first session message, determine the target first session message whose message topic matches the target input;

[0017] Based on the session terminal identifier corresponding to the second session terminal to which each first session message belongs, determine the target first session message whose session terminal identifier matches the target input from the at least one first session message;

[0018] Obtain the target question inferred from the generative pattern for the target input, and determine the target first session message that matches the target question from the at least one first session message.

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

[0020] If the participating ends of the target session include the first session end and a second session end, determine at least one second session message in the target session whose message topic is the same as the message topic of the target first session message.

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

[0022] Identify at least one second session message in the target session whose message topic is the same as that of the target first session message;

[0023] Based on the target second session terminal to which the target first session message belongs, at least one second session message from the target second session terminal is determined in the target session.

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

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

[0026] Another possible implementation includes: if there are multiple target first session messages, retain the target first session message with the latest generation time.

[0027] In another aspect, this application also provides an input device, comprising:

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

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

[0030] The third determining unit 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.

[0031] An input unit is used to obtain the target output of the generative model and to input based on the target output; the generative model is capable of inference based on the target input, the target first session message, and the second information. Attached Figure Description

[0032] The above and other features, advantages, and aspects of the embodiments of this disclosure will become more apparent from the accompanying drawings and the following detailed description. Throughout the drawings, the same or similar reference numerals denote 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 flowchart illustrating the input method provided in this application;

[0034] Figure 2 Another flowchart illustrating the input method provided in this application;

[0035] Figure 3 Another flowchart illustrating the input method provided in this application;

[0036] Figure 4 Another flowchart illustrating the input method provided in this application;

[0037] Figure 5 An example diagram of the session interface of the first session client provided in this application in the target session;

[0038] Figure 6 Another flowchart illustrating the input method provided in this application;

[0039] Figure 7 Another example diagram of the session interface of the first session client provided in this application in the target session;

[0040] Figure 8 A schematic diagram of the composition structure of the input device provided in this application;

[0041] Figure 9 A schematic diagram of the composition structure of an electronic device provided in this application. Detailed Implementation

[0042] The embodiments of this application are described below with reference to the accompanying drawings. The terminology used in the implementation section of this application is only for explaining specific embodiments and is not intended to limit the application. Those skilled in the art will recognize that, with technological advancements and the emergence of new scenarios, the technical solutions provided in the embodiments of this application are also applicable to similar technical problems.

[0043] The terms "first," "second," etc., used in the specification, claims, and accompanying drawings of this application are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such terms are interchangeable where appropriate; this is merely a way of distinguishing objects with the same attributes in the embodiments of this application. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover non-exclusive inclusion, so that a process, method, system, product, or apparatus that comprises a series of elements is not necessarily limited to those elements, but may include other elements not explicitly listed or inherent to those processes, methods, products, or apparatuses.

[0044] like Figure 1 This illustration shows a flowchart of an input method provided in an embodiment of this application. The solution in this embodiment can be applied to an electronic device, which can be a terminal device where the first session end is located, or a server that provides session interaction services, without any limitation.

[0045] The method in this embodiment may include:

[0046] S101, in response to the target input of the first session end for the target session, obtain the first information.

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

[0048] The target input refers to the content to be input generated by the input operation of the first session client in relation to the target session. Therefore, the content of the target input at the current moment does not belong to the session messages in the target session. For example, the target input of the first session client in relation to the target session can be information entered by the first session client into the input field of the target session.

[0049] The specific form of the content in the target input can be varied, such as strings, emoji descriptors, animations, or audio, without any restrictions.

[0050] In this application, the first information includes at least one first session message from at least one second session endpoint in the target session. For example, the first message may include all first session messages from all second session endpoints in the target session. Furthermore, considering that users on the first session endpoint are more likely to reply to recently sent session messages from the second session endpoints during the session, the first information may include: at least one first session message from at least one second session endpoint in the target session within a set time range prior to the current moment.

[0051] S102, Based on the target input, determine the target first session message from at least one first session message.

[0052] The target first session message is the first session message that matches the target input. For example, the target first session message can be at least one of the following: message content, expressed semantics, or associated session endpoint, and is the first session message that matches the content of the target input.

[0053] Understandably, during the conversational interaction, the user on the first conversation end needs to reply to a message sent by the second conversation end. Therefore, the target first conversation message can be the reply message that the user on the first conversation end is waiting to reply to. Considering that the user's target input will be related to that first conversation message when inputting reply information, the target first conversation message that the user expects to reply to can be determined from at least one first conversation message from at least one second conversation end based on this target input.

[0054] S103, determine the second information based on the target first session message.

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

[0056] In this application, the second session message is a session message in the target session that is related to 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 the session client to which the target first session message belongs.

[0057] S104: Obtain the target output of the generative model and use the target output as input.

[0058] The generative model is capable of reasoning based on the target input, the target first session message, and the second information. Therefore, the target output is the information to be input from the first session end, inferred by the generative model based on the target input, the target first session message, and the second information.

[0059] The input based on the target output can 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 can be displayed as candidate input information for the user to select in the candidate input information display area. Based on this, if the user at the first session confirms that the target output is the information that the user needs to input, then the user selects the target output in the candidate input information display area to trigger the input of the target output into the target session.

[0060] If the target output is not the information the user expects to input, the user ignores the target output and continues to input information for that target session to update the target input.

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

[0062] In this application, the generative model learns the features and patterns of input information by training on a large amount of diverse data. It typically has hundreds of millions to trillions of model parameters (model parameters are variables that control the behavior of the target model) and is able to capture complex relationships and patterns in the input information. The generative model can be a large language model or other machine learning model, without limitation.

[0063] It is understandable that a generative model can have one or more target outputs, which can be set as needed without any restrictions.

[0064] As can be seen from the above, when there is target input for the target session on the first session end, this application first determines at least one first session message from at least one second session end within the target session. Since the content of the target input reflects the content to be input by the first session end into the target session, 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, this 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 uses the target output inferred by the generative model to accurately express the reply information that the first session end wants to input. Therefore, the user of the first session end does not need to spend too much time reviewing historical session messages, editing and inputting information, but can complete the reply to the session message based on the target output of the generative model, thus improving the efficiency of session interaction.

[0065] Understandably, if the target output of the generative model deviates from the information the user expects to input in the first session, the user will not choose to input that target input, but may continue to input the target information for that session. Based on this, in order to continue predicting the information the user might want to input into the target session, if no selection operation for that target output is detected, and the target input for that session is updated, the process can return to obtain the first information and subsequent operations based on the updated target input to re-obtain the target output of the generative model.

[0066] Understandably, because the second session of the target session may generate new second session messages while the user is updating the target input, the first information obtained when returning to obtain the first information based on the updated target input will 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, thus causing the target output redefined by the generative model to change.

[0067] For example:

[0068] Suppose that user A in the first session has the target input "Zhang San" for the target session, and there are 5 first session messages sent by users B and C in the target session. Then, based on "Zhang San", we need to match the target first session message from these 5 first session messages. Then, based on the target first session message, we need to determine at least one second session message in the target session, and finally use a generative model to determine the target output.

[0069] If user A in the first session does not select the target output as the session message content, but continues to input information based on the already entered "Zhang San", assuming the updated target input is "Zhang San, [specific meeting]", then if there are 7 first session messages sent by users B and 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, [specific meeting]", then re-determine at least one second session message from the target session based on the currently determined target first session message, and finally redetermine the target output using a generative model.

[0070] In this application, there are several possible implementations for determining the target first session message based on the target input. Several possible implementations are illustrated below. In practical applications, determining the target first session message can be achieved using at least one of the following possible implementations:

[0071] In one possible implementation, this application can determine the target first session message whose message topic matches the target input from the at least one first session message.

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

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

[0074] Of course, the subject of the conversation message can be "work arrangement", "clothing" or "press conference", etc., depending on the content of the conversation message, and there are no restrictions on this.

[0075] The message topic of a conversation message can be determined by semantic analysis of the conversation message; or it can be determined by segmenting multiple conversation messages and classifying conversation messages containing the same segment into conversation messages belonging to the message topic represented by that segment.

[0076] Of course, there are other ways to define the message subject of a session message, and there are no restrictions on this.

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

[0078] In particular, to reduce delays in determining the target first session message due to the determination of the message subject of the session message, this application can also predetermine the message subject of the session messages in the target session. For example, the message subject of each session message generated in the target session can be determined; alternatively, the message subject of each session message in the target session can be determined periodically or irregularly.

[0079] The matching of message topic and target input can be either that the target input includes the topic words corresponding to the message topic, or that the similarity between the target input and the message topic exceeds a set threshold, without any specific restrictions.

[0080] Understandably, if the message subject of the first session message matches the target input, it means that the target input is very likely a reply to the message subject of the first session message. Therefore, identifying the first session message whose message subject matches the target input as the target first session message is beneficial for accurately identifying the various second session messages related to the message subject to be replied to from the target session.

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

[0082] For either the first or second session terminal, the session terminal identifier is used to uniquely identify that session terminal. For example, the session terminal identifier can be the username, nickname, or job title that can uniquely identify the user (e.g., Project Manager or General Manager of Department A).

[0083] A match between the session identifier and the target input can be achieved either by the target input including the session identifier, or by the similarity between the session identifier and the target input exceeding a set threshold.

[0084] It is understandable that if the session identifier of the second session to which the first session message belongs matches the target input, it means that the target input is very likely a reply to the input of the second session message. Therefore, the first session message can be identified as the target first session message so as to facilitate the subsequent matching of relevant context session messages.

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

[0086] In another possible implementation, the target question inferred by the generative pattern for the target input can also be obtained, and the target first session message matching the target question can be determined from the at least one first session message.

[0087] The target question is the question information that the generative model infers that the target input may address.

[0088] It is understandable that during the conversational interaction, the target input of the first conversation end to the target conversation is the reply information of a certain first conversation message input by a certain second conversation end in the target conversation. The target problem is the problem that the target input may address, which is inferred by the generative model. Therefore, the first conversation message that the target input addresses must match the target problem.

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

[0090] In this application, there are several possible implementations for obtaining the first message, and these implementations will vary depending on the specific scenario of the target session. The following explanations will illustrate these implementations in the context of different target session scenarios.

[0091] First, considering the scenario where the target session involves two participants—a first session participant and a second session participant—the specific implementation for obtaining the first message will be described. For example... Figure 2 This illustration shows a flowchart of an input method provided in an embodiment of this application. This embodiment describes a scenario where a first session endpoint and a second session endpoint are in a session. This embodiment may include:

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

[0093] In a target session where the participants include only the first session endpoint and a second session endpoint, each first session message sent by the second session endpoint is a session message addressed to the first session endpoint. Correspondingly, the first session endpoint can reply to any first session message from the second session endpoint. Therefore, each first session message from the second session endpoint in the target session could be a session message that the target input requires a reply to.

[0094] Understandably, in practical applications, the number of session messages from the second session end in the target session may be quite large, and many session messages were generated a considerable amount of time ago. Users on the first session end typically reply to session messages recently sent by the second session end. Therefore, to reduce data processing volume and more accurately locate the session message targeted by the first session end's input, this application can also obtain all first session messages from the second session end within the target session up to the current time.

[0095] The target duration can be a pre-set duration, such as 1 minute, 10 minutes, or 1 hour.

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

[0097] S202, based on the target input, determine the target first session message from the at least one first session message.

[0098] The specific implementation of determining the target first session message may include at least one of the implementation methods mentioned above, without any specific restrictions.

[0099] For example:

[0100] If the target input includes the session identifier of the second session client but not the session topic of any first session message, then since all first session messages belong to the same second session client, all first session messages can be identified as the target first session message.

[0101] If the target input includes the message topic to which a certain first session message belongs, then that first session message can be identified as the target first session message.

[0102] Furthermore, if there are multiple target first session messages, only the first session message with the latest generation time can be identified as the target first session message.

[0103] Of course, the implementation method of obtaining the target question inferred from the generative pattern for the target input and determining the target first session message that matches the target question is also applicable to this embodiment, and there is no limitation thereto.

[0104] S203, determine the second information based on the first session message of the target.

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

[0106] S204, obtain the target output of the generative model, and use the target output as input.

[0107] The generative model is capable of reasoning based on the target input, the target's first session message, and second information.

[0108] The above two steps S203 and S204 can be found in the relevant descriptions of other embodiments of this application, and will not be repeated here.

[0109] The following section describes the specific implementation of obtaining the first information, assuming the target session involves both a first session participant and multiple second session participants. For example... Figure 3 This illustrates another flowchart of the input method provided in an embodiment of this application. The method in this embodiment may include:

[0110] S301, in response to the target input of the first session end for the target session, 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.

[0111] The first session message that mentions the first session client can be a first session message that prompts the first session client to reply or process. For example, if the session client identifier of the first session client is the username of the first session client, "Li Si", and the session message generated by the second session client includes information that prompts Li Si to pay attention through a specific identifier, such as "@Li Si" in the session message, then the session message is determined to be the first session message that mentions the first session client.

[0112] The first session message that mentions the first session endpoint can also be a first session message whose message content contains the session endpoint identifier of the first session endpoint. For example, if the session endpoint identifier of the first session endpoint is the username "Li Si" of the first session endpoint, and if the session message generated by the second session endpoint includes content discussing or mentioning "Li Si", then the session message of the second session endpoint belongs to the first session message.

[0113] It is understandable that in a target session involving multiple session endpoints, if a second session endpoint mentions a session message related to the first session endpoint, and this message is also a session message that the first session endpoint needs to respond to, then each session message mentioned by a second session endpoint is also a session message that the first session endpoint's target input needs to respond to.

[0114] Considering that the number of session messages from each second session endpoint in the target session may be relatively large, and users on the first session endpoint generally reply to session messages recently sent by the second session endpoints, in one possible implementation, to reduce data processing volume and more accurately locate the session message targeted by the first session endpoint's target input, this application can also obtain at least one first session message mentioning the first session endpoint from at least one session message generated by each second session endpoint within a target duration before the current time.

[0115] S302, based on the target input, determine the target first session message from the at least one first session message.

[0116] In this application, any one or more of the above-mentioned methods for determining the target first session message are applicable to this embodiment. For example, at least one of the following can be used: the session message topic, the session terminal identifier of the second session terminal to which it belongs, and / or the target response inferred from the generative pattern based on the target input. The first session message that matches the target input is determined as the target first session message.

[0117] Specifically, if the target first session message is not present in at least one first session message that mentions the first session end, this application can also determine at least one first session message sent by each second session end in the target session that does not mention the first session end. Based on this, the target first session message can be matched against the target input in at least one first session message that does not mention the first session end, and subsequent steps S303 to S304 can be performed.

[0118] The specific implementation of matching the target first session message in at least one first session message that never mentions the first session end can adopt any of the aforementioned implementation methods for matching the target first session message. In one alternative method, this application can determine the target first session message that matches the target input by identifying the session message topic and / or the target response inferred from the generative pattern for the target input in at least one first session message that never mentions the first session end.

[0119] S303, determine the second information based on the target first session message.

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

[0121] S304: Obtain the target output of the generative model and use the target output as input.

[0122] The generative model is capable of reasoning based on the target input, the target's first session message, and second information.

[0123] The above steps S303 and S304 can be found in the relevant descriptions of the previous embodiments, and will not be repeated here.

[0124] It is understood that, in the above embodiments, if each first session message in the first information is a first session message of the second session end within the target duration before the current time, and if the target first session message cannot be matched from at least one first session message, this application may further increase the time length of the target duration, return to execute the operation of obtaining at least the first session message generated by each second session end in the target session within the target duration before the current time, and re-execute the operation of matching the target first session message.

[0125] In any of the embodiments described above, there are various possible implementations for determining the second information based on the target first session message. These will be explained below in conjunction with different session scenarios of the target session.

[0126] In one possible implementation, if the participants in the target session include a first session client and a second session client, then at least one second session message in the target session whose message topic is the same as that of the target first session message can be identified. This second session message with the same message topic as the target first session message can originate from either the first session client or the second session client.

[0127] The following section uses this possible implementation as an example to introduce the input method of this application, along with a specific implementation. For example... Figure 4 This illustrates another flowchart of the input method provided in an embodiment of this application. The method in this embodiment may include:

[0128] S401, in response to the target input of the first session end for the 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 whose generation time is within the target duration from the current time.

[0129] The target duration can be a fixed value or a value determined based on the generation time of the last message in the target session, as described above and will not be repeated here.

[0130] Assuming a target duration of 10 minutes, and that the session identifier for the first session is user a, while the session identifier for the second session is user b, then... Figure 5 The following is an example diagram illustrating the session interface of the first session client in the target session:

[0131] Assuming the current time is 9:00, by Figure 5 As can be seen from the target session window 500, when the first session end enters the target input "Conference TT in progress" 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] In the target session, there are multiple session messages from both user a and user b. Based on the generation time of each session message from user b, it can be seen that within 10 minutes before the current time (9:00), there were 3 session messages from user b, namely session message b1, session message b2, and session message b3. Therefore, these three session messages will be identified as the first session message.

[0133] It is understood that this embodiment is illustrated by taking the first session message whose generation time is within the target duration as an example. However, the situation in which the generation time of the session message generated by the second session end is not considered, and all session messages generated by the second session end are taken as the first session message, is also applicable to this embodiment.

[0134] S402, Detect whether there is a target first session message in the at least one first session message whose message subject matches the target input. If yes, proceed to step S404; otherwise, proceed to step S403.

[0135] It is understandable that when the target session only includes a first session endpoint and a second session endpoint, all first session messages belong to the same second session endpoint. Based on this, even if the target input mentions the session endpoint identifier of the second session endpoint, all first session messages will still match the target input. Therefore, this embodiment does not need to consider whether the second session endpoint to which each first session message belongs matches the target input; it only needs to detect whether the target input mentions the message topic corresponding to each first session message.

[0136] If there exists a target first session 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 session message. Therefore, the target first session message is the session message that the target input wants to reply to.

[0137] Understandably, if there are multiple first session messages whose message topics match the target input, the target first session message with the latest generation time can be determined from these multiple first session messages whose message topics match the target input.

[0138] Still combined Figure 5 To illustrate:

[0139] Depend on Figure 5 It can be seen that the target input for user a in the first session is "Meeting TT in progress". The identified first session messages in the second session include: session message b1, session message b2, and session message b3. Assuming that the subject of session message b1 is "Clothing", while the subjects of session messages b2 and b3 are "Meeting TT", and this subject "Meeting TT" matches the subject mentioned in the target input, then the session message b2, which was generated latest, can be identified as the target first session message.

[0140] It should be noted that this embodiment is an example of one implementation for determining the target first session message. In practical applications, step S402 can also be replaced by: obtaining the target response inferred from the generative pattern for the target input, and detecting whether there is a target first session message matching the target response from at least one first session message. Alternatively, step S402 can be replaced by: detecting whether there is a target first session message in the at least one first session message whose message subject matches the target input, or whether there is a target first session message matching the target response. The specific details will not be elaborated further.

[0141] S403, determine the target first session message with the latest generation time among the at least one first session message.

[0142] If the target input does not include content related to the message topic of any first session message, then the user on the first session end is most likely to want to reply to the first session message generated latest on the second session end. Therefore, the first session message generated latest can be determined as the target first session message.

[0143] S404, determine at least one second session message in the target session whose message topic is the same as the message topic of the target first session message.

[0144] In one possible implementation, in order to reduce the amount of data processing and ensure the accuracy of the generative model's prediction of the target output, this application may also determine at least one second session message in the target session whose generation time is within the target duration from the current time and whose message topic is the same as the message topic of the first session message of the target.

[0145] Still combined Figure 5 Example illustration:

[0146] exist Figure 5 The first target session message identified is session message b2 from user b, and the message subject of session message b2 is "Meeting TT". Therefore, this application can identify session messages whose generation time is within 10 minutes of the current time and whose message subject is "Meeting TT" as the second session message. Assuming that the session message from user a is also a session message generated within the last 10 minutes and its message subject is also "Meeting TT", then... Figure 5 In addition to session messages b2 and b3, the second session message also includes session message a1 from user a.

[0147] S405, obtain the target output of the generative model, and use the target output as input.

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

[0149] The specific implementation of input based on the target input can be found in the relevant descriptions of the previous embodiments, and will not be repeated here.

[0150] The following describes possible implementations for determining the second information, assuming the target meeting involves both a first session endpoint and multiple second session endpoints. In this case, determining the second information based on the target first session message can include at least one of the following possible implementations:

[0151] In one possible implementation, at least one second session message in the target session is identified whose message topic is the same as that of the target first session message.

[0152] In this possible implementation, the second session message can be a session message from the first session end with the same message subject as the target first session message; or it can be a session message from the second session end with the same message subject as the target first session message.

[0153] Furthermore, with Figure 4 Similarly, in order to reduce the amount of data processing and improve the prediction accuracy of the generative model, this application may also determine at least one second session message in the target session whose generation time is within the target duration from the current time and whose message topic is the same as the message topic of the target first session message.

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

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

[0156] Furthermore, with Figure 4 Similarly, in order to reduce the amount of data processing and improve the prediction accuracy of the generative model, this application may also determine that the generation time in the target session is within the target duration and that at least one second session message comes from the target second session end.

[0157] The following example uses a combination of the two possible implementation methods to determine the second information, and is further explained in conjunction with a specific implementation of the input method. For example... Figure 6 This illustrates another flowchart of the input method provided in an embodiment of this application. The method in this embodiment may include:

[0158] S601, in response to the target input of the first session end for the target session, 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.

[0159] For ease of understanding, combined with Figure 7 The following is another example diagram illustrating the session interface of the first session client in the target session.

[0160] exist Figure 7 In the session window 700 of the target session shown, the session terminal identifier of the first session terminal of the target session is user a, and the target session includes a second session terminal with a session terminal identifier of user b and a second session terminal with a session terminal identifier of user c.

[0161] exist Figure 7 Taking the first session message mentioned in the text as an example, which includes "@usera", the following is a more detailed explanation: Figure 7 It can be seen that the first session messages from each second session end that mention the first session end may include: session messages b11 and b12 from user b, and session messages c11 and c12 from user c.

[0162] In one possible implementation, as mentioned above Figure 3As described in the embodiments, 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 terminal, this application can also obtain at least one first session message mentioning the first session terminal from at least one session message generated by each second session terminal within the target duration before the current time.

[0163] S602, from at least one first session message, determine the target first session message whose corresponding message subject and / or session identifier matches the target input.

[0164] In one alternative approach, if there are multiple first session messages whose message subject and / or session identifier match the target input, this application may identify the first session message whose message subject and / or session identifier matches the target input and whose generation time is the latest as the target first session message.

[0165] Still combined Figure 7 To illustrate:

[0166] Depend on Figure 7 As can be seen, in input field 701, the target input from the first session client is "@user c". In this case, the target input actually needs to be a reply to the session message identified as user c from the session client. Based on this, we can... Figure 7 The target first session message is determined from the session message identified by user c. Since there are multiple session messages with user c as the session end, the session message c12, which was generated the latest and has user c as the session end, can be identified as the target first session message.

[0167] Understandably, in Figure 7 Taking the example of the target input including the session identifier of the second session client, the situation is similar for the case where the target input includes the session topic corresponding to the first session message of the second session client. For example, if there are multiple first session messages whose session topics match the target input, the first session message with the latest generation time among these multiple first session messages is determined as the target first session message. The specifics will not be elaborated further.

[0168] It is understandable that step S602 is illustrated by the method of determining the target first session message. In practical applications, it is also possible to first obtain the target response inferred from the generative pattern for the target input, and then determine the target first session message that matches the target response from the at least one first session message.

[0169] S603, determine at least one second session message in the target session whose message subject is the same as the message subject of the target first session message.

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

[0171] In this application, for ease 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 one possible implementation, considering that the effective information that the earlier generated session messages in the target session can provide as the context of the target first session message is relatively limited, this application may identify each second session message with the same message topic as the target first session message from among the session messages generated in the target session that are within the target duration from the current time; and identify each second session message from the target second session end.

[0173] Still combined Figure 7 Example illustration:

[0174] Taking a target duration of 1 minute as an example, in Figure 7 The target first session message is session message c12. Session message c12 belongs to the second session end corresponding to user c. Assuming that the message subject of session message c12 is "business trip", this application can determine the second session messages generated within the last minute in the target session with the message subject "business trip" and the second session messages belonging to user c.

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

[0176] S605 uses a generative model to infer the target output based on the target input, the target first session message, and each second session message.

[0177] S606, Determine whether a selection operation on the target output is detected. If yes, proceed to step S607; otherwise, proceed to step S608.

[0178] S607, the target output is input into the target session as a session message from the first session end.

[0179] S608, determine whether a trigger operation for the target input has been detected. If yes, proceed to step S609; otherwise, proceed to step S610.

[0180] S609, the target input is input into the target session as a session message from the first session end.

[0181] S610, if no selection operation for the target output is 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 obtain the target output of the generative model again.

[0182] It is understood that in any of the above embodiments of this application, considering the different user identities of different conversation ends in the target session, the tone and data format of the conversation messages sent by each conversation end will be different. For example, if the user of the first conversation end is a teacher, and the users of each second conversation end are students, then the content of the conversation messages sent by each student will be considered. The conversation messages sent by the user of the first conversation end need to pay more attention to the precision of word choice, and the tone can be serious or amiable, etc. Based on this, this application can also determine the first user identity feature corresponding to the first conversation end and the second user identity feature associated with each second conversation 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 conversation end to which the second conversation message belongs.

[0183] For example, user identity features can be user job title, user relationships (such as friends, classmates or colleagues), user education level, and user age, which are characteristic information that can represent user identity.

[0184] The user's identity can be determined by at least one of the session identifier and the user attribute information associated with the session, without any specific restrictions. For example, if the session identifier is "Manager XX", the user's identity on that session can be determined to be a department manager.

[0185] Correspondingly, the target output can be a response content that conforms to the first user identity feature, inferred by the generative model based on the target input, the target first session message, the second information, and the second user identity feature.

[0186] The response content that matches the first user's identity characteristics can be the target output's semantics, tone, or writing style, etc., that match the first user's identity characteristics.

[0187] It is understood that, in any of the above embodiments, if the target first session message cannot be determined from at least one first session message, this application may also generate a target output based on all session messages in the target session whose generation time is within the target duration from the current time, using the generative model, and input based on the target output, which will not be elaborated further.

[0188] Corresponding to one input method of this application, this application also provides an input device.

[0189] like Figure 8This diagram illustrates a possible structural composition of the input device provided in this application. The device in this embodiment may include:

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

[0191] The second determining unit 802 is used to determine the target first session message from the at least one first session message based on the target input;

[0192] The 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 the target output of the generative model and input based on the target output; the generative model is capable of inference based on the target input, the target first session message and the second information.

[0194] In one possible implementation, the apparatus may further include: an update processing unit, configured to, if no selection operation on the target output is detected and the target input for the target session is updated, return to the operation of the first determining unit based on the updated target input to re-obtain the target output of the generative model.

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

[0196] The first target determination subunit is used to determine, from the at least one first session message, a target first session message whose message topic matches the target input;

[0197] The second target determination subunit is used to determine, based on the session terminal identifier corresponding to the second session terminal to which each first session message belongs, the target first session message that matches the target input from the at least one first session message;

[0198] The third target determination subunit is used to obtain the target question inferred by the generative pattern for the target input, and to determine the target first session message that matches the target question from the at least one first session message.

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

[0200] The first obtaining subunit is configured to obtain, if the participating ends of the target session include the first session end and a second session end, each of the first session messages of the second session end in the target session.

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

[0202] The second obtaining subunit is configured to, if the participating ends of the target session include the first session end and multiple second session ends, obtain from at least one first session message mentioning the first session end from at least one session message in the target session by each second session end.

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

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

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

[0206] The second message determination subunit is used to determine at least one second session message in the target session whose message topic is the same as that of the target first session message.

[0207] The third message determination subunit is used to determine at least one second session message from the target second session terminal in the target session based on the target second session terminal 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 terminal and a second user identity feature associated with each second session message, wherein the second user identity feature is the user identity feature corresponding to the second session terminal to which the second session message belongs;

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

[0210] In another possible implementation, the input device further includes a message retention unit, used to retain the target first session message with the latest generation time if multiple target first session messages exist.

[0211] This application also provides an electronic device in its embodiments. For example... Figure 9 As shown, it illustrates a schematic diagram of the composition structure of the electronic device, which includes at least a processor 901 and a memory 902;

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

[0213] The memory 902 is used to store the programs required for the processor to perform operations.

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

[0215] Of course, the electronic device can also have more than Figure 9 There are no restrictions on the number of components, whether more or fewer.

[0216] This application also provides a computer program product, including computer-readable instructions, which, when executed on an electronic device, cause the electronic device to implement any of the input methods provided in this application.

[0217] This application also provides a computer-readable storage medium that 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 of the input methods provided in this application.

[0218] It should also be noted that the device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separate, and the components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the modules can be selected to achieve the purpose of this embodiment according to actual needs. In addition, in the device embodiment drawings provided in this application, the connection relationship between modules indicates that they have a communication connection, which can be implemented as one or more communication buses or signal lines.

[0219] Through the above description of the embodiments, those skilled in the art can clearly understand that this application can be implemented by means of software plus necessary general-purpose hardware, or it can be implemented by special-purpose hardware including application-specific integrated circuits, special-purpose CPUs, special-purpose memory, special-purpose components, etc. Generally, any function performed by a computer program can be easily implemented by corresponding hardware, and the specific hardware structure used to implement the same function can also be diverse, such as analog circuits, digital circuits, or special-purpose circuits. However, for this application, software program implementation is more often the preferred implementation method. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product is stored in a readable storage medium, such as a computer floppy disk, USB flash drive, mobile hard disk, ROM, RAM, magnetic disk, or optical disk, etc., and includes several instructions to cause a computer device (which may be a personal computer, training equipment, or network device, etc.) to execute the methods described in the various embodiments of this application.

[0220] In the above embodiments, implementation can be achieved, in whole or in part, through software, hardware, firmware, or any combination thereof. When implemented in software, it can be implemented, in whole or in part, as 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, all or part of the processes or functions described in the embodiments of this application are generated. The computer may be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions may be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another. For example, the computer instructions may be transmitted from one website, computer, training device, or data center to another website, computer, training device, or data center via wired (e.g., coaxial cable, fiber optic, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) means. 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 or data center that integrates one or more available media. The available media may be magnetic media (e.g., floppy disks, hard disks, magnetic tapes), optical media (e.g., DVDs), or semiconductor media (e.g., solid-state drives (SSDs)).

Claims

1. An input method, comprising: In response to the target input from the first session end for the target session, obtain the 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 from the at least one second session end in the target session; Based on the target input, the target first session message to be replied to is determined from the at least one first session message; The second information is determined based on the target first session message; the second information includes at least one second session message in the target session. Obtain the target output of the generative model, and use the target output as input; The generative model is capable of inference based on the target input, the target first session message, and the second information.

2. The input method according to claim 1 further includes: If no selection operation for the target output is detected, and the target input for the target session is updated, the operation of obtaining the first information is returned based on the updated target input to re-obtain the target output of the generative model.

3. The input method according to claim 1, wherein obtaining the first information includes: If the participating ends of the target session include the first session end and a second session end, obtain each of the first session messages of the second session end in the target session.

4. The input method according to claim 1, wherein obtaining the first information includes: 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 in the target session by each second session end.

5. The input method according to any one of claims 1 to 4, wherein determining the target first session message from the at least one first session message based on the target input includes at least one of the following: From the at least one first session message, determine the target first session message whose message topic matches the target input; Based on the session terminal identifier corresponding to the second session terminal to which each first session message belongs, determine the target first session message whose session terminal identifier matches the target input from the at least one first session message; Obtain the target question inferred from the generative pattern for the target input, and determine the target first session message that matches the target question from the at least one first session message.

6. The input method according to any one of claims 1 to 3, wherein determining the second information based on the target first session message includes: If the participating ends of the target session include the first session end and a second session end, determine at least one second session message in the target session whose message topic is the same as the message topic of the target first session message.

7. The input method according to claim 1, 2, or 4, wherein if the participating terminals of the target session include the first session terminal and a plurality of second session terminals, the step of determining the second information based on the target first session message includes at least one of the following: Identify at least one second session message in the target session whose message topic is the same as that of the target first session message; Based on the target second session terminal to which the target first session message belongs, at least one second session message from the target second session terminal is determined in the target session.

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

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

10. An input device, comprising: The first determining unit is configured to obtain first information in response to the target input of the first session terminal for the 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 from the at least one second session end in the target session; The second determining unit is configured to determine the target first session message for which a response is expected from the at least one first session message based on the target input. The third determining unit is used to determine the second information based on the target first session message; The second information includes at least one second session message in the target session; An input unit is used to obtain the target output of the generative model and to input based on the target output. The generative model is capable of inference based on the target input, the target first session message, and the second information.