A method and system for implementing a front-end data dictionary
By determining the URL path of the loaded page and matching it with the data dictionary path, and controlling the threshold for the number of data dictionary entries, the problem of unbalanced data dictionary implementation methods in existing technologies is solved, achieving a balance between response time and memory usage, and improving user experience and system performance.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- CHINA CONSTRUCTION BANK
- Filing Date
- 2022-09-16
- Publication Date
- 2026-06-09
AI Technical Summary
Existing technologies for implementing data dictionaries struggle to balance user needs, leading to imbalances in response time and memory usage, which negatively impact system performance and user experience.
By determining whether the URL path of the loaded page belongs to the already loaded data dictionary path, if it does not, the dictionary path required by the user is matched according to the URL path, the data dictionary information is loaded and the DOM control is rendered. After rendering is completed, if the number of loaded data dictionary entries reaches the threshold, loading stops, thus achieving a balance between response time and memory usage.
It achieves a balance between response time and memory usage, improves the applicability of the data dictionary implementation method, and enhances user experience and system performance.
Smart Images

Figure CN115470434B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of data processing technology, specifically to a method and system for implementing a front-end data dictionary. Background Technology
[0002] A data dictionary is a centralized repository of relevant data. It defines and describes data items, data structures, etc. Data dictionaries are widely used in front-end business and management projects. As an indispensable part of various front-end systems, improper use can have disastrous consequences on system performance and user experience. How to load data on demand is currently a major research direction.
[0003] Current data dictionary implementation technologies mainly include two aspects. The first is to load the data dictionary through a single request, which results in significant latency in the front-end experience when there is a large number of concurrent users. The second is to use business tables to associate with dictionary tables. When a table has five fields that need to be interpreted by the data dictionary, the dictionary table needs to be associated five times. When faced with a large amount of data dictionary loading, this consumes a lot of front-end memory, places high demands on database performance, and results in a poor user experience.
[0004] In summary, the existing technologies suffer from poor applicability due to the difficulty in balancing user needs, memory usage, and response time in implementing data dictionaries. Summary of the Invention
[0005] This application provides a method and system for implementing a front-end data dictionary, aiming to solve the technical problem in the prior art where the implementation of data dictionaries is difficult to balance user needs, memory, and response time, resulting in poor applicability of the data dictionary implementation methods.
[0006] In view of the above problems, this application provides a method and system for implementing a front-end data dictionary.
[0007] Firstly, this application provides a method for implementing a front-end data dictionary, wherein the method is applied to a front-end data dictionary implementation system, and the method includes: determining whether the URL path of the loading page satisfies the loaded dictionary path; if not, inputting the URL path of the loading page into a dictionary path hierarchy index file to generate a dictionary path matching result, wherein the dictionary path matching result belongs to the Nth level dictionary path; inputting the dictionary path matching result into a data dictionary storage file, loading the Nth level data dictionary file to render the DOM control of the loading page; after rendering is completed, determining whether the total number of loaded data dictionary entries satisfies the data dictionary entry count threshold; if so, generating a loading termination instruction.
[0008] Secondly, this application provides a front-end data dictionary implementation system, wherein the system includes: a first judgment module, used to judge whether the URL path of the loading page satisfies the loaded dictionary path; a first execution module, used to, if not satisfied, input the URL path of the loading page into a dictionary path hierarchy index file to generate a dictionary path matching result, wherein the dictionary path matching result belongs to the Nth level dictionary path; a data loading module, used to input the dictionary path matching result into a data dictionary storage file to load the Nth level data dictionary file and render the DOM controls of the loading page; a second judgment module, used to, after rendering is completed, judge whether the total number of loaded data dictionary entries satisfies the data dictionary entry count threshold; and a second execution module, used to, if satisfied, generate a loading termination instruction.
[0009] Thirdly, this application provides an electronic device including a processor and a memory; the memory is used to store a computer program; the processor is used to execute the steps of the method described in any one of the first aspects by invoking the computer program stored in the memory.
[0010] Fourthly, this application provides a computer program product, including a computer program and / or instructions, which, when executed by a processor, implement the steps of the method described in any one of the first aspects.
[0011] One or more technical solutions provided in this application have at least the following technical effects or advantages:
[0012] By determining whether the URL path of the loading page belongs to the already loaded data dictionary path, if it does not, the path corresponding to the dictionary data required by the user is matched according to the URL path of the loading page. Then, the data dictionary information is loaded according to the matched dictionary path to render the DOM control of the loading page. After rendering is completed, if the number of loaded data dictionary entries meets the data dictionary entry threshold, loading stops, thus ensuring a balance between response time and memory usage. This achieves the technical goal of balancing user needs, response time, and memory usage, and improves the applicability of the data dictionary implementation method.
[0013] The above description is only an overview of the technical solution of this application. In order to better understand the technical means of this application and to implement it in accordance with the contents of the specification, and to make the above and other objects, features and advantages of this application more obvious and understandable, the following are specific embodiments of this application. Attached Figure Description
[0014] Figure 1 This application provides a flowchart illustrating a front-end data dictionary implementation method.
[0015] Figure 2This application provides a schematic diagram of the process flow before dictionary path matching results are matched in a front-end data dictionary implementation method;
[0016] Figure 3 This application provides a flowchart illustrating the process of controlling the total number of data dictionary entries in a front-end data dictionary implementation method.
[0017] Figure 4 This application provides a schematic diagram of the system architecture for implementing a front-end data dictionary;
[0018] Figure 5 This is a schematic diagram of the structure of an exemplary electronic device of this application.
[0019] Explanation of reference numerals in the attached drawings: First judgment module 11, first execution module 12, data loading module 13, second judgment module 14, second execution module 15, electronic device 300, memory 301, processor 302, communication interface 303, bus architecture 304. Detailed Implementation
[0020] The overall concept of the technical solution provided in this application is as follows:
[0021] This application provides a method and system for implementing a front-end data dictionary. By determining whether the URL path of the loading page belongs to an already loaded data dictionary path, if not, the system matches the path corresponding to the dictionary data needed by the user based on the loading page's URL path. Then, it loads the data dictionary information based on the matched dictionary path and renders the DOM controls of the loading page. After rendering, if the number of loaded data dictionary entries meets the data dictionary entry threshold, loading stops, thus ensuring a balance between response time and memory usage. This achieves the technical objective of balancing user needs, response time, and memory consumption, and improves the applicability of the data dictionary implementation method.
[0022] After introducing the basic principles of this application, various non-limiting embodiments of this application will be described in detail below with reference to the accompanying drawings.
[0023] Example 1
[0024] like Figure 1 As shown, this application provides a method for implementing a front-end data dictionary, wherein the method is applied to a front-end data dictionary implementation system, and the method includes the following steps:
[0025] S100: Determine if the URL path of the loaded page satisfies the path of the already loaded dictionary;
[0026] Furthermore, the determination of whether the URL path of the loaded page satisfies the loaded dictionary path also includes step S900, which includes the following steps:
[0027] S910: If satisfied, retrieve the data dictionary information based on the loaded dictionary path and render the DOM control of the loaded page.
[0028] Specifically, a URL, or Uniform Resource Locator, is a method used by the World Wide Web services to specify the location of information. Every file on the Internet has a unique URL, containing information indicating the file's location. The loading page URL path refers to the URL locator data representing the URL of the webpage being loaded. The loaded dictionary path refers to the URL path corresponding to data dictionary information that has already been loaded. Data dictionary information is a dataset that specifically describes and interprets various data items on the loading page. The loading page DOM controls refer to the DOM, which is the standard model used to represent objects in a document on a webpage. This means that the DOM controls can be rendered using the content of the data dictionary, thus obtaining the specific document object representation of the data dictionary on the loading page.
[0029] The loading page URL path is compared with the loaded dictionary path. If they do not match, it is recorded that the loading page URL path does not satisfy the loaded dictionary path, and further calls are needed in the next step. If they match, it means that the URL path of the loaded data dictionary information is consistent with the loading page URL path. It is recorded that the loading page URL path satisfies the loaded dictionary path, and the data dictionary information corresponding to the loaded dictionary path can be directly called to render the DOM control of the loading page, thereby realizing the process of loading various data files on the page.
[0030] S200: If not satisfied, input the loaded page URL path into the dictionary path hierarchy index file to generate a dictionary path matching result, wherein the dictionary path matching result belongs to the Nth level dictionary path;
[0031] Furthermore, such as Figure 2 As shown, if the condition is not met, the URL path of the loaded page is input into the dictionary path hierarchy index file to generate a dictionary path matching result. The dictionary path matching result belongs to the Nth level dictionary path. Prior to this, step S1100 is included, which includes the following steps:
[0032] S1110: If not satisfied, set the loaded dictionary path and the loaded data dictionary file to empty;
[0033] S1120: Determine whether the loaded dictionary path and the loaded data dictionary file are empty;
[0034] S1130: If empty, input the URL path of the loaded page into the dictionary path hierarchy index file to generate dictionary path matching results.
[0035] Specifically, if the URL path of the loading page does not match the loaded dictionary path, it means that none of the loaded data dictionary paths match the URL path of the loading page. The currently loaded data dictionary information is no longer useful. To avoid consuming memory, the loaded dictionary paths and loaded data dictionary files are set to empty. The loaded data dictionary files refer to the URL paths that correspond one-to-one with the loaded dictionary paths. The process of checking if the loaded dictionary paths and loaded data dictionary files are empty is as follows: If they are empty, then a matching data dictionary path corresponding to the URL path of the loading page can be performed.
[0036] A dictionary path hierarchy index file refers to data that represents the URL paths corresponding to each piece of information in the stored data dictionary. Through this index file, corresponding data dictionary files can be loaded in batches. The dictionary path hierarchy index file is stored in a tree-like hierarchical format, allowing users to access the page corresponding to the next level's URL path by clicking links on pages with URL paths in the parent level. Therefore, the URL path depth at the top level is relatively shallow, while the depth increases towards the bottom level. The dictionary path matching result refers to the dictionary path in the dictionary path hierarchy index file that matches the URL path of the loaded page. The level of the dictionary path matching result within the dictionary path hierarchy index file is denoted as the Nth level dictionary path. For example, if the dictionary path matching result is the root node, then N=1, denoted as the first level dictionary path; if it belongs to a node in the fifth level, then N=5, denoted as the fifth level dictionary path.
[0037] By matching and loading dictionary paths corresponding to page URL paths using a dictionary path hierarchy index file, it is easier to load the corresponding data dictionary files required by the user in subsequent steps. Moreover, the batch loading method only requires associating the data dictionary once, which shortens the response time and achieves the technical effect of improving user experience and meeting user needs.
[0038] S300: Input the dictionary path matching result into the data dictionary storage file, load the Nth level data dictionary file, and render the DOM control of the loaded page;
[0039] Specifically, the data dictionary storage file refers to the storage information of a data dictionary file that corresponds one-to-one with the dictionary path hierarchy index file. The data dictionary storage file and the dictionary path hierarchy index file are interconnected but stored in two separate modules to avoid consuming memory in one place. By inputting the dictionary path matching result into the data dictionary storage file, the corresponding data dictionary file in the Nth-level data dictionary file can be retrieved to render the DOM controls on the loaded page, meeting user needs while reducing response time.
[0040] S400: After rendering is complete, determine whether the total number of loaded data dictionary entries meets the data dictionary entry threshold;
[0041] S500: If satisfied, generate a load termination instruction.
[0042] Specifically, after all loaded data dictionary files have been rendered, it is determined whether the total number of loaded data dictionary entries is greater than or equal to a data dictionary entry count threshold. The data dictionary entry count threshold refers to the minimum number of data dictionary entries that can be loaded without affecting response time and database performance, preferably 10,000. The total number of loaded data dictionary entries is compared with 10,000. If it is greater than or equal to 10,000, it means that the data dictionary entry count threshold has been exceeded, and loading needs to be stopped. A loading termination command is generated to stop loading, avoiding any impact on response time, database performance, and user experience. Since the data dictionary information for the current page has already been loaded, as long as the user does not navigate to another page, the user's needs can be met. If the user navigates to another page, the data dictionary file for the current page can be set to empty before processing the content of the page the user navigated to. This achieves the technical goal of meeting user needs in real time while ensuring response speed.
[0043] Furthermore, such as Figure 3 As shown, after rendering is complete, determining whether the total number of loaded data dictionary entries meets the data dictionary entry threshold further includes step S600, which includes the following steps:
[0044] S610: If not satisfied, obtain the (N-1)th level dictionary path based on the dictionary path matching result and the dictionary path hierarchy index file;
[0045] S620: Input the N-1 level dictionary path into the data dictionary storage file, load the N-1 level data dictionary file and update the total number of loaded data dictionary entries;
[0046] S630: After the update is completed, determine whether the total number of loaded data dictionary entries meets the data dictionary entry threshold;
[0047] S640: If not satisfied, repeatedly load the (N-2)th level data dictionary file, the (N-3)th level data dictionary file, and so on until the first level data dictionary file. When the total number of loaded data dictionary entries meets the data dictionary entry threshold, generate the loading termination instruction.
[0048] Specifically, following the above judgment, if the total number of loaded data dictionary entries is less than the data dictionary entry threshold, it is considered unsatisfactory. In this case, to facilitate users quickly obtaining the corresponding data dictionary information when navigating to other levels of URLs, it is necessary to traverse the data dictionary files at levels N-1 (up to N-2) that have an index relationship with the loading page URL path, up to the first level data dictionary file, and load the corresponding data dictionary files. If the Nth level data dictionary file is the first level data dictionary file, this process is not executed.
[0049] The path of the (N-1)th level dictionary is input into the data dictionary storage file. The (N-1)th level data dictionary file is loaded, and the total number of loaded data dictionary entries is updated. If the updated total number of loaded data dictionary entries is still less than the data dictionary entry threshold, the (N-2)th level data dictionary file is loaded, and the total number of loaded data dictionary entries is updated again. If the updated total number of loaded data dictionary entries is still less than the data dictionary entry threshold, the (N-3)th level data dictionary file is loaded. When the updated total number of data dictionary entries at any level is greater than or equal to the data dictionary entry threshold, a stop loading command is immediately generated. If the total number of loaded data dictionary entries is consistently less than the data dictionary entry threshold, the loading of data dictionary files is repeated until the first level data dictionary file is reached, at which point loading stops.
[0050] Layer-by-layer loading aligns with users' natural page navigation habits. Continuous comparison with the data dictionary entry count threshold ensures that the total number of loaded data dictionary entries does not deviate significantly from the threshold, thus guaranteeing memory availability and database performance. In subsequent page navigations, the URL path can be used to determine if a loaded data dictionary file exists; if so, it can be directly invoked and rendered, improving user experience and response speed.
[0051] Furthermore, the determination of whether the URL path of the loaded page satisfies the loaded dictionary path includes step S1000, which includes the following steps:
[0052] S1010: Determine whether the loaded dictionary path and the loaded data dictionary file are empty;
[0053] S1020: If not empty, determine whether the URL path of the loaded page satisfies the path of the loaded dictionary.
[0054] Furthermore, the step S1010, which determines whether the loaded dictionary path and the loaded data dictionary file are empty, also includes the following steps:
[0055] S1011: If empty, input the URL path of the loaded page into the dictionary path hierarchy index file.
[0056] Specifically, before determining whether the loaded page URL path satisfies the loaded dictionary path, it is also necessary to determine whether the loaded dictionary path and the loaded data dictionary file are empty. If they are empty, it means that the current loaded page URL path needs to go through the process of determining whether the loaded page URL path satisfies the loaded dictionary path. The loaded page URL path can be directly input into the dictionary path hierarchy index file to match the corresponding dictionary path and load the data dictionary file.
[0057] If it is not empty, it is necessary to first determine whether the URL path of the loaded page matches the path of the loaded dictionary. If they match, the process of step S910 is executed directly: the DOM control is rendered directly. If they do not match, the URL path of the loaded page is input into the dictionary path hierarchy index file to match the corresponding dictionary path and the data dictionary file is loaded.
[0058] Furthermore, if the condition is not met, the URL path of the loaded page is input into a dictionary path hierarchy index file to generate a dictionary path matching result, wherein the dictionary path matching result belongs to the Nth level dictionary path. Prior to this, step S1200 is included, which includes the following steps:
[0059] S1210: Obtain the data dictionary URL path set and data dictionary information, wherein the data dictionary URL path set and the data dictionary information have a first association relationship;
[0060] S1220: The data dictionary URL path set is hierarchically structured according to the index hierarchy to generate the dictionary path hierarchy index file;
[0061] S1230: Based on the first association relationship, the data dictionary information is retrieved according to the dictionary path hierarchical index file and stored hierarchically to generate the data dictionary storage file.
[0062] Specifically, the data dictionary URL path set refers to the collection of URL paths corresponding to each piece of data in the data dictionary; data dictionary information refers to each piece of data in the data dictionary, which corresponds one-to-one with the data dictionary URL path set; the first association relationship refers to information representing the correspondence between the data dictionary URL path set and the data dictionary information; the dictionary path hierarchy index file refers to the result of hierarchically categorizing the data dictionary URL path set according to the index hierarchy. The index hierarchy refers to the traversal relationship between the URL path sets, that is, the page corresponding to the URL path at the next lower level can be accessed by clicking on a certain position on the page corresponding to the URL path at the previous higher level. Based on the above principle, traversing the data dictionary URL path set yields a hierarchical dictionary path hierarchy index file with a tree-like distribution; furthermore, the data dictionary information is hierarchically stored according to the first association relationship, corresponding one-to-one with the dictionary path hierarchy index file, resulting in a data dictionary storage file. The dictionary path hierarchy index file and the data dictionary storage file are stored as two separate modules to avoid consuming storage space, and they can be quickly accessed by each other based on the first association relationship. Through this hierarchical storage method, the data dictionary file can be retrieved according to user needs, improving response speed.
[0063] In summary, the front-end data dictionary implementation method and system provided in this application embodiment have at least the following technical effects:
[0064] 1. By determining whether the URL path of the loading page belongs to the already loaded data dictionary path, if not, the path corresponding to the dictionary data required by the user is matched according to the URL path of the loading page; then, the data dictionary information is loaded according to the matched dictionary path to render the DOM control of the loading page. After rendering is completed, if the number of loaded data dictionary entries meets the data dictionary entry threshold, loading is stopped, thus ensuring a balance between response time and memory usage. This achieves the technical goal of balancing user needs, response time, and memory usage, and improves the applicability of the data dictionary implementation method.
[0065] 2. Using URL paths to segment the data dictionary hierarchically conforms to general system URL naming conventions and user access habits. The probability of needing to repeatedly load the data dictionary when navigating to a new page for details is low.
[0066] 3. Use total amount control during data dictionary loading to reasonably limit memory usage and balance system performance with user experience.
[0067] Example 2
[0068] Based on the same inventive concept as the implementation method of a front-end data dictionary in the foregoing embodiments, such as Figure 4 As shown, this application provides a front-end data dictionary implementation system, wherein the system includes:
[0069] The first judgment module 11 is used to determine whether the URL path of the loaded page satisfies the path of the loaded dictionary.
[0070] The first execution module 12 is used to input the loaded page URL path into a dictionary path hierarchy index file and generate a dictionary path matching result if the condition is not met. The dictionary path matching result belongs to the Nth level dictionary path.
[0071] Data loading module 13 is used to input the dictionary path matching result into the data dictionary storage file, load the Nth level data dictionary file, and render the DOM control of the loading page.
[0072] The second judgment module 14 is used to determine whether the total number of loaded data dictionary entries meets the data dictionary entry number threshold after rendering is completed;
[0073] The second execution module 15 is used to generate a load termination instruction if the conditions are met.
[0074] Furthermore, the system also includes a third execution module, which performs the following steps:
[0075] If not satisfied, obtain the (N-1)th level dictionary path based on the dictionary path matching result and the dictionary path hierarchy index file;
[0076] Input the N-1 level dictionary path into the data dictionary storage file, load the N-1 level data dictionary file and update the total number of loaded data dictionary entries;
[0077] After the update is completed, determine whether the total number of loaded data dictionary entries meets the data dictionary entry threshold.
[0078] If the conditions are not met, the N-2 level data dictionary file, the N-3 level data dictionary file, and so on until the first level data dictionary file are loaded. When the total number of loaded data dictionary entries meets the data dictionary entry threshold, the loading termination instruction is generated.
[0079] Furthermore, the system also includes a fourth execution module, which performs the following steps:
[0080] If satisfied, retrieve the data dictionary information based on the loaded dictionary path and render the DOM controls of the loaded page.
[0081] Furthermore, the system also includes a third judgment module, which performs the following steps:
[0082] Determine whether the loaded dictionary path and the loaded data dictionary file are empty;
[0083] If not empty, determine whether the URL path of the loaded page satisfies the path of the loaded dictionary.
[0084] Furthermore, the third judgment module execution steps also include:
[0085] If empty, input the URL path of the loaded page into the dictionary path hierarchy index file.
[0086] Furthermore, the first judgment module execution steps also include:
[0087] If not satisfied, set the loaded dictionary path and loaded data dictionary file to empty;
[0088] Determine whether the loaded dictionary path and the loaded data dictionary file are empty;
[0089] If empty, input the URL path of the loaded page into the dictionary path hierarchy index file to generate dictionary path matching results.
[0090] Furthermore, the first judgment module execution steps also include:
[0091] Obtain the set of URL paths for the data dictionary and the data dictionary information, wherein the set of URL paths for the data dictionary and the data dictionary information have a first association relationship;
[0092] The data dictionary URL path set is hierarchically structured according to the index hierarchy to generate the dictionary path hierarchy index file;
[0093] Based on the first association relationship, the data dictionary information is retrieved from the dictionary path hierarchical index file and stored hierarchically to generate the data dictionary storage file.
[0094] Exemplary electronic devices
[0095] The following is for reference. Figure 5 To describe the electronic device of this application.
[0096] Based on the same inventive concept as the implementation method of a front-end data dictionary in the foregoing embodiments, this application also provides an electronic device, including a processor and a memory; the memory is used to store a computer program; the processor is used to execute the method described in any one of the embodiments by calling the computer program stored in the memory.
[0097] The electronic device 300 includes a processor 302, a communication interface 303, and a memory 301. Optionally, the electronic device 300 may also include a bus architecture 304. The communication interface 303, processor 302, and memory 301 can be interconnected via the bus architecture 304; the bus architecture 304 can be a peripheral component interconnect (PCI) bus or an extended industry standard architecture (EISA) bus, etc. The bus architecture 304 can be divided into an address bus, a data bus, a control bus, etc. For ease of representation, Figure 5 The bus is represented by a single thick line, but this does not mean that there is only one bus or one type of bus.
[0098] Processor 302 may be a CPU, microprocessor, ASIC, or one or more integrated circuits used to control the execution of programs according to the present application.
[0099] Communication interface 303 is used in any transceiver system for communicating with other devices or communication networks, such as Ethernet, radio access network (RAN), wireless local area network (WLAN), wired access network, etc.
[0100] Memory 301 can be ROM or other types of static storage devices capable of storing static information and instructions, RAM or other types of dynamic storage devices capable of storing information and instructions, or electrically erasable programmable read-only memory (EEPROM), compact disc read-only memory (CD-ROM) or other optical disc storage, optical disc storage (including compressed optical discs, laser discs, optical discs, digital universal optical discs, Blu-ray discs, etc.), magnetic disk storage media or other magnetic storage devices, or any other medium capable of carrying or storing desired program code in the form of instructions or data structures and accessible by a computer, but not limited thereto. Memory can exist independently and be connected to the processor via bus architecture 304. Memory can also be integrated with the processor.
[0101] The memory 301 stores computer execution instructions for implementing the scheme of this application, and the processor 302 controls the execution. The processor 302 executes the computer execution instructions stored in the memory 301, thereby implementing a front-end data dictionary implementation method provided in the above embodiments of this application.
[0102] This application also provides a computer program product, including a computer program and / or instructions that, when executed by a processor, implement the steps of the method described in any one of the embodiments.
[0103] Optionally, the computer execution instructions in this application may also be referred to as application code, and this application does not specifically limit them.
[0104] Those skilled in the art will understand that the various numerical designations, such as "first," "second," etc., used in this application are merely for descriptive convenience and are not intended to limit the scope of this application, nor do they indicate a chronological order. "And / or" describes the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can represent: A alone, A and B simultaneously, or B alone. The character " / " generally indicates that the preceding and following related objects are in an "or" relationship. "At least one" refers to one or more. "At least two" refers to two or more. "At least one," "any one," or similar expressions refer to any combination of these items, including any combination of single or multiple items. For example, at least one of a, b, or c can represent: a, b, c, ab, ac, bc, or abc, where a, b, and c can be single or multiple.
[0105] In the above embodiments, implementation can be achieved entirely or partially through software, hardware, firmware, or any combination thereof. When implemented using software, it can be implemented entirely or partially in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, all or part of the processes or functions described in this application are generated. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable system.
[0106] The instructions can be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another. For example, the computer instructions can be transmitted from one website, computer, server, or data center to another via wired (e.g., coaxial cable, fiber optic, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) means. The computer-readable storage medium can be any available medium that a computer can access, or a data storage device such as a server or data center that integrates one or more available media. The available medium can be a magnetic medium (e.g., floppy disk, hard disk, magnetic tape), an optical medium (e.g., DVD), or a semiconductor medium (e.g., a solid-state drive (SSD)).
[0107] The various illustrative logic units and circuits described in this application can be implemented or operate the described functions using a general-purpose processor, digital signal processor, application-specific integrated circuit (ASIC), field-programmable gate array (FPGA) or other programmable logic system, discrete gate or transistor logic, discrete hardware components, or any combination thereof. The general-purpose processor can be a microprocessor; alternatively, it can be any conventional processor, controller, microcontroller, or state machine. The processor can also be implemented using a combination of computing systems, such as a digital signal processor and a microprocessor, multiple microprocessors, one or more microprocessors combined with a digital signal processor core, or any other similar configuration.
[0108] The steps of the methods or algorithms described in this application can be directly embedded in hardware, a software unit executed by a processor, or a combination of both. The software unit can be stored in RAM memory, flash memory, ROM memory, EPROM memory, EEPROM memory, registers, hard disk, removable disk, CD-ROM, or any other storage medium of any form in the art. Exemplarily, the storage medium can be connected to the processor so that the processor can read information from the storage medium and write information to the storage medium. Optionally, the storage medium can also be integrated into the processor. The processor and storage medium can be disposed in an ASIC, which can be disposed in a terminal. Optionally, the processor and storage medium can also be disposed in different components within the terminal. These computer program instructions can also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable apparatus for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.
[0109] Although this application has been described in conjunction with specific features and embodiments, it is obvious that various modifications and combinations can be made thereto without departing from the spirit and scope of this application. Accordingly, this specification and drawings are merely exemplary illustrations of the application as defined herein, and are to be considered as covering any and all modifications, variations, combinations, or equivalents within the scope of this application. Clearly, those skilled in the art can make various alterations and modifications to this application without departing from its scope. Thus, if such modifications and modifications fall within the scope of this application and its equivalents, this application intends to include such modifications and modifications.
Claims
1. A method for implementing a front-end data dictionary, characterized in that, The method is applied to a front-end data dictionary implementation system, and the method includes: Obtain the set of URL paths for the data dictionary and the data dictionary information, wherein the set of URL paths for the data dictionary and the data dictionary information have a first association relationship; The data dictionary URL path set is hierarchically structured according to the index hierarchy to generate a dictionary path hierarchy index file with a hierarchical structure according to the index hierarchy. Based on the first association relationship, the data dictionary information is retrieved from the dictionary path hierarchical index file and stored hierarchically to generate a data dictionary storage file that is stored independently of the dictionary path hierarchical index file in separate modules; Determine if the URL path of the loaded page satisfies the condition of a loaded dictionary path; If not satisfied, input the loaded page URL path into the dictionary path hierarchy index file to generate a dictionary path matching result, wherein the dictionary path matching result belongs to the Nth level dictionary path; The dictionary path matching results are input into the data dictionary storage file, and the Nth level data dictionary file is loaded to render the DOM controls of the loaded page; After rendering is complete, determine whether the total number of loaded data dictionary entries meets the data dictionary entry threshold; If satisfied, a load termination instruction will be generated; The step of determining whether the total number of loaded data dictionary entries meets the data dictionary entry threshold after rendering is completed also includes: If not satisfied, obtain the (N-1)th level dictionary path based on the dictionary path matching result and the dictionary path hierarchy index file; Input the N-1 level dictionary path into the data dictionary storage file, load the N-1 level data dictionary file and update the total number of loaded data dictionary entries; After the update is completed, determine whether the total number of loaded data dictionary entries meets the data dictionary entry threshold. If not, the loading of the (N-2)th level data dictionary file, the (N-3)th level data dictionary file, and so on, continues until the first level data dictionary file is loaded. When the total number of loaded data dictionary entries meets the data dictionary entry threshold, the loading termination instruction is generated. The loading page URL path is compared with the loaded dictionary path. If they are inconsistent, it is recorded that the loading page URL path does not satisfy the loaded dictionary path, and further calls are needed in the next step. If they are consistent, it means that the URL path of the loaded data dictionary information is consistent with the loading page URL path. It is recorded that the loading page URL path satisfies the loaded dictionary path. The data dictionary information corresponding to the loaded dictionary path is directly called to render the DOM control of the loading page, so as to realize the description of various data files on the loading page. If the above conditions are not met, the URL path of the loaded page is input into the dictionary path hierarchy index file to generate a dictionary path matching result. The dictionary path matching result belongs to the Nth level dictionary path, and includes the following preceding levels: If not satisfied, set the loaded dictionary path and loaded data dictionary file to empty; Determine whether the loaded dictionary path and the loaded data dictionary file are empty; If empty, input the URL path of the loaded page into the dictionary path hierarchy index file to generate dictionary path matching results.
2. The method as described in claim 1, characterized in that, The determination of whether the URL path of the loaded page satisfies the loaded dictionary path also includes: If satisfied, retrieve the data dictionary information based on the loaded dictionary path and render the DOM controls of the loaded page.
3. The method as described in claim 1, characterized in that, The step of determining whether the URL path of the loaded page satisfies the loaded dictionary path also includes: Determine whether the loaded dictionary path and the loaded data dictionary file are empty; If not empty, determine whether the URL path of the loaded page satisfies the path of the loaded dictionary.
4. The method as described in claim 2, characterized in that, The step of determining whether the loaded dictionary path and the loaded data dictionary file are empty also includes: If empty, input the URL path of the loaded page into the dictionary path hierarchy index file.
5. A system for implementing a front-end data dictionary, characterized in that, The system includes: The first judgment module is used to determine whether the URL path of the loaded page satisfies the path of the already loaded dictionary; The first execution module is used to input the URL path of the loaded page into a dictionary path hierarchy index file and generate a dictionary path matching result if the condition is not met. The dictionary path matching result belongs to the Nth level dictionary path. The data loading module is used to input the dictionary path matching results into the data dictionary storage file, load the Nth level data dictionary file, and render the DOM controls of the loading page. The second judgment module is used to determine whether the total number of loaded data dictionary entries meets the data dictionary entry threshold after rendering is completed; The second execution module is used to generate a load termination instruction if the conditions are met. The step of determining whether the total number of loaded data dictionary entries meets the data dictionary entry threshold after rendering is completed also includes: If not satisfied, obtain the (N-1)th level dictionary path based on the dictionary path matching result and the dictionary path hierarchy index file; Input the N-1 level dictionary path into the data dictionary storage file, load the N-1 level data dictionary file and update the total number of loaded data dictionary entries; After the update is completed, determine whether the total number of loaded data dictionary entries meets the data dictionary entry threshold. If not, the loading of the (N-2)th level data dictionary file, the (N-3)th level data dictionary file, and so on, continues until the first level data dictionary file is loaded. When the total number of loaded data dictionary entries meets the data dictionary entry threshold, the loading termination instruction is generated. The loading page URL path is compared with the loaded dictionary path. If they are inconsistent, it is recorded that the loading page URL path does not satisfy the loaded dictionary path, and further calls are needed in the next step. If they are consistent, it means that the URL path of the loaded data dictionary information is consistent with the loading page URL path. It is recorded that the loading page URL path satisfies the loaded dictionary path. The data dictionary information corresponding to the loaded dictionary path is directly called to render the DOM control of the loading page, so as to realize the description of various data files on the loading page. The first judgment module execution step further includes: obtaining a set of data dictionary URL paths and data dictionary information, wherein the set of data dictionary URL paths and the data dictionary information have a first association relationship; The data dictionary URL path set is hierarchically structured according to the index hierarchy to generate a dictionary path hierarchy index file with a hierarchical structure according to the index hierarchy. Based on the first association relationship, the data dictionary information is retrieved from the dictionary path hierarchical index file and stored hierarchically to generate a data dictionary storage file that is stored independently of the dictionary path hierarchical index file in separate modules; The third judgment module execution steps include: determining whether the loaded dictionary path and the loaded data dictionary file are empty; if not empty, determining whether the loaded page URL path satisfies the loaded dictionary path; if empty, inputting the loaded page URL path into the dictionary path hierarchy index file.
6. An electronic device, characterized in that, Including processor and memory; The memory is used to store computer programs; The processor is configured to execute the method of any one of claims 1-4 by invoking the computer program stored in the memory.
7. A computer program product, comprising a computer program and / or instructions, characterized in that, When the computer program and / or instructions are executed by a processor, they implement the steps of the method described in any one of claims 1-4.