Method and system for realizing multi-layer drawer rendering

By deploying a drawer status monitoring mechanism and building a tree data structure in multi-layer drawer rendering, the problem of layer setting errors and code complexity is solved, flexibility and scalability are achieved, and user experience and system security are improved.

CN118733920APending Publication Date: 2024-10-01BEIJING XIAOYOU TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410821367.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-06-24
Publication Date
2024-10-01

AI Technical Summary

Technical Problem

The existing technology is error-prone in setting levels in multi-layer drawer rendering, resulting in high code complexity and maintenance costs, a lack of flexibility and scalability, and difficulty in quickly adapting to changes in business needs.

Method used

Deploy the drawer state monitoring mechanism in the initial page, monitor the drawer state and update the hierarchical information, generate a unique identifier through a hybrid encryption algorithm, pass the hierarchical information and identifier to the drawer component, and build a tree data structure for rendering processing.

Benefits of technology

It achieves dynamic response to user interaction and page status changes, ensures hierarchical structure consistency, improves system security and user experience, simplifies hierarchical management and interface layout, and reduces maintenance costs.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118733920A_ABST
    Figure CN118733920A_ABST
Patent Text Reader

Abstract

The invention belongs to the technical field of web front ends, and discloses a method and system for achieving multi-layer drawer rendering, and the method for achieving multi-layer drawer rendering comprises the steps: deploying and configuring a drawer state monitoring mechanism in an initial page; monitoring the states of the drawers in the initial page, and updating hierarchical information of each drawer based on the state of each drawer; and transmitting the hierarchical information and the identifier of each drawer to a drawer assembly corresponding to each drawer, and executing rendering processing for each drawer. According to the invention, the hierarchical information and the identifier of each drawer are transmitted to the corresponding drawer component and rendering processing is executed, so that the hierarchical structure is clear and visible, and a user can intuitively understand the hierarchical and organizational structure of the information, which is very helpful for rapid access of navigation and content.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of web front-end technology, and in particular to a method and system for implementing multi-layer drawer rendering. Background Art

[0002] With the rapid development of Internet technology, the importance of user experience in website and application design has become increasingly prominent. The drawer design pattern came into being and quickly became a popular choice for interface organization. This pattern is particularly suitable for presenting hierarchical information and navigation structures, allowing users to easily explore and quickly locate the required content. Through the drawer design, users can operate the interface in a simple and intuitive manner, and smoothly access multi-level menus or functions without tedious jumps and loading. This not only makes the interface more neat and orderly, but also significantly improves the user's operating efficiency. In addition, the drawer design is also extremely flexible and scalable, and can easily adapt to different screen sizes and device types, ensuring that users can enjoy a consistent and high-quality experience no matter what device they are on.

[0003] The existing technology has the following major defects in multi-layer drawer rendering: in the use scenario of multi-layer drawers, manual setting of the drawer hierarchy is prone to errors; due to the complex hierarchical relationship, it is difficult for manual operation to ensure the accuracy of each setting, which may cause confusion in the drawer display order and affect the user experience. For drawers that are used multiple times, the hierarchy needs to be manually set each time they are used. This not only leads to a large amount of hierarchy setting logic in the code, increasing the complexity of the code, but also when the drawer hierarchy needs to be adjusted or new drawers need to be added, a large amount of code must be modified and tested, significantly increasing the maintenance cost. The practice of manually setting the hierarchy limits the flexibility and scalability of the system; as business needs change or product functions increase, the hard-coded hierarchy setting method is difficult to quickly adapt to these changes.

[0004] Therefore, how to provide a method and system for realizing multi-layer drawer rendering is a problem that needs to be solved urgently. Summary of the invention

[0005] The embodiments of the present invention provide a method and system for implementing multi-layer drawer rendering, so as to solve the problems in the prior art of easy error in hierarchical settings, code redundancy, high maintenance cost, and lack of flexibility and scalability.

[0006] In order to have a basic understanding of some aspects of the disclosed embodiments, a brief summary is given below. This summary is not intended to be a general review, nor is it intended to identify key / important components or to delineate the scope of protection of these embodiments. Its only purpose is to present some concepts in a simple form as a preface to the detailed description that follows.

[0007] According to a first aspect of an embodiment of the present invention, a method for implementing multi-layer drawer rendering is provided.

[0008] In one embodiment, the method for implementing multi-layer drawer rendering includes:

[0009] Deploy and configure the drawer status monitoring mechanism in the initial page;

[0010] Monitor the status of the drawers in the initial page, and update the hierarchical information of each drawer based on the status of each drawer;

[0011] The hierarchical information and identifier of each drawer are passed to the drawer component corresponding to each drawer, and rendering processing is performed for each drawer.

[0012] Preferably, the deploying and configuring the drawer status monitoring mechanism in the initial page includes:

[0013] In the initial page, create and initialize public variables;

[0014] Set an event listener for the open button of each drawer in the initial page;

[0015] Set the callback function used to handle the drawer opening logic in the event listener.

[0016] Preferably, the common variables include: a hierarchical storage variable and an array storage variable, the hierarchical storage variable is used to store the hierarchical information of the currently opened drawer, and the array storage variable is used to store and share the hierarchical information of each drawer.

[0017] Preferably, monitoring the state of the drawers in the initial page and updating the hierarchical information of each drawer based on the state of each drawer includes:

[0018] Use event listeners to monitor whether the user clicks the drawer open button;

[0019] If the user clicks the drawer open button, an identifier is generated for each drawer;

[0020] The callback function in the event listener is used to update the hierarchical storage variables and array storage variables in the public variables respectively.

[0021] Preferably, when the user clicks the drawer open button, generating an identifier for each drawer includes:

[0022] When the user clicks the drawer open button, get the drawer's current level information and timestamp information;

[0023] Combine the drawer's current level information and timestamp information to obtain an information string;

[0024] The obtained information character string is encrypted using a hybrid encryption algorithm to obtain an identifier;

[0025] Associate the obtained identifier with the corresponding drawer.

[0026] Preferably, the method of encrypting the obtained information string using a hybrid encryption algorithm to obtain an identifier includes:

[0027] Use the MD5 algorithm to preliminarily encrypt the information string to obtain initial encrypted data;

[0028] Based on the elliptic curve encryption algorithm, the timestamp information in the information string is encrypted to obtain a random string;

[0029] Perform bitwise XOR operation on the initial encrypted data and the random string to obtain combined data;

[0030] The obtained combined data is encrypted again using the MD5 algorithm to obtain the final identifier.

[0031] Preferably, the encrypting of the timestamp information in the information string based on the elliptic curve encryption algorithm to obtain the random string includes:

[0032] Extracting timestamp information from the information string, inputting the timestamp information into the elliptic curve encryption algorithm, and generating a point set on the elliptic curve;

[0033] From the point set generated on the elliptic curve, remove the points on the coordinate axis and the points at infinity, and randomly select coordinate points;

[0034] Extending the randomly selected coordinate point to a preset character length to obtain an extended coordinate point;

[0035] The obtained extended coordinate points are randomly converted using a pseudo-random number generator to obtain a random character string.

[0036] Preferably, performing a bitwise XOR operation on the initial encrypted data and the random string to obtain the combined data comprises:

[0037] Perform binary conversion on the initial encrypted data and the random character string respectively to obtain binary data;

[0038] Perform bit-by-bit XOR operation on the initial encrypted data and the binary data of the random string to obtain new binary data;

[0039] The new binary data is converted into a preset data format to obtain combined data.

[0040] Preferably, the transferring of the level information and identifier of each drawer to the drawer component corresponding to each drawer, and performing rendering processing for each drawer includes:

[0041] Based on the hierarchical information and identifier of each drawer, a tree data structure is constructed with each drawer as a node;

[0042] The tree data structure is processed using the depth-first traversal method to obtain a structured data group;

[0043] Calculate the rendering position and estimated height of each node based on the structured data group;

[0044] Initialize the drawer component, and based on the rendering position and estimated height of each node, perform rendering operations through the drawer component to display the drawer content on the page.

[0045] According to a second aspect of an embodiment of the present invention, a system for implementing multi-layer drawer rendering is provided.

[0046] In one embodiment, the system for implementing multi-layer drawer rendering includes:

[0047] Deployment configuration module, used to deploy and configure the drawer status monitoring mechanism in the initial page;

[0048] The information update module is used to monitor the status of the drawers in the initial page and update the hierarchical information of each drawer based on the status of each drawer;

[0049] The rendering processing module is used to transfer the level information and identifier of each drawer to the drawer component corresponding to each drawer, and perform rendering processing for each drawer.

[0050] According to a third aspect of an embodiment of the present invention, a computer device is provided.

[0051] In some embodiments, the computer device includes a memory and a processor, the memory stores a computer program, and the processor implements the steps of the above method when executing the computer program.

[0052] The technical solution provided by the embodiment of the present invention may have the following beneficial effects:

[0053] 1. The present invention deploys a drawer status monitoring mechanism on the initial page, which can respond to the user's interactive behavior and changes in page status in real time. This dynamic responsiveness ensures that the user interface can be updated in time, providing a smoother and more responsive user experience. By monitoring and updating the hierarchical information of each drawer based on its status, it can ensure that the display information of all drawer components remains consistent, and the hierarchical information and identifier of each drawer are passed to the corresponding drawer component and rendering processing is performed, so that the hierarchical structure is clearly visible, and the user can intuitively understand the hierarchy and organizational structure of the information, which is very helpful for navigation and quick access to content.

[0054] 2. The present invention encrypts the drawer's hierarchical information and timestamp through a hybrid encryption algorithm to generate a unique identifier, which greatly improves the security of the system. This encryption method combines the MD5 algorithm and the elliptic curve encryption algorithm to make the generated identifier unique.

[0055] 3. The present invention constructs a tree data structure with each drawer as a node, which makes it easy to manage and understand the hierarchical relationship of the entire system. The tree structure can effectively organize and store a large amount of hierarchical information, which is convenient for rapid retrieval and updating. The precise rendering position and estimated height of the node are calculated based on the hierarchy and structured data group of each node, which helps to achieve precise layout of complex interfaces. By dynamically calculating and adjusting the rendering position, the user interface can respond to data changes and user interactions in real time, providing a smoother and more intuitive user experience.

[0056] It is to be understood that both the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the invention. BRIEF DESCRIPTION OF THE DRAWINGS

[0057] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the invention and, together with the description, serve to explain the principles of the invention.

[0058] Figure 1 is a flow chart of a method for implementing multi-layer drawer rendering according to an exemplary embodiment;

[0059] Figure 2 is a principle block diagram of a system for implementing multi-layer drawer rendering according to an exemplary embodiment;

[0060] Figure 3 The figure is a schematic diagram showing the structure of a computer device according to an exemplary embodiment. DETAILED DESCRIPTION

[0061] The following description and accompanying drawings fully illustrate the specific embodiments of this article so that those skilled in the art can practice them. Parts and features of some embodiments may be included in or replace parts and features of other embodiments. The scope of the embodiments of this article includes the entire scope of the claims, as well as all available equivalents of the claims. Herein, the terms "first", "second", etc. are only used to distinguish one element from another, without requiring or implying any actual relationship or order between these elements. In fact, the first element can also be called the second element, and vice versa. Moreover, the terms "include", "comprise" or any other variant thereof are intended to cover non-exclusive inclusion, so that the structure, device or equipment including a series of elements includes not only those elements, but also other elements that are not explicitly listed, or also include elements inherent to such structure, device or equipment. In the absence of more restrictions, the elements defined by the sentence "including one..." do not exclude the existence of other identical elements in the structure, device or equipment including the elements. Each embodiment is described in a progressive manner herein, and each embodiment focuses on the differences from other embodiments, and the same and similar parts between the embodiments can be referred to each other.

[0062] The terms "longitudinal", "lateral", "upper", "lower", "front", "back", "left", "right", "vertical", "horizontal", "top", "bottom", "inside", "outside", etc. in this document indicate the orientation or position relationship based on the orientation or position relationship shown in the drawings, and are only for the convenience of describing this document and simplifying the description, and do not indicate or imply that the device or element referred to must have a specific orientation, be constructed and operate in a specific orientation, and therefore cannot be understood as a limitation on the present invention. In the description of this document, unless otherwise specified and limited, the terms "installed", "connected", and "connected" should be understood in a broad sense, for example, it can be a mechanical connection or an electrical connection, it can also be the internal communication of two elements, it can be a direct connection, or it can be an indirect connection through an intermediate medium. For ordinary technicians in this field, the specific meanings of the above terms can be understood according to specific circumstances.

[0063] As used herein, the term "plurality" means two or more than two, unless otherwise specified.

[0064] In this document, the character " / " indicates that the preceding and following objects are in an "or" relationship. For example, A / B means: A or B.

[0065] In this article, the term "and / or" is a description of the association relationship between objects, indicating that three relationships may exist. For example, A and / or B means: A or B, or, A and B.

[0066] It should be understood that, although the various steps in the flow chart are displayed in sequence according to the indication of the arrows, these steps are not necessarily executed in sequence according to the order indicated by the arrows. Unless there is a clear description in this article, the execution of these steps is not strictly limited in order, and these steps can be executed in other orders. Moreover, at least a portion of the steps in the figure may include multiple sub-steps or multiple stages, and these sub-steps or stages are not necessarily executed at the same time, but can be executed at different times, and the execution order of these sub-steps or stages is not necessarily to be carried out in sequence, but can be executed in turn or alternately with other steps or at least a portion of the sub-steps or stages of other steps.

[0067] Each module in the device or system of the present application can be implemented in whole or in part by software, hardware, or a combination thereof. The above modules can be embedded in or independent of a processor in a computer device in the form of hardware, or can be stored in a memory in a computer device in the form of software, so that the processor can call and execute operations corresponding to the above modules.

[0068] In the absence of conflict, the embodiments of the present invention and the features of the embodiments may be combined with each other.

[0069] Figure 1 An embodiment of a method for implementing multi-layer drawer rendering of the present invention is shown.

[0070] In this optional embodiment, the method for implementing multi-layer drawer rendering includes:

[0071] Step S101, deploying and configuring a drawer status monitoring mechanism in the initial page;

[0072] Step S103, monitoring the state of the drawers in the initial page, and updating the level information of each drawer based on the state of each drawer;

[0073] Step S105 , transferring the level information and identifier of each drawer to the drawer component corresponding to each drawer, and performing rendering processing for each drawer.

[0074] In this optional embodiment, deploying and configuring the drawer status monitoring mechanism in the initial page includes:

[0075] In the initial page, create and initialize public variables; set event listeners for the open buttons of each drawer in the initial page; set callback functions for processing the drawer opening logic in the event listeners.

[0076] It should be noted that setting an event listener for the open button of each drawer in the initial page includes: determining which elements in the page are the open buttons of the drawer; for each open button, adding an event listener, which will be activated when the button is clicked, usually using JavaScript (an advanced, interpreted programming language) to complete.

[0077] In addition, setting a callback function for processing the drawer opening logic in the event listener includes: determining the specific operation that the callback function needs to perform and creating the callback function, for the drawer open button event, using it as the event type to be listened, and using the event listening function in JavaScript to bind the callback function to the click event of each open button.

[0078] In this optional embodiment, the common variables include: a hierarchical storage variable and an array storage variable, the hierarchical storage variable is used to store the hierarchical information of the currently opened drawer, and the array storage variable is used to store and share the hierarchical information of each drawer.

[0079] In this optional embodiment, monitoring the status of the drawer in the initial page and updating the hierarchical information of each drawer based on the status of each drawer includes: monitoring whether the user clicks the drawer open button through an event listener; if the user clicks the drawer open button, generating an identifier for each drawer; and using the callback function in the event listener to respectively update the hierarchical storage variables and array storage variables in the common variables.

[0080] It should be noted that in the callback function, in addition to processing changes in the interface (such as the opening action of the drawer), it is also necessary to update related data storage variables. Specifically, it includes:

[0081] The level storage variable records the level information of the currently active drawer. When the user opens a new drawer, this variable is updated to reflect the latest level status.

[0082] The array stores variables. This array maintains the hierarchical information of all drawers for sharing and reference in the entire application or page. Each time the drawer state changes, the corresponding array elements should also be updated to ensure data consistency and accuracy.

[0083] In this optional embodiment, if the user clicks the drawer open button, generating an identifier for each drawer includes: when the user clicks the drawer open button, obtaining the current level information and timestamp information of the drawer; combining the current level information and timestamp information of the drawer to obtain an information string; encrypting the obtained information string using a hybrid encryption algorithm to obtain an identifier; and associating the obtained identifier with the corresponding drawer.

[0084] It should be noted that when the user clicks the drawer open button, the current level information of the drawer must be obtained first. The level information can usually be the position of the drawer in the page or a specific path in a drawer component tree. At the same time, the timestamp information of the click is obtained. The timestamp can be accurate to milliseconds to ensure that the generated identifier is unique. The drawer's level information and timestamp information are combined to form an information string. This string will contain two parts of the drawer's level and timestamp data, which can be connected with a specific delimiter.

[0085] In this optional embodiment, the method of encrypting the obtained information string using a hybrid encryption algorithm to obtain an identifier includes: preliminarily encrypting the information string using an MD5 algorithm to obtain initial encrypted data; encrypting the timestamp information in the information string based on an elliptic curve encryption algorithm to obtain a random string; performing a bitwise XOR operation on the initial encrypted data and the random string to obtain combined data; and encrypting the obtained combined data again using the MD5 algorithm to obtain a final identifier.

[0086] It should be noted that MD5 (Message-Digest Algorithm 5) is a widely used cryptographic hash function that can receive data input of any length and generate a hash value of a fixed length (usually 128 bits). This hash value is usually expressed as 32 hexadecimal digits.

[0087] In this optional embodiment, the timestamp information in the information string is encrypted based on the elliptic curve encryption algorithm to obtain a random string, including: extracting the timestamp information from the information string, inputting the timestamp information into the elliptic curve encryption algorithm, and generating a point set on the elliptic curve; from the point set generated on the elliptic curve, removing points on the coordinate axis and points at infinity, and randomly selecting coordinate points; extending the randomly selected coordinate points to a preset character length to obtain extended coordinate points; and using a pseudo-random number generator to randomly transform the obtained extended coordinate points to obtain a random string.

[0088] It should be noted that the timestamp information is extracted from the information string. The timestamp is a number. The extracted timestamp information is used as input data for the elliptic curve encryption algorithm. In elliptic curve encryption, the input data is usually used as a parameter to generate points on the elliptic curve. Each point on the elliptic curve has an x ​​coordinate and a y coordinate. By inputting the timestamp information, the corresponding point set on the elliptic curve is calculated. These points satisfy the elliptic curve equation y 2 =x 3+ax+b (where a and b are the parameters of the elliptic curve). The point set includes all possible solutions, that is, all valid (x, y) pairs; remove the points on the coordinate axis (that is, x or y is 0) and the points at infinity from the generated point set, and then randomly select a coordinate point from the remaining valid points. Extending the randomly selected coordinate point (x, y) to a preset character length usually involves formatting the coordinate value so that its length meets specific requirements or ranges; using a pseudo-random number generator to further randomly process the extended coordinate point to obtain a random string. This process includes transforming, reordering, or other methods to increase randomness of the coordinate point numbers.

[0089] In this optional embodiment, the bitwise XOR operation of the initial encrypted data and the random string to obtain the combined data includes: performing binary conversion on the initial encrypted data and the random string respectively to obtain binary data; performing a bitwise XOR operation on the binary data of the initial encrypted data and the random string to obtain new binary data; and converting the new binary data into a predetermined data format to obtain the combined data.

[0090] It should be noted that converting the initial encrypted data and the random string into binary form involves converting each character or number into its corresponding binary representation. For example, if text or hexadecimal data is used, each character will correspond to a binary number of a certain length. Once the binary form of the two sets of data is available, they can be XORed bit by bit. The rules of the XOR operation are:

[0091] If the two bits are the same (both 0 or both 1), the result is 0.

[0092] If the two bits are different (one is 0 and the other is 1), the result is 1.

[0093] After completing the XOR operation, a new string of binary data will be obtained. Next, the binary data needs to be converted back to a more useful format, usually hexadecimal or directly converted into ASCII text (text composed of characters in the ASCII character set, which is a character encoding standard used to represent English characters, numbers and special symbols).

[0094] In this optional embodiment, the hierarchical information and identifier of each drawer are passed to the drawer component corresponding to each drawer, and rendering processing is performed for each drawer, including: based on the hierarchical information and identifier of each drawer, a tree data structure is constructed with each drawer as a node; the tree data structure is processed using a depth-first traversal method to obtain a structured data group; the rendering position and estimated height of each node are calculated based on the structured data group; the drawer component is initialized, and based on the rendering position and estimated height of each node, a rendering operation is performed through the drawer component to display the drawer content on the page.

[0095] It should be noted that, based on the hierarchical information and identifier of each drawer, each drawer is regarded as a node and a tree data structure is constructed. Each node stores information about the drawer, including its identifier, hierarchy, and any related metadata. Starting from the top-level drawer, each drawer is correctly linked to its parent drawer node according to the hierarchical information to form a complete tree structure.

[0096] The tree data structure is traversed using the depth-first traversal (DFS) method, starting from the root node, recursively accessing all child nodes of each node until a leaf node is reached. During the traversal process, additional information of each drawer, such as rendering priority or dependency, can be calculated or updated.

[0097] It should be noted that the level information of each node is the basis for calculating its rendering position. The level of the node determines its vertical position (depth) and possible horizontal position (for example, the position of the child node relative to the parent node) on the interface.

[0098] In addition, the horizontal position is usually determined by the node's hierarchical depth. For example, in a tree-structured view, each time a level is added, the node may move to the right by a fixed indentation amount, setting a basic indentation value, such as 20 pixels; the node's hierarchical depth multiplied by the basic indentation gives the total indentation value.

[0099] The vertical position can be calculated by accumulating the heights of all previous nodes. For each new node, its top position is the bottom position of the previous node plus a fixed interval. Starting from the root node, the height of each node and all its child nodes is accumulated. A fixed interval, such as 10 pixels, can be set to avoid overlap between nodes.

[0100] The estimated height of a node can be calculated based on the amount of content it contains. For example, a node with a lot of text or multiple controls will require a taller space.

[0101] Figure 2 An embodiment of a system for implementing multi-layer drawer rendering of the present invention is shown.

[0102] In this optional embodiment, the system for implementing multi-layer drawer rendering includes:

[0103] Deployment configuration module 201, used to deploy and configure the drawer status monitoring mechanism in the initial page;

[0104] The information updating module 203 is used to monitor the state of the drawers in the initial page and update the hierarchical information of each drawer based on the state of each drawer;

[0105] The rendering processing module 205 is used to transfer the level information and identifier of each drawer to the drawer component corresponding to each drawer, and perform rendering processing for each drawer.

[0106] In one embodiment, a computer device is provided. The computer device may be a server, and its internal structure diagram may be as follows: Figure 3 As shown. The computer device includes a processor, a memory and a network interface connected through a system bus. Among them, the processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program and a database. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The database of the computer device is used to store static information and dynamic information data. The network interface of the computer device is used to communicate with an external terminal through a network connection. When the computer program is executed by the processor, the steps in the above method embodiment are implemented.

[0107] Those skilled in the art will understand that Figure 3 The structure shown in the figure is only a block diagram of a part of the structure related to the solution of the present invention, and does not constitute a limitation on the computer device to which the solution of the present invention is applied. The specific computer device may include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.

[0108] In addition, the present invention also provides a computer device, including a memory and a processor, wherein a computer program is stored in the memory, and the processor implements the steps in the above method embodiment when executing the computer program.

[0109] In addition, the present invention further provides a computer-readable storage medium on which a computer program is stored. When the computer program is executed by a processor, the steps in the above method embodiment are implemented.

[0110] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to memory, storage, database or other media used in the embodiments provided by the present invention can include at least one of non-volatile and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory or optical memory, etc. Volatile memory can include random access memory (RAM) or external cache memory. As an illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM).

[0111] The present invention is not limited to the structures which have been described above and shown in the drawings, and various modifications and changes may be made without departing from the scope thereof. The scope of the present invention is limited only by the appended claims.

Claims

1. A method for implementing multi-layer drawer rendering, characterized in that: The method for implementing multi-layer drawer rendering includes: Deploy and configure the drawer status monitoring mechanism in the initial page; Monitor the status of the drawers in the initial page, and update the hierarchical information of each drawer based on the status of each drawer; The hierarchical information and identifier of each drawer are passed to the drawer component corresponding to each drawer, and rendering processing is performed for each drawer.

2. The method for implementing multi-layer drawer rendering according to claim 1, characterized in that: The deployment and configuration of the drawer status monitoring mechanism in the initial page includes: In the initial page, create and initialize public variables; Set an event listener for the open button of each drawer in the initial page; Set the callback function used to handle the drawer opening logic in the event listener.

3. The method for implementing multi-layer drawer rendering according to claim 2, characterized in that: The common variables include: a hierarchical storage variable and an array storage variable, the hierarchical storage variable is used to store the hierarchical information of the currently opened drawer, and the array storage variable is used to store and share the hierarchical information of each drawer.

4. The method for implementing multi-layer drawer rendering according to claim 1, characterized in that: The monitoring of the state of the drawers in the initial page and updating the hierarchical information of each drawer based on the state of each drawer includes: Use event listeners to monitor whether the user clicks the drawer open button; If the user clicks the drawer open button, an identifier is generated for each drawer; The callback function in the event listener is used to update the hierarchical storage variables and array storage variables in the public variables respectively.

5. The method for implementing multi-layer drawer rendering according to claim 4, characterized in that: When the user clicks the drawer open button, generating an identifier for each drawer includes: When the user clicks the drawer open button, get the drawer's current level information and timestamp information; Combine the drawer's current level information and timestamp information to obtain an information string; The obtained information character string is encrypted using a hybrid encryption algorithm to obtain an identifier; The obtained identifier is associated with the corresponding drawer.

6. The method for implementing multi-layer drawer rendering according to claim 5, characterized in that: The information string is encrypted using a hybrid encryption algorithm to obtain an identifier including: Use the MD5 algorithm to preliminarily encrypt the information string to obtain initial encrypted data; Based on the elliptic curve encryption algorithm, the timestamp information in the information string is encrypted to obtain a random string; Perform bitwise XOR operation on the initial encrypted data and the random string to obtain combined data; The obtained combined data is encrypted again using the MD5 algorithm to obtain the final identifier.

7. The method for implementing multi-layer drawer rendering according to claim 6, characterized in that: The elliptic curve encryption algorithm is used to encrypt the timestamp information in the information string to obtain a random string including: Extracting timestamp information from the information string, inputting the timestamp information into the elliptic curve encryption algorithm, and generating a point set on the elliptic curve; From the point set generated on the elliptic curve, remove the points on the coordinate axis and the points at infinity, and randomly select coordinate points; Extending the randomly selected coordinate point to a preset character length to obtain an extended coordinate point; The obtained extended coordinate points are randomly converted using a pseudo-random number generator to obtain a random character string.

8. The method for implementing multi-layer drawer rendering according to claim 1, characterized in that: The initial encrypted data and the random string are subjected to a bitwise XOR operation to obtain the combined data, which includes: Perform binary conversion on the initial encrypted data and the random character string respectively to obtain binary data; Perform bit-by-bit XOR operation on the initial encrypted data and the binary data of the random string to obtain new binary data; The new binary data is converted into a preset data format to obtain combined data.

9. The method for implementing multi-layer drawer rendering according to claim 1, characterized in that: The step of transferring the level information and identifier of each drawer to the drawer component corresponding to each drawer and performing rendering processing for each drawer includes: Based on the hierarchical information and identifier of each drawer, a tree data structure is constructed with each drawer as a node; The tree data structure is processed using the depth-first traversal method to obtain a structured data group; Calculate the rendering position and estimated height of each node based on the structured data group; Initialize the drawer component, and based on the rendering position and estimated height of each node, perform rendering operations through the drawer component to display the drawer content on the page.

10. A system for implementing multi-layer drawer rendering, characterized in that: The system for implementing multi-layer drawer rendering includes: Deployment configuration module, used to deploy and configure the drawer status monitoring mechanism in the initial page; The information update module is used to monitor the status of the drawers in the initial page and update the hierarchical information of each drawer based on the status of each drawer; The rendering processing module is used to transfer the level information and identifier of each drawer to the drawer component corresponding to each drawer, and perform rendering processing for each drawer.