Message processing method and apparatus, and device and storage medium

By constructing a message window mechanism, the problem of disordered response order in chatbots was solved, and the response logic became smooth and the processing efficiency improved when users input continuously.

WO2025246543A1PCT designated stage Publication Date: 2025-12-04BEIJING YOUZHUJU NETWORK TECH CO LTD
View PDF 5 Cites 0 Cited by

Patent Information

Application Number
PCT/CN2025/082369
Authority / Receiving Office
WO · WO
Patent Type
Applications
Current Assignee / Owner
Priority Date
2024-05-27
Filing Date
2025-03-13
Publication Date
2025-12-04

AI Technical Summary

Technical Problem

The order of responses from chatbots can easily become disordered, especially when users ask questions in succession. The extended processing time for complex questions can lead to a chaotic response order.

Method used

By constructing a message window mechanism, the first set of messages is collected and sent within the time range of the first message window to generate the first response. The time range of the second message window is constructed based on the end time of the first response and the associated response time, ensuring that the second response is generated after the first response.

Benefits of technology

This effectively avoids disordered response order, improves the anthropomorphism of the responses, and reduces the computational burden on the target processing entity.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN2025082369_04122025_PF_FP_ABST
    Figure CN2025082369_04122025_PF_FP_ABST
Patent Text Reader

Abstract

The embodiments of the present disclosure relate to a message processing method and apparatus, and a device and a storage medium. The method provided herein comprises: in response to the reception of a first message, determining a first message window corresponding to the first message; sending to a target processing entity a first group of messages received within a first time range of the first message window, so as to generate a first reply for the first group of messages, wherein the first group of messages comprises the first message; in response to the reception of a second message beyond the first time range, constructing a second message window on the basis of the second message, wherein a second time range of the second message window is determined on the basis of a first end time of the first time range and a reply time that is associated with the first reply; and sending to the target processing entity a second group of messages received within the second time range of the second message window, so as to generate a second reply for the second group of messages, wherein the second group of messages comprises the second message.
Need to check novelty before this filing date? Find Prior Art

Description

Message processing methods, apparatus, devices and storage media

[0001] This application claims priority to Chinese Patent Application No. 202410669243.8, filed on May 27, 2024, entitled "Message Processing Method, Apparatus, Device and Storage Medium", the entire contents of which are incorporated herein by reference. Technical Field

[0002] The exemplary embodiments disclosed herein relate generally to the field of computers, and particularly to message processing methods, apparatus, devices, and storage media. Background Technology

[0003] With the development of machine learning models, chatbots have become one of the main ways people obtain information. Chatbots can process questions asked by users and then return corresponding answers. However, when a user asks multiple questions, the order in which the chatbot responds can easily become disordered. Summary of the Invention

[0004] In a first aspect of this disclosure, a message processing method is provided, the method comprising: in response to receiving a first message, determining a first message window corresponding to the first message; sending a first set of messages received within a first time range of the first message window to a target processing entity to generate a first response to the first set of messages, the first set of messages including the first message; in response to receiving a second message outside the first time range, constructing a second message window based on the second message, the second time range of the second message window being determined based on a first end time of the first time range and a response time associated with the first response; and sending a second set of messages received within a second time range of the second message window to a target processing entity to generate a second response to the second set of messages, the second set of messages including the second message.

[0005] In a second aspect of this disclosure, a message processing apparatus is provided, comprising: a message window determination module configured to determine a first message window corresponding to the first message in response to receiving a first message; a first message sending module configured to send a first set of messages received within a first time range of the first message window to a target processing entity to generate a first response to the first set of messages, the first set of messages including the first message; a message window construction module configured to construct a second message window based on the second message in response to receiving a second message outside the first time range, the second time range of the second message window being determined based on a first end time of the first time range and a response time associated with the first response; and a second message sending module configured to send a second set of messages received within a second time range of the second message window to a target processing entity to generate a second response to the second set of messages, the second set of messages including the second message.

[0006] In a third aspect of this disclosure, an electronic device is provided. The device includes at least one processing unit; and at least one memory coupled to the at least one processing unit and storing instructions for execution by the at least one processing unit. When executed by the at least one processing unit, the instructions cause the electronic device to perform the method of the first aspect.

[0007] In a fourth aspect of this disclosure, a computer-readable storage medium is provided. The computer-readable storage medium stores a computer program that can be executed by a processor to implement the method of the first aspect.

[0008] In a fifth aspect of this disclosure, a computer program product is provided. The computer program product includes computer-executable instructions that, when executed by a processor, implement the method according to a first aspect of this disclosure.

[0009] It should be understood that the content described in this content section is not intended to limit the key or essential features of the embodiments of this disclosure, nor is it intended to restrict the scope of this disclosure. Other features of this disclosure will become readily apparent from the following description. Attached Figure Description

[0010] 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. In the drawings, the same or similar reference numerals denote the same or similar elements, wherein:

[0011] Figure 1 shows one of the schematic diagrams of interacting with a chatbot based on some solutions;

[0012] Figure 2 shows a second schematic diagram of interacting with a chatbot based on some solutions;

[0013] Figure 3 shows a schematic diagram of an example environment in which embodiments of the present disclosure can be implemented;

[0014] Figure 4 illustrates a schematic diagram of interacting with a chatbot according to some embodiments of the present disclosure;

[0015] Figure 5 illustrates a flowchart of a message processing procedure according to some embodiments of the present disclosure;

[0016] Figure 6 shows a schematic structural block diagram of a message processing apparatus according to some embodiments of the present disclosure;

[0017] Figure 7 shows a block diagram of an electronic device that may implement one or more embodiments of the present disclosure. Detailed Implementation

[0018] Embodiments of this disclosure will now be described in more detail with reference to the accompanying drawings. While some embodiments of this disclosure are shown in the drawings, it should be understood that this disclosure can be implemented in various forms and should not be construed as limited to the embodiments set forth herein. Rather, these embodiments are provided to provide a more thorough and complete understanding of this disclosure. It should be understood that the accompanying drawings and embodiments of this disclosure are for illustrative purposes only and are not intended to limit the scope of protection of this disclosure.

[0019] It should be noted that the headings of any section / subsection provided herein are not limiting. Various embodiments are described throughout this document, and embodiments of any type may be included under any section / subsection. Furthermore, embodiments described in any section / subsection may be combined in any way with any other embodiments described in the same section / subsection and / or different sections / subsections.

[0020] In the description of embodiments of this disclosure, the term "comprising" and similar terms should be understood as open-ended inclusion, i.e., "including but not limited to". The term "based on" should be understood as "at least partially based on". The term "one embodiment" or "the embodiment" should be understood as "at least one embodiment". The term "some embodiments" should be understood as "at least some embodiments". Other explicit and implicit definitions may also be included below. The terms "first", "second", etc., may refer to different or the same objects. Other explicit and implicit definitions may also be included below.

[0021] The embodiments of this disclosure may involve user data, data acquisition, and / or use. All of these aspects comply with applicable laws, regulations, and relevant provisions. In the embodiments of this disclosure, all data collection, acquisition, processing, manipulation, forwarding, and use are conducted with the user's knowledge and confirmation. Accordingly, in implementing the embodiments of this disclosure, the type, scope of use, and usage scenarios of any data or information that may be involved should be communicated to the user and their authorization obtained in accordance with relevant laws and regulations through appropriate means. The specific methods of notification and / or authorization may vary depending on the actual situation and application scenario, and the scope of this disclosure is not limited in this respect.

[0022] In this specification and the embodiments, any processing of personal information will be carried out only under the premise of legality (such as obtaining the consent of the personal information subject, or being necessary for the performance of a contract), and will only be carried out within the scope stipulated or agreed upon. A user's refusal to process personal information other than that necessary for basic functions will not affect the user's use of basic functions.

[0023] As briefly mentioned earlier, chatbots have become one of the main ways people obtain information. Currently, chatbots mainly adopt a question-and-answer interaction mode. In this mode, the chatbot generates an answer for each question asked by the user. Figure 1 shows one of the schematic diagrams of interacting with a chatbot based on some solutions. As shown in Figure 1, the user asks question 111 through a terminal device. The chatbot can process question 111 through a machine learning model M1 and return an answer 112 for question 111. Suppose the user asks question 121 after 1 second. The chatbot can process question 121 through machine learning model M1 and return an answer 122 for question 121. In the example shown in Figure 1, machine learning model 130 is configured to handle simpler questions and therefore has a faster response speed (e.g., the processing time of machine learning model 130 for both question 111 and question 121 is less than 1 second). This allows the generative chatbot to generally return an answer 112 before question 121 is asked, thus forming a question-and-answer interaction mode.

[0024] With the continuous development of machine learning technology, machine learning models can perform a wider range of tasks, including but not limited to text summarization, translation, and sentiment analysis, which can help chatbots answer more complex questions. Correspondingly, machine learning models require more time to process complex questions, which leads to a corresponding increase in the time it takes for chatbots to return responses, making it easier for the order of responses to become disordered.

[0025] Figure 2 illustrates a second schematic diagram of interaction with a chatbot based on several solutions. As shown in Figure 2, a user asks question 141 through a terminal device. The chatbot processes question 141 using a machine learning model 160 and generates a response 142. The machine learning model 160 can be the machine learning model described earlier, capable of answering more complex questions. Assuming the processing time S1 for machine learning model 160 to process question 141 is 7 seconds, and the user asks question 151 very shortly after asking question 141 (e.g., 1 second), response 142 will be returned to the user only after question 151 has been asked. Furthermore, if the processing time S2 for machine learning model 160 to process question 151 is much shorter than the processing time S1 (e.g., S2 = 4 seconds), then response 152 for question 151 will be generated before response 142, causing the chatbot to return response 152 to the user first, then response 142, resulting in a disordered response order.

[0026] Therefore, embodiments of this disclosure provide a message processing method. According to the method of this disclosure, in response to receiving a first message, a first message window corresponding to the first message is determined, and then a first group of messages received within a first time range of the first message window is sent to a target processing entity to generate a first response to the first group of messages, wherein the first group of messages includes the first message. Further, embodiments of this disclosure also, in response to receiving a second message outside the first time range, a second message window is constructed based on the second message, and then a second group of messages received within a second time range of the second message window is sent to the target processing entity to generate a second response to the second group of messages, wherein the second time range of the second message window is determined based on a first end time of the first time range and a response time associated with the first response, and the second group of messages includes the second message.

[0027] Therefore, according to the method of this disclosure embodiment, a first set of messages (wherein the first message may be a question X1 raised by the user) can be collected within a first time range through a first message window, and then sent to a target processing entity (e.g., a machine learning model) to generate a first response. A second set of messages (wherein the second message may be a question X2 raised by the user after question X1) can be collected outside the first time range (specifically, a second time range) through a second message window, and then sent to the target processing entity to generate a second response. Since the second time range is determined based on the first end time of the first time range and the response time associated with the first response, by reasonably setting it (e.g., setting the second end time of the second time range based on the response time associated with the first response), the generation of the second response can be made later than the response time associated with the first response. This facilitates returning the second response to the user after the first response, thereby avoiding disorder in the response order.

[0028] The following section provides a detailed description of various example implementations of this scheme, with reference to the accompanying drawings.

[0029] Example Environment

[0030] Figure 3 illustrates a schematic diagram of an example environment 300 in which embodiments of the present disclosure can be implemented. As shown in Figure 3, the example environment 300 may include a terminal device 310 and an electronic device 320.

[0031] In this example environment 300, a client 330 for interacting with electronic device 320 is installed on terminal device 310. User 140 can interact with client 330 via terminal device 310 and / or its attached devices. Client 330 can be a social application, content sharing application, or any other suitable application.

[0032] In environment 300 of Figure 3, if client 330 is active, client 330 can provide services such as the creation or playback of media content to user 340.

[0033] Furthermore, the terminal device 310 can display the interface 350 of the client 330. The content displayed on the interface 350 will change depending on the specific service provided, the user's interaction behavior / preset operation, etc.

[0034] In some embodiments, terminal device 310 communicates with electronic device 320 to provide services to client 330. Terminal device 310 can be any type of mobile terminal, fixed terminal, or portable terminal, including mobile phones, desktop computers, laptop computers, notebook computers, netbook computers, tablet computers, media computers, multimedia tablets, personal communication system (PCS) devices, personal navigation devices, personal digital assistants (PDAs), audio / video players, digital cameras / camcorders, positioning devices, television receivers, radio receivers, e-book devices, gaming devices, or any combination thereof, including accessories and peripherals of these devices or any combination thereof. In some embodiments, terminal device 310 can also support any type of user-facing interface (such as "wearable" circuitry).

[0035] Electronic device 320 can be a standalone physical server, a server cluster or distributed system composed of multiple physical servers, or a cloud server providing basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communication, middleware services, domain name services, security services, content delivery networks, and big data and artificial intelligence platforms. Electronic device 320 may include, for example, computing systems / servers such as mainframes, edge computing nodes, and computing devices in a cloud environment. Electronic device 320 can provide backend services for the client 330 that supports content presentation in terminal device 310.

[0036] A communication connection can be established between electronic device 320 and terminal device 310. This communication connection can be established via wired or wireless means. The communication connection may include, but is not limited to, Bluetooth, mobile network, Universal Serial Bus, and Wi-Fi connections; the embodiments of this disclosure are not limited in this respect. In the embodiments of this disclosure, electronic device 320 and terminal device 310 can achieve signaling interaction through their communication connection.

[0037] It should be understood that the structure and function of the various elements in environment 300 are described for illustrative purposes only and do not imply any limitation on the scope of this disclosure.

[0038] Example message processing

[0039] Figure 4 illustrates a schematic diagram of interaction with a chatbot according to some embodiments of the present disclosure. Referring to Figures 3 and 4, in some embodiments, client 330 may present interface 350 to user 340. User 340 may input information on interface 350. Client 330 may process the information input by user 340 to generate corresponding messages (e.g., message 411, message 412, message 413, and message 414), and then client 330 may send the generated messages to an electronic device. Exemplarily, the messages generated by client 330 may include any suitable content input by user 340 on interface 350. For example, the messages generated by client 330 may include question X1 or question X2 raised by user 340. Of course, embodiments of the present disclosure are not limited to questions; messages generated by client 330 may also include other suitable content, such as statements or keywords used for retrieval.

[0040] In some embodiments, user 340 can sequentially input multiple pieces of information on interface 350, and electronic device 320 can process these pieces of information to generate multiple messages. For example, the multiple messages can be messages 411, 412, 413, and 414 as shown in FIG. 4. Client 330 can send each message to electronic device 320 as it is generated.

[0041] In some embodiments, the electronic device 320 determines a first message window corresponding to the first message in response to receiving the first message. In some embodiments, the first message may be any one of message 411, message 412, message 413, and message 414.

[0042] Referring to Figure 4, in some embodiments, the electronic device 320 collects one or more messages sent by the user 340 through the client 330 via message windows (e.g., message windows 431 and 432). The electronic device 320 can send the collected messages as a group to the target processing entity 440 via the message windows. The target processing entity 440 can generate a response based on one or more messages, instead of generating a response for each message individually. For example, the target processing entity 440 can generate response 421 based on messages 411 and 412, and response 422 based on messages 413 and 414. This enables a "multiple questions, one answer" interaction method, which helps reduce response noise and improves the anthropomorphism of the response. Furthermore, sending multiple messages as a group to the target processing entity 440 via message windows also reduces the computational burden on the target processing entity 440, thereby freeing up processor resources.

[0043] In some embodiments, the client 330 sequentially sends multiple messages to the electronic device 320. The electronic device 320 can construct multiple message windows to collect these messages separately based on the time intervals between them. For example, if the interval between messages 411 and 412 is short, the interval between messages 413 and 414 is short, but the interval between messages 412 and 413 is long, then the electronic device 320 can construct message windows 431 and 432. Message windows 431 are used to collect messages 411 and 412, and message windows 432 are used to collect messages 413 and 414. In some embodiments, the first message window corresponding to the first message can refer to a message window used to collect the first message. For example, if the first message is message 412, then the first message window corresponding to the first message is message window 431; if the first message is message 413, then the first message window corresponding to the first message is message window 432.

[0044] It should be noted that the number of messages and message windows shown in Figure 4 is only an example and does not constitute a limitation of this disclosure. The specific number of messages and message windows can be determined according to actual needs.

[0045] In some embodiments, the electronic device 320 may construct the first message window upon receiving the first message, or the electronic device 320 may construct the first message window before receiving the first message. In some embodiments, in response to receiving the first message, the electronic device 320 determines whether there is a valid message window whose time window has not ended. If there is a valid message window, the valid message window is determined as the first message window. If there is no valid message window, a new message window is constructed based on the first message to serve as the first message window.

[0046] In some embodiments, each message window has a time window, which can be a countdown time window. When the time window ends, the message window will no longer collect messages, and the message window can send all collected messages to the target processing entity 440. Therefore, embodiments of this disclosure also refer to message windows whose time windows have not ended as valid message windows.

[0047] For example, referring to Figure 4, assuming the first message is message 411, when electronic device 320 receives message 411, there is currently no valid message window. Therefore, electronic device 320 can construct message window 431 and use message window 431 as the first message window. Assuming the first message is message 412, when electronic device 320 receives message 412, there is currently a message window 431 whose time window has not ended (i.e., a valid message window). Therefore, electronic device 320 can use message window 431 as the first message window. In this way, electronic device 320 can place the first message and adjacent messages in the same message window, thereby facilitating the simultaneous transmission of these adjacent messages to the target processing entity 440.

[0048] In some embodiments, electronic device 320 sends a first set of messages received within a first time range of a first message window to target processing entity 440 to generate a first response to the first set of messages, the first set of messages including the first message.

[0049] In some embodiments, a complete interaction between user 340 and electronic device 320 via client 330 can be considered a session. Referring to Figure 4, message 411 may be the first message sent by user 340 to electronic device 320 via client 330, and message 412 may be the last message sent by user 340 to electronic device 320 via client 330. Thus, a session includes messages 411, 412, 413, and 414, and also includes message windows 431 and 432. In some embodiments, the first message window may be the first message window in a session (e.g., message window 431), in which case the first time range may be a preset fixed value. The first message window may also be another message window in a session besides the first message window (e.g., message window 432), in which case the first time range may be a dynamic value. The specific method for determining the value can be found in the second time range of the second message window, which will be described in detail below, and will not be repeated here.

[0050] For clarity, unless otherwise specified, the following description uses message window 431 as an example to illustrate the various embodiments of this disclosure.

[0051] In some embodiments, the first message window can continuously collect messages from the client 330 within a first time range. Referring to FIG4, the first message window can collect messages 411 and 412 within the first time range. Messages 411 and 412 are also known as the first set of messages, and the first message can be either message 411 or message 412. The electronic device 320 can send the messages 411 and 412 collected by the first message window to the target processing entity 440. The target processing entity 440 can process messages 411 and 412 to generate a first response to messages 411 and 412.

[0052] In some embodiments, in response to receiving a second message outside a first time range, the electronic device 320 constructs a second message window based on the second message, wherein the second time range of the second message window is determined based on the first end time of the first time range and the response time associated with the first response.

[0053] In some embodiments, the second message window can be another message window in a session besides the first message window. In some embodiments, the first message window and the second message window can be two adjacent message windows generated sequentially (e.g., message window 431 and message window 432 in FIG. 4), wherein two adjacent message windows can mean that there are no other message windows between the two message windows.

[0054] For clarity, unless otherwise specified, the following description uses message window 431 as the first message window and message window 432 as the second message window to illustrate the various embodiments of this disclosure.

[0055] In some embodiments, the first message window can continuously collect messages from the client 330 within a first time range. Referring to FIG4, the first message window can collect messages 411 and 412 within the first time range. After the first end time, the first message window no longer accepts messages from the client 330. Messages 411 and 412 are also known as the first set of messages, and the first message can be either message 411 or message 412. The electronic device 320 can send messages 411 and 412 collected by the first message window to the target processing entity 440. The target processing entity 440 can process messages 411 and 412 to generate a first response (e.g., response 421) to messages 411 and 412. Electronic device 320 receives message 413 (i.e., the second message) after the first end time (i.e., outside the first time range), and therefore constructs a second message window (i.e., message window 432). The second message window can continuously collect messages from client 330 within a second time range. Referring to Figure 4, the second message window can collect messages 413 and 414 within the second time range. Messages 413 and 414 are also the second set of messages, and the second message is message 413. Electronic device 320 can send messages 413 and 414 collected by the second message window to target processing entity 440. Target processing entity 440 can process messages 413 and 414 to generate a second response (e.g., response 422) to messages 413 and 414.

[0056] In some embodiments, the response time associated with the first response may include the time when the electronic device 320 returns the first response to the client 330. As described above, the second time range is determined based on the first end time and the response time associated with the first response; therefore, the second time range is actually a dynamic value related to the first end time and the time when the first response is returned to the client 330. For example, the electronic device 320 may adjust this dynamic value based on the first end time and the time when the first response is returned to the client 330 to determine the start and end times of the second time range.

[0057] In some embodiments, the target processing entity 440 includes a machine learning model, for example, the target processing entity 440 may include the machine learning model described above.

[0058] In some embodiments, the electronic device 320 determines the start time of the second time range based on the first end time of the first time range. In some embodiments, the electronic device 320 may ensure that the start time of the second time range is no earlier than the first end time of the first time range, thereby enabling the first message window and the second message window to collect messages for two different time periods respectively, minimizing the possibility of duplicate messages collected by the first message window and the second message window.

[0059] In some embodiments, the electronic device 320 may use the first end time as the start time of the second time range, thereby making the first time range and the second time range continuous, thus avoiding missing messages from the client 330.

[0060] In some embodiments, the electronic device 320 determines the response time based on the provision time when the first response is provided or the acquisition time when the first response is acquired, and the electronic device 320 determines the second end time of the second time range based on the response time.

[0061] In some embodiments, the provision time of the first response may refer to the time when the electronic device 320 presents the first response using the client 330, and the acquisition time of the first response may refer to the time when the client 330 confirms that the user 340 has acquired the first response after it has been presented. In some embodiments, the provision time of the first response can be used as the response time. In other embodiments, a period of time before and after the provision time can be extracted as the response time. In other embodiments, the acquisition time of the first response can be used as the response time. In other embodiments, a period of time before and after the acquisition time can be extracted as the response time. Thus, the response time can reflect that the client 330 has at least provided the first response to the user 340.

[0062] In some embodiments, electronic device 320 sends a second set of messages received within a second time range of a second message window to target processing entity 440 to generate a second response to the second set of messages, the second set of messages including the second message. In some embodiments, the response time can be used as the second end time of the second time range. In this way, electronic device 320 will not send the second set of messages collected in the second message window to target processing entity 440 until at least after client 330 provides the first response to user 340. This ensures that no second response is generated before the first response is provided to user 340, thereby preventing the second response from being provided to user 340 before the first response, and thus preventing the response order from being disordered.

[0063] In some embodiments, after the electronic device 320 provides a first response using the client 330, it obtains an indication message from the client 330 indicating that the first response has been obtained by the user 340, and in response to the first response being an answer type, the electronic device 320 determines the acquisition time corresponding to the indication message.

[0064] In some embodiments, when the client 330 determines that the first reply has been obtained by the user 340 and generates a corresponding instruction message, the client 330 may determine that the user 340 has viewed the presented first reply.

[0065] As described above, the first message may include any suitable content input by user 340 using client 330. For example, the first message may include a question input by user 340 using client 330, and the first response may be an answer to this question (or all the questions contained in the first group of messages). In this case, electronic device 320 can determine that the first response is an answer type.

[0066] In some embodiments, the indication message may include a generation timestamp. When the electronic device 320 determines that the first response is an answer type, it can obtain the generation timestamp of the indication message and determine the acquisition time based on the generation timestamp. For example, the generation timestamp of the indication message can be used as the acquisition time. Thus, the actual time when the user 340 acquired the first response can be determined quickly and accurately.

[0067] In some embodiments, a second end time of the second time range is determined based on the response time and a preset time interval. In some embodiments, the electronic device 320 may make the second end time of the second time range no earlier than the response time of the first response and postpone it for a period of time, the length of the postponement being greater than or equal to the preset time interval. In this way, the second time range ends some time after the client 330 receives the first response. Therefore, the electronic device 320 can continue to collect messages for a period of time after the client 330 receives the first response through the second message window. This is beneficial for collecting user 340's feedback on the first response through the second message window. After the electronic device 320 sends the user 340's feedback on the first response to the target processing entity 440, the target processing entity 440 can take these feedback into consideration when generating the second response, so that the generated second response can include the correction content of the first response.

[0068] In some embodiments, the electronic device 320 generates a prompt based on a second set of messages and sends the prompt to the target processing entity 440 to generate a second response. In some embodiments, the prompt also includes at least one response generated within a second time range, wherein the at least one response includes the first response.

[0069] In some embodiments, the electronic device 320 sends a prompt containing the first response to the target processing entity 440, which can cause the target processing entity 440 to take the content of the first response into consideration when generating the second response. As a result, the target processing entity 440 can filter out parts that are repeated with the first response when generating the second response, thereby making the second response more accurate.

[0070] According to various embodiments of this disclosure, electronic device 320 can collect a first set of messages (where the first message may be a question X1 raised by user 340) within a first time range through a first message window, and then send the first set of messages to target processing entity 440 (e.g., a machine learning model) to generate a first response. It can also collect a second set of messages (where the second message may be a question X2 raised by user 340 after question X1) outside the first time range (specifically, a second time range) through a second message window, and then send the second set of messages to target processing entity 440 to generate a second response. Since the second time range ends after client 330 provides the first response to user 340, the second response will be provided to user 340 later than the first response, thus avoiding a disordered response order.

[0071] Example process

[0072] Figure 5 shows a flowchart of a message processing procedure 500 according to some embodiments of the present disclosure. Procedure 500 can be implemented at an electronic device 320. Procedure 500 will now be described with reference to Figure 5.

[0073] As shown in Figure 5, in box 510, electronic device 320, in response to receiving the first message, determines the first message window corresponding to the first message.

[0074] In some embodiments, in response to receiving a first message, the electronic device 320 determines whether there is a valid message window whose time window has not ended. If there is a valid message window, the valid message window is determined as the first message window. If there is no valid message window, a new message window is constructed based on the first message to serve as the first message window.

[0075] In box 520, electronic device 320 sends a first set of messages received within a first time range of a first message window to target processing entity 440 to generate a first response to the first set of messages, the first set of messages including the first message.

[0076] In box 530, in response to receiving a second message outside a first time range, electronic device 320 constructs a second message window based on the second message, the second time range of the second message window being determined based on a first end time of the first time range and a response time associated with the first response.

[0077] In some embodiments, the electronic device 320 determines the start time of the second time range based on the first end time of the first time range.

[0078] In some embodiments, the electronic device 320 determines the response time based on the provision time when the first response is provided or the acquisition time when the first response is acquired, and the electronic device 320 determines the second end time of the second time range based on the response time.

[0079] In some embodiments, after the electronic device 320 provides a first response using the client 330, it obtains an indication message from the client 330 indicating that the first response has been obtained by the user 340, and in response to the first response being an answer type, the electronic device 320 determines the acquisition time corresponding to the indication message.

[0080] In some embodiments, a second end time of the second time range is determined based on the response time and a preset time interval.

[0081] In box 540, electronic device 320 sends a second set of messages received within a second time range of a second message window to target processing entity 440 to generate a second response to the second set of messages, the second set of messages including the second message.

[0082] In some embodiments, the electronic device 320 generates a prompt based on the second set of messages and sends the prompt to the target processing entity 440 to generate a second response.

[0083] Example devices and equipment

[0084] Embodiments of this disclosure also provide corresponding apparatus for implementing the methods or processes described above. Figure 6 shows a schematic structural block diagram of a message processing apparatus 600 according to some embodiments of this disclosure. Apparatus 600 may be implemented as or included in electronic device 320. The various modules / components in apparatus 600 may be implemented by hardware, software, firmware, or any combination thereof.

[0085] As shown in Figure 6, the apparatus 600 includes a message window determination module 610 configured to determine a first message window corresponding to the first message in response to receiving a first message; a first message sending module 620 configured to send a first set of messages received within a first time range of the first message window to a target processing entity to generate a first response to the first set of messages, the first set of messages including the first message; a message window construction module 630 configured to construct a second message window based on the second message in response to receiving a second message outside the first time range, the second time range of the second message window being determined based on a first end time of the first time range and a response time associated with the first response; and a second message sending module 640 configured to send a second set of messages received within a second time range of the second message window to a target processing entity to generate a second response to the second set of messages, the second set of messages including the second message.

[0086] In some embodiments, the apparatus 600 further includes a first time determination module 650, which is configured to determine the start time of a second time range based on a first end time of a first time range.

[0087] In some embodiments, the apparatus 600 further includes a second time determination module 660, which is configured to determine a response time based on the provision time when the first response is provided or the acquisition time when the first response is acquired; and to determine a second end time of a second time range based on the response time.

[0088] In some embodiments, the second time determination module 660 is further configured to, after the client provides a first response, obtain an indication message from the client regarding the first response being obtained by the user; and, in response to the first response being an answer type, determine the acquisition time corresponding to the indication message.

[0089] In some embodiments, the second time determination module 660 is further configured to determine a second end time of the second time range based on the response time and a preset time interval.

[0090] In some embodiments, the second message sending module 640 is further configured to generate a prompt item based on a second set of messages, the prompt item further including at least one reply generated within a second time range, the at least one reply including a first reply; and to send the prompt item to a target processing entity to generate a second reply.

[0091] In some embodiments, the message window determination module 610 is further configured to, in response to receiving a first message, determine whether there is a valid message window whose time window has not ended; and in response to the existence of a valid message window, determine the valid message window as the first message window.

[0092] In some embodiments, the message window determination module 610 is further configured to construct a new message window based on the first message in response to the absence of a valid message window, and use it as the first message window.

[0093] The modules and / or units included in device 600 can be implemented in various ways, including software, hardware, firmware, or any combination thereof. In some embodiments, one or more modules and / or units can be implemented using software and / or firmware, such as machine-executable instructions stored on a storage medium. In addition to or as an alternative to machine-executable instructions, some or all of the modules and / or units in device 600 can be implemented at least partially by one or more hardware logic components. By way of example and not limitation, exemplary types of hardware logic components that can be used include field-programmable gate arrays (FPGAs), application-specific integrated circuits (ASICs), application-specific standard products (ASSPs), systems-on-chips (SoCs), complex programmable logic devices (CPLDs), and so on.

[0094] Figure 7 illustrates a block diagram of an electronic device 700 that may implement one or more embodiments of the present disclosure. It should be understood that the electronic device 700 shown in Figure 7 is merely exemplary and should not constitute any limitation on the functionality and scope of the embodiments described herein. The electronic device 700 shown in Figure 7 can be used to implement the terminal device 310 and / or electronic device 320 of Figure 3.

[0095] As shown in Figure 7, the electronic device 700 is in the form of a general-purpose computing device. Components of the electronic device 320500 may include, but are not limited to, one or more processors or processing units 710, memory 720, storage devices 730, one or more communication units 740, one or more input devices 750, and one or more output devices 760. The processing unit 710 may be a physical or virtual processor and is capable of performing various processes according to programs stored in the memory 720. In a multiprocessor system, multiple processing units execute computer-executable instructions in parallel to improve the parallel processing capability of the electronic device 700.

[0096] Electronic device 700 typically includes multiple computer storage media. Such media can be any available media accessible to electronic device 700, including but not limited to volatile and non-volatile media, removable and non-removable media. Memory 720 can be volatile memory (e.g., registers, cache, random access memory (RAM)), non-volatile memory (e.g., read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory), or some combination thereof. Storage device 730 can be a removable or non-removable medium and can include machine-readable media, such as flash drives, disks, or any other media that can be used to store information and / or data (e.g., training data for training) and can be accessed within electronic device 700.

[0097] Electronic device 700 may further include additional removable / non-removable, volatile / non-volatile storage media. Although not shown in FIG. 7, disk drives for reading from or writing to removable, non-volatile disks (e.g., "floppy disks") and optical disk drives for reading from or writing to removable, non-volatile optical disks may be provided. In these cases, each drive may be connected to a bus (not shown) via one or more data media interfaces. Memory 720 may include computer program product 725 having one or more program modules configured to perform various methods or actions of various embodiments of the present disclosure.

[0098] The communication unit 740 enables communication with other electronic devices via a communication medium. Additionally, the functionality of the components of the electronic device 700 can be implemented using a single computing cluster or multiple computing machines capable of communicating via communication connections. Therefore, the electronic device 700 can operate in a networked environment using logical connections to one or more other servers, network personal computers (PCs), or another network node.

[0099] Input device 750 can be one or more input devices, such as a mouse, keyboard, trackball, etc. Output device 760 can be one or more output devices, such as a monitor, speaker, printer, etc. Electronic device 700 can also communicate with one or more external devices (not shown) via communication unit 740 as needed. These external devices include storage devices, display devices, etc., and can communicate with one or more devices that enable user interaction with electronic device 700, or with any device that enables electronic device 700 to communicate with one or more other electronic devices (e.g., network card, modem, etc.). Such communication can be performed via input / output (I / O) interface (not shown).

[0100] According to exemplary embodiments of the present disclosure, a computer-readable storage medium is provided that stores computer-executable instructions thereon, wherein the computer-executable instructions are executed by a processor to implement the methods described above. According to exemplary embodiments of the present disclosure, a computer program product is also provided, which is tangibly stored on a non-transitory computer-readable medium and includes computer-executable instructions, which are executed by a processor to implement the methods described above.

[0101] Various aspects of this disclosure are described herein with reference to flowchart illustrations and / or block diagrams of methods, apparatuses, devices, and computer program products implemented according to this disclosure. It should be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer-readable program instructions.

[0102] These computer-readable program instructions can be provided to a processing unit of a general-purpose computer, a special-purpose computer, or other programmable data processing apparatus to produce a machine such that, when executed by the processing unit of the computer or other programmable data processing apparatus, they create means for implementing the functions / actions specified in one or more blocks of the flowchart and / or block diagram. These computer-readable program instructions can also be stored in a computer-readable storage medium that causes a computer, programmable data processing apparatus, and / or other device to operate in a particular manner. Thus, the computer-readable medium storing the instructions comprises an article of manufacture that includes instructions for implementing aspects of the functions / actions specified in one or more blocks of the flowchart and / or block diagram.

[0103] Computer-readable program instructions can be loaded onto a computer, other programmable data processing apparatus, or other device to cause a series of operational steps to be performed on the computer, other programmable data processing apparatus, or other device to produce a computer-implemented process, thereby causing the instructions that execute on the computer, other programmable data processing apparatus, or other device to perform the functions / actions specified in one or more boxes of a flowchart and / or block diagram.

[0104] The flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of systems, methods, and computer program products according to various embodiments of this disclosure. In this regard, each block in a flowchart or block diagram may represent a module, segment, or portion of an instruction, which contains one or more executable instructions for implementing the specified logical function. In some alternative implementations, the functions indicated in the blocks may occur in a different order than those indicated in the drawings. For example, two consecutive blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each block in the block diagrams and / or flowcharts, and combinations of blocks in the block diagrams and / or flowcharts, may be implemented using a dedicated hardware-based system that performs the specified function or action, or using a combination of dedicated hardware and computer instructions.

[0105] Various implementations of this disclosure have been described above. These descriptions are exemplary and not exhaustive, nor are they limited to the disclosed implementations. Many modifications and variations will be apparent to those skilled in the art without departing from the scope and spirit of the described implementations. The terminology used herein is chosen to best explain the principles, practical applications, or improvements to the technology in the market, or to enable others skilled in the art to understand the various embodiments disclosed herein.

Claims

1. A message processing method, comprising: In response to receiving the first message, determine the first message window corresponding to the first message; Send the first set of messages received within the first time range of the first message window to the target processing entity to generate a first response to the first set of messages, wherein the first set of messages includes the first message; In response to receiving a second message outside the first time range, a second message window is constructed based on the second message, wherein the second time range of the second message window is determined based on the first end time of the first time range and the response time associated with the first response; as well as Send the second set of messages received within the second time range of the second message window to the target processing entity to generate a second response to the second set of messages, the second set of messages including the second message.

2. The method according to claim 1, further comprising: Based on the first end time of the first time range, the start time of the second time range is determined.

3. The method according to claim 1, further comprising: The response time is determined based on the time when the first response was provided or the time when the first response was obtained; as well as The second end time of the second time range is determined based on the response time.

4. The method according to claim 3, further comprising: After the client provides the first response, an indication message is obtained from the client regarding the user receiving the first response; as well as In response to the first reply being an answer type, the acquisition time corresponding to the indication message is determined.

5. The method of claim 3, wherein determining the second end time of the second time range based on the response time comprises: Based on the response time and the preset time interval, the second end time of the second time range is determined.

6. The method of claim 1, wherein sending the second set of messages received within the second time range of the second message window to the target processing entity comprises: A prompt item is generated based on the second set of messages, and the prompt item also includes at least one reply generated within the second time range, wherein the at least one reply includes the first reply; as well as The prompt item is sent to the target processing entity to generate the second response.

7. The method according to claim 1, wherein determining the first message window corresponding to the first message comprises: Upon receiving the first message, determine whether there is a valid message window whose time window has not yet ended; as well as In response to the existence of the valid message window, the valid message window is determined as the first message window.

8. The method according to claim 7, wherein determining the first message window corresponding to the first message further includes: In response to the absence of a valid message window, a new message window is constructed based on the first message and used as the first message window.

9. A message processing apparatus, comprising: The message window determination module is configured to determine the first message window corresponding to the first message in response to receiving the first message; The first message sending module is configured to send a first set of messages received within a first time range of the first message window to the target processing entity, so as to generate a first response to the first set of messages, wherein the first set of messages includes the first message; A message window building module is configured to, in response to receiving a second message outside the first time range, build a second message window based on the second message, wherein the second time range of the second message window is determined based on the first end time of the first time range and the response time associated with the first response; as well as The second message sending module is configured to send a second set of messages received within the second time range of the second message window to the target processing entity to generate a second response to the second set of messages, wherein the second set of messages includes the second message.

10. An electronic device, comprising: At least one processor; as well as At least one memory coupled to the at least one processor and storing instructions for execution by the at least one processor, the instructions causing the electronic device to perform the method according to any one of claims 1 to 8 when executed by the at least one processor.

11. A computer-readable storage medium having stored thereon computer-executable instructions that, when executed by a processor, implement the method according to any one of claims 1 to 8.

12. A computer program product comprising computer-executable instructions, wherein the computer-executable instructions, when executed by a processor, implement the method according to any one of claims 1 to 8.

Citation Information

Patent Citations

  • Message processing method and device, electronic equipment and storage medium

    CN113360238A

  • Message processing method and device, equipment and storage medium

    CN118433145A

  • Conversational user interfaces and artificial intelligence for messaging and mobile devices

    US10708216B1

  • Conversation agent for collaborative search engine

    US20200287856A1

  • Session message processing method and apparatus, and device, storage medium and program product

    WO2024021646A1