Method and device for processing unlocking breakthrough control mode
By employing high-performance storage media and linked lists to manage activity paths separately from databases, the method addresses scalability and efficiency issues in online teaching systems, ensuring efficient unlocking and level-breaking control.
Patent Information
- Application Number
- CN202411082704.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-08
- Publication Date
- 2024-12-06
AI Technical Summary
Existing online teaching systems face scalability issues and low efficiency in managing unlocking and level-breaking control due to storage bottlenecks and poor business scalability with current path table storage methods, particularly when dealing with large volumes of activities.
Implementing a method that uses high-performance storage media like Redis, Memcached, or TiDB to store activity path information in a linked list format, separate from the database, and utilizing an activity information storage module to manage basic activity data, enhancing scalability and data processing speed.
This approach overcomes storage limitations, improves scalability, and accelerates data processing by using high-performance storage media and linked lists, enabling efficient unlocking and level-breaking control with reduced risk of activity deadlocks.
Smart Images

Figure CN119088802A_ABST
Abstract
Description
Technical Field
[0001] The present application belongs to the field of software technology, and specifically relates to a method and device for processing an unlocking and level-breaking control mode. Background Art
[0002] In existing online teaching systems, course arrangements generally have a certain set order, such as following the order of the syllabus, or following a process from easy to difficult, with a series of activities. In order to enable students to study according to the predetermined learning route, some locking functions will be set before each activity can be used. Students can only enter the activity to study after meeting the unlocking conditions, such as Figure 1 As shown in the figure: Activity 1 (learning the material) must be completed before Activity 2 (test assessment) can be completed. To this end, when recording activity information, the online teaching system must record the association between each activity, that is, the sequential path in which the activities can be used.
[0003] In the prior art, a path table is generally used to record the activity path. The pseudo code of the table structure is as follows:
[0004]
[0005] The specific activity path content is stored in the database table. The sample activity relationship storage table structure is as follows:
[0006] Table 1 Activity path database table of existing technical solutions
[0007] Primary key (id) Activity name (name) Prefix id (pre_id) path 1 Activity 1 0 1 2 Activity 2 1 1-2 3 Activity 3 2 1-2-3
[0008] The existing technical solutions can solve the following problems based on the current activity ID:
[0009] 1. Obtain complete link data of upstream dependencies;
[0010] 2. Determine whether there is a dependency loop to avoid activity deadlock.
[0011] However, according to the existing storage method, as the activity volume increases, there will always be a storage bottleneck upper limit, and business scalability is poor.
[0012] Taking the text field type in MySQL as an example, it can hold up to 64KB, about 65535 characters. The storage content of the Path field is in the form of "23006161-23004355-23004417". If the ID length is 8 bits, plus the connector '-', and the utf8mb4 encoding format, the maximum number of activity IDs that can be stored is about: 65535 / (8+1)*4=1820. With the continuous growth of the teaching system, the implementation method of the existing technical solution has the problems of poor scalability and low business processing efficiency. Summary of the invention
[0013] The purpose of this application is to overcome the defects of poor scalability and low efficiency of the existing method for processing the unlocking and level-breaking control mode.
[0014] In order to achieve the above purpose, the present application proposes a method for processing an unlocking and level-breaking control mode, the method comprising:
[0015] Use a database to store basic information about activities;
[0016] Use high-performance storage media to store active path information;
[0017] The complete information of the activity is formed by combining the basic information and path information of the activity, which is used for unlocking and passing the level control.
[0018] As an improvement of the above method, the basic information of the activity includes: an activity primary key, an activity name, and a primary key of a preceding activity of the activity.
[0019] As an improvement to the above method, a link method is used to store the path information of the activity; the key of the linked list node is the activity primary key, and the value of the linked list node is the path of the activity.
[0020] As an improvement of the above method, the high-performance storage medium is Redis, Memcached, Cassandra or TiDB.
[0021] The present application also provides a device for processing an unlocking and level-breaking control mode, which is implemented based on the above method, and the device includes:
[0022] An activity information storage module is used to store basic information of activities in a database;
[0023] An activity path storage module, used for storing activity path information in a high-performance storage medium;
[0024] The activity processing module is used to combine the database and high-performance storage media to perform unlocking and level-breaking control.
[0025] Compared with the prior art, the advantages of this application are:
[0026] 1. This application uses high-performance storage media to replace the database field storage path information, which overcomes the length limit of the database table field and improves scalability;
[0027] 2. This application uses a linked list to store path information, which improves data processing speed. BRIEF DESCRIPTION OF THE DRAWINGS
[0028] Figure 1Shown is a schematic diagram of the chain and locking relationship between activities;
[0029] Figure 2 Shown is a schematic diagram of the activity relationship of Example 1;
[0030] Figure 3 The figure shows a schematic diagram of using a linked list to save the content of the activity path;
[0031] Figure 4 Shown is a schematic diagram of the closed loop of the activity path. DETAILED DESCRIPTION
[0032] The technical solution of the present application is described in detail below with reference to the accompanying drawings.
[0033] According to the development route of the existing technology, the idea to solve the existing problem is to change the path field in the table structure to a field type that can store larger capacity in the database, such as clob, blob, etc. After using a large-capacity field type, the problem of too long activity chain can be solved, but these large-capacity field types are many times less efficient than ordinary fields when processing, and cannot support functions such as retrieval.
[0034] To this end, the present application proposes a method and device for processing an unlocking and level-breaking control mode, introduces a high-performance storage medium, processes the content of the path field separately, improves the flexibility of expanding the number of unlocking and level-breaking activities, and improves the speed of data processing.
[0035] Example 1
[0036] The methods for handling unlocking the level control mode include:
[0037] Adjust the original path table to only record the dependency between two adjacent nodes and remove the path field. The table structure pseudo code is as follows:
[0038]
[0039] The activity path database table structure is shown in the following table:
[0040] Table 2 Activity path database table
[0041]
[0042]
[0043] The corresponding activity relationship is as follows Figure 2 shown.
[0044] The active path content is saved in a high-performance storage medium such as Redis in the form of a linked list. The content stored in each linked list node includes:
[0045] Key: Active node ID;
[0046] Value: The path of the activity ID that the upstream activity depends on.
[0047] The activity path is stored as Figure 3 As shown, the linked list has flexible storage and retrieval methods and can flexibly process the data in the linked list.
[0048] Compared with databases, Redis query efficiency is improved. At the same time, according to the specified activity node ID, it is very convenient to obtain the complete link data of the upstream dependency, and the complete dependency link activity data can be displayed according to business needs. When changing the unlocking conditions of an activity, you can determine in advance whether there is a dependency closed loop to avoid activity deadlock. For example, when modifying the path, the path of activity 3 is: activity 1--》activity 2--》activity 3--》activity 1 (such as Figure 4 As shown); through the duplicate checking algorithm, it is easy to find that the path has closed loop and deadlock problems.
[0049] In addition to Redis, other high-performance storage media that can be used include Memcached, Cassandra, TiDB and other KV storage databases, all of which can achieve the same effect.
[0050] Example 2
[0051] The present application also provides a device for processing an unlocking and level-breaking control mode, which is implemented based on the above method, and the device includes:
[0052] An activity information storage module is used to store basic information of activities in a database table;
[0053] An activity path storage module, used for storing activity path information in a high-performance storage medium;
[0054] The activity processing module is used to combine the database table and high-performance storage media to perform unlocking and level-breaking control. The functions of unlocking and level-breaking control include reading, adding, modifying and deadlock judgment of the activity path.
[0055] The present application may also provide a computer device, comprising: at least one processor, a memory, at least one network interface and a user interface. The various components in the device are coupled together through a bus system. It is understood that the bus system is used to achieve connection and communication between these components. In addition to the data bus, the bus system also includes a power bus, a control bus and a status signal bus.
[0056] The user interface may include a display, a keyboard or a pointing device, such as a mouse, a trackball, a touch pad or a touch screen.
[0057] It is understood that the memory in the embodiments disclosed in the present application may be a volatile memory or a non-volatile memory, or may include both volatile and non-volatile memories. Among them, the non-volatile memory may be a read-only memory (ROM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), an electrically erasable programmable read-only memory (EEPROM), or a flash memory. The volatile memory may be a random access memory (RAM), which is used as an external cache. By way of example and not limitation, many forms of RAM are available, such as static random access memory (SRAM), dynamic random access memory (DRAM), synchronous dynamic random access memory (SDRAM), double data rate synchronous dynamic random access memory (DDRSDRAM), enhanced synchronous dynamic random access memory (ESDRAM), synchronous link dynamic random access memory (SLDRAM), and direct memory bus random access memory (DRRAM). The memories described herein are intended to include, but are not limited to, these and any other suitable types of memories.
[0058] In some embodiments, the memory stores the following elements, executable modules or data structures, or a subset thereof, or an extended set thereof: an operating system and applications.
[0059] The operating system includes various system programs, such as a framework layer, a core library layer, a driver layer, etc., which are used to implement various basic services and process hardware-based tasks. The application includes various application programs, such as a media player (Media Player), a browser (Browser), etc., which are used to implement various application services. The program for implementing the method of the embodiment of the present disclosure can be included in the application.
[0060] In the above embodiment, the processor may also call a program or instruction stored in the memory, specifically, a program or instruction stored in an application program, and is used to:
[0061] Execute the steps of the above method.
[0062] The above method can be applied to a processor or implemented by a processor. The processor may be an integrated circuit chip with signal processing capabilities. In the implementation process, each step of the above method can be completed by an integrated logic circuit of hardware in the processor or an instruction in the form of software. The above processor may be a general processor, a digital signal processor (Digital Signal Processor, DSP), an application specific integrated circuit (Application Specific Integrated Circuit, ASIC), a field programmable gate array (Field Programmable Gate Array, FPGA) or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components. The above-disclosed methods, steps and logic block diagrams can be implemented or executed. The general processor may be a microprocessor or the processor may also be any conventional processor, etc. The steps of the above-disclosed method can be directly embodied as a hardware decoding processor to execute, or the hardware and software modules in the decoding processor are combined to execute. The software module can be located in a mature storage medium in the field such as a random access memory, a flash memory, a read-only memory, a programmable read-only memory or an electrically erasable programmable memory, a register, etc. The storage medium is located in the memory, and the processor reads the information in the memory and completes the steps of the above method in combination with its hardware.
[0063] It is understood that the embodiments described in the present application can be implemented by hardware, software, firmware, middleware, microcode or a combination thereof. For hardware implementation, the processing unit can be implemented in one or more application specific integrated circuits (ASIC), digital signal processors (DSP), digital signal processing devices (DSPD), programmable logic devices (PLD), field programmable gate arrays (FPGA), general-purpose processors, controllers, microcontrollers, microprocessors, other electronic units for performing the functions described in the present application or a combination thereof.
[0064] For software implementation, the technology of the present application can be implemented by executing the functional modules (such as procedures, functions, etc.) of the present application. The software code can be stored in a memory and executed by a processor. The memory can be implemented in the processor or outside the processor.
[0065] The present application may also provide a non-volatile storage medium for storing a computer program. When the computer program is executed by a processor, each step in the above method embodiment can be implemented.
[0066] Finally, it should be noted that the above embodiments are only used to illustrate the technical solution of the present application and are not intended to limit it. Although the present application is described in detail with reference to the embodiments, a person skilled in the art should understand that any modification or equivalent replacement of the technical solution of the present application does not depart from the spirit and scope of the technical solution of the present application and should be included in the scope of the claims of the present application.
Claims
1. A method for processing an unlocking and breaking through control mode, the method include: Use a database to store basic information about activities; Use high-performance storage media to store active path information; The complete information of the activity is formed by combining the basic information and path information of the activity, which is used for unlocking and passing the level control.
2. The method for processing the unlocking control mode according to claim 1, It is characterized in that The basic information of the activity includes: an activity primary key, an activity name, and a primary key of a preceding activity of the activity.
3. The method for processing the unlocking control mode according to claim 1, It is characterized in that The path information of the activity is stored in a linked manner; the key of the linked list node is the activity primary key, and the value of the linked list node is the path of the activity.
4. The method for processing the unlocking control mode according to claim 1, It is characterized in that The high-performance storage medium is Redis, Memcached, Cassandra or TiDB.
5. A device for processing unlocking and level-breaking control mode, implemented based on any of the methods of claims 1-4, wherein the device include: An activity information storage module is used to store basic information of activities in a database; An activity path storage module, used for storing activity path information in a high-performance storage medium; and The activity processing module is used to combine the database and high-performance storage media to perform unlocking and level-breaking control.
