Message processing method, device, electronic device and medium
By using the target port to send, receive and update messages without displaying the target session window, the problem of users having to perform multiple operations to reply to messages is solved, and more efficient message processing is achieved.
Patent Information
- Application Number
- CN202310054542.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-02-03
- Publication Date
- 2025-10-03
- Estimated Expiration
- 2043-02-03
AI Technical Summary
When a user replies to a conversation window message in an electronic device, he or she needs to perform multiple operations, which makes the operation cumbersome and time-consuming, and has low efficiency.
When the target conversation window is not displayed and the message is not updated, the message is sent through the target port and the conversation window is displayed, the message is received and updated, and the updated message is sent to the second electronic device.
It simplifies user operations, reduces time consumption, and improves message reply efficiency.
Smart Images

Figure CN116032870B_ABST
Abstract
Description
Technical Field
[0001] The present application belongs to the field of communication technology, and specifically relates to a message processing method, device, electronic device and medium. Background Art
[0002] Currently, if a user wants to reply to a message in a certain conversation window of a certain application, the user can first trigger the electronic device to display the application interface of the certain application, and then trigger the electronic device to display a certain conversation window in the application interface, so that the electronic device can receive the message through the transmission port corresponding to the certain conversation window and display the message in the certain conversation window, so that the user can reply according to the message in the certain conversation window.
[0003] However, since the user needs to perform multiple operations to trigger the electronic device to display a message in a conversation window of a certain application, the user's operations in the process of replying to the message in the conversation window are relatively cumbersome and time-consuming, resulting in low efficiency of the electronic device in replying to messages. Summary of the Invention
[0004] The purpose of the embodiments of the present application is to provide a message processing method, device, electronic device and medium, which can solve the problem of low efficiency of electronic devices in replying to messages.
[0005] In a first aspect, an embodiment of the present application provides a message processing method, which is performed by a first electronic device, the method comprising: when a target session window is not displayed and a message in the target session window is not updated, performing a first operation, the first operation comprising at least one of the following: sending a message and displaying a target session window through a target port, the target port being used to transmit the message in the target session window; receiving a first message through the target port; updating a second message in the target session window to a third message based on the first message, the second message being the message already transmitted by the target port; and sending a third message to a second electronic device.
[0006] In a second aspect, an embodiment of the present application provides a message processing device, which is a first message processing device and includes: an execution module, a receiving module, an update module, and a sending module. The execution module is configured to, when a target session window is not displayed and a message in the target session window is not updated, perform a first operation, the first operation including at least one of the following: sending a message through a target port and displaying the target session window, the target port being used to transmit the message in the target session window. The receiving module is configured to receive a first message through the target port. The update module is configured to update a second message in the target session window to a third message based on the first message received by the receiving module, the second message being the message already transmitted by the target port. The sending module is configured to send the third message updated by the update module to the second message processing device.
[0007] In a third aspect, an embodiment of the present application provides an electronic device comprising a processor and a memory, wherein the memory stores programs or instructions that can be run on the processor, and when the program or instructions are executed by the processor, the steps of the method described in the first aspect are implemented.
[0008] In a fourth aspect, an embodiment of the present application provides a readable storage medium, which stores a program or instruction. When the program or instruction is executed by a processor, the steps of the method described in the first aspect are implemented.
[0009] In a fifth aspect, an embodiment of the present application provides a chip, which includes a processor and a communication interface, the communication interface is coupled to the processor, and the processor is used to run programs or instructions to implement the method described in the first aspect.
[0010] In a sixth aspect, an embodiment of the present application provides a computer program product, which is stored in a storage medium and executed by at least one processor to implement the method described in the first aspect.
[0011] In an embodiment of the present application, the first electronic device can perform a first operation when the target conversation window is not displayed and the message in the target conversation window is not updated. The first operation includes at least one of sending a message through a target port (for transmitting the message in the target conversation window) and displaying the target conversation window, so that the first electronic device can receive the first message through the target port and, based on the first message, update the second message in the target conversation window (i.e., the message transmitted by the target port) to a third message, and send the third message to the second electronic device. Since the first electronic device can send a message and / or display the target conversation window through the target port when the target conversation window is not displayed and the message in the target conversation window is not updated, the first electronic device can update the target conversation window based on the first message received through the target port and the first and second messages to obtain the third message, so that the first electronic device can send the third message to the second electronic device to display the third message through the second electronic device without the user having to perform multiple operations to trigger the first electronic device to display the third message. Therefore, the user's operation in replying to the third message can be simplified, time consumption can be reduced, and the efficiency of the first electronic device replying to the message can be improved. BRIEF DESCRIPTION OF THE DRAWINGS
[0012] Figure 1 This is one of the flow diagrams of a message processing method provided in an embodiment of the present application;
[0013] Figure 2 This is a second flow chart of a message processing method provided in an embodiment of the present application;
[0014] Figure 3 This is a flowchart of a message processing method provided by an embodiment of the present application;
[0015] Figure 4 This is a fourth flow chart of a message processing method provided in an embodiment of the present application;
[0016] Figure 5 This is a fifth flow chart of a message processing method provided in an embodiment of the present application;
[0017] Figure 6 This is a structural diagram of a message processing device provided in an embodiment of the present application;
[0018] Figure 7 This is a schematic diagram of the structure of an electronic device provided in an embodiment of the present application;
[0019] Figure 8 This is a schematic diagram of the hardware structure of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0020] The following will be combined with the accompanying drawings in the embodiments of the present application to clearly describe the technical solutions in the embodiments of the present application. Obviously, the embodiments described are part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field are within the scope of protection of this application.
[0021] The terms "first," "second," and the like in the specification and claims of this application are used to distinguish similar objects, and are not used to describe a specific order or precedence. It should be understood that the terms used in this manner are interchangeable where appropriate, so that the embodiments of this application can be implemented in an order other than that illustrated or described herein, and that the objects distinguished by "first," "second," and the like are generally of the same type, and do not limit the number of objects; for example, the first object can be one or more. In addition, the term "and / or" in the specification and claims refers to at least one of the connected objects, and the character " / " generally indicates that the objects connected are in an "or" relationship.
[0022] The message processing method, device, electronic device and medium provided in the embodiments of the present application are described in detail below with reference to the accompanying drawings through specific embodiments and their application scenarios.
[0023] In the message processing method, device, electronic device, and medium provided in the embodiments of the present application, a first electronic device can perform a first operation when the target session window is not displayed and the message in the target session window is not updated. The first operation includes at least one of sending a message through a target port (for transmitting the message in the target session window) and displaying the target session window, so that the first electronic device can receive the first message through the target port and, based on the first message, update the second message in the target session window (i.e., the message transmitted by the target port) to a third message, and send the third message to the second electronic device. Since the first electronic device can send a message and / or display the target session window through the target port when the target session window is not displayed and the message in the target session window is not updated, the first electronic device can update the target session window based on the first message received through the target port and the first and second messages to obtain the third message in the target session window, so that the first electronic device can send the third message to the second electronic device to display the third message through the second electronic device without the user having to perform multiple operations to trigger the first electronic device to display the third message. Therefore, the user's operation in replying to the third message can be simplified and time-consuming, thereby improving the efficiency of the first electronic device in replying to messages.
[0024] The execution subject of the message processing method provided in this embodiment may be a message processing device, which may be an electronic device, or a control module or processing module in the electronic device. The technical solution provided in the embodiment of this application is described below using an electronic device as an example.
[0025] The embodiment of the present application provides a message processing method, which is executed by a first electronic device, such as Figure 1 As shown in the flowchart of the message processing method shown in FIG, the message processing method provided in the embodiment of the present application includes the following steps:
[0026] Step 101: When a target conversation window is not displayed and a message in the target conversation window is not updated, the first electronic device performs a first operation.
[0027] In the embodiment of the present application, the first operation includes at least one of the following: sending a message through a target port and displaying a target session window, where the target port is used to transmit the message in the target session window.
[0028] Optionally, in an embodiment of the present application, when displaying the first application interface of the first application (the first application interface includes a target session window), the first electronic device can display the target interface based on the user's input to the first electronic device, so that the first electronic device can determine whether the target session window is displayed and whether the message in the target session window is updated. Further, when the first electronic device determines that the target session window is not displayed and the message in the target session window is not updated, the first electronic device can perform the first operation.
[0029] The application type of the first application may be any of the following: a game application, a short video interactive application, a live broadcast application, a movie viewing application, etc. The first application interface may be any application interface of the first application.
[0030] The target interface can be any of the following: a desktop interface, a second application interface of the first application, or an application interface of the second application. The second application interface can be any application interface of the first application other than the first application interface. The second application can be any application of the first electronic device other than the first application. The target session window can specifically be any session window of the first application.
[0031] In which, when the target interface is displayed, the first electronic device can detect the running status of the target conversation window to determine whether to display the target conversation window, and the first electronic device can detect the reception time of the seventh message in the target conversation window to determine whether the message in the target conversation window is updated.
[0032] The above-mentioned running state can be any one of the following: foreground running state, background running state. It can be understood that when the running state of the target conversation window is the foreground running state, the first electronic device can determine to display the target conversation window.
[0033] The seventh message may be the last message in the target conversation window. It is understood that if the time interval between the reception time of the seventh message and the current system time of the first electronic device is greater than or equal to the preset time interval, the first electronic device may determine that the message in the target conversation window has not been updated.
[0034] In an embodiment of the present application, if the first electronic device does not display the target session window, it is possible that the first electronic device deactivates the target port in order to save port resources, that is, the first electronic device may not be able to transmit the message in the target session window through the target port. Therefore, the first electronic device can perform a first operation (that is, at least one of sending a message through the target port and displaying the target session window) to activate the target port.
[0035] It can be understood that the target port is used to transmit messages in the message sending and receiving queue of the target session window.
[0036] Optionally, in an embodiment of the present application, when the first operation includes sending a message through the target port, the message content may include at least one of the following: preset characters, blank message content. The preset characters may include at least one of the following: preset numbers, preset letters, preset words, preset symbols, etc.
[0037] It should be noted that the above-mentioned “blank message content” can be understood as: the message content of the message is empty.
[0038] Optionally, in a possible implementation of the embodiment of the present application, the first operation includes sending a message through the target port. Figure 1 ,like Figure 2 As shown, the above step 101 can be specifically implemented through the following step 101a.
[0039] Step 101a: When the target conversation window is not displayed and the message in the target conversation window is not updated, the first electronic device sends a fourth message to the server through the target port.
[0040] In the embodiment of the present application, the message content in the fourth message is empty, or the message content in the fourth message includes the target character. The first message is the message fed back by the server in response to the fourth message.
[0041] Optionally, in an embodiment of the present application, the above-mentioned server may be a server corresponding to the first application.
[0042] That is to say, the first electronic device can activate the target port by sending an empty packet or a data packet containing specific characters to simulate the user triggering the first electronic device to send a message in the target session window, so that the first electronic device can sniff from the server whether there is a new message (i.e., the first message) in the target session window.
[0043] Optionally, in an embodiment of the present application, the first electronic device may send N fourth messages to the server through the target port within a first predetermined time period, where N is a positive integer.
[0044] In this way, the first electronic device can actively sniff the target session window by sending the fourth message, so that it can actively obtain the new message (i.e., the first message) in the target session window, ensuring the timely sending of various messages in the target session window, and then ensuring that the new message in the target session window can be sent to the second electronic device in a timely manner.
[0045] Optionally, in an embodiment of the present application, when the first operation includes displaying a target conversation window, the first electronic device may display the target conversation window in a floating manner on the target interface, or may switch the target interface to the first application interface.
[0046] Optionally, in another possible implementation of the embodiment of the present application, the first operation includes displaying the target conversation window. Figure 1 ,like Figure 3 As shown, the above step 101 can be specifically implemented through the following step 101b.
[0047] Step 101b: If the target session window is not displayed and the message in the target session window is not updated, and if no message is received through the target port within a first predetermined time period, display the target session window within a first time period.
[0048] In the embodiment of the present application, the first electronic device does not receive any operation of the user on the first electronic device during the first time period.
[0049] It can be understood that before the first electronic device receives any operation from the user on the first electronic device, the first electronic device may continue to display the target conversation window.
[0050] Optionally, in an embodiment of the present application, the first electronic device can simulate an operation event of the user so that the first electronic device can switch the target interface to the first application interface to display the target session window.
[0051] Optionally, in an embodiment of the present application, after displaying the target conversation window, when the first electronic device receives an operation of the user on the first electronic device, the first electronic device may switch the first application interface to the target interface.
[0052] In an embodiment of the present application, if no message is received through the target port within the first predetermined time period, it can be considered that the first electronic device has not detected from the server whether there is a new message (i.e., the first message) in the target conversation window. Therefore, the first electronic device can simulate the user's operation of opening the target conversation window and display the target conversation window on the first application interface, so that the first electronic device can activate the target port.
[0053] In this way, if the first electronic device does not receive a message through the target port within the first predetermined time period, the target session window can be displayed within the first time period, so that the first electronic device can actively obtain new messages in the target session window from the server, ensuring the timely sending of various messages in the target session window, and further ensuring that the first electronic device can send the new messages in the target session window to the second electronic device in a timely manner.
[0054] Step 102: The first electronic device receives a first message through a target port.
[0055] Optionally, in an embodiment of the present application, the first electronic device may receive the first message from the server through the target port.
[0056] Step 103: The first electronic device updates the second message in the target conversation window to a third message according to the first message.
[0057] In the embodiment of the present application, the second message is a message that has been transmitted by the target port.
[0058] Optionally, in an embodiment of the present application, the first electronic device may add the first message to the second message to update the second message to a third message.
[0059] Optionally, in the embodiment of the present application, after the first electronic device updates the second message to a third message, the first electronic device may store the third message in a storage area corresponding to the target port.
[0060] Furthermore, the electronic device may first delete the second message in the storage area corresponding to the target port, and then store the third message in the storage area corresponding to the target port.
[0061] Step 104: The first electronic device sends a third message to the second electronic device.
[0062] Optionally, in an embodiment of the present application, the first electronic device may first establish a wireless connection with the second electronic device, and then send the third message to the second electronic device. The wireless connection may be any of the following: Bluetooth connection, Wireless Fidelity (Wi-Fi) connection, 2.4G wireless connection, etc.
[0063] It should be noted that, for the description of establishing a wireless connection between the first electronic device and the second electronic device, reference may be made to the specific description in the related art, and the embodiments of the present application will not be repeated here.
[0064] Optionally, in an embodiment of the present application, after the first electronic device sends the third message to the second electronic device, the second electronic device may display the third message so that the user can reply according to the third message.
[0065] Furthermore, the user may reply on the first electronic device according to the third message, or may reply on the second electronic device according to the third message.
[0066] In an embodiment of the present application, after the first electronic device sends the third message to the second electronic device, the first electronic device may repeat steps 101 to 104 to send the message in the target conversation window to the second electronic device in real time, so that the user can view the message in the target conversation window on the second electronic device.
[0067] In the message processing method provided by the embodiment of the present application, a first electronic device can perform a first operation when the target conversation window is not displayed and the message in the target conversation window is not updated. The first operation includes at least one of sending a message through a target port (for transmitting the message in the target conversation window) and displaying the target conversation window, so that the first electronic device can receive the first message through the target port and, based on the first message, update the second message in the target conversation window (i.e., the message transmitted by the target port) to a third message, and send the third message to the second electronic device. Since the first electronic device can send a message and / or display the target conversation window through the target port when the target conversation window is not displayed and the message in the target conversation window is not updated, the first electronic device can update the target conversation window based on the first message received through the target port and the first and second messages to obtain the third message, so that the first electronic device can send the third message to the second electronic device to display the third message through the second electronic device without the user having to perform multiple operations to trigger the first electronic device to display the third message. Therefore, the user's operation in replying to the third message can be simplified and time-consuming, thereby improving the efficiency of the first electronic device in replying to messages.
[0068] Optionally, in an embodiment of the present application, before the above step 101, the message processing method provided in the embodiment of the present application may further include the following step 201.
[0069] Step 201: When a target conversation window is displayed and a first condition is satisfied, the first electronic device obtains a second message.
[0070] In the embodiment of the present application, the first condition includes any one of the following: receiving input to the target session window, and determining that the message in the target session window can be received through the target port.
[0071] Optionally, in an embodiment of the present application, when the first electronic device displays the target session window, the first electronic device may analyze the data packets sent and received by the system to determine the target port, so that the first electronic device can determine whether the first condition is met.
[0072] Optionally, in an embodiment of the present application, when the first condition includes receiving input to the target conversation window, the input can specifically be any of the following: a long press input, a preset number of click inputs. In this case, the first electronic device can detect the display screen to determine whether input to the target conversation window has been received, thereby determining whether the first condition is met.
[0073] It can be understood that the target session window may be a session window selected by the user.
[0074] Optionally, in an embodiment of the present application, when the first condition includes determining that the message in the target session window can be received through the target port, the first electronic device can interact with the server through the target port to determine whether the message in the target session window can be received through the target port.
[0075] It can be understood that the target conversation window may also be a conversation window selected by the first electronic device.
[0076] In the embodiment of the present application, if the target conversation window is displayed and the first condition is met, it can be considered that the user may need to view the message in the target conversation window (such as the third message), so the first electronic device can obtain the second message.
[0077] Optionally, in an embodiment of the present application, when the target conversation window is displayed and the first condition is met, the first electronic device may determine a message storage area corresponding to the target port and obtain the second message from the message storage area, wherein the message storage area is used to store messages transmitted by the target port.
[0078] In this way, when the user needs to view the message in the target conversation window, the first electronic device can directly obtain the second message and directly update the third message based on the first and second messages. Therefore, the first electronic device can send the third message to the second electronic device in a timely manner.
[0079] The following will take the example of a user replying on the second electronic device to illustrate how the user replies to a message.
[0080] Optionally, in the embodiment of the present application, Figure 1 ,like Figure 4 As shown, after the above step 104, the message processing method provided in the embodiment of the present application may further include the following steps 301 and 302.
[0081] Step 301: A first electronic device receives a fifth message sent by a second electronic device.
[0082] Optionally, in an embodiment of the present application, after the first electronic device sends the third message to the second electronic device, the second electronic device can display the third message and an input box, so that the user can enter the first message content in the input box based on the third message, so that the second electronic device can generate a fifth message based on the first message content and send the fifth message to the second electronic device.
[0083] Step 302: The first electronic device sends a fifth message to the server through the target port.
[0084] Optionally, in an embodiment of the present application, when the first electronic device has activated the target port, the first electronic device may directly send the fifth message to the server through the target port.
[0085] In this way, since the first electronic device can send the fifth message to the server through the target port without the user triggering the first electronic device to display the target conversation window, the utilization rate of the display space of the first electronic device can be improved.
[0086] Optionally, in the embodiment of the present application, Figure 1 ,like Figure 5 As shown, after the above step 104, the message processing method provided in the embodiment of the present application may further include the following steps 401 to 403.
[0087] Step 401: A first electronic device receives a sixth message sent by a second electronic device.
[0088] Optionally, in an embodiment of the present application, after the first electronic device sends the third message to the second electronic device, the second electronic device can display the third message and an input box, so that the user can enter the second message content in the input box based on the third message, so that the second electronic device can generate a sixth message based on the second message content and send the sixth message to the second electronic device.
[0089] Step 402: The first electronic device displays a target message conversation window within a second time period.
[0090] In the embodiment of the present application, the first electronic device does not receive any operation of the user on the first electronic device during the second time period.
[0091] Optionally, in an embodiment of the present application, when the first electronic device does not activate the target port, the first electronic device may display the target message conversation window within the second time period.
[0092] Optionally, in an embodiment of the present application, the first electronic device can simulate an operation event of the user so that the first electronic device can switch the target interface to the first application interface to display the target session window.
[0093] Step 403: The first electronic device sends a sixth message to the server through the target port.
[0094] In this way, since the first electronic device can directly display the target message conversation window within the second time period, the situation where the first electronic device cannot send the sixth message due to the inactivation of the target port can be avoided. In this way, the first electronic device can send the sixth message to the server in a timely manner.
[0095] The message processing method provided in the embodiment of the present application can be executed by a message processing device. In the embodiment of the present application, the message processing device provided in the embodiment of the present application is described by taking the message processing method executed by the message processing device as an example.
[0096] The embodiment of the present application provides a message processing device, which is a first message processing device, such as Figure 6 As shown, the first message processing device 500 includes an execution module 501, a receiving module 502, an updating module 503, and a sending module 504. The execution module 501 is configured to, when the target session window is not displayed and the message in the target session window has not been updated, perform a first operation. The first operation includes at least one of the following: sending a message via a target port, and displaying the target session window. The target port is used to transmit the message in the target session window. The receiving module 502 is configured to receive a first message via the target port. The updating module 503 is configured to update the second message in the target session window to a third message based on the first message received by the receiving module 502. The second message is the message already transmitted by the target port. The sending module 504 is configured to send the third message updated by the updating module 503 to the second message processing device.
[0097] In one possible implementation, the first operation includes sending a message through the target port, and the execution module 501 includes a first sending submodule. The first sending submodule is configured to send a fourth message to the server through the target port, wherein the message content of the fourth message is empty or includes target characters. The first message is a message fed back by the server in response to the fourth message.
[0098] In this way, the first message processing device can actively sniff the target session window by sending the fourth message, so that it can actively obtain the new message (i.e., the first message) in the target session window, ensuring the timely sending of various messages in the target session window, and then ensuring that the new message in the target session window can be sent to the second message processing device in a timely manner.
[0099] In one possible implementation, the first operation includes displaying a target conversation window, and the execution module 501 includes a first display submodule. The first display submodule is configured to display the target message conversation window within a first time period if no message is received through the target port within a first predetermined time period, and the first message processing apparatus 500 does not receive any user operation on the first message processing apparatus 500 within the first time period.
[0100] In this way, if the first message processing device does not receive any message through the target port within the first predetermined time period, the first message processing device can display the target session window within the first time period, so that the first message processing device can actively obtain new messages in the target session window from the server, ensuring the timely sending of various messages in the target session window, and further ensuring that the first message processing device can send new messages in the target session window to the second message processing device in a timely manner.
[0101] In one possible implementation, the first message processing apparatus 500 provided in an embodiment of the present application may further include an acquisition module. The acquisition module is configured to acquire the second message when a target message conversation window is displayed and a first condition is satisfied. The first condition includes any one of the following: receiving input to the target message conversation window, or determining that messages in the target message conversation window are receivable via the target port.
[0102] In this way, when the user needs to view the message in the target conversation window, the first message processing device can directly obtain the second message and directly update the third message based on the first message and the second message. Therefore, the first message processing device can send the third message to the second message processing device in a timely manner.
[0103] In a possible implementation, the receiving module 502 is further configured to receive a fifth message sent by the second message processing apparatus. The sending module 504 is further configured to send the fifth message received by the receiving module 502 to the server via a target port.
[0104] In this way, since the first message processing apparatus can send the fifth message to the server through the target port without the user triggering the first message processing apparatus to display the target conversation window, the utilization rate of the display space of the first message processing apparatus can be improved.
[0105] In a possible implementation, the receiving module 502 is further configured to receive a sixth message sent by the second message processing apparatus. The sending module 504 is further configured to send the sixth message received by the receiving module 502 to the server via a target port.
[0106] In this way, since the first message processing device can directly display the target message conversation window within the second time period, it can avoid the situation where the first message processing device cannot send the sixth message due to the inactivation of the target port. In this way, the first message processing device can send the sixth message to the server in a timely manner.
[0107] The message processing device provided in the embodiment of the present application is capable of sending a message and / or displaying a target session window through a target port when the target session window is not displayed and the message in the target session window is not updated. Thus, the first message processing device can update a third message in the target session window based on the first message received through the target port and the first and second messages. The first message processing device can then send the third message to the second message processing device, so that the second message processing device displays the third message, without requiring the user to perform multiple operations to trigger the first message processing device to display the third message. Therefore, the user's operations in replying to the third message can be simplified and time consumption can be reduced, thereby improving the efficiency of the first message processing device in replying to messages.
[0108] The message processing device in the embodiment of the present application can be an electronic device or a component in an electronic device, such as an integrated circuit or a chip. The electronic device can be a terminal or a device other than a terminal. For example, the electronic device can be a mobile phone, a tablet computer, a laptop computer, a PDA, an in-vehicle electronic device, a mobile Internet device (MID), an augmented reality (AR) / virtual reality (VR) device, a robot, a wearable device, an ultra-mobile personal computer (UMPC), a netbook or a personal digital assistant (PDA), etc. It can also be a server, a network attached storage (NAS), a personal computer (PC), a television (TV), a teller machine or a self-service machine, etc., and the embodiment of the present application does not specifically limit it.
[0109] The message processing device in the embodiment of the present application may be a device having an operating system. The operating system may be an Android operating system, an iOS operating system, or other possible operating systems, which are not specifically limited in the embodiment of the present application.
[0110] The message processing device provided in the embodiment of the present application can implement each process implemented in the above method embodiment. To avoid repetition, it will not be described here.
[0111] Alternatively, as Figure 7 As shown, an embodiment of the present application also provides an electronic device 600, including a processor 601 and a memory 602, wherein the memory 602 stores a program or instruction that can be run on the processor 601. When the program or instruction is executed by the processor 601, the various steps of the method embodiment of the above-mentioned message processing method are implemented, and the same technical effect can be achieved. To avoid repetition, it will not be repeated here.
[0112] It should be noted that the electronic devices in the embodiments of the present application include the mobile electronic devices and non-mobile electronic devices mentioned above.
[0113] Figure 8 A schematic diagram of the hardware structure of an electronic device to implement an embodiment of the present application is provided, where the electronic device is a first electronic device.
[0114] The electronic device 700 includes but is not limited to components such as a radio frequency unit 701 , a network module 702 , an audio output unit 703 , an input unit 704 , a sensor 705 , a display unit 706 , a user input unit 707 , an interface unit 708 , a memory 709 , and a processor 710 .
[0115] Those skilled in the art will understand that the electronic device 700 may also include a power source (such as a battery) to power each component, and the power source may be logically connected to the processor 710 through a power management system, thereby implementing functions such as charging, discharging, and power consumption management through the power management system. Figure 8 The electronic device structure shown in the figure does not constitute a limitation on the electronic device. The electronic device may include more or fewer components than shown in the figure, or combine certain components, or arrange the components differently, which will not be repeated here.
[0116] The processor 710 is configured to, when the target session window is not displayed and the message in the target session window is not updated, perform a first operation, where the first operation includes at least one of the following: sending a message through a target port, and displaying the target session window, where the target port is used to transmit the message in the target session window.
[0117] The radio frequency unit 701 is configured to receive a first message through a target port.
[0118] The processor 710 updates the second message in the target session window to a third message according to the first message, where the second message is the message transmitted by the target port.
[0119] The radio frequency unit 701 is further configured to send a third message to the second electronic device.
[0120] An electronic device provided in an embodiment of the present application is a first electronic device. Since the first electronic device can send a message and / or display the target session window through the target port when the target session window is not displayed and the message in the target session window is not updated, the first electronic device can update the third message in the target session window based on the first message received through the target port and the first message and the second message, so that the first electronic device can send the third message to the second electronic device to display the third message through the second electronic device, without the user having to perform multiple operations to trigger the first electronic device to display the third message. Therefore, the user's operations in the process of replying to the third message can be simplified and the time consumption can be reduced. In this way, the efficiency of the first electronic device in replying to messages can be improved.
[0121] Optionally, in an embodiment of the present application, the first operation includes sending a message through a target port.
[0122] The processor 710 is specifically configured to send a fourth message to the server through the target port, where the message content in the fourth message is empty, or the message content in the fourth message includes target characters.
[0123] The first message is the message fed back by the server in response to the fourth message.
[0124] In this way, the first electronic device can actively sniff the target session window by sending the fourth message, so that it can actively obtain the new message (i.e., the first message) in the target session window, ensuring the timely sending of various messages in the target session window, and then ensuring that the new message in the target session window can be sent to the second electronic device in a timely manner.
[0125] Optionally, in an embodiment of the present application, the first operation includes displaying a target conversation window.
[0126] The display unit 706 is specifically configured to display the target session window within a first time period if no message is received through the target port within a first predetermined time period, and the first electronic device does not receive any user operation on the first electronic device within the first time period.
[0127] In this way, if the first electronic device does not receive a message through the target port within the first predetermined time period, the target session window can be displayed within the first time period, so that the first electronic device can actively obtain new messages in the target session window from the server, ensuring the timely sending of various messages in the target session window, and further ensuring that the first electronic device can send the new messages in the target session window to the second electronic device in a timely manner.
[0128] Optionally, in the embodiment of the present application, the processor 710 is further configured to obtain a second message when the target conversation window is displayed and the first condition is met.
[0129] The first condition includes any one of the following: receiving input to the target session window, and determining that the message in the target session window can be received through the target port.
[0130] In this way, when the user needs to view the message in the target conversation window, the first electronic device can directly obtain the second message and directly update the third message based on the first and second messages. Therefore, the first electronic device can send the third message to the second electronic device in a timely manner.
[0131] Optionally, in the embodiment of the present application, the radio frequency unit 701 is further configured to receive a fifth message sent by the second electronic device; and send the fifth message to the server through the target port.
[0132] In this way, since the first electronic device can send the fifth message to the server through the target port without the user triggering the first electronic device to display the target conversation window, the utilization rate of the display space of the first electronic device can be improved.
[0133] Optionally, in the embodiment of the present application, the radio frequency unit 701 is further configured to receive a sixth message sent by the second electronic device.
[0134] The display unit 706 is configured to display the target conversation window within a second time period, during which the first electronic device does not receive any operation from the user on the first electronic device.
[0135] The radio frequency unit 701 is further configured to send a sixth message to the server through the target port.
[0136] In this way, since the first electronic device can directly display the target message conversation window within the second time period, the situation where the first electronic device cannot send the sixth message due to the inactivation of the target port can be avoided. In this way, the first electronic device can send the sixth message to the server in a timely manner.
[0137] It should be understood that in an embodiment of the present application, the input unit 704 may include a graphics processing unit (GPU) 7041 and a microphone 7042, and the graphics processor 7041 processes the image data of a static picture or video obtained by an image capture device (such as a camera) in a video capture mode or an image capture mode. The display unit 706 may include a display panel 7061, and the display panel 7061 may be configured in the form of a liquid crystal display, an organic light emitting diode, etc. The user input unit 707 includes a touch panel 7071 and at least one of other input devices 7072. The touch panel 7071 is also called a touch screen. The touch panel 7071 may include two parts: a touch detection device and a touch controller. Other input devices 7072 may include, but are not limited to, a physical keyboard, function keys (such as volume control keys, switch keys, etc.), a trackball, a mouse, and an operating stick, which will not be repeated here.
[0138] The memory 709 can be used to store software programs and various data. The memory 709 may mainly include a first storage area for storing programs or instructions and a second storage area for storing data, wherein the first storage area may store an operating system, applications or instructions required for at least one function (such as a sound playback function, an image playback function, etc.). In addition, the memory 709 may include a volatile memory or a non-volatile memory, or the memory 709 may include both volatile and non-volatile memories. Among them, the non-volatile memory may be a read-only memory (ROM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), an electrically erasable programmable read-only memory (EEPROM), or a flash memory. The volatile memory may be a random access memory (RAM), a static random access memory (SRAM), a dynamic random access memory (DRAM), a synchronous dynamic random access memory (SDRAM), a double data rate synchronous dynamic random access memory (DDRSDRAM), an enhanced synchronous dynamic random access memory (ESDRAM), a synchronous link dynamic random access memory (SLDRAM), and a direct memory bus random access memory (DRRAM). The memory 709 in the embodiment of the present application includes but is not limited to these and any other suitable types of memory.
[0139] Processor 710 may include one or more processing units. Optionally, in an embodiment of the present application, processor 710 integrates an application processor and a modem processor. The application processor primarily handles operations related to the operating system, user interface, and application programs, while the modem processor primarily processes wireless communication signals, such as a baseband processor. It is understood that the modem processor may not be integrated into processor 710.
[0140] An embodiment of the present application also provides a readable storage medium, on which a program or instruction is stored. When the program or instruction is executed by a processor, the various processes of the above-mentioned message processing method embodiment are implemented and the same technical effect can be achieved. To avoid repetition, it will not be repeated here.
[0141] The processor is the processor in the electronic device described in the above embodiment. The readable storage medium includes a computer readable storage medium, such as a computer read-only memory (ROM), a random access memory (RAM), a magnetic disk, or an optical disk.
[0142] An embodiment of the present application further provides a chip, which includes a processor and a communication interface, wherein the communication interface is coupled to the processor, and the processor is used to run programs or instructions to implement the various processes of the above-mentioned message processing method embodiment and can achieve the same technical effect. To avoid repetition, it will not be repeated here.
[0143] It should be understood that the chip mentioned in the embodiments of the present application can also be called a system-level chip, a system chip, a chip system or a system-on-chip chip, etc.
[0144] An embodiment of the present application provides a computer program product, which is stored in a storage medium. The program product is executed by at least one processor to implement the various processes of the above-mentioned message processing method embodiment and can achieve the same technical effect. To avoid repetition, it will not be repeated here.
[0145] It should be noted that, in this article, the terms "comprise", "include" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device comprising a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, an element defined by the statement "comprises a ..." does not exclude the presence of other identical elements in the process, method, article or device comprising the element. In addition, it should be noted that the scope of the methods and devices in the embodiments of the present application is not limited to performing functions in the order shown or discussed, and may also include performing functions in a substantially simultaneous manner or in the opposite order according to the functions involved. For example, the described method may be performed in an order different from that described, and various steps may also be added, omitted, or combined. In addition, the features described with reference to certain examples may be combined in other examples.
[0146] Through the description of the above implementation methods, those skilled in the art can clearly understand that the above-mentioned embodiment methods can be implemented by means of software plus the necessary general hardware platform, and of course can also be implemented by hardware, but in many cases the former is a better implementation method. Based on this understanding, the technical solution of the present application is essentially or the part that contributes to the prior art can be embodied in the form of a computer software product, which is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk), including a number of instructions for enabling a terminal (which can be a mobile phone, computer, server, or network device, etc.) to execute the methods described in each embodiment of the present application.
[0147] The embodiments of the present application are described above in conjunction with the accompanying drawings, but the present application is not limited to the above-mentioned specific implementation methods. The above-mentioned specific implementation methods are merely illustrative and not restrictive. Under the guidance of this application, ordinary technicians in this field can also make many forms without departing from the purpose of this application and the scope of protection of the claims, all of which are within the protection of this application.
Claims
1. A message processing method, executed by a first electronic device, characterized in that: The method comprises: When the target interface is displayed, the target session window in the first application interface is not displayed, and the message in the target session window is not updated, performing a first operation, wherein the first operation includes at least one of the following: sending a message to the server through a target port, displaying the target session window, the target port being used to transmit the message in the target session window; and activating the target port. receiving a first message from the server through the target port, where the first message is a message fed back by the server in response to a message sent by the first electronic device through the target port; According to the first message, add the first message to the second message in the target session window to update the second message to a third message, where the second message is the message transmitted by the target port; The third message is sent to the second electronic device.
2. The method according to claim 1, characterized in that The first operation includes sending a message through the target port, and performing the first operation includes: Sending a fourth message to the server through the target port, where the message content in the fourth message is empty, or the message content in the fourth message includes target characters; The first message is a message fed back by the server in response to the fourth message.
3. The method according to claim 1, characterized in that The first operation includes displaying the target session window, and performing the first operation includes: In the case that no message is received through the target port within a first predetermined time period, the target conversation window is displayed within a first time period, and the first electronic device does not receive any user operation on the first electronic device within the first time period.
4. The method according to claim 1, wherein Before performing the first operation, the method further includes: When the target conversation window is displayed and the first condition is satisfied, acquiring the second message; The first condition includes any one of the following: receiving input to the target session window, and determining that the message in the target session window can be received through the target port.
5. The method according to claim 1, wherein After sending the third message to the second electronic device, the method further includes: receiving a fifth message sent by the second electronic device; The fifth message is sent to the server through the target port.
6. The method according to claim 1, characterized in that After sending the third message to the second electronic device, the method further includes: receiving a sixth message sent by the second electronic device; During a second time period, the target conversation window is displayed, and during the second time period, the first electronic device does not receive any operation from the user on the first electronic device; The sixth message is sent to the server through the target port.
7. A message processing device, the message processing device being a first message processing device, characterized in that: The first message processing device includes: an execution module, a receiving module, an updating module and a sending module; The execution module is configured to execute a first operation when the target interface is displayed, the target session window in the first application interface is not displayed, and the message in the target session window is not updated, wherein the first operation includes at least one of the following: sending a message to the server through a target port, displaying the target session window, the target port being used to transmit the message in the target session window; and activating the target port. The receiving module is configured to receive a first message from the server through the target port, where the first message is a message fed back by the server in response to a message sent by the first message processing device through the target port; The updating module is configured to add the first message to the second message in the target session window according to the first message received by the receiving module, so as to update the second message to a third message, where the second message is the message transmitted by the target port; The sending module is used to send the third message updated by the updating module to the second message processing device.
8. The message processing device according to claim 7, characterized in that: The first operation includes sending a message through the target port, and the execution module includes: a first sending submodule; The first sending submodule is configured to send a fourth message to the server through the target port, where the message content in the fourth message is empty, or the message content in the fourth message includes target characters; The first message is a message fed back by the server in response to the fourth message.
9. An electronic device, characterized in that: The method comprises a processor and a memory, wherein the memory stores a program or instruction that can be run on the processor, and when the program or instruction is executed by the processor, the steps of the message processing method according to any one of claims 1 to 6 are implemented.
10. A readable storage medium, characterized in that: The readable storage medium stores a program or instruction, and when the program or instruction is executed by a processor, the steps of the message processing method according to any one of claims 1 to 6 are implemented.
Citation Information
Patent Citations
Method and system for replying to message, and electronic device
WO2022037407A1