Learning interaction method and device based on virtual gift, equipment and storage medium
By monitoring users' learning behavior and generating virtual gifts, combined with gift expiration dates and challenge tasks, a dynamic social incentive mechanism is established, which solves the problem of insufficient learning motivation among young users on online education platforms and improves the effectiveness of learning interaction.
Patent Information
- Application Number
- CN202510931744.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-07-07
- Publication Date
- 2025-10-21
AI Technical Summary
Existing online education platforms lack dynamic and social interactive elements. Traditional incentive methods are difficult to continuously attract the learning attention and stimulate learning motivation of young users. There is a lack of systems and methods to effectively combine learning tasks with "gift generation", "task challenges" and "interactive giving".
By monitoring users' learning behavior and using a gift generation rule engine to determine whether learning events have reached a preset threshold, gifts are generated and sent to the user's virtual backpack. This introduces a virtual gift validity period and challenge task threshold mechanism, establishing a new social incentive mechanism driven by learning behavior.
It increases the fun and interactivity of user learning, motivates users to continue learning, and enhances their learning enthusiasm and participation, making it especially suitable for younger users.
Smart Images

Figure CN120822996A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of artificial intelligence technology, and in particular to a learning interaction method, device, equipment and storage medium based on virtual gifts. Background Art
[0002] Existing online education platforms generally use static feedback mechanisms such as point accumulation, badges, and task achievement to incentivize learning behavior. While these methods can provide motivation to a certain extent, they often lack dynamic and social interaction elements. Especially among younger users, these traditional incentives struggle to retain attention or inspire learning motivation, resulting in insufficient user engagement and low learning completion rates. Currently, the market lacks a system and method that effectively combines learning tasks with "gift generation," "task challenges," and "interactive gifting." In particular, there is a lack of a comprehensive technical solution for virtual gift lifecycle management, setting transfer task thresholds, rewarding feedback for challenge completion, and data link tracking. Therefore, there is an urgent need to develop a new technical system that can drive learning motivation through fun and social interaction, thereby improving user engagement and persistence in learning. Summary of the Invention
[0003] The embodiments of the present invention provide a learning interaction method, apparatus, computer equipment and storage medium based on virtual gifts, aiming to enhance the learning interaction effect of users.
[0004] In a first aspect, an embodiment of the present invention provides a learning interaction method based on virtual gifts, comprising:
[0005] Monitor a first learning event of the first user's learning behavior, and store the monitored first learning event in a message queue;
[0006] Using a gift generation rule engine to determine whether a first learning event in the message queue reaches a preset event threshold;
[0007] If it is determined that the first learning event in the message queue reaches a preset event threshold, the gift generation logic is triggered, and the corresponding virtual gift is generated using the gift generation logic;
[0008] The virtual gift is distributed to the virtual backpack preset by the first user.
[0009] In a second aspect, an embodiment of the present invention provides a learning interaction device based on virtual gifts, comprising:
[0010] An event monitoring unit, configured to monitor a first learning event of a first user's learning behavior and store the monitored first learning event in a message queue;
[0011] An event determination unit, configured to determine, using a gift generation rule engine, whether a first learning event in the message queue reaches a preset event threshold;
[0012] a logic triggering unit, configured to trigger a gift generation logic if it is determined that the first learning event in the message queue reaches a preset event threshold, and generate a corresponding virtual gift using the gift generation logic;
[0013] The gift distribution unit is used to distribute the virtual gift to the virtual backpack preset by the first user.
[0014] In a third aspect, an embodiment of the present invention provides a computer device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the computer program, the learning interaction method based on virtual gifts as described in the first aspect is implemented.
[0015] In a fourth aspect, an embodiment of the present invention provides a computer-readable storage medium having a computer program stored thereon. When the computer program is executed by a processor, the learning interaction method based on virtual gifts as described in the first aspect is implemented.
[0016] The embodiment of the present invention provides a learning interaction method, apparatus, computer equipment and storage medium based on virtual gifts, the method comprising: monitoring the first learning event of the learning behavior of the first user, and storing the monitored first learning event in a message queue; using a gift generation rule engine to determine whether the first learning event in the message queue reaches a preset event threshold; if it is determined that the first learning event in the message queue reaches the preset event threshold, triggering the gift generation logic, and using the gift generation logic to generate a corresponding virtual gift; distributing the virtual gift to the virtual backpack preset by the first user. The embodiment of the present invention obtains the corresponding learning event by monitoring the user's learning behavior, and then determines the learning event through the gift generation rule engine. When the learning event reaches the preset threshold, the gift generation logic is triggered to generate a virtual gift and store it in the user's virtual backpack. This can increase the user's learning interest and interactivity, motivate the user to continue learning, improve learning enthusiasm and participation, and thus enhance the user's learning interaction effect. BRIEF DESCRIPTION OF THE DRAWINGS
[0017] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.
[0018] Figure 1 A flowchart of a learning interaction method based on virtual gifts provided by an embodiment of the present invention;
[0019] Figure 2 Another flowchart of a learning interaction method based on virtual gifts provided by an embodiment of the present invention;
[0020] Figure 3 A schematic block diagram of a learning interaction device based on virtual gifts provided by an embodiment of the present invention;
[0021] Figure 4 Another schematic block diagram of a learning interaction device based on virtual gifts provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0022] The following will clearly and completely describe the technical solutions in the embodiments of the present invention in conjunction with the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of them. All other embodiments obtained by ordinary technicians in this field based on the embodiments of the present invention without making any creative efforts shall fall within the scope of protection of the present invention.
[0023] It will be understood that when used in this specification and the appended claims, the terms “comprises” and “comprising” indicate the presence of described features, integers, steps, operations, elements and / or components, but do not preclude the presence or addition of one or more other features, integers, steps, operations, elements, components and / or groups thereof.
[0024] It should also be understood that the terminology used in this specification is for the purpose of describing particular embodiments only and is not intended to limit the present invention. As used in the specification and appended claims, the singular forms "a," "an," and "the" are intended to include the plural forms unless the context clearly indicates otherwise.
[0025] It should be further understood that the term "and / or" used in the present description and the appended claims refers to and includes any and all possible combinations of one or more of the associated listed items.
[0026] See below Figure 1 , an embodiment of the present invention provides a learning interaction method based on virtual gifts, specifically including: steps S101 to S104.
[0027] Step S101: monitoring a first learning event of a first user's learning behavior, and storing the monitored first learning event in a message queue;
[0028] Step S102: Using a gift generation rule engine, determining whether the first learning event in the message queue reaches a preset event threshold;
[0029] Step S103: If it is determined that the first learning event in the message queue reaches a preset event threshold, triggering the gift generation logic, and using the gift generation logic to generate a corresponding virtual gift;
[0030] Step S104: distribute the virtual gift to the virtual backpack preset by the first user.
[0031] In this embodiment, the system first monitors user learning behavior to obtain corresponding learning events. Then, the gift generation rule engine determines these learning events. When the learning event reaches a preset threshold, the gift generation logic is triggered to generate a virtual gift and store it in the user's virtual backpack. This increases the user's learning interest and interactivity, motivates them to continue learning, improves their learning enthusiasm and engagement, and ultimately enhances the user's learning interaction.
[0032] The learning interaction method provided in this embodiment breaks the static feedback model of traditional learning incentive systems, implementing a new social incentive mechanism driven by learning behavior. It also introduces a virtual gift validity period and a challenge task threshold mechanism to strengthen the motivation design for real-time learning behavior. In particular, the learning interaction method provided in this embodiment is suitable for multi-terminal scenarios such as mini-programs and apps, and is also suitable for synchronous learning application scenarios for young people, such as elementary and middle school students.
[0033] It should also be noted that the virtual gift-based learning interaction method provided in this embodiment can be implemented by a server or service terminal, while the first user's learning behavior can be performed on its equipped client. The server or service terminal interacts with the first user's learning client to monitor the first user's learning behavior and generate and distribute gifts. The server or service terminal is responsible for core logic processing such as capturing monitoring events, determining the rules engine, and generating and distributing gifts. The first user's learning client serves as the entry point for user interaction, responsible for triggering learning events and uploading event data to the server or service terminal.
[0034] In one embodiment, if Figure 2 As shown, the learning interaction method based on virtual gifts also includes: steps S201 to S203.
[0035] Step S201: In response to the first user transferring the virtual gift, determining a corresponding second user and monitoring a second learning event of the second user;
[0036] Step S202: Using the gift generation rule engine, determine whether the second learning event reaches a preset event threshold;
[0037] Step S203: If it is determined that the second learning event reaches a preset event threshold, the virtual gift is distributed to the second user.
[0038] In order to further enhance the fun and sociality of the learning interaction method, this embodiment allows the first user to transfer the virtual gift he or she has obtained to the second user, and sets the transfer conditions to be associated with the learning event of the second user. This not only motivates the learning behavior of the first user, but also indirectly promotes the learning enthusiasm of the second user, achieving the external influence of enhancing learning motivation through social communication paths, and promoting the effect of positive interaction between users. Specifically, when the first user chooses to transfer a virtual gift, the corresponding second user is determined, and the learning behavior of the second user, that is, the second learning event, is monitored. The gift generation rule engine is used to determine whether the second learning event meets the preset event threshold. Once the second learning event meets the preset standard, the transferred virtual gift is issued to the second user, thereby forming a closed loop of gift transfer and reception driven by learning behavior. This method not only increases the interaction between users, but also further strengthens the motivation design of learning behavior by setting transfer thresholds and task challenges, thereby improving the user's learning participation and continuity.
[0039] In a specific embodiment, the first user can set a series of interesting challenge tasks when transferring gifts to increase interactivity and fun. These tasks may include completing a certain number of questions, achieving a specific accuracy rate of answering questions, or watching a course for a certain length of time. In actual applications, a sharing page with a challenge task can be generated, and the page can have various forms, such as a poster QR code, a mini-program card, and an H5 link. During the sharing process, the page will automatically carry data such as the gift ID, task rules, and timestamp. After clicking the link, the recipient, that is, the second user, will enter the corresponding challenge page, which will display the challenge content and countdown. The learning behavior is then monitored in real time to ensure that the recipient's behavior meets the task conditions. Once the recipient successfully completes the task, the reward animation is automatically triggered, and the gift storage operation is completed, making the whole process both fun and fulfilling.
[0040] In this way, this embodiment establishes a complete closed-loop path from "learning behavior → motivation generation → social transmission → task challenge → motivation feedback". Based on this closed-loop path, it can effectively improve students' enthusiasm, autonomy and interactive participation in the learning process, and is especially suitable for interesting learning scenarios for young learners.
[0041] In one embodiment, monitoring a first learning event of the learning behavior of the first user and storing the monitored first learning event in a message queue includes:
[0042] Using an event hook function to collect the learning behavior trigger information of the first user to obtain a first learning event; wherein the event hook function is pre-injected into the learning client of the first user;
[0043] A long connection channel is established with the learning client through the WebSocket protocol, and regular polling is performed to obtain the first learning event and store it in the message queue.
[0044] This embodiment combines multiple mechanisms to achieve real-time monitoring and collection of different learning behavior events. Specifically:
[0045] (1) Front-end event hook mechanism: In front-end learning modules such as mini-programs or apps, a unified event hook function is injected for key user operations, such as clicking to start reading, completing questions, submitting answers, and entering the next question, to collect behavior triggering information in real time.
[0046] (2) Tracking and behavior tracking mechanism: Deploy a tracking system in the learning page or component, and combine the page path, component status and event callback to collect behavioral data including listening playback completion, voice input success, voice assessment results (such as scores, fluency, completeness, accuracy and other indicators), reading page browsing time reaching the standard, correctly completing N questions, question completion and accuracy, etc.
[0047] (3) WebSocket / long polling mechanism: For real-time interactive learning, such as conversational exercises and real-time question answering, a long connection channel is established through WebSocket to push task progress and synchronize server status.
[0048] (4) User client local status detection + scheduled polling synchronization: For data that needs to be completed locally (such as recording file analysis, sentence comparison accuracy), combined with scheduled polling and status monitoring, task trigger judgment and reporting are completed.
[0049] (5) Server-side event center and rule engine judgment: After the front-end uploads behavioral data to the server, the back-end event center combines with the rule engine to determine the task status, such as whether a complex task such as "checking in for three consecutive days" or "reading accuracy exceeding 80%" has been achieved. Specifically, it can support monitoring and judgment of multiple learning behavior dimensions, including listening task completion, reading accuracy reaching the target, and word spelling task completion reaching the target.
[0050] In practical applications, the rule engine described in this embodiment supports monitoring and judging multiple learning behavior dimensions, including but not limited to: listening task playback completion, oral reading accuracy reaching the target, reading comprehension accuracy exceeding a preset threshold, and word spelling task completion reaching the target. Each task dimension can be configured with corresponding trigger conditions to drive subsequent incentive mechanisms.
[0051] In one embodiment, the determining, using the gift generation rule engine, whether the first learning event in the message queue reaches a preset event threshold includes:
[0052] Obtaining an incentive rule corresponding to the first learning event; wherein the incentive rule includes a learning task condition;
[0053] comparing the first learning event with the learning task condition;
[0054] If the first learning event meets the learning task condition, determining that the first learning event reaches a preset event threshold;
[0055] If the first learning event does not meet the learning task condition, it is determined that the first learning event does not reach a preset event threshold.
[0056] In this embodiment, collected learning events, such as listening practice completion and speech accuracy score results, which include user ID, behavior type, and behavior parameters (such as accuracy rate, number of questions, and duration), can be matched against a pre-set rule pool based on the learning event's "behavior type." For example, "Complete pronunciation task + accuracy rate ≥ 85%" matches a speech Easter egg reward rule. The rule engine in this embodiment supports multiple rule types: single-condition rules, multi-condition combination rules, probabilistic trigger rules, and incremental task rules. It then determines whether the learning event meets all of the conditions set by the rule, such as time window, achievement rate, and continuity. If multiple rules meet the conditions, a weighted priority can be introduced to select the rule that best suits the reward. If the learning event is determined to have met the conditions set by the rule or if the conditions set by the rule meet the preset condition threshold, it indicates that the learning event has reached the preset event threshold. Otherwise, it indicates that the learning event has not reached the preset event threshold, and the gift generation logic is not triggered. By setting diverse incentive rules and combining them with the rule engine for intelligent judgment, this embodiment can flexibly adapt to different learning scenarios and needs, providing users with a personalized learning incentive experience.
[0057] In actual application scenarios, when it is determined that a learning event has achieved the conditions set by the rule or that the conditions set by the rule have met the preset condition threshold, the following structure can be output:
[0058] {
[0059] "shouldGenerate":true, / / whether to generate
[0060] "giftId":"gift_123456", / / gift ID (gift ID is unique and traceable)
[0061] "giftType":"Voice Easter Egg Bear", / / gift type
[0062] "giftTheme":"Voice Incentive", / / gift theme
[0063] "giftLevel":"Rare", / / gift level
[0064] "validDuration":86400, / / Validity period (seconds)
[0065] "userId":"user_123456" / / gift owner (user id)
[0066] }
[0067] Then, push the above to the gift generation logic module.
[0068] In one embodiment, if it is determined that the first learning event in the message queue reaches a preset event threshold, triggering gift generation logic, and using the gift generation logic to generate a corresponding virtual gift, includes:
[0069] Matching the first learning event using a preset gift indicator to obtain a virtual gift corresponding to the first learning event;
[0070] The virtual gift is assigned a gift attribute, and the virtual gift is registered and assigned in combination with the first user's virtual backpack.
[0071] When generating virtual gifts, this embodiment first searches for incentive rules associated with learning events (such as completing listening exercises, achieving reading accuracy, etc.). Each incentive rule can define task conditions (such as completion time, accuracy threshold, learning time, etc.) and corresponding gift reward configurations. Then, gifts of different types, rarities, or levels are matched based on indicators such as the difficulty, efficiency, and accuracy of the task completed by the user. For example, ordinary tasks generate ordinary gifts, such as "Voice Stars", and high-difficulty tasks may generate rare gifts, such as "Knowledge Dragons". Gift types can include motion effects (that is, gifts are presented in the form of motion effect components with dynamic playback properties, such as glowing, exploding, jumping, voice, character interaction, etc.), sound effects, message types, etc., which are rich in expressiveness and enhance emotional feedback. They can also be divided into ordinary gifts, rare gifts, holiday theme gifts, limited combination gifts, etc.
[0072] When generating and initializing gift attributes, the following attributes can be dynamically assigned to the gift: unique gift ID, type / theme / level, validity period (such as valid within 24 hours), whether it can be transferred, whether challenge tasks can be set, etc., so that each gift has unique identification, validity period, generation source and other meta-information.
[0073] Furthermore, you can also bind animation resource paths and sound effects, for example, binding gifts to front-end display animation resources (such as Lottie JSON animation, frame animation, Canvas rendering, etc.);
[0074] In addition, the animation of virtual gifts can be triggered and played at nodes such as receiving, giving and / or using.
[0075] After a virtual gift is generated, it can be registered in the current user's "virtual backpack," along with information such as the virtual gift's creation time, source task, expiration date, and whether it has been gifted. In practice, virtual gifts in a user's virtual backpack can be actively manipulated (transferred, used, or collected) or automatically cleared (e.g., removed upon expiration).
[0076] In one embodiment, if it is determined that the first learning event in the message queue reaches a preset event threshold, triggering gift generation logic, and using the gift generation logic to generate a corresponding virtual gift, further includes:
[0077] Obtaining a learning behavior indicator corresponding to the first learning event;
[0078] generating a gift probability matrix according to the learning behavior indicator;
[0079] Based on the gift probability matrix, a random algorithm is used to load the probability of generating virtual gifts, and a dynamic rendering engine is combined to generate gift animations; wherein, the virtual gifts include rare gifts and common gifts.
[0080] This embodiment uses a dynamic rendering engine (such as the Lottie animation framework) to generate gift animations, and combines random algorithms (such as Monte Carlo simulation, Poisson distribution, or Bayesian sampling algorithms) to control the probability of rare gifts, thereby increasing the user's sense of surprise and expectation when receiving gifts. Specifically, a gift probability matrix can be generated based on the user's learning behavior indicators (such as task completion, accuracy, learning time, etc.). The matrix defines the probability of obtaining rare gifts and ordinary gifts under different learning behavior indicators. For example, the probability of hitting a rare animation gift for an ordinary task is 0%, and the probability of triggering a rare gift for excellent task performance (such as 3 consecutive full marks) rises to 25%. In this way, the quantitative indicators of educational behavior can be dynamically bound to the rarity of animation rewards to avoid the static reward mechanism causing users to habitually ignore it. When it is determined that the learning event reaches the preset event threshold, the probability of generating a virtual gift can be loaded for the user based on this probability matrix using a random algorithm.
[0081] Then, combined with a dynamic rendering engine, such as the Lottie animation framework, corresponding gift animation effects, such as glowing, explosions, and character interactions, are generated based on the loaded probabilities. This is presented to users, thereby enhancing user interest, participation, and reward feedback. For example, when using the Lottie dynamic rendering mechanism, a static animation resource pool is not used. Instead, the following parameters are dynamically combined to generate the gift animation:
[0082] (1) Gift themes, such as animals, scenes, festivals, etc.;
[0083] (2) Gift level, such as color, special effects, and particle style;
[0084] (3) Gift behaviors, such as jumping, spinning, exploding, falling, etc.
[0085] Automatically combine JSON resources based on gift type to render different visual styles, enhancing the sense of difference between gifts. This allows for dynamic synthesis of animation rendering resources, reduces redundant preset files, and enhances the visual personalization of gifts.
[0086] Furthermore, a feedback mechanism can be set up to link the gift distribution system with dynamic effects. Since the virtual gift animation in this embodiment is not played statically, but is tied to the results of user behavior, such as playing after completing a task, unlocking playback after completing a challenge, and flashing as a reminder before expiration, a closed-loop design of learning behavior → triggering feedback → enhancing motivation can be formed, thereby strengthening the role of dynamic effects as a feedback device for user learning behavior and achieving a deep coupling of learning experience and virtual interaction.
[0087] In one embodiment, the virtual gift-based learning interaction method further includes:
[0088] The Redis expiration key mechanism is used to manage the virtual gifts in the virtual backpack.
[0089] This embodiment maintains a dedicated virtual backpack for each user to store unused gifts. Virtual gifts in the virtual backpack have a "limited-time" attribute and automatically expire and are removed upon expiration. This automatic expiration of gifts is achieved using a Redis expiration key mechanism, triggering a scheduled task to clean up the user's backpack data. Furthermore, virtual gifts in a user's virtual backpack can be used or transferred in response to user actions.
[0090] Furthermore, the virtual backpack can also be limited in capacity. For example, when the virtual backpack reaches its upper limit, the user can expand the backpack capacity by completing specific learning tasks. This can incentivize users to value the virtual gifts they receive and actively participate in learning tasks to obtain more storage space by limiting the backpack capacity and increasing the cost of expansion.
[0091] In a specific embodiment, a data link tracking mechanism can be set up to record the entire process data of virtual gift generation, distribution, use and user feedback. The data link tracking mechanism includes the collection of user learning behavior data, the logging of the virtual gift generation and distribution process, and the monitoring and analysis of user interactive feedback, that is, the learning-incentive-interaction-feedback-data tracking closed loop, which enables the system to have sustainable evolution capabilities. Through this mechanism, the system can track the life cycle of virtual gifts in real time, including key information such as the gift generation time, type, level, receiving user, and usage status. At the same time, the mechanism can also analyze user feedback behavior on virtual gifts, such as whether the user likes the gift received, whether the user actively participates in challenge tasks to obtain more gifts, etc., so as to evaluate the effectiveness of the virtual gift incentive mechanism and optimize the subsequent gift design and distribution strategy accordingly.
[0092] Furthermore, the data link tracking mechanism helps promptly identify and address anomalies, such as errors in virtual gift generation, delayed distribution, or unusual user feedback. Once these issues are detected, an early warning mechanism is automatically triggered, notifying relevant personnel to address them, ensuring the smooth operation of the virtual gift incentive mechanism.
[0093] Furthermore, the data link tracking mechanism can be implemented by combining distributed log collection and storage systems (such as ELKStack), real-time data analysis engines (such as Spark Streaming), and data visualization tools (such as Grafana). Through these technical means, virtual gift-related data can be efficiently collected, processed, and analyzed, providing strong data support for optimizing the interactive learning experience.
[0094] In actual application, for example, student A completes the task of "achieving a score of 90 points in oral reading" in an English learning mini-program. The system automatically generates a "Voice Easter Egg Bear" virtual gift (valid for 24 hours). Student A sets the gift claim condition to "complete 2 medium-difficulty reading exercises" and generates a sharing link through the WeChat mini-program card and sends it to friend B. Student B clicks the link to enter the challenge page and completes the designated task within the countdown. After the system automatically recognizes that the learning behavior meets the challenge rules, it plays the "Easter Egg Bear Jump + Star Explosion" animation and adds the gift to student B's virtual backpack. At the same time, it records this learning behavior, reward link, and interaction path for subsequent analysis.
[0095] Figure 3 A schematic block diagram of a learning interaction device 300 based on virtual gifts provided in an embodiment of the present invention, the device 300 includes:
[0096] An event monitoring unit 301 is configured to monitor a first learning event of a first user's learning behavior and store the monitored first learning event in a message queue;
[0097] An event determination unit 302 is configured to determine, using a gift generation rule engine, whether the first learning event in the message queue reaches a preset event threshold;
[0098] The logic trigger unit 303 is configured to trigger the gift generation logic if it is determined that the first learning event in the message queue reaches a preset event threshold, and generate a corresponding virtual gift using the gift generation logic;
[0099] The gift distributing unit 304 is configured to distribute the virtual gift to the virtual backpack preset by the first user.
[0100] In one embodiment, if Figure 4 As shown, the virtual gift-based learning interactive device 300 further includes:
[0101] The gift transfer processing unit 401 is configured to determine a corresponding second user in response to the first user's gift transfer processing of the virtual gift, and monitor a second learning event of the second user;
[0102] A second determining unit 402 is configured to determine, using the gift generation rule engine, whether the second learning event reaches a preset event threshold;
[0103] The second issuing unit 403 is configured to issue the virtual gift to the second user if it is determined that the second learning event reaches a preset event threshold.
[0104] In one embodiment, the event monitoring unit 301 includes:
[0105] an information collection unit, configured to collect the learning behavior triggering information of the first user using an event hook function to obtain a first learning event; wherein the event hook function is pre-injected into the learning client of the first user;
[0106] The polling acquisition unit is used to establish a long connection channel with the learning client through the WebSocket protocol, and to periodically poll to obtain the first learning event and store it in a message queue.
[0107] In one embodiment, the event determination unit 302 includes:
[0108] A rule acquisition unit, configured to acquire an incentive rule corresponding to the first learning event; wherein the incentive rule includes a learning task condition;
[0109] a condition comparison unit, configured to compare the first learning event with the learning task condition;
[0110] a first determining unit, configured to determine whether the first learning event reaches a preset event threshold if the first learning event satisfies the learning task condition;
[0111] The second determination unit is configured to determine that the first learning event does not reach a preset event threshold if the first learning event does not meet the learning task condition.
[0112] In one embodiment, the logic trigger unit 303 includes:
[0113] An event matching unit, configured to match the first learning event using a preset gift indicator to obtain a virtual gift corresponding to the first learning event;
[0114] The attribute allocation unit is used to allocate gift attributes to the virtual gift and register and allocate the virtual gift in combination with the virtual backpack of the first user.
[0115] In one embodiment, the logic trigger unit 303 further includes:
[0116] an indicator acquisition unit, configured to acquire a learning behavior indicator corresponding to the first learning event;
[0117] a matrix generating unit, configured to generate a gift probability matrix according to the learning behavior indicator;
[0118] The gift generation unit is used to load the virtual gift generation probability based on the gift probability matrix using a random algorithm, and generate gift animation in combination with a dynamic rendering engine; wherein the virtual gifts include rare gifts and common gifts.
[0119] In one embodiment, the virtual gift-based learning interaction device 300 further includes:
[0120] The gift management unit is used to manage the virtual gifts in the virtual backpack by using the Redis expiration key mechanism.
[0121] Since the embodiments of the apparatus part correspond to the embodiments of the method part, please refer to the description of the embodiments of the method part for the embodiments of the apparatus part, and they will not be repeated here.
[0122] The present invention also provides a computer-readable storage medium having a computer program stored thereon. When executed, the computer program can implement the steps provided in the above embodiments. The storage medium can include a USB flash drive, a mobile hard drive, a read-only memory (ROM), a random access memory (RAM), a magnetic disk, or an optical disk, among other media capable of storing program code.
[0123] The present invention also provides a computer device that may include a memory and a processor. The memory stores a computer program, and when the processor calls the computer program in the memory, the steps provided in the above embodiment can be implemented. Of course, the computer device may also include various network interfaces, a power supply, and other components.
[0124] The various embodiments in the specification are described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The same and similar parts between the various embodiments can be referred to each other. For the system disclosed in the embodiment, since it corresponds to the method disclosed in the embodiment, the description is relatively simple, and the relevant parts can be referred to the method part description. It should be pointed out that for ordinary technicians in this technical field, without departing from the principles of this application, several improvements and modifications can be made to this application, and these improvements and modifications also fall within the scope of protection of the claims of this application.
[0125] It should also be noted that, in this specification, relational terms such as first and second, etc., are used only to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any actual relationship or order between these entities or operations. Moreover, the terms "comprises," "comprising," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus comprising a series of elements includes not only those elements, but also other elements not explicitly listed, or elements inherent to such process, method, article, or apparatus. In the absence of further limitations, an element defined by the phrase "comprising a ..." does not exclude the presence of additional identical elements in the process, method, article, or apparatus comprising the element.
Claims
1. A learning interaction method based on virtual gifts, characterized in that: include: Monitor a first learning event of the first user's learning behavior, and store the monitored first learning event in a message queue; Using a gift generation rule engine to determine whether a first learning event in the message queue reaches a preset event threshold; If it is determined that the first learning event in the message queue reaches a preset event threshold, the gift generation logic is triggered, and the corresponding virtual gift is generated using the gift generation logic; The virtual gift is distributed to the virtual backpack preset by the first user.
2. The learning interaction method based on virtual gifts according to claim 1 is characterized in that: Also includes: In response to the first user transferring the virtual gift, determining a corresponding second user and monitoring a second learning event of the second user; Determining whether the second learning event reaches a preset event threshold using the gift generation rule engine; If it is determined that the second learning event reaches a preset event threshold, the virtual gift is distributed to the second user.
3. The learning interaction method based on virtual gifts according to claim 1, characterized in that: The step of monitoring a first learning event on the learning behavior of the first user and storing the monitored first learning event in a message queue includes: Using an event hook function to collect the learning behavior trigger information of the first user to obtain a first learning event; wherein the event hook function is pre-injected into the learning client of the first user; A long connection channel is established with the learning client through the WebSocket protocol, and regular polling is performed to obtain the first learning event and store it in the message queue.
4. The learning interaction method based on virtual gifts according to claim 1, characterized in that: The using of the gift generation rule engine to determine whether the first learning event in the message queue reaches a preset event threshold includes: Obtaining an incentive rule corresponding to the first learning event; wherein the incentive rule includes a learning task condition; comparing the first learning event with the learning task condition; If the first learning event meets the learning task condition, determining that the first learning event reaches a preset event threshold; If the first learning event does not meet the learning task condition, it is determined that the first learning event does not reach a preset event threshold.
5. The learning interaction method based on virtual gifts according to claim 1, characterized in that: If it is determined that the first learning event in the message queue reaches a preset event threshold, the gift generation logic is triggered, and the corresponding virtual gift is generated using the gift generation logic, including: Matching the first learning event using a preset gift indicator to obtain a virtual gift corresponding to the first learning event; The virtual gift is assigned a gift attribute, and the virtual gift is registered and assigned in combination with the first user's virtual backpack.
6. The learning interaction method based on virtual gifts according to claim 1, characterized in that: If it is determined that the first learning event in the message queue reaches a preset event threshold, the gift generation logic is triggered, and the corresponding virtual gift is generated using the gift generation logic, further comprising: Obtaining a learning behavior indicator corresponding to the first learning event; generating a gift probability matrix according to the learning behavior indicator; Based on the gift probability matrix, a random algorithm is used to load the probability of generating virtual gifts, and a dynamic rendering engine is combined to generate gift animations; wherein, the virtual gifts include rare gifts and common gifts.
7. The learning interaction method based on virtual gifts according to claim 1, characterized in that: Also includes: The Redis expiration key mechanism is used to manage the virtual gifts in the virtual backpack.
8. A learning interactive device based on virtual gifts, characterized in that: include: An event monitoring unit, configured to monitor a first learning event of a first user's learning behavior and store the monitored first learning event in a message queue; An event determination unit, configured to determine, using a gift generation rule engine, whether a first learning event in the message queue reaches a preset event threshold; a logic triggering unit, configured to trigger a gift generation logic if it is determined that the first learning event in the message queue reaches a preset event threshold, and generate a corresponding virtual gift using the gift generation logic; The gift distribution unit is used to distribute the virtual gift to the virtual backpack preset by the first user.
9. A computer device, characterized in that: The invention comprises a memory, a processor and a computer program stored in the memory and executable on the processor, wherein when the processor executes the computer program, the learning interaction method based on virtual gifts as described in any one of claims 1 to 7 is implemented.
10. A computer-readable storage medium, characterized in that The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the learning interaction method based on virtual gifts as described in any one of claims 1 to 7 is implemented.
