Interactive message processing method, device, equipment and medium

By presetting and cacheing the interactive messages of terminal devices in live broadcast scenarios, and directly sending corresponding processing results, the problems of high server data processing pressure and high resource consumption are solved, the message distribution efficiency is improved, and traffic overhead is reduced.

CN114598894BActive Publication Date: 2024-12-10DOUYIN VISION CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202011408418.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2020-12-03
Publication Date
2024-12-10
Estimated Expiration
2040-12-03

AI Technical Summary

Technical Problem

In the live broadcast scenario, the server needs to process and distribute a large number of interactive messages to each terminal device, resulting in high data processing pressure, high resource consumption, and repetitive message preset processing operations, which increases the burden on the server.

Method used

By first performing preset processing and cache processing results on the interaction message of the first terminal device, if the subsequent interaction message of the second terminal device corresponds to the first message processing result, the cache processing results are directly sent to avoid repetitive preset processing , reduce the server's data processing pressure and resource consumption.

Benefits of technology

It effectively reduces the repetitive message preset processing operations during the interactive message sending process, reduces the server's data processing pressure and resource consumption, improves the distribution efficiency of interactive messages, and reduces the traffic overhead between the server and the terminal device.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114598894B_ABST
    Figure CN114598894B_ABST
Patent Text Reader

Abstract

This disclosure relates to an interactive message processing method, apparatus, device, and medium. The method includes: determining a first interactive message to be sent to a first terminal device; performing preset processing on the first interactive message to obtain a first message processing result, and caching the first message processing result; sending the first message processing result to the first terminal device; determining a second interactive message to be sent to a second terminal device; and, if it is determined that the second interactive message corresponds to the first message processing result, sending the cached first message processing result to the second terminal device. This disclosure allows cached message processing results to be sent to different terminal devices, reducing repetitive preset message processing operations during interactive message sending, alleviating server data processing pressure, reducing server resource consumption, and improving the distribution efficiency of interactive messages.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to the field of Internet live broadcast technology, and in particular to an interactive message processing method, device, equipment and medium. Background Art

[0002] In the live broadcast scenario, the interactive messages between the audience and the anchor include chats, gifts, likes, etc. After the server obtains the interactive messages of each live broadcast room, if it follows the same message processing process to determine and process them one by one and send them to each terminal device (or client), it will cause problems such as high data processing pressure and high resource consumption on the server. Summary of the invention

[0003] In order to solve the above technical problems or at least partially solve the above technical problems, the embodiments of the present disclosure provide an interactive message processing method, apparatus, device and medium.

[0004] In a first aspect, an embodiment of the present disclosure provides an interactive message processing method, including:

[0005] Determining a first interaction message to be sent to a first terminal device;

[0006] Performing preset processing on the first interaction message to obtain a first message processing result, and caching the first message processing result;

[0007] Sending the first message processing result to the first terminal device;

[0008] Determining a second interaction message to be sent to a second terminal device;

[0009] When it is determined that the second interactive message corresponds to the first message processing result, the cached first message processing result is sent to the second terminal device.

[0010] In a second aspect, the embodiment of the present disclosure further provides an interactive message processing device, including:

[0011] A first interaction message determining module, used to determine a first interaction message to be sent to a first terminal device;

[0012] a first preprocessing module, configured to perform a preset process on the first interaction message, obtain a first message processing result, and cache the first message processing result;

[0013] A first message sending module, used to send the first message processing result to the first terminal device;

[0014] A second interaction message determining module, used to determine a second interaction message to be sent to a second terminal device;

[0015] The second message sending module is used to send the cached first message processing result to the second terminal device when it is determined that the second interactive message corresponds to the first message processing result.

[0016] In a third aspect, an embodiment of the present disclosure further provides an electronic device, comprising a memory and a processor, wherein a computer program is stored in the memory, and when the computer program is executed by the processor, the electronic device implements any interactive message processing method provided by the embodiment of the present disclosure.

[0017] In a fourth aspect, an embodiment of the present disclosure further provides a computer-readable storage medium, in which a computer program is stored. When the computer program is executed by a computing device, the computing device implements any interactive message processing method provided by the embodiment of the present disclosure.

[0018] Compared with the prior art, the technical solution provided by the embodiments of the present disclosure has at least the following advantages: in the embodiments of the present disclosure, a first interactive message to be sent to a first terminal device is first determined, and a first message processing result after preset processing is sent to the first terminal device and cached; after determining a second interactive message to be sent to a second terminal device, it is preferentially determined whether the second interactive message corresponds to the first message processing result, that is, whether the first message processing result is the same as the preset processing result of the second interactive message; if they correspond, there is no need to perform preset processing on the second interactive message, and the cached first message processing result can be directly sent to the second terminal device, thereby reducing repetitive message preset processing operations in the interactive message sending process, alleviating the data processing pressure of the server, reducing the resource consumption of the server, and improving the distribution efficiency of interactive messages. BRIEF DESCRIPTION OF THE DRAWINGS

[0019] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present disclosure and, together with the description, serve to explain the principles of the present disclosure.

[0020] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, for ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative labor.

[0021] Figure 1 A schematic diagram of an interactive message processing architecture provided by an embodiment of the present disclosure;

[0022] Figure 2 A flowchart of an interactive message processing method provided by an embodiment of the present disclosure;

[0023] Figure 3 A flowchart of another interactive message processing method provided by an embodiment of the present disclosure;

[0024] Figure 4 A flowchart of another interactive message processing method provided by an embodiment of the present disclosure;

[0025] Figure 5 A schematic diagram of the structure of an interactive message processing device provided by an embodiment of the present disclosure;

[0026] Figure 6 A schematic diagram of the structure of an electronic device provided in an embodiment of the present disclosure. DETAILED DESCRIPTION

[0027] In order to more clearly understand the above-mentioned objectives, features and advantages of the present disclosure, the scheme of the present disclosure will be further described below. It should be noted that the embodiments of the present disclosure and the features in the embodiments can be combined with each other without conflict.

[0028] In the following description, many specific details are set forth to facilitate a full understanding of the present disclosure, but the present disclosure may also be implemented in other ways different from those described herein; it is obvious that the embodiments in the specification are only part of the embodiments of the present disclosure, rather than all of the embodiments.

[0029] Figure 1 The schematic diagram of the processing architecture of an interactive message provided in the embodiment of the present disclosure is used to exemplarily illustrate the embodiment of the present disclosure, and specifically takes the live interactive scenario as an example, which should not be understood as a specific limitation of the embodiment of the present disclosure. Figure 1 As shown, the first terminal device and the second terminal device enter the live broadcast room 1 respectively, and the server 1 distributes the interactive messages to the first terminal device and the second terminal device; the third terminal device and the fourth terminal device enter the live broadcast room 2 respectively, and the server 2 distributes the interactive messages to the third terminal device and the fourth terminal device. A communication connection can be established between each terminal device and the server by establishing a long connection. Server 1 and server 2 can obtain the interactive messages they need from the message source in real time or periodically, and then distribute them to each terminal device.

[0030] During the interactive message distribution process, server 1 and server 2 can determine the interactive message to be sent to each terminal device according to the preset information of each terminal device, and respectively determine whether the first terminal device and the second terminal device receive the same interactive message, and whether the third terminal device and the fourth terminal device receive the same interactive message. If so, server 1 can send the preset processing result of the interactive message to be sent to the first terminal device to the second terminal device, thereby eliminating the repetitive message preset processing operation in the process of sending the interactive message to the second terminal device. Similarly, server 2 can send the preset processing result of the interactive message to be sent to the third terminal device to the fourth terminal device, thereby eliminating the repetitive message preset processing operation in the process of sending the interactive message to the fourth terminal device, thereby reducing the data processing pressure on the server.

[0031] Among them, the preset information of each terminal device is used as a screening condition (or filtering condition) for the server to determine the interactive message to be sent to the terminal device, and may include at least one of the following: characteristic information of the terminal device and the type of interaction in which the terminal device participates. The characteristic information of the terminal device may include, but is not limited to, the device type, the version information of the interactive application installed in the terminal device, etc. The version information of the interactive application may include the version number of the formal online version or the version number of the gray version (referring to a test version released within a certain user range), etc. The device type may include a device based on the Android operating system or a device based on the Apple (i.e., iOS) operating system, etc. The interaction type in which the terminal device participates may include a live broadcast room interaction type and a chat room interaction type, etc. The live broadcast room interaction type can be further subdivided according to the live broadcast room type, and the live broadcast room type can be determined according to the type of subject involved in the live broadcast, such as an e-commerce live broadcast room, a game live broadcast room, an education live broadcast room, or a news live broadcast room.

[0032] It should be noted that the above-mentioned first terminal device, second terminal device, third terminal device and fourth terminal device are used to refer to different devices respectively, without any limiting meaning on the order.

[0033] Figure 2 The flowchart of an interactive message processing method provided by an embodiment of the present disclosure is applicable to the case of how a server sends an interactive message to a terminal device. The interactive message processing method provided by an embodiment of the present disclosure can be executed by an interactive message processing device integrated in a server, and the device can be implemented by software and / or hardware.

[0034] like Figure 2 As shown, the interactive message processing method provided by the embodiment of the present disclosure may include:

[0035] S210. Determine a first interaction message to be sent to a first terminal device.

[0036] In the embodiments of the present disclosure, for different interaction scenarios, the types of interaction messages are different. For example, in a live interaction scenario, the interaction message may be a live message; in a chat scenario based on a chat room, the interaction message may be a chat interaction message. Based on different business deployments, the server may determine the interaction message to be sent to each terminal device from the message source according to a pre-set message distribution mechanism.

[0037] Optionally, determining a first interaction message to be sent to the first terminal device includes:

[0038] Acquire first preset information of the first terminal device, and determine a first interactive message to be sent to the first terminal device based on the first preset information; wherein the first preset information is used to filter the interactive messages that need to be sent to the terminal device. Exemplarily, the first preset information may include feature information of the first terminal device and the type of interaction in which the first terminal device participates, and the feature information may include but is not limited to the device type, version information of the interactive application installed in the terminal device, etc.; the interaction type may include a live broadcast room interaction type and a chat room interaction type, etc. The server may acquire the first preset information of the first terminal device by interacting with the first terminal device through data.

[0039] Taking the live broadcast interaction scenario as an example, the server can obtain the first preset information carried in the live broadcast room entry request by parsing the live broadcast room entry request of the first terminal device, or obtain the first preset information by interacting with the first terminal device after the first terminal device enters the live broadcast room. With respect to the live broadcast room type, the server can also determine the live broadcast room type according to the room identifier carried in the live broadcast room entry request of the first terminal device, for example, according to the pre-stored correspondence between the room identifier and the live broadcast room type, determine the live broadcast room type corresponding to the room identifier of the live broadcast room currently entered by the first terminal device.

[0040] The server can obtain candidate interaction messages for the interaction type currently participated in by the terminal device from the message source in real time or periodically, and then filter out the first interaction message to be sent to the first terminal device from the candidate interaction messages according to the first preset information of the first terminal device. That is, further, determining the first interaction message to be sent to the first terminal device based on the preset information includes: obtaining the candidate interaction message from the message source according to the preset time period (which can be determined according to the demand); determining the first interaction message to be sent to the first terminal device from the candidate interaction messages based on the first preset information. Specifically, in the process of determining the first interaction message, the first interaction message to be sent to the first terminal device can be determined according to the preset interaction message screening strategy (the interaction message screening strategy pre-sets at least one valid preset information for screening interaction messages). For example, the server determines the first interaction message to be sent to the first terminal device from the candidate interaction messages according to the version information and device type of the interactive application in the first terminal device.

[0041] Continuing with the live broadcast interaction scenario as an example, the server can periodically obtain candidate interaction messages of the current live broadcast room entered by the first terminal device from the message source, such as various chat messages, gift messages, and like messages, etc., and then filter out the first interaction messages that need to be sent to the first terminal device from the candidate interaction messages based on all or part of the first preset information of the first terminal device, thereby avoiding the large traffic overhead and large consumption of server resources caused by sending all the candidate interaction messages of the current live broadcast room to the first terminal device.

[0042] The server adopts the method of periodically obtaining candidate interactive messages. On the basis of ensuring that the latest interactive messages are sent to the terminal device, it can also balance resource consumption to a certain extent and relieve task processing pressure. In addition, according to the preset information of the terminal device, the interactive messages that need to be sent to the terminal device are filtered, which can also improve the effectiveness of the interactive messages received by the terminal device, that is, the interactive messages sent to the terminal device are valid interactive messages that match the preset information of the terminal device and can be displayed in the terminal device, avoiding the server indiscriminately sending interactive messages that cannot be displayed in the terminal device to the terminal device.

[0043] S220: Perform preset processing on the first interaction message to obtain a first message processing result, and cache the first message processing result.

[0044] The specific operations involved in the preset processing may be determined according to the message processing in different interaction scenarios. For example, performing preset processing on the first interaction message to obtain the first message processing result includes: performing message serialization processing and compression processing on the first interaction message to obtain the first message processing result. Among them, message serialization processing refers to processing the interaction message according to the agreed message format (which can be determined according to requirements), and compression processing can be implemented by any available compression method. The specific implementation of message serialization processing and compression processing can refer to the existing implementation principle.

[0045] Compared with screening interactive messages according to preset information of terminal devices, serialization processing and compression processing are two processing processes that consume a lot of CPU resources of the server. By adopting the technical solution of the embodiment of the present disclosure, for terminal devices receiving the same interactive message, serialization processing and compression processing of the interactive message only need to be performed once before the interactive message is sent to each terminal device. Therefore, it can greatly reduce the repeated operations of serialization processing and compression processing in the server, alleviate the data processing pressure of the server, and reduce the resource consumption of the server.

[0046] S230. Send the first message processing result to the first terminal device.

[0047] S240: Determine a second interaction message to be sent to the second terminal device.

[0048] Optionally, determining a second interaction message to be sent to the second terminal device includes:

[0049] The second preset information of the second terminal device is obtained, and the second interactive message to be sent to the second terminal device is determined based on the second preset information; wherein the second preset information is used to filter the interactive messages that need to be sent to the terminal device. Exemplarily, the second preset information may include characteristic information of the second terminal device and the type of interaction in which the second terminal device participates, and the characteristic information may include but is not limited to the device type, the version information of the interactive application installed in the terminal device, etc.; the interaction type may include the live broadcast room interaction type and the chat room interaction type, etc. Moreover, in the embodiment of the present disclosure, the second terminal device and the first terminal device participate in the same type of interaction, such as entering the same live broadcast room, or participating in the chat interaction in the same chat room, etc.

[0050] Furthermore, candidate interaction messages may be obtained from a message source according to a preset time period; and based on second preset information, a second interaction message to be sent to the second terminal device may be determined from the candidate interaction messages.

[0051] The implementation logic of how to determine the second interaction message is the same as that of how to determine the implementation logic of the first interaction message, and reference may be made to the foregoing description.

[0052] S250: When it is determined that the second interactive message corresponds to the first message processing result, the cached first message processing result is sent to the second terminal device.

[0053] Exemplarily, if the preset information of the terminal devices involved in determining the first interactive message and the second interactive message is the same, it can be determined that the second interactive message corresponds to the first message processing result; or, the same hash calculation method can be used to calculate the hash values ​​corresponding to the first interactive message and the second interactive message respectively. If the hash values ​​are the same, it can be determined that the second interactive message corresponds to the first message processing result, that is, it is determined that the first message processing result is the same as the preset processing result of the second interactive message; then the cached first message processing result is directly sent to the second terminal device, thereby eliminating the need to repeat the operation of performing the preset processing on the second interactive message. Among them, the first terminal device and the second terminal device participate in the same type of interaction, and the server performs the same preset processing on the first interactive message and the second interactive message.

[0054] Furthermore, the interactive message processing method provided by the embodiment of the present disclosure also includes:

[0055] If it is determined that the second interaction message does not correspond to the first message processing result, perform a preset process on the second interaction message to obtain a second message processing result, and cache the second message processing result;

[0056] The second message processing result is sent to the second terminal device.

[0057] By caching the second message processing result, when a subsequent terminal device also needs to receive the same message as the second interactive message, the cached second message processing result can be directly sent to the terminal device, which can also achieve the effect of reducing the repetitive preset processing operations that need to be performed during the message distribution process.

[0058] In the disclosed embodiment, the first interactive message to be sent to the first terminal device is first determined, and the first message processing result after the preset processing is sent to the first terminal device and cached. After the second interactive message to be sent to the second terminal device is determined, it is first determined whether the second interactive message corresponds to the first message processing result, that is, whether the first message processing result is the same as the preset processing result of the second interactive message. If it corresponds, there is no need to perform preset processing on the second interactive message, and the cached first message processing result can be directly sent to the second terminal device, which solves the problem that the server in the existing solution has a large data processing pressure and a large resource consumption due to repeated execution of a large number of message preset processing operations. By reducing the repetitive message preset processing operations in the process of sending interactive messages, the data processing pressure of the server is relieved, the resource consumption of the server is reduced, and the distribution efficiency of the interactive messages is improved. In addition, by screening the interactive messages to be sent to the terminal device according to the preset information of the terminal device, compared with the existing solution of sending all interactive messages, the problem of large traffic overhead between the server and the terminal device is solved, the traffic consumption between the server and the terminal device is reduced, and the effectiveness of the interactive messages received by the terminal device is improved.

[0059] Figure 3 The flowchart of another interactive message processing method provided in the embodiment of the present disclosure is used to exemplify the embodiment of the present disclosure and should not be understood as a specific limitation of the embodiment of the present disclosure. Figure 3 As shown, during the entire live broadcast process, the server obtains the latest message of the current live broadcast room from the message source according to a preset time period, and according to the preset information of the first terminal device A (used to refer to any terminal device entering the live broadcast room), the server filters out the first interactive message that needs to be sent to the first terminal device A from the latest message obtained (this process is message filtering), and performs message serialization and message compression on the first interactive message. Then, the message processing result can be sent to the first terminal device A. At the same time, the message processing result is cached locally on the server, or cached in the memory of the current process.

[0060] Then, according to the preset information of another terminal device B entering the current live broadcast room, determine the second interactive message that needs to be sent to the second terminal device B, and determine whether the message processing result corresponding to the second interactive message exists in the cache. If it exists, the message processing result corresponding to the second interactive message can be directly obtained from the cache and sent to the second terminal device B; if it does not exist, the second interactive message needs to be serialized and compressed before being sent to the second terminal device B. At the same time, the message processing result can be cached locally on the server or in the memory of the current process. The above operations can be repeated to complete the message sending to each terminal device entering the live broadcast room until the live broadcast is closed or ended.

[0061] Figure 4 A flowchart of another interactive message processing method provided in an embodiment of the present disclosure is further optimized and expanded based on the above technical solution, and can be combined with the above-mentioned various optional implementation methods.

[0062] like Figure 4 As shown, the interactive message processing method provided by the embodiment of the present disclosure may include:

[0063] S410. Determine a first interaction message to be sent to a first terminal device.

[0064] S420: Perform preset processing on the first interaction message to obtain a first message processing result.

[0065] S430: Obtain a message ID of the first interaction message, and calculate a first hash value based on the message ID of the first interaction message.

[0066] The message ID is used to uniquely identify the interaction message. The specific implementation of the hash calculation can be implemented by any existing available hash calculation method, which is not specifically limited in the embodiments of the present disclosure. For example, the MD5 message digest algorithm (MD5 Message-Digest Algorithm) can be used to perform a hash calculation on the message ID of the first interaction message to obtain a first hash value.

[0067] Optionally, if the first interaction message includes multiple sub-messages, obtaining a message ID of the first interaction message, and calculating a first hash value based on the message ID of the first interaction message includes:

[0068] Obtaining message IDs of each sub-message in the first interactive message, and concatenating the message IDs of each sub-message according to a preset sorting strategy to obtain a first concatenated ID sequence;

[0069] A first hash value is calculated based on the first concatenated ID sequence.

[0070] Among them, the preset sorting strategy can be flexibly set according to the needs, such as sorting according to the priority of the sub-message (the priority level corresponding to each sub-message can also be pre-defined), sorting according to the time when the server receives each sub-message, etc.; and multiple sub-messages and corresponding message IDs can be cached in the form of message list (filterList) and message ID list (filterIdList) respectively. Different preset sorting strategies are used to obtain different splicing ID sequences, and different splicing ID sequences correspond to different hash values.

[0071] S440: Cache the first message processing result according to the correspondence between the first hash value and the first message processing result.

[0072] For example, the first hash value and the first message processing result may be cached in the form of a key-value pair. Specifically, the first hash value may be used as a "key" and the first message processing result may be used as a "value".

[0073] S450: Send the first message processing result to the first terminal device.

[0074] S460: Determine a second interaction message to be sent to the second terminal device.

[0075] S470: Obtain a message ID of the second interaction message, and calculate a second hash value based on the message ID of the second interaction message.

[0076] Similarly, the specific implementation of the hash calculation can be implemented by any existing available hash calculation method, which is not specifically limited in the embodiments of the present disclosure. For example, the MD5 message digest algorithm (MD5 Message-DigestAlgorithm) can be used to perform a hash calculation on the message ID of the second interactive message to obtain a second hash value. The second hash value is calculated in the same way as the first hash value.

[0077] If the second interactive message also includes multiple sub-messages, the message IDs of the sub-messages may be concatenated according to the aforementioned preset sorting strategy to obtain a second concatenated ID sequence; and then the second hash value is calculated based on the second concatenated ID sequence. That is, in order to ensure the comparative accuracy of the hash value, the concatenation of the message IDs of the multiple sub-messages in the second interactive message and the hash calculation of the second concatenated ID sequence are implemented in the same manner as the concatenation and hash calculation of the message IDs of the multiple sub-messages in the first interactive message.

[0078] S480: If the second hash value is the same as the first hash value, determine that the second interaction message corresponds to the first message processing result.

[0079] S490: Send the cached first message processing result to the second terminal device.

[0080] If the second hash value is different from the first hash value, it is determined that the second interaction message does not correspond to the first message processing result, and the second interaction message needs to be processed by a preset method before being sent to the second terminal device.

[0081] In the embodiment of the present disclosure, a first hash value corresponding to the first interactive message is obtained by hash value calculation, and the first message processing result is cached according to the correspondence between the first hash value and the first message processing result. After the second hash value corresponding to the second interactive message is calculated, it is determined whether the second interactive message corresponds to the first message processing result by comparing the first hash value and the second hash value. If they correspond, the cached first message processing result is sent to the second terminal device, thereby reducing repetitive message preset processing operations in the interactive message sending process, alleviating the data processing pressure on the server, reducing the resource consumption of the server, and improving the distribution efficiency of interactive messages.

[0082] In the embodiment of the present disclosure, the server can receive the interaction request of the first terminal device and the second terminal device from the same gateway module, such as a request to enter the same live broadcast room, or a request to enter the same chat room, etc. Taking the live broadcast interaction scenario as an example, before the first terminal device and the second terminal device enter the same live broadcast room, the gateway module (or gateway layer) routes them to the same server (or the same message access layer device) based on the room identifier of the live broadcast room, and the server provides the interactive message delivery service, thereby ensuring that after adopting the technical solution of the embodiment of the present disclosure, for the terminal devices receiving the same interactive message, it can achieve the effect of reducing traffic overhead, alleviating the data processing pressure of the server, and reducing the resource consumption of the server.

[0083] Continue with Figure 1For example, suppose that the first terminal device and the third terminal device receive the same interactive message, but since the interactive message is sent to the first terminal device by server 1 and to the third terminal device by server 2, server 1 determines the first interactive message for the first terminal device, and caches it locally on server 1 after preset processing. At this time, server 2 cannot directly obtain the message processing result of the cached first interactive message from server 1 and send it directly to the third terminal device. Server 2 still needs to perform the same message screening and preset processing operations as server 1 to determine the message processing result of the interactive message that needs to be sent to the third terminal device. At this time, for the situation where the first terminal device and the third terminal device receive the same interactive message, the server cannot achieve the effect of reducing traffic overhead and reducing server resource consumption. Therefore, it is very necessary to route different terminal devices to the same server as much as possible through the gateway module to reduce traffic overhead and reduce server resource consumption.

[0084] It should be noted that, in the case where the distribution volume of interactive messages is very large, a large number of terminal devices can also be routed to at least two servers, that is, at least two servers provide interactive message sending services for different terminal devices respectively, and then for each server, the technical solution of the embodiment of the present disclosure can still be adopted to aggregate the terminal devices receiving the same interactive message, thereby reducing the server's repetitive preset processing operations on the interactive message.

[0085] Figure 5 The structure diagram of an interactive message processing device provided by the embodiment of the present disclosure is a schematic diagram of the structure of an interactive message processing device provided by the embodiment of the present disclosure. The embodiment of the present disclosure can be applicable to the situation of how a server sends an interactive message to a terminal device. The interactive message processing device provided by the embodiment of the present disclosure can be implemented by software and / or hardware and integrated in any server.

[0086] like Figure 5 As shown, the interactive message processing device 500 provided in the embodiment of the present disclosure may include a first interactive message determining module 501, a first pre-processing module 502, a first message sending module 503, a second interactive message determining module 504, and a second message sending module 505, wherein:

[0087] A first interaction message determining module 501, configured to determine a first interaction message to be sent to a first terminal device;

[0088] A first pre-processing module 502, configured to perform a preset process on the first interaction message, obtain a first message processing result, and cache the first message processing result;

[0089] A first message sending module 503, configured to send a first message processing result to a first terminal device;

[0090] A second interaction message determining module 504, configured to determine a second interaction message to be sent to a second terminal device;

[0091] The second message sending module 505 is used to send the cached first message processing result to the second terminal device when it is determined that the second interaction message corresponds to the first message processing result.

[0092] Optionally, the first preprocessing module 502 is specifically used to: perform message serialization processing and compression processing on the first interaction message to obtain a first message processing result.

[0093] Optionally, the first preprocessing module 502 includes:

[0094] A processing unit, configured to perform a preset process on the first interaction message to obtain a first message processing result;

[0095] A first hash value calculation unit, configured to obtain a message ID of the first interaction message, and calculate a first hash value based on the message ID of the first interaction message;

[0096] The first cache unit is used to cache the first message processing result according to the corresponding relationship between the first hash value and the first message processing result.

[0097] Optionally, the second message sending module 505 includes:

[0098] A second hash value calculation unit, configured to obtain a message ID of the second interaction message, and calculate a second hash value based on the message ID of the second interaction message;

[0099] a message correspondence determination unit, configured to determine that the second interaction message corresponds to the first message processing result if the second hash value is the same as the first hash value;

[0100] The second message sending unit is used to send the cached first message processing result to the second terminal device.

[0101] Optionally, if the first interaction message includes multiple sub-messages, the first hash value calculation unit includes:

[0102] A message ID concatenation subunit, configured to obtain the message IDs of the sub-messages in the first interactive message, and concatenate the message IDs of the sub-messages according to a preset sorting strategy to obtain a first concatenated ID sequence;

[0103] The first hash value calculation subunit is used to calculate a first hash value based on the first splicing ID sequence.

[0104] Optionally, the interactive message processing device 500 provided in the embodiment of the present disclosure further includes:

[0105] A second preprocessing module, configured to, when it is determined that the second interaction message does not correspond to the first message processing result, perform a preset process on the second interaction message to obtain a second message processing result, and cache the second message processing result;

[0106] The third message sending module sends the second message processing result to the second terminal device.

[0107] Optionally, the first interaction message determining module 501 is specifically configured to:

[0108] Acquire first preset information of the first terminal device, and determine a first interaction message to be sent to the first terminal device based on the first preset information;

[0109] The second interaction message determination module 504 is specifically configured to:

[0110] Acquire second preset information of the second terminal device, and determine a second interaction message to be sent to the second terminal device based on the second preset information;

[0111] The first preset information or the second preset information is used to filter the interactive messages that need to be sent to the terminal device.

[0112] Optionally, the first interaction message determining module 501 includes:

[0113] A candidate interaction message acquisition unit, configured to acquire candidate interaction messages from a message source according to a preset time period;

[0114] The first interaction message determining unit is used to determine a first interaction message to be sent to a first terminal device from candidate interaction messages based on first preset information.

[0115] The second interaction message determination module 504 includes:

[0116] The second interaction message determining unit is used to determine the second interaction message to be sent to the second terminal device from the candidate interaction messages based on the second preset information.

[0117] Optionally, the type of the first interactive message or the second interactive message includes a live broadcast message;

[0118] The first terminal device and the second terminal device include terminal devices entering the same live broadcast room.

[0119] The interactive message processing device provided in the embodiment of the present disclosure can execute any interactive message processing method provided in the embodiment of the present disclosure, and has the corresponding functional modules and beneficial effects of the execution method. The contents not described in detail in the embodiment of the device of the present disclosure can refer to the description in any method embodiment of the present disclosure.

[0120] Figure 6The schematic diagram of the structure of an electronic device provided in the embodiment of the present disclosure is used to exemplarily illustrate an electronic device that implements the interactive message processing method in the embodiment of the present disclosure. The electronic device may include but is not limited to any type of server, etc. Figure 6 As shown, the electronic device 600 includes one or more processors 601 and a memory 602 .

[0121] The processor 601 may be a central processing unit (CPU) or other forms of processing units having data processing capabilities and / or instruction execution capabilities, and may control other components in the electronic device 600 to perform desired functions.

[0122] The memory 602 may include one or more computer program products, and the computer program product may include various forms of computer-readable storage media, such as volatile memory and / or non-volatile memory. Volatile memory may include, for example, random access memory (RAM) and / or cache memory (cache), etc. Non-volatile memory may include, for example, read-only memory (ROM), hard disk, flash memory, etc. One or more computer program instructions may be stored on a computer-readable storage medium, and the processor 601 may run the program instructions to implement any interactive message processing method provided by the embodiment of the present disclosure, and may also implement other desired functions. Various contents such as input signals, signal components, noise components, etc. may also be stored in the computer-readable storage medium.

[0123] The above-mentioned interactive message processing method may include: determining a first interactive message to be sent to a first terminal device; performing preset processing on the first interactive message to obtain a first message processing result, and caching the first message processing result; sending the first message processing result to the first terminal device; determining a second interactive message to be sent to a second terminal device; and when it is determined that the second interactive message corresponds to the first message processing result, sending the cached first message processing result to the second terminal device. It should be understood that the electronic device 600 may also execute other optional implementation schemes provided in the embodiment of the disclosed method.

[0124] In one example, the electronic device 600 may further include: an input device 603 and an output device 604 , and these components are interconnected via a bus system and / or other forms of connection mechanisms (not shown).

[0125] In addition, the input device 603 may also include, for example, a keyboard, a mouse, and the like.

[0126] The output device 604 can output various information to the outside, including the determined distance information, direction information, etc. The output device 604 can include, for example, a display, a speaker, a printer, a communication network and a remote output device connected thereto, and the like.

[0127] Of course, to simplify, Figure 6 Only some of the components related to the present disclosure in the electronic device 600 are shown, and components such as a bus, an input / output interface, etc. are omitted. In addition, according to specific application situations, the electronic device 600 may also include any other appropriate components.

[0128] In addition to the above methods and devices, the embodiments of the present disclosure may also be a computer program product, which includes computer program instructions. When the computer program instructions are executed by a processor, the processor executes any interactive message processing method provided by the embodiments of the present disclosure.

[0129] The computer program product may be written in any combination of one or more programming languages ​​to write program codes for performing the operations of the disclosed embodiments, including object-oriented programming languages ​​such as Java, C++, etc., and conventional procedural programming languages ​​such as "C" or similar programming languages. The program code may be executed entirely on the user electronic device, partially on the user device, as a separate software package, partially on the user electronic device and partially on a remote electronic device, or entirely on a remote electronic device or server.

[0130] In addition, the embodiments of the present disclosure may also be a computer-readable storage medium on which computer program instructions are stored. When the computer program instructions are executed by a processor, the processor executes any interactive message processing method provided by the embodiments of the present disclosure.

[0131] The above-mentioned interactive message processing method may include: determining a first interactive message to be sent to a first terminal device; performing preset processing on the first interactive message to obtain a first message processing result, and caching the first message processing result; sending the first message processing result to the first terminal device; determining a second interactive message to be sent to a second terminal device; and when it is determined that the second interactive message corresponds to the first message processing result, sending the cached first message processing result to the second terminal device. It should be understood that when the computer program instructions are executed by the processor, the processor may also execute other optional implementation schemes provided in the embodiment of the method disclosed herein.

[0132] Computer readable storage media can adopt any combination of one or more readable media. The readable medium can be a readable signal medium or a readable storage medium. The readable storage medium can include, for example, but is not limited to, a system, device or device of electricity, magnetism, light, electromagnetic, infrared, or semiconductor, or any combination of the above. More specific examples (non-exhaustive list) of readable storage media include: an electrical connection with one or more wires, a portable disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above.

[0133] It should be noted that, in this article, relational terms such as "first" and "second" are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including 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, the elements defined by the sentence "comprise a ..." do not exclude the existence of other identical elements in the process, method, article or device including the elements.

[0134] The above description is only a specific embodiment of the present disclosure, so that those skilled in the art can understand or implement the present disclosure. Various modifications to these embodiments will be apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the present disclosure. Therefore, the present disclosure will not be limited to the embodiments described herein, but will conform to the widest scope consistent with the principles and novel features disclosed herein.

Claims

1. A method for processing interactive messages, characterized in that: include: Determining, according to a preset time period, a first interaction message to be sent to the first terminal device based on first preset information of the first terminal device; Performing preset processing on the first interaction message to obtain a first message processing result, and caching the first message processing result; Sending the first message processing result to the first terminal device; Determining, according to a preset time period, a second interaction message to be sent to the second terminal device based on second preset information of the second terminal device; When it is determined that the second interactive message corresponds to the first message processing result, the cached first message processing result is sent to the second terminal device, wherein the first preset information is obtained by parsing the live broadcast room entry request corresponding to the first terminal device, and the second preset information is obtained by parsing the live broadcast room entry request corresponding to the second terminal device, the first interactive message and the second interactive message include multiple sub-messages, and the second interactive message corresponds to the first message processing result including: a hash value corresponding to a first spliced ​​ID sequence obtained by splicing the message IDs of each sub-message in the first interactive message is the same as a hash value corresponding to a second spliced ​​ID sequence obtained by splicing the message IDs of each sub-message in the second interactive message.

2. The method according to claim 1, characterized in that The performing a preset process on the first interaction message to obtain a first message processing result includes: The first interaction message is serialized and compressed to obtain the first message processing result.

3. The method according to claim 1, characterized in that The caching the first message processing result includes: Obtaining a message ID of the first interaction message, and calculating a first hash value based on the message ID of the first interaction message; The first message processing result is cached according to the correspondence between the first hash value and the first message processing result.

4. The method according to claim 3, characterized in that Before determining that the second interaction message corresponds to the first message processing result, the method further includes: Obtain a message ID of the second interaction message, and calculate a second hash value based on the message ID of the second interaction message.

5. The method according to claim 3, characterized in that: The acquiring the message ID of the first interaction message includes: The message ID of each sub-message in the first interactive message is obtained, wherein the first concatenated ID sequence is obtained by concatenating the message IDs of each sub-message in the first interactive message according to a preset sorting strategy.

6. The method according to claim 1, characterized in that Also includes: If it is determined that the second interaction message does not correspond to the first message processing result, perform the preset processing on the second interaction message to obtain a second message processing result, and cache the second message processing result; The second message processing result is sent to the second terminal device.

7. The method according to claim 1, characterized in that Before determining the first interaction message to be sent to the first terminal device based on the first preset information of the first terminal device, the method further includes: Acquire first preset information of the first terminal device; Before determining the second interaction message to be sent to the second terminal device based on the second preset information of the second terminal device, the method further includes: Acquire second preset information of the second terminal device; The first preset information or the second preset information is used to filter the interactive messages that need to be sent to the terminal device.

8. The method according to claim 1, characterized in that The determining, according to the preset time period, the first interaction message to be sent to the first terminal device based on the first preset information of the first terminal device includes: Obtain candidate interaction messages from a message source according to a preset time period; Based on the first preset information, determining the first interaction message to be sent to the first terminal device from the candidate interaction messages; The determining, according to the preset time period, the second interaction message to be sent to the second terminal device based on the second preset information of the second terminal device includes: Based on the second preset information, the second interaction message to be sent to the second terminal device is determined from the candidate interaction messages.

9. The method according to claim 1, characterized in that: The type of the first interactive message or the second interactive message includes a live broadcast message; The first terminal device and the second terminal device include terminal devices entering the same live broadcast room.

10. An interactive message processing device, characterized in that: include: A first interaction message determining module, configured to determine a first interaction message to be sent to the first terminal device based on first preset information of the first terminal device according to a preset time period; a first preprocessing module, configured to perform a preset process on the first interaction message, obtain a first message processing result, and cache the first message processing result; A first message sending module, used to send the first message processing result to the first terminal device; A second interaction message determining module, configured to determine a second interaction message to be sent to the second terminal device based on second preset information of the second terminal device according to a preset time period; A second message sending module is used to send the cached first message processing result to the second terminal device when it is determined that the second interactive message corresponds to the first message processing result, wherein the first preset information is obtained by parsing the live broadcast room entry request corresponding to the first terminal device, and the second preset information is obtained by parsing the live broadcast room entry request corresponding to the second terminal device, the first interactive message and the second interactive message include multiple sub-messages, and the second interactive message corresponds to the first message processing result: a hash value corresponding to a first spliced ​​ID sequence obtained by splicing the message IDs of each sub-message in the first interactive message is the same as a hash value corresponding to a second spliced ​​ID sequence obtained by splicing the message IDs of each sub-message in the second interactive message.

11. An electronic device, characterized in that: It comprises a memory and a processor, wherein the memory stores a computer program, and when the computer program is executed by the processor, the electronic device implements the interactive message processing method according to any one of claims 1 to 9.

12. A computer-readable storage medium, characterized in that: The storage medium stores a computer program, and when the computer program is executed by a computing device, the computing device implements the interactive message processing method according to any one of claims 1 to 9.