Data processing method, related device, equipment and storage medium
Patent Information
- Application Number
- CN202411677529.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-21
- Publication Date
- 2026-05-22
AI Technical Summary
In systems with complex logic and numerous interfaces, such as esports event service systems, the existing technology employs a single-interface, single-object caching strategy, resulting in high development costs and slow data query response speeds.
By using storage engine tables to create data cache spaces corresponding to data storage spaces, data can be retrieved from the corresponding spaces based on the target business identifier or name information carried in the query request, thereby improving cache hit rate and query speed.
By establishing a cache space in the data layer, the cache hit rate was improved, the cache response time was reduced, and the data query response speed was increased.
Smart Images

Figure CN122072629A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of computer technology, and in particular to a data processing method, related apparatus, device, and storage medium. Background Technology
[0002] In recent years, with the continuous development of the esports (electronic sports) industry, esports events have become increasingly popular, giving rise to various types of esports competitions. Esports events generally include multiple functional services at each stage of the competition.
[0003] In modern software system architectures, backend systems are generally divided into an interface layer, a logic layer, and a data layer. Current technologies for data caching often employ caching at the interface or logic layer, commonly using Redis or directly caching related business objects in memory. This traditional caching approach uses a single interface and single object for caching logic, requiring separate implementation of caching strategies for each interface.
[0004] However, for systems with complex logic and numerous interfaces, such as esports event service systems, the sheer number of interfaces means that adopting a separate caching strategy for each interface would significantly increase development costs and slow down data query response times. Summary of the Invention
[0005] This application provides a data caching method, related apparatus, device, and storage medium, which solves the problem of high caching costs.
[0006] One aspect of this application provides a data processing method, comprising:
[0007] In response to a query request for the first target data of the target business; wherein the target business includes M stages, each stage includes N events, and the first target data is the event data corresponding to any event in any stage, M≥1, N≥1;
[0008] When the query request carries the identification information of the target service, the first target data is queried from the data cache space based on the identification information of the target service;
[0009] If the query request does not carry the identification information of the target business, the first target data is queried in the data storage space based on the name information of the target business; wherein, the data cache space is a storage engine table built based on the data storage space.
[0010] Another aspect of this application provides a data processing apparatus, comprising:
[0011] The request-response module is used to respond to the query request for the first target data of the target business; wherein the target business includes M stages, each stage includes N events, and the first target data is the event data corresponding to any event in any stage, M≥1, N≥1;
[0012] The data query module is used to query the first target data in the data cache space based on the target business's identification information when the query request carries the target business's identification information;
[0013] The data query module is also used to query the first target data in the data storage space based on the name information of the target business when the query request does not carry the identification information of the target business; wherein, the data cache space is a storage engine table built based on the data storage space.
[0014] Another aspect of this application provides a computer device, comprising:
[0015] Memory, transceiver, processor, and bus system;
[0016] The memory is used to store programs;
[0017] The processor is used to execute programs in memory, including methods for performing the aspects mentioned above;
[0018] Bus systems are used to connect memory and processor to enable communication between them.
[0019] Another aspect of this application provides a computer-readable storage medium storing instructions that, when executed on a computer, cause the computer to perform the methods described above.
[0020] Another aspect of this application provides a computer program product or computer program including computer instructions stored in a computer-readable storage medium. A processor of a computer device reads the computer instructions from the computer-readable storage medium and executes the computer instructions, causing the computer device to perform the methods provided in the above aspects.
[0021] As can be seen from the above technical solutions, the embodiments of this application have the following advantages:
[0022] This application provides a data processing method and related apparatus. It employs a storage engine table to establish a data cache space corresponding to the data storage space. When querying target data for a target business, if the query request carries the target business's identifier information, the target data is queried from the data cache space; otherwise, the query request does not carry the target business's identifier information, the target data is queried from the data storage space. The method provided in this application, by establishing a data layer cache space, can improve cache hit rate, reduce cache response time, and increase the speed of data query response. Attached Figure Description
[0023] Figure 1 An architectural diagram of an e-sports game event provided in a certain embodiment of this application;
[0024] Figure 2 An interface diagram for creating an e-sports game tournament management system provided in a certain embodiment of this application;
[0025] Figure 3 An interface diagram of the e-sports game tournament management system provided in a certain embodiment of this application;
[0026] Figure 4 An architectural diagram of a sports event provided in a certain embodiment of this application;
[0027] Figure 5 An architecture diagram of logistics management provided for one embodiment of this application;
[0028] Figure 6 A schematic diagram illustrating the architecture of a data processing method provided in one embodiment of this application applied to an e-sports game event management system;
[0029] Figure 7 A flowchart illustrating a data processing method provided in one embodiment of this application;
[0030] Figure 8 This is a cache deployment structure diagram provided in one embodiment of the present application;
[0031] Figure 9 A flowchart illustrating a data processing method provided in one embodiment of this application;
[0032] Figure 10 A flowchart for querying first target data provided in one embodiment of this application;
[0033] Figure 11 A comparison diagram of the relevant technical solutions and the technical solution of this application;
[0034] Figure 12 This is an architecture diagram of a data processing system provided in one embodiment of this application;
[0035] Figure 13 This is a schematic diagram of the structure of a data processing apparatus provided in one embodiment of this application. Detailed Implementation
[0036] This application provides a data processing method that uses a storage engine table to establish a data cache space corresponding to the data storage space, which can improve the cache hit rate, reduce the cache response time, and improve the speed of data query response.
[0037] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those of ordinary skill in the art without creative effort are within the scope of protection of this application.
[0038] It should be noted that the terms "first," "second," etc., in the specification, claims, and accompanying drawings of this application are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments of this application described herein can be implemented in orders other than those illustrated or described herein. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover non-exclusive inclusion; for example, a process, method, system, product, or apparatus that comprises a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or apparatus.
[0039] In the embodiments of this application, the terms "module" or "unit" refer to a computer program or part of a computer program that has a predetermined function and works with other related parts to achieve a predetermined goal, and can be implemented wholly or partially using software, hardware (such as processing circuitry or memory), or a combination thereof. Similarly, a processor (or at least one processor or memory) can be used to implement one or more modules or units. Furthermore, each module or unit can be part of an overall module or unit that includes the functionality of that module or unit.
[0040] In practice, the collection and processing of data in this application should strictly comply with the requirements of relevant national laws and regulations, obtain the informed consent or separate consent of the data subject, and carry out subsequent data use and processing within the scope of laws and regulations and the authorization of the data subject.
[0041] Before introducing the specific methods of this application, we will first provide an illustrative example of the application scenarios for the data processing methods in this application. It should be understood that the following application scenarios are merely examples and are not limited to these.
[0042] As an optional implementation, the data processing method in this application is applied to an e-sports game event management system. Typically, e-sports events include various functional services at different stages of the event (involving state changes after the execution of a particular functional service). In this embodiment, these functional services are referred to as events, and the development of the e-sports event system revolves around these events.
[0043] Please see Figure 1 , Figure 1 This diagram illustrates the structure of esports tournaments. In the esports field, a tournament refers to an organized, regulated, and goal-oriented esports competition. An esports tournament can be divided into: the tournament preparation phase (1001), the pre-tournament phase (1002), the tournament phase (1003), and the post-tournament phase (1004). Specifically:
[0044] Events during the event preparation phase 1001 include:
[0045] Team Management 10011: The esports game tournament management system can be used to collect and organize information about participating teams, including team names, logos, member lists, and contact information. For example, in the esports tournament system, each team enters its information into the system through an online registration portal, facilitating unified management and review by the tournament organizers. The system also allows for grouping participating teams by lottery. Based on the number of participating teams and the tournament format, the system can randomly or according to specific rules (such as seeded teams). For example, if 16 teams register, the system's grouping function can divide them into 4 groups of 4 teams each, preparing for the subsequent group stage matches.
[0046] Schedule 10012: Determines match dates, times, and the order of events. Event organizers can input a time range into the system, and the system will automatically generate a schedule based on factors such as the number of events and participating teams. For example, for a comprehensive esports event including multiple esports titles, the system can allocate the match times for each title to different dates and time slots to avoid time conflicts. The generated schedule is then distributed to participating teams and spectators. The schedule can be displayed on the official event website, mobile applications, and other platforms, allowing participants and spectators to understand the specific arrangements in advance.
[0047] Event Promotion and Publicity 10013: The system can integrate promotional functions, such as publishing event news, athlete introductions, and event highlight previews. Event-related information can be pushed to users through the official event website or mobile application to attract audience attention. For example, the system can regularly publish news about participating star athletes' training progress and speculation on new tactics to increase the event's popularity.
[0048] Events in the pre-match phase 1002 include:
[0049] Player Preparation Management 10021: Player Information Verification. Before the competition, the system can re-verify the players' identity information to ensure that the participating players match the registration information. For example, facial recognition technology or identity verification codes can be used to verify the player's identity and prevent cheating such as account sharing. Player Check-in and Preparation Status Recording. At the competition venue (offline events) or online competition platform, players check in through the system, and event staff can record the players' preparation status, such as whether the equipment is properly set up and whether there are any special needs.
[0050] Equipment and Network Inspection 10022: For offline events, the system can be used to manage and record the inspection status of competition equipment, including computer hardware, gaming peripherals, network devices, etc. For example, in a high-end esports tournament, staff use the system to record the hardware configuration and performance test results of each host to ensure that the equipment meets requirements. In online events, the system can monitor network conditions in real time, such as network latency and bandwidth. If network anomalies occur, it will promptly alert event staff and participants so that appropriate measures can be taken, such as changing network nodes or adjusting match times.
[0051] Audience Service Preparation 10023: Ticketing Management. For offline events, the event system can handle ticket sales, ticket verification, and seat allocation. For example, after an audience member purchases a ticket through an online ticketing platform, the system automatically assigns them a seat and generates an e-ticket, which is verified upon entry. Online Audience Services. For events streamed online, the system can manage the streaming platform's settings, such as video quality options, commentary language selection, and interactive features (such as bullet comments and voting), providing viewers with a superior viewing experience.
[0052] Events in stage 1003 of the game include:
[0053] Match Data Recording and Real-Time Statistics 10031: Records various data during the match, such as player action data (kills, assists, deaths, skill usage, etc.), team economic data, and the competition for game resources (such as the time and team ownership of dragons). For example, the system records each player's CS (creep score) and economic growth after each kill, providing data support for subsequent data analysis and match commentary. It also generates real-time statistical data and visualized match data panels. These panels can be displayed on a large screen at the match venue or viewed on live streaming platforms. For example, during the match, viewers can see real-time economic curves, kill ratios, and turret counts for both teams through the live stream interface, enhancing their viewing experience.
[0054] Event Live Stream Management 10032: For online live streams, the event system can control the push of the live stream, including selecting different commentary channels, switching match perspectives, and adding real-time effects. For example, in an esports event with multiple commentary teams, viewers can choose between different commentary styles through the system, such as professional analytical commentary or exciting entertainment commentary. It also manages interactive elements during the live stream, such as comment moderation and viewer voting (e.g., favorite player voting, match prediction voting). This ensures the smooth operation of interactive elements and enhances the interaction between viewers and the event.
[0055] Referee Assistance 10033: The system provides a competition rules query function, which makes it convenient for referees to quickly look up the details of the rules when they encounter controversial calls.
[0056] The events in post-match phase 1004 include:
[0057] Match Data Processing and Analysis 10041: The system processes and analyzes massive amounts of data recorded during matches, generating detailed match reports. Reports include individual player performance analysis, team tactical execution, and key factors in determining victory or defeat. For example, by analyzing player operational data and resource collection data, the system can determine the rationality of players' strategy choices at different stages, providing references for improvement for players and coaching teams. Data Mining and Comparison: By mining data from multiple matches, the system compares the performance differences between different players and teams, discovering potential match trends and tactical innovations. For example, comparing the tactical changes of the same team across different seasons analyzes the effectiveness of tactical adjustments against different opponents.
[0058] Award Selection and Award Ceremony Management 10042: Based on competition data and selection rules, the system can automatically calculate and filter candidates for various awards, such as Best Player Award and Best Teamwork Award. For example, based on a player's performance data in the competition (such as overall data ranking, performance in key rounds, etc.), the system generates a candidate list for the Best Player Award. It manages the award ceremony process, including displaying the list of winners, arranging award presenters, and producing trophies and certificates. During the award ceremony, the system controls stage lighting, music playback, and the scrolling display of the list of winners to ensure the smooth running of the ceremony.
[0059] Audience Feedback Collection and Event Evaluation 10043: This function collects audience feedback on the competition, including evaluations of the competition content, commentary quality, live broadcast effectiveness, and event organization. Feedback is collected through the official event website, social media platforms, and questionnaires. The system then organizes and analyzes this information. For example, it calculates audience satisfaction ratings for different commentators and gathers suggestions for the competition's structure. A comprehensive evaluation of the event is conducted, summarizing its strengths and weaknesses based on audience feedback, participating team satisfaction, and event data, providing lessons learned for future events.
[0060] The esports tournament management system covers the entire process from tournament announcement to prize distribution, ensuring smooth operation and efficient management. The entire system is built around the tournament, with all functions and data processing closely centered around it. The esports tournament management system is primarily intended for tournament organizers and participants. An introduction to the esports tournament management system will follow.
[0061] For example:
[0062] As shown in Table 1, Table 1 shows the specific information of the 5 events managed by the event organizer (User A).
[0063] Table 1
[0064]
[0065] like Figure 2 As shown, Figure 2This diagram illustrates the interface for creating an esports tournament management system. The "My Tournaments" module 201 provides a "Create Tournament" control 2011 and a "List Page Management" control 2012. Users can click the "Create Tournament" control 2011 to create a new tournament, and click the "List Page Management" control 2012 to edit all or part of the tournaments in the current list (e.g., delete or pin tournaments). The "My Tournaments" module 201 also provides a tournament query interface. Users can select tournaments to query via the "Game Items" tab 2013, the "Tournament Status" tab 2014, or the "Tournament Name" tab 2015. Reset and search operations are also available to improve management efficiency. The "My Tournaments" module 201 also centrally displays the tournaments managed by the user. Users can quickly view the event name (e.g., event a, event b, event c, event d, event e), event status (e.g., in progress), game category (e.g., game a, game b, game c), game server information, event time (e.g., aaaa year aa month aa day - aaaa year ab month bb day, aaaa year bb month aa day - aaaa year bb month bb day, aaaa year cc month aa day - aaaa year cc month bb day, aaaa year aa month aa day - aaaa year ab month bb day, aaaa year cc month aa day - aaaa year bb month bb day), event ID (e.g., 1111, 2222, 3333, 4444, 5555), and creator information for each event. The system supports event management, management manuals, and the ability to pin events for each competition. Event management and manuals provide specific functions for each event, including scheduling, team management, and results entry. The management manual also provides operational guidance and instructions to ensure users can correctly use the system for event management. Pinning events allows users to prioritize important events for easier monitoring and management.
[0066] The "Data Dashboard" module provides users with data analysis and visualization related to the event, helping them better understand the event's progress, the performance of participating teams, and other important information. The "Appeals Processing" module allows users to handle appeals when disputes or problems arise during the event, ensuring fairness and impartiality. The "Permission Settings" module allows users to assign permissions to different user roles, ensuring the security and standardization of event management. For example, it allows setting which users can perform operations such as event creation and data modification. The "Account Settings" module allows users to manage their account information, including password changes and profile updates.
[0067] like Figure 3 As shown, Figure 3 The diagram shows the interface of the e-sports game tournament management system. The page configuration module 301 provides rich page customization functions 3011, including basic settings, tournament schedule settings, reward settings, tournament notification settings, advertising space settings, and automation settings. In the basic settings, users can set the tournament name, organizer name, game, tournament mode, tournament format, tournament key visuals, tournament logo, tournament rules, etc., and these settings will be displayed in the display area 3012 on the left side of the settings panel.
[0068] The participant management module manages participant information and status. This may include functions such as participant registration, grouping, and score recording, ensuring comprehensive participant management. The competition management module allows administrators to plan various stages of the competition, such as the registration and final stages, and define corresponding timelines to ensure the orderly progress of the competition. The rewards management module sets up the competition's reward system, including prize types, quantities, and distribution methods, to incentivize participant participation and enhance the competition's appeal.
[0069] In an esports game event management system, the target business can be represented by a specific esports game event. An esports game event typically includes multiple stages, such as the registration stage, group stage, knockout stage, and final stage. The M stages represent these different event stages. Each stage includes multiple events; for example, the registration stage might include player registration and information verification events; the group stage might include events related to each match. The N events represent the specific activities or tasks within each stage.
[0070] When the system receives a query request for specific event data (i.e., the primary target data) in an esports game tournament, it first determines whether the query request carries identification information for the target service (esports game tournament). This identification information can be a unique number or ID of the tournament, clearly pointing to a specific tournament.
[0071] If a query request includes event identification information, the system will retrieve the required primary target data from the data cache space based on this identification information. In esports game event management systems, the data cache space can be a storage engine table specifically built on top of the data storage space to improve query efficiency; for example, it can be implemented using technologies such as in-memory databases. For instance, when querying the score data of a specific match within a particular event, if the request includes the event ID, the system will prioritize searching in the cache because cache queries are typically very fast, allowing for quick response to query requests and improving user experience.
[0072] If the query request does not include event identification information, the system will search for the first target data in the data storage space based on the name information of the target business (such as the specific name of the event). The data storage space can be a traditional database that stores detailed data for all esports game events. For example, when a user only knows the event name but not the specific ID, the system can search the database by event name to find the corresponding event data, and then further search for the specific event data required.
[0073] By applying this data processing method to esports game event systems, we can more efficiently handle the query needs of different users for data related to various stages and events of esports game events, thereby improving the system's response speed and the effectiveness of data management.
[0074] As another optional implementation, the data processing method in this application is applied to a sports event management system. For example... Figure 4 As shown, Figure 4 The diagram illustrates the architecture of a sports event. In a sports event management system, the target business can be viewed as a complete sports event. A sports event can be divided into: event preparation phase 4001, athlete registration and eligibility verification phase 4002, pre-event preparation phase 4003, the event itself phase 4004, and the event wrap-up phase 4005. Specifically:
[0075] The events in the event preparation phase 4001 include: determining the competition events 40011, planning the competition schedule 40012, recruiting staff 40013, and preparing venue facilities 40014.
[0076] The events in the athlete registration and eligibility review stage 4002 include: athlete submits registration information 40021, event organizer reviews registration eligibility 40022, and confirmation of the participant list 40023.
[0077] Events in the pre-competition preparation phase 4003 include: athletes conducting pre-competition training 40031, acclimatizing to the venue 40032, and holding technical meetings to explain the competition rules 40033.
[0078] The events in the competition phase 4004 include: the actual conduct of each competition event 40041, recording athletes' competition data 40042 (such as scores, fouls, etc.), and audience interaction 40043.
[0079] The events in the final stage of the competition (4005) include: holding an awards ceremony (40051), summarizing the competition (40052), and compiling competition data (40053).
[0080] The primary target data here refers to the specific data corresponding to any event in any of the aforementioned stages. For example, budget data for the preparation of a venue facility during the event preparation stage; registration and qualification review results data for an athlete during the athlete registration and qualification review stage; and specific performance data of an athlete in a particular match during the competition stage.
[0081] Different roles within a sports event management system, such as event organizers, coaches, athletes, media personnel, and spectators, may initiate query requests for primary target data. For example, a coach might need to query the training data of their athletes during the pre-competition training phase to assess their condition; a media worker might want to query the real-time score of a key match during the competition to provide timely updates; and a spectator might query the personal data of an athlete they follow during the match.
[0082] In a sports event management system, the identification information for the target business can be the event number. This is because the event number is a key piece of information that uniquely identifies each sports event, similar to the target business identification information in the methods described above. In addition, for certain query scenarios, supplementary identification information may also be involved, such as athlete ID (when querying data related to a specific athlete) or match number (when querying data for a specific match).
[0083] The data cache space, as a storage engine table built upon the data storage space, stores frequently queried hot data. This includes basic information about popular sporting events, recent match data of star athletes, and real-time scores of ongoing matches. When a query request carries an event number (or other relevant identifier), the system first searches the data cache space for the primary target data based on this identifier. For example, if media personnel frequently query the real-time scores of a major sporting event (such as an Olympic event), this event-related data is likely stored in the cache space. The system quickly searches the cache using the event number. If it finds corresponding event data relevant to the match, such as the score at halftime, it can quickly relay this information to the media personnel, improving query response speed.
[0084] When a query request does not include an event number (identifying the target service), it may search the data storage space based on the name of the target service. This name information can be relatively vague, such as the event name, athlete's name, or competition name, but it can still pinpoint the service to some extent. For example, a viewer might remember an athlete's name but not the specific event number and want to query that athlete's recent performance. In this case, the data storage space can be searched for all related sports event records based on the athlete's name, and then further filtered to find the primary target data, such as the athlete's specific performance in a particular competition.
[0085] The data storage space contains all the basic data of the sports event management system, including data from the entire process of each sports event from preparation to conclusion. Therefore, even when the query request does not carry precise identification information, relevant business records can be found within it using relatively broad name information, thus leading to the most likely primary target data.
[0086] By applying this data processing method to a sports event management system, we can more effectively meet the query needs of different users for data related to various stages and events of sports events, and improve the system's response speed and the effectiveness of data management.
[0087] As another optional implementation, the data processing method in this application is applied to a logistics management system. For example... Figure 5 As shown, Figure 5 The diagram illustrates the architecture of logistics management. In a logistics management system, a target business can be viewed as a complete logistics transportation process. A single logistics transportation process can be divided into: order receiving stage 5001, goods sorting stage 5002, transportation scheduling stage 5003, in-transit transportation stage 5004, and goods delivery stage 5005. Specifically:
[0088] The events in the order receipt phase 5001 include: customer placing an order 50011, order entry and review 50012, and order pricing and confirmation 50013.
[0089] The events in the goods sorting stage 5002 include: goods receiving 50021, sorting planning 50022, and actual sorting operation 50023.
[0090] The events in the transportation scheduling phase 5003 include: vehicle / transportation allocation 50031, route planning 50032, and driver / transportation team arrangement 50033.
[0091] The events in the transit phase 5004 include: vehicle departure 50041, transit status acquisition 50042, and cargo status check 50043.
[0092] The events in the goods delivery phase 5005 include: arrival notification and appointment for receipt 50051, goods delivery and acceptance 50052, and delivery completion and feedback 50053.
[0093] The primary target data can be specific data corresponding to any event in any of the above stages, such as detailed information of an order in the order receiving stage (customer name, contact information, order product details, etc.), or real-time location data of a vehicle in the transit stage.
[0094] Different user roles in a logistics system (such as customer service personnel, warehouse managers, transportation dispatchers, and customers) may initiate query requests for primary target data. For example, a customer service representative might need to query vehicle information for a particular order during the transportation dispatch phase to answer customer inquiries about when the goods will be shipped; a warehouse manager might need to query the sorting progress data for a batch of goods during the sorting phase. In a logistics management system, the identification information for the target business can be the order number. This is because the order number is a key piece of information that uniquely identifies each logistics transportation transaction, similar to the target business identification information in the methods described above.
[0095] The data cache space, as a storage engine table built upon the data storage space, stores frequently queried hot data. This includes real-time status data of frequently queried orders and information related to popular shipping routes. When a query request includes an order number, the system first searches the data cache space for the primary target data based on that order number. For example, if customer service personnel frequently query the shipping status of orders from a popular e-commerce platform, the relevant data for that order is likely stored in the cache space. The system quickly searches the cache using the order number. If it finds corresponding event data such as "sorted and being loaded for transport," indicating the goods are in the sorting or shipping scheduling stage, it can quickly relay this information to customer service personnel, improving query response speed.
[0096] When a query request does not include an order number (identifying the target business), it may search the data storage space based on the name of the target business. This name information can be relatively vague, such as a customer's name or the name of the goods, but it can help locate the business to some extent. For example, a warehouse manager might only remember the general name of a batch of goods (such as a brand of electronic products) but not the specific order number. In this case, they can search the data storage space for all related logistics records based on the goods' name, and then further filter to find the primary target data, such as detailed sorting information for this batch of electronic products during the sorting stage.
[0097] The data storage space holds all the basic data of the logistics management system, including the entire process of each logistics transaction from order receipt to delivery completion. Therefore, even when the query request does not carry precise identification information, relevant business records can be found within it using relatively broad name information, thus leading to the most likely primary target data.
[0098] By applying this data processing method to the logistics management system, the query needs of different users for data related to each stage and event of the logistics business can be handled more efficiently, thereby improving the system's response speed and the effectiveness of data management.
[0099] The following provides illustrative examples of the application scenarios for the audio playback method in this application. It should be understood that these application scenarios are merely illustrative and are not limited to specific examples. As an optional implementation method, such as... Figure 6 As shown, Figure 6 This diagram illustrates the architecture of a data processing method applied to an esports game tournament management system. The scenario includes a terminal 601, a network 602, a server 603, a data storage space 604, and a data cache space 605.
[0100] Terminal 601 includes, but is not limited to, mobile phones, tablets, laptops, desktop computers, smart voice interaction devices, virtual reality devices, smart home appliances, vehicle terminals, and aircraft. The client 6011 of the e-sports game tournament management system is deployed on terminal 601. The e-sports game tournament management system 6011 can run on terminal 601 via a browser, or as a standalone application (APP) or mini-program.
[0101] Network 602 uses standard communication technologies and / or protocols, typically the Internet, but can also be any network, including but not limited to Bluetooth, local area network (LAN), metropolitan area network (MAN), wide area network (WAN), mobile, private network, or any combination of virtual private network. In some embodiments, custom or dedicated data communication technologies may be used to replace or supplement the aforementioned data communication technologies.
[0102] Server 603 includes a processor for performing storage or retrieval operations on database 604. Server 603 in this application can be a standalone physical server, a server cluster or distributed system composed of multiple physical servers, or a cloud server providing basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communication, middleware services, domain name services, security services, content delivery networks (CDNs), and big data and artificial intelligence (AI) platforms.
[0103] Data storage space 604 is used to store various detailed information about esports game events. This includes basic event information such as event name, organizer, event date, and rules. It also records information about participating teams or players, including team name, player ID, game nickname, and preferred roles. Data from each stage of the event is stored, such as qualifier results, group stage standings, knockout stage matchups, and final results. Other event-related data may also be saved, such as live stream links, commentary, and audience voting data. Data storage space 604 typically employs reliable database storage technology, ensuring long-term data preservation. Even in the event of system failure or shutdown, data will not be lost, guaranteeing the integrity and traceability of event data. It can also store large amounts of esports game event data, meeting the ever-growing data storage needs as more events are held and data accumulates.
[0104] Data cache space 605 primarily stores frequently accessed data from esports games, such as real-time scores of ongoing matches, player status, and keyframes from live streams of popular matches. It may also cache frequently queried basic event information, such as event names, dates, and participating team lists, to improve query speed. Data cache space typically employs in-memory storage or high-speed caching technology, resulting in very fast access speeds. This allows for rapid response when handling a large number of concurrent queries, reducing user wait times and improving system performance and user experience. The cached data is temporary and not persistent. If the system fails or restarts, the cached data may be lost. However, since cached data can usually be reloaded from the data storage space, it will not seriously affect the normal operation of the system. Data cache space is automatically updated according to certain strategies. For example, when data in the data storage space changes, the corresponding data in the cache is updated promptly to ensure consistency between the cached and data storage spaces. Simultaneously, the cache automatically evicts infrequently used data based on factors such as access frequency and time to free up cache space.
[0105] Data cache space 605 is a storage engine table built on top of data storage space 604; for example, data cache space 605 is built on the mysqlmemory engine table.
[0106] like Figure 6 As shown, when a user queries the event, as in step S611, terminal 601 generates a query request for the first target data of the target service.
[0107] As in step S612, the query request for the first target data of the target business is sent to the server 603 via network 602.
[0108] As in step S613, when the query request carries the identification information of the target service, the server 603 queries the first target data in the data cache space 605 according to the identification information of the target service.
[0109] As in step S614, if the query request does not carry the identification information of the target service, the server 603 queries the first target data in the data storage space 604 based on the name information of the target service.
[0110] As in step S615, server 603 sends the first target data obtained through the network 602 to terminal 601.
[0111] The method provided in this application allows the server to directly query the first target data in the data cache space when the query request carries the identifier information of the target business. Since the cache is typically stored in memory, access speed is extremely fast, and results can be returned in a very short time, significantly reducing user waiting time and improving system response speed. If the query request does not carry identifier information, the server queries the data storage space based on the name information of the target business. Although the query speed of the data storage space may be relatively slow, this method can meet the needs of users who only know the business name but not the specific identifier, ensuring that users can obtain the required data through different methods. The use of the data cache space can effectively reduce frequent access to the data storage space, especially for queries of hot data. This can reduce the load on the data storage space and improve the performance and stability of the entire system.
[0112] Please see Figure 7 , Figure 7 A flowchart of a data processing method is shown. It should be noted that the data processing method provided in this application embodiment can be applied to a server. The method includes:
[0113] S710, responding to a query request for the first target data of the target business.
[0114] The target business includes M stages, each stage includes N events, and the first target data is the event data corresponding to any event in any stage, where M≥1 and N≥1.
[0115] It is understandable that when a user queries the first target data of a target business through the system, the terminal generates a query request for the first target data of the target business and sends the query request to the server.
[0116] The server receives a query request for specific data within the target business. The target business can be various complex business scenarios; for example, in esports event management, the target business could be a specific esports competition. The target business is divided into M stages, each containing N events, reflecting the complexity and multi-stage nature of the business. The primary target data is the data corresponding to a specific event within these numerous stages and events; for example, in an esports competition, it might be the score data of a particular match.
[0117] S720. When the query request carries the identification information of the target service, query the first target data in the data cache space according to the identification information of the target service.
[0118] Understandably, when a query request contains identifiers for the target business, the server will prioritize searching the data cache. Identifiers are typically key information that uniquely identifies the target business; for example, in esports, it could be the tournament number. The initial query retrieves the first target data from the data cache based on the target business's identifier. This initial query (SQL) could be: "SELECT FROM tournament_stage WHERE stage_id=? AND tou_id=? AND name=?", where tou_id= represents the tournament ID.
[0119] A data cache is a storage engine table built upon a data storage space. It's a storage area located in memory or high-speed storage media used to store frequently accessed data copies. In various application scenarios, especially when handling large amounts of data and high concurrency, the data cache plays a crucial role. For example, in an esports event management system, the data cache can store real-time match scores, player statistics, and audience interaction information. When a user requests this data, the system can quickly retrieve it directly from the cache, instead of reading from a slower database or data storage space each time, thus significantly improving response speed and enhancing the user experience.
[0120] When the system receives a data access request, if the requested data exists in the cache (a cache hit), the data is returned directly from the cache. If the data is not in the cache (a cache miss), the system reads the data from the data storage space (such as a database) and stores it in the cache so that it can be retrieved faster on the next access.
[0121] When data in the data storage space changes, the data in the cache needs to be updated promptly to ensure data consistency. This can be achieved by setting cache expiration times or retrieving database changes. For example, in esports events, when the score of a match changes, the system will promptly update the cached score data to ensure that viewers see the latest information.
[0122] S730. If the query request does not carry the identification information of the target service, query the first target data in the data storage space based on the name information of the target service.
[0123] The data cache space is a storage engine table built on top of the data storage space.
[0124] Understandably, if the query request lacks identification information for the target service, the server will search the data storage space based on the name of the target service. While the name information may not be as uniquely identifying as the identifier, it's still sufficient to perform a query if the user only knows the service name and not the identifier. The data storage space is typically a traditional database, capable of storing large amounts of business data, but its query speed may be relatively slow. Querying the first target data in the data storage space based on the target service's name is achieved through remote querying. A remote query statement (SQL) could be: "SELECT FROM tournament_stage WHERE tou_id=?", where tou_id= represents the tournament ID.
[0125] Data storage space is a place used to store various types of data persistently and for the long term. It is a data warehouse within a system, storing all the basic data required by applications, including raw data, processed data, and various configuration information. This data is typically organized into specific structures, such as tables in a database, files and folders in a file system.
[0126] To ensure compatibility, the same MySQL database as the data storage space is used to deploy the data caching space. In terms of technical architecture, consistency is maintained in data storage format, access interface, and management methods, reducing compatibility issues caused by different database systems. For example, during development, developers can use the same SQL statements and database connection methods to access the data storage space and caching space, reducing development complexity.
[0127] like Figure 8 , Figure 8 The caching deployment structure is illustrated. For each instance of the esports event management system's heavy event service deployment, a MySQL cache instance is added to provide independent caching resources for each event service instance, avoiding interference between cached data from different instances. For example, when multiple esports events are running simultaneously, each event has its own dedicated cache instance, better meeting the data caching needs of different events. The event service instance and the MySQL cache instance run within the same pod (a logical concept in Kubernetes, which can be understood as a deployment unit). This significantly reduces network request latency because communication between the service instance and the cache instance within the same pod does not require network routing; data exchange occurs directly in memory, greatly improving data access speed. For example, when the event service needs to query match data, it can quickly retrieve the data from the cache instance within the same pod, rather than retrieving it from a remote database server over the network, thereby improving system performance. This deployment method effectively improves system response speed and throughput. In the esports event management system, for operations such as match data queries and updates with high real-time requirements, fast cache access ensures users can obtain the latest event information promptly, improving user experience. Simultaneously, reducing network request latency also reduces system load, improving system stability and reliability.
[0128] The data cache space is a storage engine table built on top of the data storage space. Considering cache performance and data volume, and the fact that cached data is not afraid of being lost, the mysqlmemory engine table is used.
[0129] For example, the sample table structure for storage space is as follows:
[0130] CREATE TABLE'tournament stage'(
[0131] 'stage_id'bigint(20)unsigned NOT NULL COMMENT'stage ID',
[0132] 'tou_id'bigint(20)unsigned NOT NULL COMMENT'EventID',
[0133] 'name'bigint(20)NOT NULL COMMET'Name',
[0134] 'info1' varchar(255) NOT NULL DEFAULT '0' COMMENT 'Other information',
[0135] 'info2' varchar(255) NOT NULL DEFAULT 'COMMENT' Other information,
[0136] 'info3' varchar(255) NOT NULL DEFAULT 'COMMENT' Other information,
[0137] 'info4' varchar(255) NOT NULL DEFAULT 'COMMENT' Other information,
[0138] 'info5' varchar(255) NOT NULL DEFAULT 'COMMENT' Other information,
[0139] PRIMARY KEY('stage id')
[0140] )ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
[0141] The corresponding cache space example table structure is as follows:
[0142] CREATE TABLE'tournament stage'(
[0143] 'stage_id'bigint(20)unsigned NOT NULL COMMENT'stage ID',
[0144] 'tou_id'bigint(20)unsigned NOT NULL COMMENT'EventID',
[0145] 'name'bigint(20)NOT NULL COMMET'Name',
[0146] 'info1' varchar(255) NOT NULL DEFAULT '0' COMMENT 'Other information',
[0147] 'info2' varchar(255) NOT NULL DEFAULT 'COMMENT' Other information,
[0148] 'info3' varchar(255) NOT NULL DEFAULT 'COMMENT' Other information,
[0149] 'info4' varchar(255) NOT NULL DEFAULT 'COMMENT' Other information,
[0150] 'info5' varchar(255) NOT NULL DEFAULT 'COMMENT' Other information,
[0151] PRIMARY KEY('stage id')
[0152] )ENGINE=MEMORY DEFAULT CHARSET=utf8mb4;
[0153] For example, suppose the target business is a large-scale e-sports game tournament, which can be divided into multiple stages, such as the group stage (M=1), and within the group stage, multiple events, such as individual matches (N=10). Now, a query request is received asking for the kill count of a specific team in a particular match; this kill count is the primary target data. If the query request includes a unique identifier for the tournament, such as tournament number 1234, the server will first query the data cache space. The data cache space is an in-memory database or high-speed caching system that stores frequently accessed tournament data. If the team's kill count is in the cache, the result can be quickly returned, for example, a kill count of 25. If the query request does not include the tournament identifier information but only mentions the tournament name, the server will query the data storage space, which can be a traditional relational database. It will search by tournament name to find the corresponding tournament, and then further search for the kill count of a specific team in a particular match. Although this process may be relatively slower, it still meets the user's query needs.
[0154] Please see Figure 9 , Figure 9This is a flowchart of a data processing method provided in an embodiment of this application. First, as in step S910, in response to a query request for the first target data of the target service, then, as in step S920, it is determined whether the query request carries the identification information of the target service; if the query request carries the identification information of the target service, then, as in step S930, the first target data is queried in the data cache space based on the identification information of the target service; if the query request does not carry the identification information of the target service, then, as in step S940, the first target data is queried in the data storage space based on the name information of the target service.
[0155] The method provided in this application prioritizes querying the first target data in the data cache space when the query request carries the identification information of the target service. Since the cache is typically stored in memory, access speed is extremely fast, responding to query requests in milliseconds, greatly improving query efficiency and reducing user waiting time. Storing frequently accessed data in the cache reduces direct access to the data storage space (usually a traditional database), lowering the database load and improving the overall system performance and stability. When the query request does not carry the identification information of the target service, the first target data is queried in the data storage space based on the name information of the target service. Even without identification information, users can still find the required data through the name information. The data storage space stores all data, ensuring data integrity, and providing accurate results regardless of the query method used by the user. In summary, the method provided in this application has multiple beneficial effects, including improving query efficiency, reducing database pressure, ensuring data real-time performance, increasing system flexibility, and adapting to different user needs.
[0156] In an optional embodiment of the data processing method provided in the above embodiments of this application, querying first target data in the data cache space based on the identification information of the target service includes:
[0157] Based on the identification information of the target business, query the data cache space for data related to the target business;
[0158] If the data cache space contains data related to the target business, determine the first target stage and the first target event corresponding to the first target data based on the query request;
[0159] Based on the first target stage and the first target event, query the first target data in the data related to the target business;
[0160] If the data cache space does not contain data related to the target business, the first target data is queried in the data storage space based on the identification information of the target business.
[0161] Understandably, the first step is to query the data cache space for data related to the target business based on its identifier. The uniqueness of the identifier is used to quickly locate the range that might contain the required data. For example, in esports event management, the identifier could be a unique event number; this number is then used to find all cached data related to that event.
[0162] If the data cache contains data related to the target business, the next step is to determine the first target stage and the first target event corresponding to the first target data based on the query request. This step further refines the query requirements, clarifying the location of the specific data to be searched within the target business. For example, determining the stage and event corresponding to the score data of a specific team in a particular stage of a competition.
[0163] Then, based on the first target stage and the first target event, query the first target data from the data related to the target business. This allows for precise location of the required data, improving the accuracy and efficiency of the query.
[0164] If the data cache does not contain data related to the target business, the first target data is retrieved from the data storage space based on the target business's identifier. This ensures that even if the cache misses, the required data can still be obtained from the data storage space, guaranteeing query integrity. Retrieving the first target data from the data storage space based on the target business's identifier is achieved through remote querying. The remote query statement (SQL) can be: "SELECT FROM tournament_stage WHERE tou_id=?", where tou_id= represents the tournament ID.
[0165] Please see Figure 10 , Figure 10 A flowchart for querying the first target data is shown. First, as in step S1010, data related to the target business is queried in the data cache space based on the identification information of the target business. Next, as in step S1020, it is determined whether the data cache space contains data related to the target business. If the data cache space contains data related to the target business, as in step S1030, the first target stage and the first target event corresponding to the first target data are determined according to the query request. Next, as in step S1040, the first target data is queried in the data related to the target business based on the first target stage and the first target event. If the data cache space does not contain data related to the target business, then as in step S1050, the first target data is queried in the data storage space based on the identification information of the target business.
[0166] For example, in a game league, a user wants to know the economic situation of a specific team in the early stages of a playoff match. The system quickly searches the cache for relevant data using the match's identifier. If the data for that match exists in the cache, it can further determine if the required primary target data can be found. Next, based on the user's query request, the system determines the primary target stage and primary target event corresponding to the primary target data. The system determines the primary target stage to be the early stage of the match and the primary target event to be the key team fight. Then, in the data related to that match, by matching the stage and event, the system accurately locates the player's economic data at the time of the team fight and returns it to the user. If the data related to the target business is not found in the data cache, the system will query the primary target data in the data storage space based on the target business's identifier. First, all the data for that match is found in the data storage space. Then, the primary target stage is determined to be the early stage of the match. By analyzing the match data, the team's lineup is determined, and the economic data of each player is calculated. Finally, the team's economic distribution is obtained and presented to the audience.
[0167] The method provided in this application prioritizes querying data related to the target business in the data cache space. Since the cache is usually stored in memory, the access speed is extremely fast, and query requests can be responded to in a very short time, reducing user waiting time. When the cache is hit, precise querying is performed by determining the target stage and event, further improving the speed and accuracy of the query and avoiding unnecessary full table scans or complex query operations. Even if the data related to the target business is not in the cache, it can still be queried in the data storage space through identification information to ensure that the required first target data can be obtained, thus guaranteeing data integrity. By clearly defining the target stage and event for querying, the accuracy of the data is improved, and erroneous or irrelevant data is avoided.
[0168] In an optional embodiment of the data processing method provided in the above embodiments of this application, querying first target data in data related to the target business according to a first target stage and a first target event includes:
[0169] Based on the first target phase, query the event data of all events corresponding to the first target phase from the data related to the target business;
[0170] Based on the first target event, query the first target data from the event data of all events corresponding to the first target stage.
[0171] Understandably, the first step is to query all event data corresponding to the first target stage from data related to the target business. This narrows the query scope by identifying a specific stage within the target business. For example, in esports tournament management, if the target business is a global finals tournament for a game, and the first target stage is assumed to be the group stage, then this step involves filtering all event data from all data related to the tournament to retrieve all event data from the group stage, potentially including data from multiple matches across different groups.
[0172] Next, based on the first target event, query the first target data from the event data of all events corresponding to the first target stage. Having determined the target stage, further clarify the specific events. For example, if the first target event is a match between two teams in a specific group, then precisely locate the first target data corresponding to this match from all match data in that group; this could be the match score, player performance data, etc.
[0173] The method provided in this application, by progressively narrowing the query scope—first determining the stage and then the specific event—avoids blind searching through large amounts of data, improves query accuracy, and ensures that the returned data is the user's primary target data. Step-by-step querying utilizes system resources more effectively. First, querying all event data corresponding to a stage reduces unnecessary full table scans or complex query operations. Then, querying within a smaller scope based on specific events significantly improves query efficiency, especially in managing large-scale esports game events, enabling rapid response to user query requests.
[0174] In an optional embodiment of the data processing method provided in the above embodiments of this application, after querying the first target data in the data storage space according to the identification information of the target service, the method further includes:
[0175] The first target data is stored in the data cache space.
[0176] Understandably, once the primary target data is stored in the cache, subsequent queries for that data can be quickly retrieved directly from the cache, significantly reducing query time and improving system response speed. This is especially important in esports, where real-time data queries require near-instantaneous responses. Storing frequently accessed data in the cache reduces direct access to the data storage space (usually a traditional database). In esports event management, there may be a large number of concurrent query requests. If all of these directly access the database, it would put immense pressure on the database and impact system performance. Caching can distribute the database load, improving the stability of the entire system. Using a cache allows the system to process query requests more efficiently, improving overall system performance. Furthermore, the cache can be automatically managed based on data access frequency and importance, promptly updating and evicting infrequently used data to ensure that the cache space always stores the most valuable data, further improving cache hit rate and efficiency. The first target data is stored in the data cache space by writing to the cache query statement (SQL). The write cache query statement can be: "REPIACE INTO tournament_stage,VaLUES(?,?,??,?,?,?,?,?,?)".
[0177] The method provided in this application stores the first target data in a cache, which reduces the number of accesses to the data storage space, lowers the database load, enables the database to operate more stably, and better handles other complex business operations, such as data writing and updating. For data with high real-time requirements, the cache can update and provide the latest data more quickly.
[0178] In an optional embodiment of the data processing method provided in the above embodiments of this application, the data processing method further includes:
[0179] In response to a deletion request for the second target data of the target service, wherein the deletion request carries the identification information of the target service;
[0180] Based on the identification information of the target business, delete the second target data in the data cache space.
[0181] Understandably, in various application system scenarios (such as event management systems), when business requirements change, or when certain data no longer has timeliness or accuracy, a deletion request for specific data related to the target business (i.e., secondary target data) may be triggered. For example, in an e-sports event management system, if temporary data for a certain match (such as real-time score prediction data during the match, which was later proven to be inaccurate) needs to be deleted, relevant personnel or system modules will issue such a deletion request.
[0182] The identifier information of the target service carried in the deletion request is crucial for accurately identifying the specific service to which the data to be deleted belongs. This identifier allows the system to precisely locate the cache area related to the target event among numerous different event data caches, avoiding the accidental deletion of data from other unrelated events. In complex multi-service environments, data from different services may be stored in the same data cache space; clear identifier information ensures the targeted and accurate nature of the deletion operation.
[0183] Once the identification information of the target business is obtained, the system can accurately locate the corresponding second target data in the data cache space. The data cache space typically organizes data according to a specific storage structure and logic, possibly binding business identifiers to specific data through indexes, key-value pairs, or other association methods. For example, in a key-value pair-based cache system, the event number serves as the key, and various data related to that event (including the second target data) are stored as values. Therefore, when a deletion request with a specific event number is received, the system can quickly locate the storage location of the value to be deleted (i.e., the second target data) using this key.
[0184] Once the specific location of the second target data in the cache space is found, a deletion operation can be performed to remove it from the data cache space. This deletion operation involves low-level operations on the cache storage medium (such as memory, a specific cache database, etc.), and the specific implementation depends on the caching technology and system architecture used. For example, when using memory as the cache storage medium, data deletion may be achieved by modifying memory pointers or releasing memory blocks; while in a database-based caching system, corresponding SQL deletion statements (if applicable) may be executed to clear the second target data record associated with the target business identifier. Cache cleanup is implemented through gorm processing plugins (including gorm:create, gorm:update, and gorm:delete).
[0185] The method provided in this application ensures that the data in the data cache space remains consistent with actual business needs and data status. When certain data is no longer valid at the business level or needs to be updated, timely deletion from the cache can prevent subsequent business processes from encountering problems due to the use of expired or incorrect data. Timely deletion of unnecessary secondary target data also helps optimize the utilization of the data cache space. Cache space is typically limited; failure to promptly clean up expired or useless data may result in cache space being occupied, affecting the caching of new, more valuable data.
[0186] In an optional embodiment of the data processing method provided in the above embodiments of this application, deleting the second target data in the data cache space according to the identification information of the target service includes:
[0187] Based on the identification information of the target business, determine the second target stage and the second target event corresponding to the second target data;
[0188] Delete all data corresponding to the second target event in the second target stage from the data cache space.
[0189] Understandably, when deleting second-target data in the data cache space, the first step is to further determine the second-target stage and second-target event corresponding to the second-target data based on this identification information. This step is to more accurately locate the range of data to be deleted, rather than performing a simple global deletion operation that might mistakenly delete other related data. After determining the second-target stage and second-target event, choosing to delete all data corresponding to the second-target event of the second-target stage in the data cache space is based on considerations of the correlation between data. In many business scenarios, data related to a specific event are often interconnected and together constitute a complete description or record of that event. Therefore, when deleting second-target data related to this basketball shooting event (second-target event), deleting only part of the data may lead to incomplete data or problems in subsequent business operations such as analysis of the event. Therefore, choosing to delete all data corresponding to the second-target event of the second-target stage can ensure the complete removal of all cached data related to this specific event, ensuring the consistency of the data cache space and the accuracy of data processing.
[0190] This deletion method is also significant for managing data cache space. By deleting all data related to specific stages and events, unnecessary or outdated cached data can be promptly cleaned up, freeing up more available cache space. This helps improve cache space utilization, allowing the cache to better cache other more valuable and frequently accessed hot data, thereby improving the performance and efficiency of the entire caching system.
[0191] The method provided in this application cleans up unnecessary cached data in a timely manner, freeing up more available space for the cache, which directly impacts the performance of the caching system. The performance of a caching system largely depends on the utilization rate of the cache space and the freshness of the cached data. By deleting all data related to specific stages and events, the use of cache space can be optimized, enabling the caching system to cache new, more valuable data faster, thereby improving the response speed and overall performance of the caching system and better meeting the business's needs for rapid data access and processing.
[0192] In an optional embodiment of the data processing method provided in the above embodiments of this application, after deleting the second target data in the data cache space, the method further includes:
[0193] Mark the second target event of the second target phase of the target business as uncached.
[0194] Understandably, the data caching status of different business stages and events needs to be accurately recorded and reflected in the data caching space so that the system can make decisions based on the correct status information when performing subsequent data query operations. When the second target data is deleted, the second target event of the corresponding target business's second target stage actually no longer has valid cached data, and marking it as uncached accurately reflects this situation.
[0195] Marking data as uncached will affect subsequent data query operations. When the system receives a query request for data related to the second target stage or second target event of the target business, if it finds that the data is in an uncached state, it knows that it cannot directly retrieve the data from the cache space, but needs to take other measures, such as re-querying the data from the data storage space and possibly re-caching it (if it complies with the caching policy).
[0196] The method provided in this application embodiment allows the cache management system to have a clearer understanding of the actual situation of the cache space by accurately marking which stages and events no longer have data in the cache, thereby better arranging subsequent cache filling, updating and other operations.
[0197] In an optional embodiment of the data processing method provided in the above embodiments of this application, the data processing method further includes:
[0198] Obtain the data deployment structure of the data storage space;
[0199] Establish a data cache space based on the data deployment structure of the data storage space;
[0200] Retrieve the business instance stored in the storage space;
[0201] Based on the business instance, a corresponding business cache instance is created in the data cache space.
[0202] Understandably, understanding the organization and structure of data storage is crucial for establishing an efficient data caching space. In esports event management, data storage may contain various event data, such as event information, player data, and match results. By understanding its data deployment structure, we can know how the data is stored, categorized, and associated. The purpose of establishing a data caching space is to improve data access speed and response time. Building the caching space based on the structure of the data storage space ensures that the data in the cache is logically consistent with the data in storage, facilitating quick location and retrieval of the required data. To further improve data access efficiency in specific business scenarios, corresponding business cache instances are established for different esports event business instances, ensuring that the required data can be quickly retrieved from the cache when processing that business.
[0203] The data cache space uses the same data structure as the data storage space. In the e-sports game event management system, a MySQL cache instance is added for each instance deployed for the event service. The event service instance and the MySQL cache instance run in the same pod, thereby reducing network request time and improving performance.
[0204] Please see Figure 11 , Figure 11 This is a comparison diagram between related technical solutions and the technical solution of this application. In related technologies, caching spaces are often established at both the interface and logic layers, but this suffers from problems such as frequent business modifications, difficulty in cache cleanup, and easy omissions. The method provided in this application uses a MySQL memory engine table to cache the data layer, requiring no changes to the business code. It also allows for caching and cleanup based on event dimensions and utilizes a GORM plugin mechanism to clean up cached data, ensuring the accuracy of the cached data.
[0205] Please see Figure 12 , Figure 12 The diagram illustrates the architecture of the data processing system. The system has a three-layer structure: a service layer, a caching layer, and a data layer. This layered architecture helps improve the system's maintainability, scalability, and performance.
[0206] The service layer is the interface layer through which the system interacts with users or other external systems. It is responsible for receiving various data query (SELECT) and update (UPDATE) requests and forwarding these requests to the lower layers for processing. The service layer acts as a bridge, translating user needs into operations that the system can handle internally and returning the processing results to the user. It can be customized to meet different business requirements and various complex application scenarios.
[0207] The caching layer employs the MySQL Memory engine, which stores data in memory, offering extremely high read and write speeds and enabling rapid response to data query requests. The caching layer stores frequently accessed event data, such as real-time scores and player data for currently running popular matches in an esports event management system.
[0208] Gorm is an object-relational mapping (ORM) framework for the Go programming language that facilitates interaction with databases. The Gorm update event here refers to the event that occurs when data is updated at the data layer. The Gorm framework can capture this event and update the data in the cache layer accordingly to maintain consistency between the cache and the data layer.
[0209] The data layer uses MySQL, a widely used relational database management system with powerful data storage and management capabilities. It stores all event data, including historical match data, player information, and event rules. While the data layer's read / write speed may not be as fast as the caching layer, it offers advantages in data persistence and reliability, ensuring long-term data storage and security.
[0210] When the service layer receives a data query request, it first checks if the required data exists in the cache layer. If the cache is hit, meaning the required data exists in the cache layer, the data is returned directly to the user from the cache layer, which can greatly improve response speed. If the cache is not hit, the service layer will query the data from the data layer and, while returning the query result to the user, store the data in the cache layer so that it can be quickly retrieved on the next query.
[0211] When the service layer receives a data update request, it forwards the update operation to the data layer for processing. After the data layer completes the update, the Gorm framework captures this update event and updates the data in the cache layer accordingly to maintain consistency between the cache and the data layer.
[0212] The data processing system provided in this application, through the introduction of a caching layer and the use of the Gorm framework, can improve system performance and data consistency, meeting the needs of application scenarios such as e-sports event management.
[0213] In one possible implementation, please refer to Figure 13 (A) in the middle. Figure 13 (A) in this application refers to a data processing apparatus 130 provided in an embodiment of the present application, comprising:
[0214] The request-response module 1310 is used to respond to a query request for the first target data of the target business; wherein the target business includes M stages, each stage includes N events, and the first target data is the event data corresponding to any event in any stage, M≥1, N≥1;
[0215] The data query module 1320 is used to query the first target data in the data cache space based on the identification information of the target business when the query request carries the identification information of the target business;
[0216] The data query module 1320 is also used to query the first target data in the data storage space based on the name information of the target business when the query request does not carry the identification information of the target business; wherein, the data cache space is a storage engine table built based on the data storage space.
[0217] In one possible implementation, the data query module 1320 is also used for:
[0218] Based on the identification information of the target business, query the data cache space for data related to the target business;
[0219] If the data cache space contains data related to the target business, determine the first target stage and the first target event corresponding to the first target data based on the query request;
[0220] Based on the first target stage and the first target event, query the first target data in the data related to the target business;
[0221] If the data cache space does not contain data related to the target business, the first target data is queried in the data storage space based on the identification information of the target business.
[0222] In one possible implementation, the data query module 1320 is also used for:
[0223] Based on the first target phase, query the event data of all events corresponding to the first target phase from the data related to the target business;
[0224] Based on the first target event, query the first target data from the event data of all events corresponding to the first target stage.
[0225] In one possible implementation, please refer to Figure 13 (B) in the middle. Figure 13 (B) in this application provides another data processing apparatus 130, which further includes:
[0226] The cache writing module 1330 is used to store the first target data in the data cache space.
[0227] In one possible implementation, please refer to Figure 13 (C) in the middle. Figure 13 (C) in this application refers to another data processing device 130 provided in the embodiment of the present application, which further includes: a data deletion module 1340;
[0228] The request-response module 1310 is also used to respond to a deletion request for the second target data of the target service, wherein the deletion request carries the identification information of the target service;
[0229] The data deletion module 1340 is used to delete the second target data in the data cache space based on the identification information of the target business.
[0230] In one possible implementation, the data deletion module 1340 is further used for:
[0231] Based on the identification information of the target business, determine the second target stage and the second target event corresponding to the second target data;
[0232] Delete all data corresponding to the second target event in the second target stage from the data cache space.
[0233] In one possible implementation, please refer to Figure 13 (D) in the middle. Figure 13 (D) in this application embodiment is another data processing device 130, which further includes: a cache marking module 1350, used to mark the second target event of the second target stage of the target service as an uncached state.
[0234] In one possible implementation, please refer to Figure 13 (E) in the middle. Figure 13 (E) in this application embodiment is another data processing apparatus 130, which further includes:
[0235] Module 1360 is used to obtain the data deployment structure of the data storage space;
[0236] Establish module 1370 to create a data cache space based on the data deployment structure of the data storage space;
[0237] The acquisition module 1360 is also used to acquire business instances stored in the storage space;
[0238] Module 1370 is used to create a business cache instance corresponding to the business instance in the data cache space based on the business instance.
[0239] Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the specific working processes of the systems, devices, and units described above can be referred to the corresponding processes in the foregoing method embodiments, and will not be repeated here.
[0240] In this application embodiment, the terms "module" or "unit" refer to a computer program or part of a computer program that has a predetermined function and works with other related parts to achieve a predetermined goal, and can be implemented wholly or partially using software, hardware (such as processing circuitry or memory), or a combination thereof. Similarly, a processor (or multiple processors or memory) can be used to implement one or more modules or units. Furthermore, each module or unit can be part of an overall module or unit that includes the functionality of that module or unit.
[0241] In the several embodiments provided in this application, it should be understood that the disclosed systems, apparatuses, and methods can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative; for instance, the division of units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be an indirect coupling or communication connection between apparatuses or units through some interfaces, and may be electrical, mechanical, or other forms.
[0242] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.
[0243] Furthermore, the functional units in the various embodiments of this application can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit.
[0244] If the integrated unit is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a server or terminal device, etc.) to execute all or part of the steps of the methods described in the various embodiments of this application. The aforementioned storage medium includes various media capable of storing computer programs, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.
[0245] The above-described embodiments are only used to illustrate the technical solutions of this application, and are not intended to limit them. Although this application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of this application.
Claims
1. A data processing method, characterized in that, include: In response to a query request for first target data of a target service; wherein the target service includes M stages, each stage includes N events, and the first target data is the event data corresponding to any event in any stage, M≥1, N≥1; If the query request carries the identification information of the target service, the first target data is queried in the data cache space according to the identification information of the target service; If the query request does not carry the identification information of the target service, the first target data is queried in the data storage space according to the name information of the target service; wherein, the data cache space is a storage engine table established based on the data storage space.
2. The method as described in claim 1, characterized in that, The step of querying the first target data in the data cache space based on the identification information of the target service includes: Based on the identification information of the target service, query the data cache space for data related to the target service; If the data cache space contains data related to the target business, determine the first target stage and the first target event corresponding to the first target data according to the query request; Based on the first target stage and the first target event, query the first target data in the data related to the target business; If the data cache space does not contain data related to the target service, the first target data is queried in the data storage space based on the identification information of the target service.
3. The method as described in claim 2, characterized in that, The step of querying the first target data in data related to the target business based on the first target stage and the first target event includes: Based on the first target stage, query the event data of all events corresponding to the first target stage from the data related to the target business; Based on the first target event, query the first target data from the event data of all events corresponding to the first target stage.
4. The method as described in claim 2, characterized in that, After querying the first target data in the data storage space based on the identifier information of the target service, the method further includes: The first target data is stored in the data cache space.
5. The method according to any one of claims 1-4, characterized in that, The method further includes: In response to a deletion request for second target data of a target service, wherein the deletion request carries identification information of the target service; Based on the identification information of the target service, the second target data in the data cache space is deleted.
6. The method as described in claim 5, characterized in that, The step of deleting the second target data in the data cache space based on the identification information of the target service includes: Based on the identification information of the target service, determine the second target stage and the second target event corresponding to the second target data; Delete all data corresponding to the second target event in the second target stage from the data cache space.
7. The method as described in claim 5, characterized in that, After deleting the second target data from the data cache space, the method further includes: The second target event of the second target phase of the target service is marked as uncached.
8. The method according to any one of claims 1-4, characterized in that, The method further includes: Obtain the data deployment structure of the data storage space; Based on the data deployment structure of the data storage space, a data cache space is established; Retrieve the business instance stored in the storage space; Based on the business instance, a business cache instance corresponding to the business instance is created in the data cache space.
9. A data processing apparatus, characterized in that, include: The request-response module is used to respond to a query request for the first target data of the target business; wherein the target business includes M stages, each stage includes N events, and the first target data is the event data corresponding to any event in any stage, M≥1, N≥1; The data query module is used to query the first target data in the data cache space based on the identification information of the target service when the query request carries the identification information of the target service; The data query module is further configured to query the first target data in the data storage space based on the name information of the target service when the query request does not carry the identification information of the target service; wherein, the data cache space is a storage engine table established based on the data storage space.
10. A computer device, characterized in that, include: Memory, processor, and bus system; The memory is used to store programs; The processor is configured to execute a program in the memory, including executing the data processing method as described in any one of claims 1 to 8; The bus system is used to connect the memory and the processor to enable communication between the memory and the processor.
11. A computer-readable storage medium comprising instructions, characterized in that, When it is run on a computer, it causes the computer to perform the data processing method as described in any one of claims 1 to 8.
12. A computer program product, comprising a computer program, characterized in that, The computer program is executed by a processor using the data processing method as described in any one of claims 1 to 8.