[go: up one dir, main page]

CN107451263B - Method, storage medium, device and system for caching gift panel message - Google Patents

Method, storage medium, device and system for caching gift panel message Download PDF

Info

Publication number
CN107451263B
CN107451263B CN201710642672.6A CN201710642672A CN107451263B CN 107451263 B CN107451263 B CN 107451263B CN 201710642672 A CN201710642672 A CN 201710642672A CN 107451263 B CN107451263 B CN 107451263B
Authority
CN
China
Prior art keywords
message
key
value pair
messages
caching
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201710642672.6A
Other languages
Chinese (zh)
Other versions
CN107451263A (en
Inventor
张磊
陈少杰
张文明
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Gangben Technology Development (Shenzhen) Co., Ltd.
Original Assignee
Wuhan Douyu Network Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Wuhan Douyu Network Technology Co Ltd filed Critical Wuhan Douyu Network Technology Co Ltd
Priority to CN201710642672.6A priority Critical patent/CN107451263B/en
Publication of CN107451263A publication Critical patent/CN107451263A/en
Application granted granted Critical
Publication of CN107451263B publication Critical patent/CN107451263B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • G06F16/95Retrieval from the web
    • G06F16/957Browsing optimisation, e.g. caching or content distillation
    • G06F16/9574Browsing optimisation, e.g. caching or content distillation of access to content, e.g. by caching
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L65/00Network arrangements, protocols or services for supporting real-time applications in data packet communication
    • H04L65/60Network streaming of media packets
    • H04L65/61Network streaming of media packets for supporting one-way streaming services, e.g. Internet radio
    • H04L65/611Network streaming of media packets for supporting one-way streaming services, e.g. Internet radio for multicast or broadcast
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/40Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
    • H04N21/43Processing of content or additional data, e.g. demultiplexing additional data from a digital video stream; Elementary client operations, e.g. monitoring of home network or synchronising decoder's clock; Client middleware
    • H04N21/431Generation of visual interfaces for content selection or interaction; Content or additional data rendering
    • H04N21/4312Generation of visual interfaces for content selection or interaction; Content or additional data rendering involving specific graphical features, e.g. screen layout, special fonts or colors, blinking icons, highlights or animations
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/40Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
    • H04N21/47End-user applications
    • H04N21/478Supplemental services, e.g. displaying phone caller identification, shopping application
    • H04N21/4788Supplemental services, e.g. displaying phone caller identification, shopping application communicating with other users, e.g. chatting

Landscapes

  • Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Signal Processing (AREA)
  • Databases & Information Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Data Mining & Analysis (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Information Transfer Between Computers (AREA)
  • Digital Computer Display Output (AREA)

Abstract

本发明公开了一种缓存礼物面板消息的方法、存储介质、设备及系统,涉及直播软件开发技术领域。该方法包括:将已到达消息接收器的每个消息封装成自定义的消息封装类的对象;将所有封装好的消息缓存至一个键值对集合中,每个封装好的消息对应键值对集合中的一个键值对,且键值对中的键对应封装好的消息的消息名,键值对中的值对应封装好的消息的消息体;当点击礼物面板时,从键值对集合中取出需要使用的消息的内容,并使用获取到的消息的内容,进行礼物面板的界面展示。本发明能有效保证礼物面板的消息的持久化,避免出现礼物面板的界面展示异常的情况。

Figure 201710642672

The invention discloses a method, storage medium, device and system for caching gift panel messages, and relates to the technical field of live broadcast software development. The method includes: encapsulating each message that has arrived at the message receiver into an object of a custom message encapsulation class; caching all the encapsulated messages into a key-value pair set, and each encapsulated message corresponds to a key-value pair A key-value pair in the set, and the key in the key-value pair corresponds to the message name of the packaged message, and the value in the key-value pair corresponds to the message body of the packaged message; Take out the content of the message that needs to be used, and use the content of the obtained message to display the interface of the gift panel. The present invention can effectively ensure the persistence of the message of the gift panel, and avoid the situation of abnormal display of the interface of the gift panel.

Figure 201710642672

Description

一种缓存礼物面板消息的方法、存储介质、设备及系统A method, storage medium, device and system for caching gift panel messages

技术领域technical field

本发明涉及直播软件开发技术领域,具体来讲是一种缓存礼物面板消息的方法、存储介质、设备及系统。The invention relates to the technical field of live broadcast software development, in particular to a method, storage medium, device and system for caching gift panel messages.

背景技术Background technique

随着移动终端的快速发展,特别是手机移动终端的快速发展,直播行业越来越受欢迎,很多用户喜欢通过移动终端设备来观看直播。而在观看直播的过程中,用户经常会对自己喜欢的主播赠送礼物。因此,在直播软件(如斗鱼直播软件)的开发设计中,通常需要有一个礼物面板的功能。With the rapid development of mobile terminals, especially mobile terminals, the live broadcast industry is becoming more and more popular, and many users like to watch live broadcasts through mobile terminal devices. In the process of watching live broadcasts, users often give gifts to their favorite anchors. Therefore, in the development and design of live broadcast software (such as Douyu live broadcast software), it is usually necessary to have the function of a gift panel.

礼物面板主要用于放置礼物使用的,礼物面板中会有很多个视图元素,每个视图元素需要接收不同的消息并做出不同的界面状态更新。但是,消息到达是不确定的,有可能在礼物面板还没有点击的时候消息已经到达了,等我们点击打开礼物面板的时候需要层级到达的一个消息,而这个消息的接收器只有在有消息的时候才会触发该消息所对应的功能。但是,当打开礼物面板的时候此时是没有消息的(因为该消息在礼物面板还没有点击的时候消息已经到达了),因此,会因无法及时获取到最新消息而引起礼物面板的界面展示异常。The gift panel is mainly used for placing gifts. There are many view elements in the gift panel. Each view element needs to receive different messages and make different interface status updates. However, the arrival of the message is uncertain. It is possible that the message has arrived before the gift panel has been clicked. When we click to open the gift panel, we need a message that has arrived at the level, and the receiver of this message can only be received when there is a message. Only then will the function corresponding to the message be triggered. However, when the gift panel is opened, there is no message at this time (because the message has arrived before the gift panel has been clicked), therefore, the interface of the gift panel will be displayed abnormally due to the inability to obtain the latest news in time. .

发明内容SUMMARY OF THE INVENTION

本发明的目的是为了克服上述背景技术的不足,提供一种缓存礼物面板消息的方法、存储介质、设备及系统,能有效保证礼物面板的消息的持久化,避免出现礼物面板的界面展示异常的情况。The purpose of the present invention is to overcome the above-mentioned deficiencies of the background technology, and provide a method, storage medium, device and system for caching the messages of the gift panel, which can effectively ensure the persistence of the messages of the gift panel and avoid abnormal display of the interface of the gift panel. Happening.

为达到以上目的,本发明采取的技术方案是:提供一种缓存礼物面板消息的方法,该方法包括以下步骤:In order to achieve the above object, the technical solution adopted by the present invention is to provide a method for caching gift panel messages, the method comprising the following steps:

S1、消息的封装:将已到达消息接收器的每个消息封装成自定义的消息封装类的对象;所述自定义的消息封装类包括消息名和消息体,消息名用于存放消息的唯一标识符,消息体用于存放消息的具体内容;S1. Message encapsulation: encapsulate each message that has arrived at the message receiver into an object of a self-defined message encapsulation class; the self-defined message encapsulation class includes a message name and a message body, and the message name is used to store the unique identifier of the message The message body is used to store the specific content of the message;

S2、消息的缓存:将所有封装好的消息缓存至一个键值对集合中;每个封装好的消息对应键值对集合中的一个键值对,且键值对中的键对应封装好的消息的消息名,键值对中的值对应封装好的消息的消息体;S2, message caching: cache all encapsulated messages into a key-value pair set; each encapsulated message corresponds to a key-value pair in the key-value pair set, and the key in the key-value pair corresponds to the encapsulated key-value pair The message name of the message, and the value in the key-value pair corresponds to the message body of the encapsulated message;

S3、消息缓存的获取和使用:当点击礼物面板时,从键值对集合中取出需要使用的消息的内容;并使用获取到的消息的内容,进行礼物面板的界面展示。S3. Acquisition and use of message cache: When clicking on the gift panel, the content of the message to be used is retrieved from the set of key-value pairs; and the content of the acquired message is used to display the interface of the gift panel.

在上述技术方案的基础上,步骤S2中,将所有封装好的消息缓存至一个键值对集合中,具体包括以下操作:On the basis of the above technical solution, in step S2, all encapsulated messages are cached into a key-value pair set, which specifically includes the following operations:

S201、从一个封装好的消息中取出其对应的消息名和消息体;S201, extracting its corresponding message name and message body from an encapsulated message;

S202、判断取出的消息名是否为空或者为空字符串,若是,则转入步骤S204;否则,转入步骤S203;S202, determine whether the extracted message name is empty or an empty string, if so, go to step S204; otherwise, go to step S203;

S203、将取出的消息名缓存至键值对集合中的一个键值对的键中;将取出的消息体缓存至键值对集合中的一个键值对的值中;S203, cache the taken-out message name in the key of a key-value pair in the key-value pair set; cache the taken-out message body in the value of a key-value pair in the key-value pair set;

S204、重复步骤S201~S203,直至所有封装好的消息都已缓存至键值对集合中。S204. Repeat steps S201-S203 until all the encapsulated messages have been cached in the key-value pair set.

在上述技术方案的基础上,步骤S3中,从键值对集合中取出需要使用的消息的内容,具体包括以下操作:On the basis of the above technical solution, in step S3, the content of the message to be used is retrieved from the key-value pair set, which specifically includes the following operations:

S301、从键值对集合中依次取出一个消息所对应的键值对;S301, sequentially extracting a key-value pair corresponding to a message from the key-value pair set;

S302、从键值对的键中取出该消息的消息名,并将该消息名与需要使用的消息的消息名进行比对,若两者一致,转入步骤S303;若两者不一致,转入步骤S304;S302, extract the message name of the message from the key of the key-value pair, and compare the message name with the message name of the message to be used, if the two are consistent, go to step S303; if the two are inconsistent, go to step S303 Step S304;

S303、从键值对的值中取出该消息的消息体,将该消息体中的内容作为需要使用的消息的内容进行返回,并结束取出操作;S303, extract the message body of the message from the value of the key-value pair, return the content in the message body as the content of the message that needs to be used, and end the extraction operation;

S304、判断键值对集合中所有消息所对应的键值对是否已全部取出,若是,则返回未获取到需要使用的消息的信息;否则,返回步骤S301,继续取出下一个消息所对应的键值对。S304, determine whether all the key-value pairs corresponding to all messages in the key-value pair set have been taken out, if so, return the information that the message to be used has not been obtained; otherwise, return to step S301, and continue to take out the key corresponding to the next message value pair.

在上述技术方案的基础上,步骤S2还包括以下操作:将所有封装好的消息缓存至一个消息队列中;步骤S3还包括以下操作:当点击礼物面板时,从消息队列中取出需要获取历史记录的消息的内容。On the basis of the above technical solution, step S2 further includes the following operations: buffering all the encapsulated messages in a message queue; step S3 further includes the following operations: when clicking on the gift panel, take out the historical records that need to be obtained from the message queue the content of the message.

本发明还提供一种存储介质,其上存储有计算机程序,所述计算机程序被处理器执行时实现上述缓存礼物面板消息的方法的步骤。The present invention also provides a storage medium on which a computer program is stored, and when the computer program is executed by a processor, implements the steps of the above method for caching a gift panel message.

本发明还提供一种缓存礼物面板消息的设备,包括存储器、处理器及存储在存储器上并在所述处理器上运行的计算机程序,所述处理器执行所述计算机程序时实现上述缓存礼物面板消息的方法的步骤。The present invention also provides a device for caching gift panel messages, including a memory, a processor, and a computer program stored in the memory and running on the processor, the processor implementing the above-mentioned caching gift panel when executing the computer program The steps of the method of the message.

本发明还提供一种缓存礼物面板消息的系统,该系统包括消息封装模块、消息缓存模块、消息获取及使用模块;The present invention also provides a system for caching gift panel messages, which includes a message encapsulation module, a message cache module, and a message acquisition and use module;

所述消息封装模块用于:将已到达消息接收器的每个消息封装成自定义的消息封装类的对象;所述自定义的消息封装类包括消息名和消息体,消息名用于存放消息的唯一标识符,消息体用于存放消息的具体内容;The message encapsulation module is used to encapsulate each message that has arrived at the message receiver into an object of a self-defined message encapsulation class; the self-defined message encapsulation class includes a message name and a message body, and the message name is used to store the information of the message. Unique identifier, the message body is used to store the specific content of the message;

所述消息缓存模块用于:将所有封装好的消息缓存至一个键值对集合中;每个封装好的消息对应键值对集合中的一个键值对,且键值对中的键对应封装好的消息的消息名,键值对中的值对应封装好的消息的消息体;The message caching module is used to: cache all encapsulated messages into a key-value pair set; each encapsulated message corresponds to a key-value pair in the key-value pair set, and the keys in the key-value pair correspond to encapsulation The message name of the good message, and the value in the key-value pair corresponds to the message body of the packaged message;

所述消息获取及使用模块用于:当点击礼物面板时,从键值对集合中取出需要使用的消息的内容;并使用获取到的消息的内容,进行礼物面板的界面展示。The message acquisition and use module is used to: when clicking on the gift panel, take out the content of the message to be used from the key-value pair set; and use the content of the acquired message to display the interface of the gift panel.

在上述技术方案的基础上,所述消息缓存模块将所有封装好的消息缓存至一个键值对集合中的具体流程为:On the basis of the above technical solution, the specific process for the message caching module to cache all the encapsulated messages into a key-value pair set is as follows:

从一个封装好的消息中取出其对应的消息名和消息体,判断取出的消息名是否为空或者为空字符串;若不是,则将取出的消息名缓存至键值对集合中的一个键值对的键中,并将取出的消息体缓存至键值对集合中的一个键值对的值中;若是,则继续对下一个封装好的消息进行缓存,直至所有封装好的消息都已缓存至键值对集合中。Extract the corresponding message name and message body from an encapsulated message, and determine whether the extracted message name is empty or an empty string; if not, cache the extracted message name to a key value in the key-value pair set and cache the retrieved message body into the value of a key-value pair in the key-value pair set; if so, continue to cache the next encapsulated message until all encapsulated messages have been cached into the set of key-value pairs.

在上述技术方案的基础上,所述消息获取及使用模块从键值对集合中取出需要使用的消息的内容的具体流程为:On the basis of the above technical solution, the specific process for the message acquisition and use module to extract the content of the message to be used from the key-value pair set is as follows:

从键值对集合中依次取出一个消息所对应的键值对;从键值对的键中取出该消息的消息名,并将该消息名与需要使用的消息的消息名进行比对,若两者一致,则从键值对的值中取出该消息的消息体,将该消息体中的内容作为需要使用的消息的内容进行返回,并结束取出操作;若两者不一致,则判断键值对集合中所有消息所对应的键值对是否已全部取出,若是,则返回未获取到需要使用的消息的信息;否则,继续取出下一个消息所对应的键值对进行比对。Take out the key-value pair corresponding to a message in turn from the key-value pair set; take out the message name of the message from the key of the key-value pair, and compare the message name with the message name of the message to be used. If they are consistent, the message body of the message is extracted from the value of the key-value pair, the content of the message body is returned as the content of the message to be used, and the extraction operation is ended; if the two are inconsistent, the key-value pair is judged. Whether all the key-value pairs corresponding to all messages in the collection have been taken out, if so, return the information about the messages that need to be used; otherwise, continue to take out the key-value pairs corresponding to the next message for comparison.

在上述技术方案的基础上,所述消息缓存模块还用于:将所有封装好的消息缓存至一个消息队列中;所述消息获取及使用模块还用于:当点击礼物面板时,从消息队列中取出需要获取历史记录的消息的内容。On the basis of the above technical solution, the message buffering module is further used for: buffering all the encapsulated messages in a message queue; the message acquiring and using module is also used for: when clicking on the gift panel, from the message queue Extract the content of the message that needs to get history.

本发明的有益效果在于:The beneficial effects of the present invention are:

(1)本发明中利用一个键值对集合来对所有已到达消息接收器的消息进行缓存,通过这个键值对集合能够有效的缓存礼物面板中所需要使用的所有消息数据的信息。当我们点击(打开)礼物面板时,可以直接从键值对集合中取出曾经到达的消息并加以利用即可,确保了礼物面板能够正常的加载和打开。(1) In the present invention, a set of key-value pairs is used to cache all messages that have reached the message receiver, and the set of key-value pairs can effectively cache the information of all message data needed to be used in the gift panel. When we click (open) the gift panel, we can directly take out the message that has arrived from the key-value pair collection and use it to ensure that the gift panel can be loaded and opened normally.

与现有技术相比,本发明通过对消息的缓存有效的保证了消息的持久化功能,使得礼物面板在后期的任何时间打开的时候都能够利用缓存的消息进行初始化并刷新礼物面板上相应的数据,从而实现礼物面板的界面展示,有效避免了出现礼物面板的界面展示异常的情况。Compared with the prior art, the present invention effectively ensures the persistence of messages by caching messages, so that when the gift panel is opened at any time later, the cached messages can be used to initialize and refresh the corresponding messages on the gift panel. data, so as to realize the interface display of the gift panel, and effectively avoid the abnormal situation of the interface display of the gift panel.

(2)本发明中,对原始消息进行了一层封装,将原始消息对象封装成一个自定义的消息封装类的对象,该自定义的消息封装类的对象能方便后期能够快速缓存和获取该消息。并且,该自定义的消息封装类的消息名中存放有消息的唯一标识符,通过该唯一标识符能区分不同的种类的消息。这样,在后期操作中仅仅需要读取消息封装类中的消息名就能够知道该消息的种类了,也就节省了去解析消息具体内容的时间开销,提高了程序执行速度。(2) In the present invention, the original message is encapsulated in one layer, and the original message object is encapsulated into an object of a self-defined message encapsulation class, and the object of the self-defined message encapsulation class can be conveniently cached and retrieved quickly in the later stage. information. In addition, the unique identifier of the message is stored in the message name of the self-defined message encapsulation class, and different types of messages can be distinguished by the unique identifier. In this way, in the later operation, the type of the message can be known only by reading the message name in the message encapsulation class, which saves the time overhead of parsing the specific content of the message and improves the program execution speed.

(3)本发明针对实际操作中,有些消息在使用时是需要其历史记录信息的情况,相应增设了增设一个消息队列来进行缓存。当礼物面板在展示界面时,若需要使用那些需要历史记录信息的消息时,可以从消息队列中获取,进一步避免了礼物面板的界面展示异常的情况,也使得本发明的适用性更高,使用范围广。(3) In the present invention, a message queue is correspondingly added for buffering, aiming at the situation that some messages need their historical record information when they are used in actual operation. When the gift panel is displaying the interface, if you need to use those messages that require historical record information, you can obtain them from the message queue, which further avoids the abnormal display of the interface of the gift panel, and also makes the present invention more applicable. wide range.

附图说明Description of drawings

图1为本发明实施例中缓存礼物面板消息的方法的流程图;1 is a flowchart of a method for caching a gift panel message in an embodiment of the present invention;

图2为本发明实施例中缓存礼物面板消息的设备的结构示意图;2 is a schematic structural diagram of a device for caching gift panel messages in an embodiment of the present invention;

图3为本发明实施例中缓存礼物面板消息的系统的结构框图。FIG. 3 is a structural block diagram of a system for caching gift panel messages in an embodiment of the present invention.

具体实施方式Detailed ways

下面结合附图及具体实施例对本发明作进一步的详细描述。The present invention will be further described in detail below with reference to the accompanying drawings and specific embodiments.

参见图1所示,本发明实施例提供一种缓存礼物面板消息的方法,该方法包括以下步骤:Referring to FIG. 1, an embodiment of the present invention provides a method for caching a message on a gift panel, and the method includes the following steps:

步骤S1、消息的封装:将已到达消息接收器的每个消息封装成自定义的消息封装类的对象,该自定义的消息封装类(如MsgWrapper)包括两个信息:消息名和消息体;其中,消息名为String(字符串)类型的消息码,主要用于存放消息的唯一标识符,该唯一标识符能区分不同的种类的消息;消息体为Object类型的信息数据message,主要用于存放消息的具体内容。Step S1, message encapsulation: encapsulate each message that has arrived at the message receiver into an object of a self-defined message encapsulation class, and the self-defined message encapsulation class (such as MsgWrapper) includes two pieces of information: a message name and a message body; wherein , the message name is a message code of type String (string), which is mainly used to store the unique identifier of the message, which can distinguish different types of messages; the message body is the information data message of Object type, which is mainly used to store The specific content of the message.

可以理解的是,在礼物面板中有很多种的消息,比如进入房间的房间信息消息、用户登录的用户信息消息、所在房间的房间类型信息消息或房间中的弹幕信息消息等。目前,为了对上述多种的消息种类进行区分,通常采用的方案是根据消息的数据内容来进行区分。也就是说,需要去判断消息内容是不是房间信息,或是不是用户登录信息等。虽然,这种方案原理上是可以区分不同的消息,但是其最大的弊端就是需要判断每一条消息是什么消息,且需要去读取和解析消息的内容才能够知道该消息是什么消息,这样无疑会耗费过多的判断时间,从而导致程序执行速度变慢。It can be understood that there are many kinds of messages in the gift panel, such as room information messages for entering a room, user information messages for user login, room type information messages for the room in which they are located, or bullet screen information messages in the room, etc. At present, in order to distinguish the above-mentioned various types of messages, the solution usually adopted is to distinguish according to the data content of the messages. That is to say, it is necessary to determine whether the content of the message is room information, or not user login information. Although this scheme can distinguish different messages in principle, its biggest drawback is that it needs to determine what message each message is, and it needs to read and parse the content of the message to know what the message is. It will take too much judgment time, which will cause the program execution speed to slow down.

针对上述情况,本发明实施例设计了一个自定义的消息封装类MsgWrapper,该自定义的消息封装类MsgWrapper包括两个信息:一个是消息名,另一个是消息体。其中,消息名中存放有消息的唯一标识符,通过该唯一标识符能区分不同的种类的消息。这样,在后期操作中仅仅需要读取消息封装类MsgWrapper中的消息名就能够知道该消息的种类了,也就节省了去解析消息具体内容的时间开销,提高了程序执行速度。另外,消息体为Object类型的信息数据message,之所以使用Object类型来存放消息的具体内容,是因为Object是所有类的父类,根据面向对象语言的特性父类对象可以用于接收子类对象,所以Object类型可以用于接收所有种类的消息内容。In view of the above situation, the embodiment of the present invention designs a custom message encapsulation class MsgWrapper, and the custom message encapsulation class MsgWrapper includes two pieces of information: one is the message name and the other is the message body. The unique identifier of the message is stored in the message name, and different types of messages can be distinguished by the unique identifier. In this way, in the later operation, the type of the message can be known only by reading the message name in the message encapsulation class MsgWrapper, which saves the time overhead of parsing the specific content of the message and improves the execution speed of the program. In addition, the message body is the information data message of the Object type. The reason why the Object type is used to store the specific content of the message is because Object is the parent class of all classes. According to the characteristics of the object-oriented language, the parent class object can be used to receive subclass objects. , so the Object type can be used to receive all kinds of message content.

进一步地,在一种实施方式中,将消息封装成自定义的消息封装类的对象时,每个消息所对应的消息名的生成过程为:通过调用消息message中的哈希码值获取函数getHashCode来生成每个消息所对应的消息名。可以理解的是,每一个消息都具有唯一的HashCode(哈希码值),且消息的HashCode是不可能重复的。这样,利用HashCode的唯一性的特性,我们可以通过消息的HashCode来用于区分具体的消息的种类了。也就是说,消息的HashCode即为消息名中存放的消息的唯一标识符。Further, in an implementation manner, when a message is encapsulated into an object of a custom message encapsulation class, the generation process of the message name corresponding to each message is: by calling the hash code value acquisition function getHashCode in the message message to generate the message name corresponding to each message. It can be understood that each message has a unique HashCode (hash code value), and the HashCode of the message cannot be repeated. In this way, using the unique feature of HashCode, we can use the HashCode of the message to distinguish specific message types. That is to say, the HashCode of the message is the unique identifier of the message stored in the message name.

步骤S2、消息的缓存:将所有封装好的消息缓存至一个键值对集合(如Map)中;每个封装好的消息对应一个键值对,且键值对中的键对应封装好的消息的消息名,键值对中的值对应封装好的消息的消息体。Step S2, message caching: cache all encapsulated messages into a key-value pair set (such as Map); each encapsulated message corresponds to a key-value pair, and the key in the key-value pair corresponds to the encapsulated message The message name of the key-value pair corresponds to the message body of the encapsulated message.

可以理解的是,由于礼物面板中消息的到达是不确定的,但是当我们去打开礼物面板的时候又是需要一些房间和用户等相关信息的消息的。而房间和用户等相关信息的消息又可能在打开礼物面板之间就已经到达了,所以,为了能够获取到提前到达的消息,我们需要对该消息进行缓存。It is understandable that the arrival of the message in the gift panel is uncertain, but when we go to open the gift panel, we need some information about the room and the user. And the message of room and user related information may have arrived before opening the gift panel. Therefore, in order to obtain the message that arrived in advance, we need to cache the message.

本发明实施例中,是将所有封装好的消息缓存至一个键值对集合Map中,该键值对集合Map中的键值对结构能与封装成自定义消息封装类MsgWrapper的消息相对应;并且,在键值对集合Map中,键是唯一的(不同的),值是可以相同的。其中,键值对中的键对应消息封装类MsgWrapper中的消息名,键值对中的值对应消息封装类MsgWrapper中的消息体。利用上述相对应的缓存数据结构,能快速的实现消息的缓存,并且还能方便后续快速获取到相应消息。In the embodiment of the present invention, all the encapsulated messages are cached in a key-value pair set Map, and the key-value pair structure in the key-value pair set Map can correspond to the message encapsulated into a custom message encapsulation class MsgWrapper; And, in the key-value pair collection Map, the key is unique (different), and the value can be the same. The key in the key-value pair corresponds to the message name in the message encapsulation class MsgWrapper, and the value in the key-value pair corresponds to the message body in the message encapsulation class MsgWrapper. By using the above-mentioned corresponding cache data structure, the cache of the message can be quickly realized, and the corresponding message can be easily and quickly obtained subsequently.

具体来说,在一种实施方式中,步骤S2中将所有封装好的消息缓存至一个键值对集合(如Map)中,具体包括以下操作:Specifically, in one embodiment, in step S2, all encapsulated messages are cached in a key-value pair set (such as Map), which specifically includes the following operations:

步骤S201、从一个封装好的消息(即一个消息封装类MsgWrapper的对象)中取出其对应的消息名和消息体。实际操作时,可通过调用消息名获取函数getName,获取到消息封装类MsgWrapper的对象中消息名的信息。Step S201 , extract the corresponding message name and message body from a packaged message (ie, an object of the message package class MsgWrapper). In actual operation, the message name information in the object of the message encapsulation class MsgWrapper can be obtained by calling the message name obtaining function getName.

步骤S202、判断取出的消息名是否为空(null)或者是空字符串(“”),若为空或者为空字符串,则转入步骤S204;否则,转入步骤S203。Step S202, judging whether the extracted message name is empty (null) or an empty string (""), if it is empty or an empty string, go to step S204; otherwise, go to step S203.

步骤S203、将取出的消息名缓存至键值对集合(如Map)中的一个键值对的键中;将取出的消息体缓存至键值对集合(如Map)中的一个键值对的值中。实际操作时,可通过调用键值对写入函数put(key,value)来将一个消息的消息名和消息体缓存到键值对集合的一个键值对中。Step S203: Cache the retrieved message name in the key of a key-value pair in the key-value pair set (such as Map); cache the retrieved message body in the key of a key-value pair in the key-value pair set (such as Map); value. In actual operation, the message name and message body of a message can be cached into a key-value pair in the key-value pair set by calling the key-value pair writing function put(key, value).

步骤S204、重复步骤S201~S203,直至所有封装好的消息都已缓存至键值对集合(如Map)中。Step S204: Repeat steps S201-S203 until all the encapsulated messages have been cached in a key-value pair set (eg Map).

步骤S3、消息缓存的获取和使用:当点击(打开)礼物面板时,从键值对集合(如Map)中取出需要使用的消息的内容;并使用获取到的消息的内容,进行礼物面板的界面展示。Step S3, the acquisition and use of the message cache: when the gift panel is clicked (opened), the content of the message to be used is taken out from the key-value pair collection (such as Map); interface display.

具体来说,在一种实施方式中,步骤S3中从键值对集合(如Map)中取出需要使用的消息的内容,具体包括以下操作:Specifically, in one embodiment, in step S3, the content of the message to be used is retrieved from the key-value pair collection (such as Map), which specifically includes the following operations:

步骤S301、从键值对集合(如Map)中依次取出一个消息所对应的键值对。Step S301 , sequentially extracting a key-value pair corresponding to a message from a key-value pair set (such as a Map).

步骤S302、从键值对的键中取出该消息的消息名,并将该消息名与需要使用的消息的消息名进行比对,若两者一致,转入步骤S303;若两者不一致,转入步骤S304。Step S302, take out the message name of the message from the key of the key-value pair, and compare the message name with the message name of the message to be used, if the two are consistent, go to step S303; if the two are inconsistent, go to step S303. Go to step S304.

步骤S303、从键值对的值中取出该消息的消息体,将该消息体中的内容作为需要使用的消息的内容进行返回,并结束取出操作(即结束从键值对集合中取出需要使用的消息的内容的操作)。实际操作中,可通过调用break函数来结束取出消息的循环操作。Step S303, take out the message body of the message from the value of the key-value pair, return the content in the message body as the content of the message to be used, and end the take-out operation (that is, end taking out the required use from the key-value pair set) action on the content of the message). In actual operation, the loop operation of taking out the message can be ended by calling the break function.

步骤S304、判断键值对集合中所有消息所对应的键值对是否已全部取出,若是,表明遍历完键值对集合中所有的键值对后依旧没有找到需要使用的消息,则返回未获取到需要使用的消息的信息;否则,返回步骤S301,继续取出下一个消息所对应的键值对。实际操作中,返回未获取到需要使用的消息的信息时,可直接通过返回一个null对象,表示未获取到需要使用的消息。Step S304, judging whether all the key-value pairs corresponding to all the messages in the key-value pair set have been taken out, and if so, it indicates that after traversing all the key-value pairs in the key-value pair set, the message that needs to be used is still not found, and the return is not obtained. to the information of the message to be used; otherwise, return to step S301, and continue to extract the key-value pair corresponding to the next message. In actual operation, when the information about the message that needs to be used is not obtained, you can directly return a null object to indicate that the message that needs to be used is not obtained.

可以理解的是,在实现步骤S301~S304中的循环操作时,可采用For循环语句来实现,不但循环效率高且实现简单方便。It can be understood that, when implementing the loop operations in steps S301 to S304, a For loop statement can be used to implement, which not only has high loop efficiency but also is simple and convenient to implement.

进一步的,在实际操作中,有些消息在使用时是需要其历史记录信息的,而利用键值对集合来缓存消息时消息是会被覆盖的,也就是说相同消息名的消息(即相同种类的消息)会被覆盖存储,这样我们就无法获取到历史的消息记录信息了。为了解决这种需要获取历史记录的消息的问题,可通过增设一个消息队列来进行缓存。该消息队列通过push方法将需要历史记录信息的消息存储到消息队列中,当我们取出消息的时候,通过调用pop方法来将消息获取出来。由于是通过消息队列的方式来缓存所有的消息,这样相同消息名的消息也会被当做是队列中的一个元素被存储。因此,通过这种方式就能够将相同种类的所有消息全部缓存起来了,也就是说缓存了所有消息的历史消息记录信息。由于礼物面板中共同使用到了消息队列和键值对集合两种缓存机制,因此,礼物面板在展示界面时,若需要使用那些需要历史记录信息的消息时,可以从消息队列中获取,提高了礼物面板界面展示的效率,也进一步避免了礼物面板的界面展示异常的情况。Further, in actual operation, some messages need their history information when they are used, and the messages will be overwritten when the key-value pair set is used to cache messages, that is to say, messages with the same message name (that is, the same type of message) messages) will be overwritten and stored, so that we cannot obtain historical message record information. In order to solve the problem of needing to obtain messages of historical records, a message queue can be added for buffering. The message queue stores the messages that need history information in the message queue through the push method. When we take out the message, we call the pop method to get the message. Since all messages are cached by means of message queues, messages with the same message name will also be stored as an element in the queue. Therefore, all messages of the same type can be cached in this way, that is to say, the historical message record information of all messages is cached. Because the two caching mechanisms of message queue and key-value pair collection are commonly used in the gift panel, when the gift panel displays the interface, if you need to use those messages that require history information, you can get them from the message queue, which improves the gift of gifts. The efficiency of the panel interface display also further avoids the abnormal display of the gift panel interface.

基于上述设计,在一种实施例中,步骤S2还包括以下操作:将所有封装好的消息缓存至一个消息队列中。在此基础上,步骤S3还包括以下操作:当点击(打开)礼物面板时,从消息队列中取出需要获取历史记录的消息的内容。Based on the above design, in an embodiment, step S2 further includes the following operation: buffering all the encapsulated messages into a message queue. On this basis, step S3 further includes the following operations: when the gift panel is clicked (opened), the content of the message that needs to obtain the history record is taken out from the message queue.

对应上述的缓存礼物面板消息的方法,本发明实施例还提供一种存储介质,其上存储有计算机程序,该计算机程序被处理器执行时可实现上述各实施例中的缓存礼物面板消息的方法的步骤。需要说明的是,所述存储介质包括U盘、移动硬盘、ROM(Read-OnlyMemory,只读存储器)、RAM(Random Access Memory,随机存取存储器)、磁碟或者光盘等各种可以存储程序代码的介质。Corresponding to the above-mentioned method for caching gift panel messages, an embodiment of the present invention further provides a storage medium on which a computer program is stored, and when the computer program is executed by a processor, the method for caching gift panel messages in the foregoing embodiments can be implemented A step of. It should be noted that the storage medium includes U disk, mobile hard disk, ROM (Read-Only Memory, read-only memory), RAM (Random Access Memory, random access memory), magnetic disk or optical disk and other various programs that can store program codes medium.

另外,参见图2所示,对应上述的缓存礼物面板消息的方法,本发明实施例还提供一种缓存礼物面板消息的设备,包括存储器、处理器及存储在存储器上并可在处理器上运行的计算机程序,该处理器执行计算机程序时可实现上述各实施例中的缓存礼物面板消息的方法的步骤。In addition, as shown in FIG. 2 , corresponding to the above-mentioned method for caching gift panel messages, an embodiment of the present invention further provides a device for caching gift panel messages, including a memory, a processor, and a device stored in the memory and running on the processor. The computer program, when the processor executes the computer program, can implement the steps of the method for caching gift panel messages in the above embodiments.

参见图3所示,本发明实施例还提供一种缓存礼物面板消息的系统,该系统包括消息封装模块、消息缓存模块、消息获取及使用模块。Referring to FIG. 3 , an embodiment of the present invention further provides a system for caching gift panel messages. The system includes a message encapsulation module, a message cache module, and a message acquisition and use module.

其中,消息封装模块用于:将已到达消息接收器的每个消息封装成自定义的消息封装类的对象;所述自定义的消息封装类包括消息名和消息体,消息名用于存放消息的唯一标识符,消息体用于存放消息的具体内容。The message encapsulation module is used to encapsulate each message that has arrived at the message receiver into an object of a custom message encapsulation class; the custom message encapsulation class includes a message name and a message body, and the message name is used to store the message Unique identifier, the message body is used to store the specific content of the message.

消息缓存模块用于:将所有封装好的消息缓存至一个键值对集合中;每个封装好的消息对应键值对集合中的一个键值对,且键值对中的键对应封装好的消息的消息名,键值对中的值对应封装好的消息的消息体。具体来说,所述消息缓存模块将所有封装好的消息缓存至一个键值对集合中的具体流程为:从一个封装好的消息中取出其对应的消息名和消息体,判断取出的消息名是否为空或者为空字符串;若不是,则将取出的消息名缓存至键值对集合中的一个键值对的键中,并将取出的消息体缓存至键值对集合中的一个键值对的值中;若是,则继续对下一个封装好的消息进行缓存,直至所有封装好的消息都已缓存至键值对集合中。The message caching module is used to: cache all encapsulated messages into a key-value pair set; each encapsulated message corresponds to a key-value pair in the key-value pair set, and the key in the key-value pair corresponds to the encapsulated key-value pair The message name of the message, and the value in the key-value pair corresponds to the message body of the encapsulated message. Specifically, the specific process for the message caching module to cache all encapsulated messages into a key-value pair set is as follows: extracting the corresponding message name and message body from an encapsulated message, and determining whether the extracted message name is not Empty or empty string; if not, cache the retrieved message name in the key of a key-value pair in the key-value pair set, and cache the retrieved message body in a key-value pair in the key-value pair set If yes, continue to cache the next encapsulated message until all encapsulated messages have been cached in the key-value pair set.

消息获取及使用模块用于:当点击礼物面板时,从键值对集合中取出需要使用的消息的内容;并使用获取到的消息的内容,进行礼物面板的界面展示。具体来说,所述消息获取及使用模块从键值对集合中取出需要使用的消息的内容的具体流程为:从键值对集合中依次取出一个消息所对应的键值对;从键值对的键中取出该消息的消息名,并将该消息名与需要使用的消息的消息名进行比对,若两者一致,则从键值对的值中取出该消息的消息体,将该消息体中的内容作为需要使用的消息的内容进行返回,并结束取出操作;若两者不一致,则判断键值对集合中所有消息所对应的键值对是否已全部取出,若是,则返回未获取到需要使用的消息的信息;否则,继续取出下一个消息所对应的键值对进行比对。The message acquisition and use module is used to: when the gift panel is clicked, retrieve the content of the message to be used from the key-value pair set; and use the content of the acquired message to display the interface of the gift panel. Specifically, the specific process for the message acquisition and use module to extract the content of the message to be used from the key-value pair set is: sequentially extracting a key-value pair corresponding to a message from the key-value pair set; The message name of the message is extracted from the key of the key, and the message name is compared with the message name of the message to be used. The content in the body is returned as the content of the message to be used, and the fetching operation is ended; if the two are inconsistent, it is judged whether all the key-value pairs corresponding to all the messages in the key-value pair set have been fetched, and if so, return not fetched to the information of the message to be used; otherwise, continue to extract the key-value pair corresponding to the next message for comparison.

进一步地,为了解决需要获取历史记录的消息的问题,在一种实施例中,通过增设一个消息队列来对所有封装好的消息进行缓存。具体来说,所述消息缓存模块还用于:将所有封装好的消息缓存至一个消息队列中;所述消息获取及使用模块还用于:当点击礼物面板时,从消息队列中取出需要获取历史记录的消息的内容。Further, in order to solve the problem of needing to obtain the messages of the historical records, in an embodiment, a message queue is added to cache all the encapsulated messages. Specifically, the message caching module is also used to: cache all the encapsulated messages in a message queue; the message acquisition and use module is also used to: when the gift panel is clicked, take out the messages that need to be acquired from the message queue The content of the message in the history.

需要说明的是:上述实施例提供的系统在实现礼物面板的消息的缓存操作时,仅以上述各功能模块的划分进行举例说明,实际应用中,可根据需要而将上述功能分配由不同功能模块完成,即将系统的内部结构划分成不同的功能模块,以完成以上描述的全部或者部分功能。It should be noted that: when the system provided by the above embodiment implements the buffering operation of the messages of the gift panel, only the division of the above functional modules is used as an example for illustration. In practical applications, the above functions can be allocated to different functional modules as required. Completion means dividing the internal structure of the system into different functional modules to complete all or part of the functions described above.

本发明不局限于上述实施方式,对于本技术领域的普通技术人员来说,在不脱离本发明原理的前提下,还可以做出若干改进和润饰,这些改进和润饰也视为本发明的保护范围之内。The present invention is not limited to the above-mentioned embodiments. For those skilled in the art, without departing from the principle of the present invention, several improvements and modifications can be made, and these improvements and modifications are also regarded as the protection of the present invention. within the range.

本说明书中未作详细描述的内容属于本领域专业技术人员公知的现有技术。Contents not described in detail in this specification belong to the prior art known to those skilled in the art.

Claims (8)

1. A method of caching gift panel messages, the method comprising the steps of:
s1, packaging of the message: packaging each message which reaches a message receiver into an object of a self-defined message packaging class; the self-defined message encapsulation class comprises a message name and a message body, wherein the message name is a String type message code and is used for storing a unique identifier capable of distinguishing different types of messages, and the message body is an Object type information data message and is used for storing the specific content of the message; the generation process of the message name corresponding to each message is as follows: generating a message name corresponding to each message by calling a HashCode value in the message to obtain a function getHashCode;
s2, caching of messages: caching all the packaged messages into a key-value pair set; each packaged message corresponds to one key value pair in the key value pair set, the keys in the key value pairs correspond to the message names of the packaged messages, and the values in the key value pairs correspond to the message bodies of the packaged messages;
s3, obtaining and using of message cache: when the gift panel is clicked, the content of the message needing to be used is taken out from the key value pair set; and using the content of the acquired message to display the interface of the gift panel;
step S2 further includes the following operations: caching all the packaged messages into a message queue; step S3 further includes the following operations: when the gift panel is clicked, the contents of the message for which the history is to be acquired are taken out from the message queue.
2. A method of caching gift panel messages as defined in claim 1, wherein: in step S2, caching all the packaged messages into one key-value pair set, which specifically includes the following operations:
s201, extracting a corresponding message name and a message body from a packaged message;
s202, judging whether the extracted message name is empty or an empty character string, and if so, turning to the step S204; otherwise, go to step S203;
s203, caching the extracted message name into a key of one key-value pair in the key-value pair set; caching the extracted message body into the value of one key-value pair in the key-value pair set;
and S204, repeating the steps S201 to S203 until all the packaged messages are cached in the key-value pair set.
3. A method of caching gift panel messages as defined in claim 1, wherein: in step S3, the method for retrieving the content of the message that needs to be used from the key-value pair set specifically includes the following operations:
s301, sequentially taking out a key value pair corresponding to a message from the key value pair set;
s302, extracting the message name of the message from the key of the key value pair, comparing the message name with the message name of the message needing to be used, and if the two are consistent, turning to the step S303; if the two are not consistent, go to step S304;
s303, extracting the message body of the message from the value of the key value pair, returning the content in the message body as the content of the message required to be used, and finishing the extraction operation;
s304, judging whether all the key-value pairs corresponding to all the messages in the key-value pair set are taken out, if so, returning the information that the messages needing to be used are not obtained; otherwise, returning to step S301, and continuing to fetch the key-value pair corresponding to the next message.
4. A storage medium having a computer program stored thereon, characterized in that: the computer program when executed by a processor implements the steps of the method of any of the preceding claims 1 to 3.
5. An apparatus for caching gift panel messages comprising a memory, a processor, and a computer program stored on the memory and running on the processor, wherein: the processor, when executing the computer program, realizes the steps of the method of any of the preceding claims 1 to 3.
6. A system for caching gift panel messages, comprising: the system comprises a message packaging module, a message caching module and a message acquiring and using module;
the message encapsulation module is used for: packaging each message which reaches a message receiver into an object of a self-defined message packaging class; the self-defined message encapsulation class comprises a message name and a message body, wherein the message name is a String type message code and is used for storing a unique identifier capable of distinguishing different types of messages, and the message body is an Object type information data message and is used for storing the specific content of the message; the generation process of the message name corresponding to each message is as follows: generating a message name corresponding to each message by calling a HashCode value in the message to obtain a function getHashCode;
the message caching module is used for: caching all the packaged messages into a key-value pair set; each packaged message corresponds to one key value pair in the key value pair set, the keys in the key value pairs correspond to the message names of the packaged messages, and the values in the key value pairs correspond to the message bodies of the packaged messages;
the message acquisition and use module is configured to: when the gift panel is clicked, the content of the message needing to be used is taken out from the key value pair set; and using the content of the acquired message to display the interface of the gift panel;
caching all the packaged messages into a message queue; the message acquisition and use module is further configured to: when the gift panel is clicked, the contents of the message for which the history is to be acquired are taken out from the message queue.
7. The system for caching gift panel messages of claim 6 wherein the specific process of the message caching module caching all encapsulated messages into a set of key-value pairs is:
extracting a corresponding message name and a message body from a packaged message, and judging whether the extracted message name is null or a null character string;
if not, caching the extracted message name into a key of one key-value pair in the key-value pair set, and caching the extracted message body into a value of one key-value pair in the key-value pair set;
if yes, continuing to cache the next packaged message until all the packaged messages are cached in the key-value pair set.
8. The system for caching gift panel messages of claim 6 wherein the specific process of the message fetch and use module fetching the contents of the message to be used from the set of key-value pairs is:
sequentially taking out a key value pair corresponding to a message from the key value pair set; the message name of the message is taken out from the key of the key value pair, and the message name is compared with the message name of the message required to be used,
if the two are consistent, the message body of the message is taken out from the value of the key value pair, the content in the message body is taken as the content of the message needing to be used to return, and the taking-out operation is finished;
if the two are not consistent, judging whether the key value pairs corresponding to all the messages in the key value pair set are all taken out, if so, returning the information of the messages which are not acquired to be used; otherwise, continuously taking out the key value corresponding to the next message for comparison.
CN201710642672.6A 2017-07-31 2017-07-31 Method, storage medium, device and system for caching gift panel message Active CN107451263B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201710642672.6A CN107451263B (en) 2017-07-31 2017-07-31 Method, storage medium, device and system for caching gift panel message

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201710642672.6A CN107451263B (en) 2017-07-31 2017-07-31 Method, storage medium, device and system for caching gift panel message

Publications (2)

Publication Number Publication Date
CN107451263A CN107451263A (en) 2017-12-08
CN107451263B true CN107451263B (en) 2020-10-16

Family

ID=60489959

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201710642672.6A Active CN107451263B (en) 2017-07-31 2017-07-31 Method, storage medium, device and system for caching gift panel message

Country Status (1)

Country Link
CN (1) CN107451263B (en)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108159690A (en) * 2017-12-28 2018-06-15 天脉聚源(北京)科技有限公司 A kind of information storage means and device
CN112069438B (en) * 2020-09-10 2023-12-22 北京五八信息技术有限公司 Message merging method, message processing method and device, equipment and medium
CN114598894B (en) * 2020-12-03 2024-12-10 北京字节跳动网络技术有限公司 Interactive message processing method, device, equipment and medium

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102117338A (en) * 2011-04-02 2011-07-06 天脉聚源(北京)传媒科技有限公司 Data base caching method
CN105791291A (en) * 2016-03-02 2016-07-20 腾讯科技(深圳)有限公司 Display control method for network application and real-time display update method and device

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US10521413B2 (en) * 2015-11-20 2019-12-31 Oath Inc. Location-based recommendations using nearest neighbors in a locality sensitive hashing (LSH) index

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102117338A (en) * 2011-04-02 2011-07-06 天脉聚源(北京)传媒科技有限公司 Data base caching method
CN105791291A (en) * 2016-03-02 2016-07-20 腾讯科技(深圳)有限公司 Display control method for network application and real-time display update method and device

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
百万弹幕下的礼物系统:海量并发强事务系统实践;csdn屠敏;《CSDN》;20161012;网页正文部分 *

Also Published As

Publication number Publication date
CN107451263A (en) 2017-12-08

Similar Documents

Publication Publication Date Title
CN107451263B (en) Method, storage medium, device and system for caching gift panel message
US9589136B2 (en) Method and device for extracting message format
CN111427859B (en) Message processing method and device, electronic equipment and storage medium
CN106911782A (en) A kind of method for reading data and device
US11895151B1 (en) Phishing email campaign identification
CN113419971A (en) Android system service vulnerability detection method and related device
CN113312008B (en) Processing method, system, equipment and medium for file read-write service
WO2008154571A1 (en) Integration of data records to a geographical information system
CN111817984A (en) Message sending method, device, equipment and storage medium
US10938773B2 (en) Method and apparatus for synchronizing contact information and medium
CN112148387A (en) Method, apparatus, computer device and storage medium for preloading feedback information
CN110717126A (en) Page browsing method and device, electronic equipment and computer readable storage medium
CN107291870B (en) Method for reading files in distributed storage in batch
CN113163255B (en) Video playing method, device, terminal and storage medium
CN113094413B (en) Data statistics method and device based on queue, computer equipment and storage medium
US9164922B2 (en) Technique for passive cache compaction using a least recently used cache algorithm
CN109491687B (en) Hot updating method and device of application software, terminal and readable medium
CN115080114B (en) Application program transplanting processing method, device and medium
CN108009226B (en) Promotion content display implementation method based on intelligent terminal application and intelligent terminal
CN116166422A (en) Memory optimization method and device, electronic equipment and storage medium
CN108563712A (en) Web page picture inspection method, device and storage device
CN109062647A (en) Data sharing method, device, equipment and the storage medium of active window
CN110825783B (en) Data sampling method, device, equipment and storage medium
CN108520572A (en) A method and system for real-time analysis of alarm data based on recorder management platform
CN114448976A (en) Network message assembling method, device, equipment, medium and program product

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant
TR01 Transfer of patent right

Effective date of registration: 20250926

Address after: 518000 Guangdong Province, Shenzhen City, Bao'an District, Xixiang Street, Fenghuanggang Community, Zhongxi Xiangbin Mountain Garden Building 9, Chengyue Li 312

Patentee after: Gangben Technology Development (Shenzhen) Co., Ltd.

Country or region after: China

Address before: 430000 East Lake Development Zone, Wuhan City, Hubei Province, No. 1 Software Park East Road 4.1 Phase B1 Building 11 Building

Patentee before: WUHAN DOUYU NETWORK TECHNOLOGY Co.,Ltd.

Country or region before: China