A method and system for processing live comment data based on local queue and multi-level cache

By adopting data processing methods based on local queues and multi-level cache in the live comment system, the existing system's performance bottlenecks and insufficient scalability in high concurrency scenarios are solved, and high performance, high scalability and technically independent and controllable live comment data processing is achieved, reducing operational costs and improving user experience.

CN119743526APending Publication Date: 2025-04-01CHINA CITIC BANK CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411774802.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-05
Publication Date
2025-04-01

AI Technical Summary

Technical Problem

The existing live comment system shows performance bottlenecks in high concurrency scenarios, with limited scalability and difficulty in meeting the needs of large-scale live streaming activities. It lacks technical autonomous controllability, data localization processing capabilities, and resource elastic expansion and recycling mechanisms, resulting in slow system response or crash, increasing the risk of data leakage or abuse, and increasing operating costs.

Method used

The live comment data processing method based on local queues and multi-level caches is adopted. By receiving user requests and load balancing and preliminary processing, the initially processed requests are written to the local message queue, and whether preset conditions are met for batch processing and further processing is determined. The local cache L1 and L2 are used to improve data access speed, support the elastic expansion and recycling of hardware resources, and ensure the real-timeness of data through the timer module.

Benefits of technology

It significantly improves the processing capability of high concurrent comment data in live broadcast scenarios, improves system performance and resource utilization, enhances data security and privacy protection, meets the requirements of independent and controllable technology and cost-effectiveness, reduces the risk of system crashes and improves user experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119743526A_ABST
    Figure CN119743526A_ABST
Patent Text Reader

Abstract

The present invention relates to a live commentary data processing method based on a local queue and multi-level cache, characterized in that it includes: receiving user requests and distributing them to a gateway through a first device for load balancing and preliminary processing; sending the user requests after preliminary processing to a second device and writing them into a local message queue; judging whether the user requests in the local message queue meet preset conditions, and if so, batch processing the user requests and sending them to a third device for further processing; in the second device, the local cache L1 is used to quickly respond to user queries, and the local message queue is used to temporarily store user requests to be processed. The design scheme of this application not only improves the system's processing capacity and user experience, but also meets the industry's high standards for technology autonomy, data security, and cost-effectiveness.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of computer technology, and in particular to a live comment data processing method, system, computer-readable storage medium, electronic device and program product based on local queue and multi-level cache. Background Art

[0002] In the field of live broadcast marketing, live comment function is a key tool to achieve user interaction and enhance audience participation. Currently, there are two main ways to achieve live broadcast comment interaction in the market: message broadcast mechanism based on server communication and use of external instant messaging (IM) service. However, these existing technologies are insufficient in some key aspects, especially in terms of technical autonomy, performance, scalability and data localization processing.

[0003] Performance and scalability issues: Existing live commentary systems often show performance bottlenecks in high-concurrency scenarios and cannot meet the needs of large-scale live events. In addition, the system's scalability is limited, and it is difficult to dynamically adjust resources according to real-time load, resulting in slow system response or crashes when the number of users increases dramatically.

[0004] Insufficient technological autonomy and controllability: For industries that pursue technological autonomy and controllability, such as finance and government, the existing review system may not meet their high standards for data security and privacy protection.

[0005] Difficulties in local data storage and analysis: Existing technologies generally lack support for local data storage and analysis, which limits the ability to process data in real time and increases the risk of data leakage or abuse.

[0006] Resource elastic expansion and recycling issues: The hardware resources of existing comment systems are usually statically allocated and lack elastic expansion and recycling mechanisms, which may lead to insufficient resources during business peaks and waste of resources during business troughs.

[0007] Limitations of external IM services: Although external IM services may meet your needs in terms of performance, they may not provide enough customization options to meet the special requirements of specific industries for data control and processing.

[0008] Cost-effectiveness issues: Using external IM services may involve high service fees, which increases the operating costs of the enterprise, especially when live events are frequent.

[0009] Inefficient resource management: The resource management of the existing comment system is not flexible enough and cannot dynamically adjust resource allocation according to actual business needs, resulting in low resource utilization and increased costs.

[0010] Poor system maintainability: Due to the complexity of the existing system architecture, system maintenance and upgrades become difficult, affecting the stability and reliability of the system.

[0011] Lack of automation and intelligence: Existing review systems are underdeveloped in terms of automation and intelligence, resulting in limited capabilities in data processing, anomaly detection, and user behavior analysis.

[0012] System maintainability and stability: Existing review systems may have challenges in system maintenance and stability, especially when facing the ever-changing technical environment and user needs.

[0013] In order to overcome the limitations of the prior art, the present invention proposes a live commentary data processing method and system based on local queues and multi-level caches, aiming to achieve high performance, high scalability, technical autonomy and controllability, and support localized storage, analysis and processing of data. Summary of the invention

[0014] To address the deficiencies in the prior art, the present invention provides a more reliable, efficient and secure solution for live broadcast marketing interaction by providing a live broadcast comment data processing method and system based on a local queue and multi-level cache.

[0015] To achieve the above objectives, the technical solutions adopted by the present invention include:

[0016] A method for processing live comment data based on a local queue and multi-level cache, characterized by comprising:

[0017] receiving user requests and distributing them to the gateway via the first device for load balancing and preliminary processing;

[0018] Sending the preliminarily processed user request to the second device and writing it into a local message queue;

[0019] Determine whether the user requests in the local message queue meet the preset conditions, and if so, process the user requests in batches and send them to the third device for further processing;

[0020] In the second device, the local cache L1 is used to quickly respond to user queries, and the local message queue is used to temporarily store user requests to be processed.

[0021] Exemplarily, the method further includes:

[0022] When the user request reaches an alarm threshold, the first device, the gateway, and the second device can achieve dynamic capacity expansion.

[0023] Exemplarily, the preliminary processing includes authenticating the user request and performing general processing;

[0024] The preset conditions include that the number of user requests in the local message queue reaches a set threshold or the stay time of the user request in the queue exceeds a set time length.

[0025] Exemplarily, the further processing includes the following sub-steps: performing content filtering and compliance review on user requests; writing approved user requests into a database to achieve data persistence; synchronizing user requests to a distributed cache L2 to increase data access speed.

[0026] Exemplarily, the method further includes:

[0027] Set a timer to query the latest user request data from the distributed cache L2 according to the predetermined time interval;

[0028] The user request data obtained by the query is flushed to the local cache L1 to maintain the real-time nature of the data and improve query efficiency.

[0029] The present invention also relates to a live comment data processing system based on a local queue and a multi-level cache, which is characterized by comprising:

[0030] The first device module is used to receive user requests, perform reverse proxy and be responsible for balancing;

[0031] A gateway device, for preliminarily processing a user request and sending the user request to a second device;

[0032] The second device module includes a local cache L1 module and a local message queue module, wherein the local cache L1 module is used to store hot data to improve query performance, and the local message queue module is used to temporarily store user requests to be processed;

[0033] The third device module is used to perform further processing of the user request.

[0034] Exemplarily, the system further includes:

[0035] Database module, used to persistently store audited user request data;

[0036] A distributed cache L2 module for storing user requested data to provide fast access; the batch further processing of the third device includes filtering, auditing, database writing and distributed cache L2 synchronization;

[0037] The timer module is used to periodically update the data in the local cache L1 to ensure synchronization with the distributed cache L2.

[0038] The present invention also provides a computer-readable storage medium, characterized in that a computer program is stored on the storage medium, and when the computer program is executed by a processor, the method according to any one of claims 1 to 6 is implemented.

[0039] The present invention also provides an electronic device, characterized in that it includes a processor and a memory;

[0040] The memory is used to store computer programs;

[0041] The processor is configured to execute the method according to any one of claims 1 to 6 by calling a stored computer program.

[0042] The present invention also relates to a computer program product, comprising a computer program and / or instructions, characterized in that the computer program and / or instructions implement the steps of the above method when executed by a processor.

[0043] The beneficial effects of the present invention are as follows: the live comment data processing method based on local queues and multi-level caches provided by the present invention effectively improves the processing capability of high-concurrency comment data in live broadcast scenarios by temporarily storing a large number of user requests and adopting a batch processing mechanism. The multi-level cache structure significantly reduces direct access to the back-end database, speeds up data reading, and thus improves system performance. In addition, the method supports the elastic expansion and recycling of hardware resources, dynamically adjusts resource allocation according to real-time load, optimizes resource utilization, and maintains high performance of the system under different loads.

[0044] In terms of data security and autonomous controllability, this method enhances data security and privacy protection by locally storing and processing comment data, meeting the requirements of specific industries for technical autonomous controllability. At the same time, the collaborative work of local message queues and multi-level caches ensures the consistency and reliability of comment data even in the event of network jitter or partial system failure.

[0045] The introduction of the timer module further improves the real-time performance, ensuring that users can see the comments and interactions in the live broadcast room in real time. The system stability is enhanced, and load balancing and reasonable resource allocation reduce the risk of system crash caused by overload. Compared with relying on external IM services, this method reduces operating costs and improves cost-effectiveness through internal resource optimization configuration and caching mechanism.

[0046] The localized and modularized design makes the system easier to maintain and upgrade, and quickly responds to changes in technology development and user needs. Fast comment loading and real-time update functions improve the user experience, allowing viewers to participate in live interactions more smoothly. In addition, locally stored comment data facilitates in-depth data analysis and processing, providing companies with value-added services such as user behavior analysis and market trend forecasting, thereby enhancing the overall value and effectiveness of the live comment system at multiple levels.

[0047] This live comment data processing method based on local queues and multi-level caches not only improves the processing capabilities and user experience of the live comment system, but also meets the industry's high standards for technological autonomy, data security, and cost-effectiveness. BRIEF DESCRIPTION OF THE DRAWINGS

[0048] Figure 1 The present invention is a flowchart of a live commentary data processing method based on a local queue and multi-level cache.

[0049] Figure 2 It is a structural schematic diagram of the live commentary data processing system based on local queue and multi-level cache of the present invention.

[0050] Figure 3 The present invention is a schematic diagram of the hierarchical cache structure of the live commentary data processing system based on local queues and multi-level caches.

[0051] Figure 4 The present invention is a schematic diagram of the live comment data sending process based on local queues and multi-level caches.

[0052] Figure 5 The present invention is a schematic diagram of live comment data query and dynamic expansion based on local queue and multi-level cache. DETAILED DESCRIPTION

[0053] In order to make the purpose, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, rather than all of the embodiments. The components of the embodiments of the present invention generally described and shown in the drawings here can be arranged and designed in various different configurations. Therefore, the following detailed description of the embodiments of the present invention provided in the drawings is not intended to limit the scope of the claimed invention, but merely represents selected embodiments of the present invention. Based on the embodiments in the present invention, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of the present invention.

[0054] The following specific embodiments may be combined with each other, and the same or similar concepts or processes may not be described in detail in some embodiments.

[0055] It should be noted that similar reference numerals and letters represent similar items in the following drawings, so once an item is defined in one drawing, it does not need to be further defined and explained in the subsequent drawings. At the same time, in the description of the present invention, the terms "first", "second", etc. are only used to distinguish the description and cannot be understood as indicating or implying relative importance.

[0056] The first aspect of the present invention relates to a live comment data processing step flow based on a local queue and a multi-level cache. Figure 1 The method shown comprises:

[0057] receiving user requests and distributing them to the gateway via the first device for load balancing and preliminary processing;

[0058] Sending the preliminarily processed user request to the second device and writing it into a local message queue;

[0059] Determine whether the user requests in the local message queue meet the preset conditions, and if so, process the user requests in batches and send them to the third device for further processing;

[0060] In the second device, the local cache L1 is used to quickly respond to user queries, and the local message queue is used to temporarily store user requests to be processed.

[0061] For example, in a data request sent by a user in a live comment, Figure 4 As shown, the user writes a comment in the live broadcast room and clicks to send. The comment sending request is processed by Nginx load balancing 1, and the comment query request is forwarded to the specific service gateway node (gateway) 2. After receiving the request, the service gateway node (gateway) 2 performs authentication and authorization processing, rejects invalid requests, and releases legal requests to forward to the specific comment service (second device) 3. After the comment service (second device) 3 writes the comment data into the local message queue, it immediately returns the successful comment result to the front-end. Then the local message queue asynchronously performs data batch processing. When the number of comment data exceeds 100 or the time exceeds 200ms, batch processing is triggered, and this batch of comment data packets are sent to the comment batch processing service (third device) 4 for unified processing. The comment batch processing service (third device) 4 filters comments 401, reviews comments 402, writes to the database 403, and writes to the distributed cache 404 for this batch of comment data. The subsequent timer 7 will hot refresh these real-time comments to the local cache L1 of each comment service (second device) 3.

[0062] When a user sends a request to query live comment data, such as Figure 5As shown, the first query of comments: the audience enters the live broadcast room, first pulls the latest comment data, and through the comment query request, after being processed by Nginx load balancing 1, forwards the comment query request to the specific service gateway node 2. After receiving the request, the service gateway node (gateway) 2 performs authentication and authorization processing, rejects invalid requests, and releases legal requests to forward to the specific comment service 3. The comment query service (second device) 3 starts to check whether the local cache L1 has comment data that matches the timeline. If it exists, it hits the local cache L1, and the corresponding data is put back to the front end, which parses and renders it for the user. If the comment data corresponding to the request does not hit the local cache L1 (in a few cases), a request is initiated to the distributed cache L2 for query, and the corresponding data is returned to the user for display.

[0063] Query again: Subsequently, as time goes by, each viewer will continue to make comments and generate new comment data. Each viewer's viewing terminal will continuously request and regularly pull the latest comment data and display it to the user (refer to the first query process).

[0064] like Figure 5 As shown, when the live comment data capacity is too large, as the anchor interacts with the audience, the number of viewers increases, or the audience is triggered to participate in the topic of interest, the audience's enthusiasm for commenting is increased, and the comment data rises sharply at this time. The query request and the request to send the comment increase sharply. At this moment, the backstage operation and maintenance monitoring system detects that the traffic has risen sharply due to the surge in user requests and triggers the alarm threshold. The Nginx load balancing 1 (first device), gateway service node (gateway) 2, and comment service 3 (second device) in this system can implement dynamic expansion, that is, add an extension node of Nginx load balancing 1 in the Nginx load balancing layer to respond to more requests (such as: Nginx load balancing extension node 101), and the corresponding service gateway (gateway) 2 increases the corresponding service gateway node for processing more requests (such as: service gateway extension node 201), and the corresponding comment service node (second device) 3 automatically adds more nodes to process comment data (such as: comment service extension node 303). This dynamic expansion is imperceptible to customers. As the live broadcast activity comes to an end, the comment activity data will be removed from the shelves, and the system will automatically recycle the corresponding extended resources (Nginx load balancing extension node 101, service gateway extension node 201, comment service extension node 303).

[0065] Another aspect of the present invention also relates to a system for implementing a live comment data processing method based on a local queue and a multi-level cache, and its structure is as follows: Figure 2 As shown, including:

[0066] The first device module is used to receive user requests, perform reverse proxy and be responsible for balancing;

[0067] For example, Figure 3 As shown, in the application of sending request for live comment data, the first device can be Nginx load balancing, which is a high-performance HTTP server and reverse proxy server, and can also be used as a load balancer. Its reverse proxy function forwards client requests to the back-end server to improve security, performance and reliability. The load balancing function distributes requests to multiple servers through a variety of algorithms (such as polling, minimum number of connections, IP hash and weight) to prevent single point overload and improve service stability. This application uses Nginx to load balance the traffic, so that the network traffic of the comment request can be evenly loaded to multiple gateway nodes for processing, thereby improving the performance of the system.

[0068] A gateway device module, for preliminarily processing a user request and sending the user request to a second device;

[0069] For example, Figure 3 As shown, the service gateway (gateway device) is a core component in the microservice architecture, responsible for unified management and routing of external requests, and providing authentication, authorization, security, flow control and other functions. It simplifies the interaction between the client and multiple microservices, and improves the scalability and security of the system. In this application, it is used to authenticate each comment reading request or comment sending request, verify the legitimacy and security of each request, and perform flow limiting processing under extreme load conditions. For example, security verification example: verify that the user request is a real request rather than an attack request, etc.

[0070] The second device module includes a local cache L1 module and a local message queue module, wherein the local cache L1 module is used to store hot data to improve query performance, and the local message queue module is used to temporarily store user requests to be processed;

[0071] Exemplarily, the second device in the embodiment of the present application can be a comment service in the live comment system, providing comment writing and query services. It mainly involves two major components, the local cache L1 and the local message queue. The local cache L1 uses the open source Java high-performance local cache library Caffeine to save real-time comments to the local cache L1 to improve the performance of comment reading. The comment reading service gives priority to reading the comment information in the local cache to avoid the performance and time loss caused by remote calls to read the distributed cache L2. The local message queue can use Java blocking queue technology to build an unbounded consumer queue that supports concurrency and batch processing, which can be used to batch process comment data. In order to improve the efficiency of data processing and improve the throughput of the system, batch processing technology can be used to improve processing performance and efficiency while reducing network I / O losses.

[0072] The third device module is used to perform further processing of the user request.

[0073] Exemplarily, the third device in the present application can be a comment batch processing service in this embodiment, that is, it is used to realize unified comment data batch processing, including batch comment filtering technology (black and white list filtering, security attack filtering, sensitive word filtering, etc. of comment data in live broadcast), comment review (comment review of key data to prevent malicious comments), persistent database, to ensure that the comment data is finally persisted and written to the distributed cache L2 (to improve reading performance, or to pull data from the distributed cache L2 when the comment service node is expanded).

[0074] For example, Figure 3 As shown, the above system also includes:

[0075] Database module, used to persistently store audited user request data;

[0076] For example, the database can use a Mysql database cluster with a total of 4 nodes, one master and three slaves. To improve instantaneous read and write capabilities, a bare metal storage and computing integrated physical machine is used for deployment. This system uses a database to store comment data persistently to ensure that comment data is not lost.

[0077] A distributed cache L2 module for storing user requested data to provide fast access; the batch further processing of the third device includes filtering, auditing, database writing and distributed cache L2 synchronization;

[0078] For example, the distributed cache system uses Redis cluster technology. Redis cluster is a distributed deployment method of Redis, which provides data sharding and replication to improve performance and availability. It automatically distributes data to multiple nodes to achieve load balancing and high availability. When a node fails, it automatically fails over and recovers data. It is suitable for scenarios with large-scale data processing and high concurrent access. It plays a role of supplementary query in the query request of this system. When the local cache L1 query hit fails, a supplementary query can be performed from the distributed cache L2.

[0079] The timer module is used to periodically update the data in the local cache L1 to ensure synchronization with the distributed cache L2.

[0080] For example, in the scenario of live commentary, since comments continuously generate new data during the live interactive process as the audience interacts, and are centrally processed by the previous comment batch processing service and saved in the distributed cache L2, in order to ensure that the comment data in the local cache L1 of each comment service node is the latest, this system uses a timer to continuously hot load real-time comment data into the local cache L1 of each node to ensure that the comments queried by the comment query function are the latest.

[0081] By using this system, the above-mentioned operation processing method can be executed and the corresponding technical effects can be achieved.

[0082] An embodiment of the present invention also provides a computer-readable storage medium capable of implementing all the steps in the method in the above embodiment, wherein a computer program is stored on the computer-readable storage medium, and when the computer program is executed by a processor, all the steps in the method in the above embodiment are implemented.

[0083] An embodiment of the present invention also provides an electronic device for executing the above method. As an implementation device of the method, the electronic device has at least a processor and a memory, and in particular, the memory stores data and related computer programs required for executing the method, such as storing set calculation programs, etc., and the processor calls the data and programs in the memory to execute all steps of the implementation method and obtains the corresponding technical effect.

[0084] Preferably, the electronic device may include a bus architecture, the bus may include any number of interconnected buses and bridges, and the bus will include various circuits linked together by one or more processors and memories. The bus may also link together various other circuits such as peripherals, voltage regulators, and power management circuits, which are all well known in the art and are therefore not further described herein. The bus interface provides an interface between the bus and the receiver and transmitter. The receiver and transmitter may be the same component, i.e., a transceiver, providing a unit for communicating with various other systems over a transmission medium. The processor is responsible for managing the bus and general processing, while the memory may be used to store data used by the processor when performing operations.

[0085] In addition, the electronic device may further include components such as a communication module, an input unit, an audio processor, a display, and a power supply. The processor (or controller, operation control) used may include a microprocessor or other processor device and / or a logic device, which receives input and controls the operation of various components of the electronic device; the memory may be one or more of a cache, a flash memory, a hard drive, a removable medium, a volatile memory, a non-volatile memory, or other suitable devices, which may store the above-mentioned related data information, and may also store a program for executing related information, and the processor may execute the program stored in the memory to realize information storage or processing, etc.; the input unit is used to provide input to the processor, for example, it may be a key or a touch input device; the power supply is used to provide power to the electronic device; the display is used to display display objects such as images and text, for example, it may be an LCD display. The communication module is a transmitter / receiver that sends and receives signals via an antenna. The communication module (transmitter / receiver) is coupled to the processor to provide input signals and receive output signals, which may be the same as the case of a conventional mobile communication terminal. Based on different communication technologies, multiple communication modules may be provided in the same electronic device, such as a cellular network module, a Bluetooth module and / or a wireless local area network module, etc. The communication module (transmitter / receiver) is also coupled to a speaker and a microphone via an audio processor to provide an audio output via the speaker and receive an audio input from the microphone, thereby realizing a common telecommunication function. The audio processor may include any suitable buffer, decoder, amplifier, etc. In addition, the audio processor is also coupled to a central processor, so that recording can be performed on the machine through the microphone, and the sound stored on the machine can be played through the speaker.

[0086] Those skilled in the art will appreciate that embodiments of the present invention may be provided as methods, systems, or computer program products. Therefore, the present invention may take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Moreover, the present invention may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

[0087] The present invention is described with reference to flowcharts and / or block diagrams of methods, devices (systems), and computer program products according to embodiments of the present invention. It should be understood that each process and / or block in the flowchart and / or block diagram, as well as the combination of processes and / or blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A system that specifies the functions of a box or multiple boxes.

[0088] These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing device to work in a specific manner, so that the instructions stored in the computer-readable memory produce a product including an instruction system, which is implemented in the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.

[0089] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps of the functions specified in a box or multiple boxes. Although the preferred embodiments of the present invention have been described, those skilled in the art may make additional changes and modifications to these embodiments once they know the basic creative concept. Therefore, the attached claims are intended to be interpreted as including the preferred embodiments and all changes and modifications that fall within the scope of the present invention.

[0090] The above is only a preferred specific embodiment of the present invention, but the protection scope of the present invention is not limited thereto. Any changes or substitutions that can be easily thought of by a person skilled in the art within the technical scope disclosed by the present invention should be included in the protection scope of the present invention. Therefore, the protection scope of the present invention should be based on the protection scope of the claims.

Claims

1. A live comment data processing method based on local queue and multi-level cache, characterized in that: include: receiving user requests and distributing them to the gateway via the first device for load balancing and preliminary processing; Sending the preliminarily processed user request to the second device and writing it into a local message queue; Determine whether the user requests in the local message queue meet the preset conditions, and if so, process the user requests in batches and send them to the third device for further processing; In the second device, the local cache L1 is used to quickly respond to user queries, and the local message queue is used to temporarily store user requests to be processed.

2. The method according to claim 1, characterized in that The method further comprises: When the user request reaches an alarm threshold, the first device, the gateway, and the second device can achieve dynamic capacity expansion.

3. The method according to claim 1, characterized in that The preliminary processing includes authenticating the user request and performing general processing; The preset conditions include that the number of user requests in the local message queue reaches a set threshold or the stay time of the user request in the queue exceeds a set time length.

4. The method according to any one of claims 1 to 3, characterized in that: The further processing comprises the following sub-steps: Perform content filtering and compliance review on user requests; Write approved user requests into the database to achieve data persistence; Synchronize user requests to the distributed cache L2 to increase data access speed.

5. The method according to claim 4, characterized in that Also includes: Set a timer to query the latest user request data from the distributed cache L2 according to the predetermined time interval; The user request data obtained by the query is flushed to the local cache L1 to maintain the real-time nature of the data and improve query efficiency.

6. A live comment data processing system based on local queue and multi-level cache, characterized in that: include: The first device module is used to receive user requests, perform reverse proxy and be responsible for balancing; A gateway device, for preliminarily processing a user request and sending the user request to a second device; The second device module includes a local cache L1 module and a local message queue module, wherein the local cache L1 module is used to store hot data to improve query performance, and the local message queue module is used to temporarily store user requests to be processed; The third device module is used to perform further processing of the user request.

7. The system according to claim 6, characterized in that The system further comprises: Database module, used to persistently store audited user request data; A distributed cache L2 module for storing user requested data to provide fast access; the batch further processing of the third device includes filtering, auditing, database writing and distributed cache L2 synchronization; The timer module is used to periodically update the data in the local cache L1 to ensure synchronization with the distributed cache L2.

8. A computer-readable storage medium, characterized in that: The storage medium stores a computer program, and when the computer program is executed by a processor, the method according to any one of claims 1 to 5 is implemented.

9. An electronic device, characterized in that: including a processor and a memory; The memory is used to store computer programs; The processor is configured to execute the method according to any one of claims 1 to 5 by calling a stored computer program.

10. A computer program product comprising a computer program and / or instructions, characterized in that: When the computer program and / or the instructions are executed by a processor, the steps of the method according to any one of claims 1 to 5 are implemented.