Configuration method and device of data dictionary table, equipment and medium

Through the configuration method of deeply integrated data dictionary tables, the huge workload and inefficiency caused by the single function of existing tools are solved, and efficient development and infinite expansion of dictionary data are achieved.

CN119557303APending Publication Date: 2025-03-04PING AN BANK CO LTD
View PDF 0 Cites 2 Cited by

Patent Information

Application Number
CN202411646804.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-11-18
Publication Date
2025-03-04

AI Technical Summary

Technical Problem

The existing data dictionary table management tools have a huge workload and inefficiency due to their single functions and lack of in-depth integration with other data management, integration and development tools.

Method used

Through a configuration method of a data dictionary table, the related dictionary and table field configuration relationship table in the dictionary table is obtained, the dictionary code is traversed to obtain the dictionary code, and the dictionary value object list is obtained according to the code, the fields and field values ​​of the data item are extracted, the dictionary keys are matched to determine the dictionary value, and the dictionary escaped list is generated to achieve deep integration.

Benefits of technology

It reduces the redundancy and complexity of the code, improves development efficiency, reduces development costs, and realizes infinite expansion of dictionary data, adapting to various application scenarios.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119557303A_ABST
    Figure CN119557303A_ABST
Patent Text Reader

Abstract

The invention relates to the field of data processing, and discloses a data dictionary table configuration method and device, equipment and a medium, and the method comprises the steps: obtaining an associated dictionary and table field configuration relation table in a dictionary table from a database according to the table name of an input data list, traversing the dictionary and table field configuration relation table, obtaining a dictionary code configured by each dictionary, and storing the dictionary code in the database; obtaining a dictionary value object list from a database according to the dictionary code, traversing each data item of the data list, extracting a field corresponding to the data item and an associated field value, traversing the dictionary value object list, determining a matched dictionary key according to the field value, mapping a dictionary value associated with the dictionary key, and putting the dictionary value into the data item; according to the data dictionary table management method and device, the list after dictionary escape is generated and output, and the technical problems that an existing data dictionary table management tool is often an independent product or tool and lacks deep integration with other data management, integration and development tools, so that the workload is huge, and the efficiency is low are solved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the fields of data processing technology and financial technology, and in particular to a configuration method, device, equipment and medium for a data dictionary table. Background Art

[0002] Dictionary usually refers to a data structure that stores the correspondence between keys and values. In different programming languages, this data structure may have different names, such as dictionary in Python, object in JavaScript, map in C# and Java.

[0003] In IT systems, dictionary tables are a very important data structure that is used to store and manage terms and vocabulary in the system. Dictionary tables are widely used in financial technology. They provide strong support for data processing, risk management, customer service, and decision support in the financial industry. Here are some specific application scenarios: Sentiment analysis: In the financial field, sentiment dictionaries based on deep learning can be used to analyze investor sentiment and thus predict market trends. For example, by analyzing public sentiment in financial news, social media, and forums, financial institutions can better understand market sentiment and make corresponding investment decisions. Database management: In database design, dictionary tables are used to uniformly manage and maintain the values ​​of data fields, such as ID card type, nationality, etc. This approach simplifies data maintenance and improves data consistency and maintainability. Anti-fraud and risk management: Trie is an efficient data structure for storing and retrieving strings. In financial technology, trie can be used to build a dictionary containing known fraudulent transaction patterns to quickly match and identify fraudulent transactions. In addition, trie also helps to discover fraud gangs and identify gang patterns by clustering fraudulent transactions with similar characteristics. Regulatory compliance: The FinTech development plan emphasizes the importance of FinTech ethics construction. Dictionary tables can be used to ensure that financial institutions' data processing and storage meet regulatory requirements, such as data classification, protection, and compliance management. Machine learning: In the financial field, machine learning algorithms require a large amount of labeled data for training. Dictionary tables can provide labels for these data to help the algorithm better understand and classify data, thereby improving the accuracy of the model. Data dictionary: Financial data service providers provide detailed data dictionaries, including detailed data on various financial products, such as stocks, bonds, indexes, etc. These data dictionaries provide basic data support for financial analysis and decision-making. Information technology risk management: In the information technology risk management of commercial banks, dictionary tables can be used to record and classify various risk events, help banks better identify, assess and control risks, and ensure the safe and stable operation of banking systems. Dictionary tables usually consist of one or more tables, each of which contains one or more key-value pairs, where the key represents a term or vocabulary and the value represents the corresponding definition or explanation. The terms and vocabulary in IT systems usually come from different fields and industries, so their degree of standardization may vary. Usually, these terms and vocabulary in IT systems will change over time, so dictionary tables need to be continuously updated and maintained.

[0004] However, the data dictionary table management tools currently on the market are often separate products or tools, lacking deep integration with other data management, integration, and development tools, resulting in huge workloads and low efficiency technical problems. Summary of the invention

[0005] The present invention provides a data dictionary table configuration method, device, computer equipment and medium to solve the technical problems of current data dictionary table management tools, which have single functions and lack of deep integration, resulting in huge workload and low efficiency.

[0006] In a first aspect, a method for configuring a data dictionary table is provided, comprising:

[0007] According to the table name of the input data list, obtain the dictionary and table field configuration relationship table associated with the dictionary table from the database;

[0008] Traversing the dictionary and table field configuration relationship table, obtaining the dictionary code of each dictionary configuration, and obtaining a dictionary value object list from the database according to the dictionary code;

[0009] Traversing each data item in the data list, and extracting the field corresponding to the data item and the associated field value;

[0010] The list of dictionary value objects is traversed, a matching dictionary key is determined according to the field value, a dictionary value associated with the dictionary key is mapped, the dictionary value is placed in the data item, a dictionary escaped list is generated, and the dictionary escaped list is output.

[0011] In a second aspect, a data dictionary table configuration device is provided, comprising:

[0012] An acquisition module is used to acquire the video text to be generated and extract the corresponding key semantic features through a preset semantic understanding model;

[0013] An audio data module, used to convert the video text to be generated into corresponding audio data through a preset speech conversion model, and mark the audio data with a timestamp using a text-to-speech algorithm;

[0014] A picture, text and video module, used to match the key semantic features with a preset material library to obtain picture materials and generate picture, text and video with a timestamp;

[0015] A virtual human video module, for performing preset lip-sync rendering on the audio data using a preset dynamic talking human face video model, and generating a virtual human video with a timestamp;

[0016] The video merging module is used to merge the graphic video and the virtual human video according to the timestamp of the graphic video and the timestamp of the virtual human video, generate a final video and upload it.

[0017] In a third aspect, a computer device is provided, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the steps of the above-mentioned data dictionary table configuration method when executing the computer program.

[0018] In a fourth aspect, a computer-readable storage medium is provided, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the above-mentioned data dictionary table configuration method are implemented.

[0019] In the scheme implemented by the configuration method, device, computer equipment and storage medium of the above-mentioned data dictionary table, the dictionary and table field configuration relationship table associated in the dictionary table can be obtained from the database according to the table name of the input data list, the dictionary and table field configuration relationship table can be traversed to obtain the dictionary code of each dictionary configuration, and the dictionary value object list can be obtained from the database according to the dictionary code, each data item in the data list can be traversed, and the field corresponding to the data item and the associated field value can be extracted, the dictionary value object list can be traversed, and the matching dictionary key can be determined according to the field value, and the dictionary value associated with the dictionary key can be mapped, and the dictionary value can be placed in the data item, and a dictionary escape list can be generated, and the dictionary escape list can be output, which solves the technical problem that the data dictionary table management tools on the market are often separate products or tools, lack of deep integration with other data management, integration and development tools, resulting in huge workload and low efficiency. It is no longer necessary to hard-code various cumbersome translation logics in the code, but unified management and processing through the translator can reduce the redundancy and complexity of the code, improve development efficiency and reduce development costs.

[0020] At the same time, when the data volume of the dictionary data corresponding to the dictionary table exceeds a preset threshold, the dictionary data is split into hot data and full data according to the query frequency, the hot data is stored in the database of the cache server, and the full data is stored in the database of the search server, thereby realizing unlimited expansion of the dictionary data and solving the problem that current products or tools in the industry are limited to specific platforms or technologies, which will limit their scope of use and cannot cover all application scenarios; lack of flexibility and scalability, unable to meet the customization requirements of specific systems, and may lead to technical problems such as the inability to fully adapt to the dictionary table requirements of the system in specific scenarios. BRIEF DESCRIPTION OF THE DRAWINGS

[0021] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the accompanying drawings required for use in the description of the embodiments of the present invention will be briefly introduced below. Obviously, the accompanying drawings in the following description are only some embodiments of the present invention. For ordinary technicians in this field, other accompanying drawings can be obtained based on these accompanying drawings without paying creative labor.

[0022] Figure 1 It is a schematic diagram of an application environment of a method for configuring a data dictionary table in an embodiment of the present invention;

[0023] Figure 2 It is a flow chart of a method for configuring a data dictionary table in one embodiment of the present invention;

[0024] Figure 3 It is a structural schematic diagram of a data dictionary table configuration device in one embodiment of the present invention;

[0025] Figure 4 is a schematic diagram of a structure of a computer device in one embodiment of the present invention;

[0026] Figure 5 It is another structural schematic diagram of a computer device in one embodiment of the present invention. DETAILED DESCRIPTION

[0027] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0028] The configuration method of the data dictionary table provided in the embodiment of the present invention can be applied in the following aspects: Figure 1 In an application environment, wherein the application data list of the dictionary to be queried is obtained through the client, and the server obtains the dictionary and table field configuration relationship table associated in the dictionary table from the database according to the table name of the input data list; traverses the dictionary and table field configuration relationship table to obtain the dictionary code of each dictionary configuration, and obtains the dictionary value object list from the database according to the dictionary code; traverses each data item of the data list, and extracts the field corresponding to the data item and the associated field value; traverses the dictionary value object list, determines the matching dictionary key according to the field value, maps the dictionary value associated with the dictionary key, puts the dictionary value into the data item, generates a dictionary escape list, and outputs the dictionary escape list, wherein the client can be but is not limited to various personal computers, laptops, smart phones, tablet computers and portable wearable devices. The server can be implemented with an independent server or a server cluster consisting of multiple servers. The present invention is described in detail below through specific embodiments.

[0029] See also Figure 2 As shown, Figure 2 A flow chart of a method for configuring a data dictionary table provided in an embodiment of the present invention includes the following steps:

[0030] S10: According to the table name of the input data list, obtain the dictionary and table field configuration relationship table associated with the dictionary table from the database;

[0031] In this embodiment, according to the table name of the input data list, before obtaining the dictionary and table field configuration relationship table associated with the dictionary table from the database, it is also necessary to check whether the data list is empty. If it is empty, null is directly returned.

[0032] It can be understood that the dictionary and table field configuration relationship table related to the table name tableName is obtained through dictTestMapper.getConfig(tableName).

[0033] For example, each field in the data list of the application table is traversed, matched with the dictionary and table field configuration relationship table, and it is determined whether there is a dictionary configuration field.

[0034] The step of obtaining the associated dictionary and table field configuration relationship table according to the table name of the input data list also includes:

[0035] Create a dictionary master table, a dictionary value object list, and a dictionary and table field configuration relationship table in sequence;

[0036] The acquired data is correspondingly filled into the dictionary main table, the dictionary value object list and the dictionary and table field configuration relationship table, and the dictionary main table, the dictionary value object list and the dictionary and table field configuration relationship table are stored in the database.

[0037] The dictionary master table, the dictionary value object list and the dictionary and table field configuration relationship table are sequentially created, including:

[0038] Create the dictionary master table according to the preset master table data structure;

[0039] Creating the dictionary value object list according to a preset dictionary value data structure;

[0040] Creating the dictionary and table field configuration relationship table according to a preset configuration data structure;

[0041] The dictionary main table is associated with the dictionary value object list and the dictionary and table field configuration relationship table respectively according to the dictionary item identifier.

[0042] For example, the dictionary main table (dict_main): dict_main_id: the unique identifier (primary key) of the dictionary main table. dict_code: dictionary code, used to identify different dictionaries. dict_code_name: dictionary name, providing the Chinese name or other language name of the dictionary. remark: remark field, used to store additional information or instructions about the dictionary.

[0043] Dictionary value table (dict_detail): dict_detail_id: unique identifier (primary key) of the dictionary value table. dict_code: foreign key, dictionary code associated with the dictionary master table. dict_key: dictionary value, usually a code or keyword. dict_value: Chinese description or other language description corresponding to the dictionary value. order_no: sorting number, used to define the sorting order of dictionary values.

[0044] Dictionary and table field configuration relationship table: config_id: unique identifier (primary key) of the configuration relationship table. table_code: table name code, identifying the associated database table. table_field: field value, identifying the field in the table. dict_code: foreign key, dictionary code associated with the dictionary master table.

[0045] Together, these table structures support dictionary management functions, allowing the storage of dictionary data and its relationship with database table fields. Through this design, dictionaries can be flexibly used in applications to manage constant data while maintaining data consistency and maintainability.

[0046] The aforementioned filling of the acquired data into the dictionary main table, the dictionary value object list and the dictionary and table field configuration relationship table may be as follows:

[0047] Example of filling the dictionary main table (dict_main) with data (as shown in Table 1)

[0048]

[0049] Table 1 Dictionary value table (dict_detail) data filling example (Table 2)

[0050] dict_detail_id dict_code dict_key dict_value order_no 1 is_flag Y yes 1 2 is_flag N no 2 3 prod_cd 0101 Product No.1 1 4 prod_cd 0201 Product No. 2 2 5 prod_cd 0301 Product No.3 3

[0051] Table 2 Dictionary and table field configuration relationship table (dict_table_config) data filling example (Table 3)

[0052] config_id table_code table_field dict_code 1 dict_test_t flag is_flag 2 dict_test_t prod prod_cd

[0053] Table 3

[0054] It can be understood that according to the table name of the input data list, the associated dictionary and table field configuration relationship table are obtained from the database, which also includes:

[0055] When the amount of dictionary data corresponding to the dictionary table exceeds a preset threshold, the dictionary data is split into hot data and full data according to the query frequency;

[0056] The hot data is stored in the database of the cache server, and the full data is stored in the database of the search server.

[0057] The hot data is stored in a database of a cache server, and the full data is stored in a database of a search server, and then the method further includes:

[0058] Obtaining a dictionary data request for querying the dictionary table sent by the front end, and preferentially querying the corresponding dictionary data from the database of the cache server;

[0059] When the dictionary data does not exist in the database of the cache server, querying the corresponding dictionary data from the database of the search server;

[0060] Recording each dictionary data request, and counting the query frequency of the dictionary data request at a preset time point;

[0061] The dictionary codes of the dictionary data exceeding a preset query frequency are synchronized from the database of the search server to the database of the cache server.

[0062] In one embodiment, according to the traditional design based on MySQL application data, theoretically millions of data volumes can be supported, but when the application dictionary data reaches tens of millions and hundreds of millions, it is unrealistic to use only the application database (MySQL).

[0063] According to the change in data volume, millions of data can be supported by application database (MySQL) only.

[0064] ES+redis can be used for storage support when the number of data reaches tens of millions or more. It is understandable that Elasticsearch (ES) and Redis are two popular open source technologies, each with its own characteristics and advantages in data storage and retrieval. Combining the two can give full play to their respective strengths and build an efficient and scalable data storage and retrieval system. Elasticsearch (ES): is a search server based on Lucene that provides full-text search and analysis capabilities. It is a distributed, multi-tenant full-text search engine with HTTP web interface and modeless JSON documents.

[0065] Elasticsearch can be horizontally expanded to hundreds of servers to store and process PB-level data. It is suitable for log analysis, full-text search, operation monitoring and other fields. Redis: It is a key-value pair storage database that complies with the BSD protocol, supports the network, can be based on memory, distributed, and has optional persistence. It is often called a data structure server because the values ​​can be types such as strings, hashes, lists, sets, and ordered sets. Redis supports transactions, persistence, LUA scripts, and multiple clustering solutions. Combining ES and Redis: Cache mechanism: Redis can be used as the cache layer of Elasticsearch to store hot data, reduce direct access to ES, and improve the read performance of the system. Real-time data storage: For data that needs to be written and read quickly, the high performance characteristics of Redis can be used for storage, while historical data or analytical data can be stored in Elasticsearch. Data synchronization: Data synchronization between Redis and Elasticsearch can be achieved through Logstash, custom scripts, or using specialized data synchronization tools (such as Canal, Debezium, etc.). Distributed system design: In a distributed system, Redis can be used as a session storage or distributed lock implementation, while Elasticsearch is responsible for processing logs, events, and full-text searches. In Elasticsearch, data is stored in an inverted index. This index structure makes searches very fast, but writing data requires processing index construction and maintenance, which may introduce additional complexity and resource consumption. As an in-memory database, Redis provides high-speed read and write performance, but its data is stored in memory, so for the persistent storage of large-scale data, it may be necessary to combine other storage solutions. When choosing a storage solution, you need to consider the data access pattern, consistency requirements, persistence requirements, and system scalability. By combining Elasticsearch and Redis, you can build a system that can quickly process real-time data and efficiently execute complex search queries. This combination is suitable for modern applications that require high performance and scalability.

[0066] In one embodiment, for example: 1. The front-end queries dictionary data requests 2. Obtain data from redis first. If there is no dictionary data in redis, obtain it from ES (ES stores the full amount of dictionary data). 3. Record each query request at the same time, mainly recording the following fields: dict_code (dictionary code), sq_time (query record time), sq_type (query data acquisition type 1: redis; 2: ES) 4. At 0:00 am every day, analyze the data in the query log, obtain the dict_code (dictionary code) of the top X% (configurable) of the daily query data times, and synchronize this batch of dict_code (dictionary code) from ES to redis.

[0067] S11, traversing the dictionary and table field configuration relationship table, obtaining a dictionary code of each dictionary configuration, and obtaining a dictionary value object list from a database according to the dictionary code;

[0068] In this embodiment, the dictionary and table field configuration relationship table is traversed to obtain the dictionary code of each dictionary configuration, and a dictionary value object list is obtained from the database according to the dictionary code, including:

[0069] Traversing the dictionary and table field configuration relationship table by calling a database batch query function to obtain a dictionary code for each dictionary configuration;

[0070] A list of dictionary value objects is obtained from a database according to the dictionary code, and a mapping relationship between the dictionary value and the dictionary code is stored.

[0071] The aforementioned method of traversing the dictionary and table field configuration relationship table by calling the database batch query function to obtain the dictionary code of each dictionary configuration can be used to reduce the number of database queries and improve performance if there are a large number of dictionary configurations.

[0072] In one embodiment, for example, the dictConfigs list is traversed to obtain the dictionary code of each dictionary configuration.

[0073] for(DictConfig dictConfig:dictConfigs){

[0074] String dictCode=dictConfig.getDictCode();

[0075] / / Get the dictionary value object list according to the dictionary code

[0076] List <dictvalue>dictValues=getDictValues(dictCode);

[0077] / / Store the mapping relationship between dictionary value objects and dictionary codes

[0078] Map <String,List <dictvalue>>dictValueMap=new HashMap<>();

[0079] dictValueMap.put(dictCode,dictValues);

[0080] S12, traversing each data item in the data list, and extracting the fields corresponding to the data items and the associated field values;

[0081] In this embodiment, if there is a corresponding dictionary configuration field, the dictionary code and dictionary value are obtained from the dictionary table. For example, the incoming data list dataList is traversed, and for each data item, it is checked whether the configured table field is included.

[0082] S13. Traverse the dictionary value object list, determine a matching dictionary key according to the field value, map the dictionary value associated with the dictionary key, put the dictionary value into the data item, generate a dictionary escaped list, and output the dictionary escaped list.

[0083] In this embodiment, the dictionary value object list is traversed, a matching dictionary key is determined according to the field value, a dictionary value associated with the dictionary key is mapped, the dictionary value is placed in the data item, a dictionary escaped list is generated, and the dictionary escaped list is output, including:

[0084] The dictionary value object list is traversed, and the corresponding dictionary key is searched and extracted in the dictionary value object list according to the field value. Specifically, StreamAPI is used to simplify traversal and matching.

[0085] Traversing the mapping relationship, and matching the dictionary value associated with the dictionary key according to the mapping relationship;

[0086] The dictionary value is placed in the data item to replace the original field value, a dictionary escaped list is generated, and the dictionary escaped list is output.

[0087] It can be understood that the specific steps are as follows: 1. Traverse the list of dictionary value objects: For each data item, we need to traverse the list of dictionary value objects to find the dictionary key that matches the field value. 2. Determine the matching dictionary key: Find the corresponding dictionary key in the list of dictionary value objects according to the field value. 3. Traverse the mapping relationship: Use the mapping relationship between the previously stored dictionary value and the dictionary code to find the dictionary value associated with the dictionary key. 4. Match the dictionary value: Find the corresponding dictionary value according to the mapping relationship. 5. Update the data item: Put the found dictionary value into the data item to replace the original field value. 6. Generate and output the dictionary escaped list: All updated data items are formed into a new list and output this list.

[0088] In one embodiment, for example:

[0089]

[0090] The specific application scenario of this embodiment may be:

[0091] Assume there is a data list dataList, which contains the following data items:

[0092]

[0093] There is a dictionary configuration list dictConfigs, which contains the following configurations:

[0094]

[0095]

[0096] There is also a list of dictionary value objects dictValues, which contains the following dictionary values:

[0097]

[0098]

[0099] Conversion process: 1. Check if dataList is empty, if not, continue. 2. Get the dictionary configuration list dictConfigs. 3. Traverse dictConfigs, get the dictionary code of each dictionary configuration, and get the list of dictionary value objects according to the dictionary code, and store them in dictValueMap. 4. Traverse dataList, for each data item, check whether it contains the configured table fields. For the first data item, it contains the fields prod and flag. Traverse dictValueMap, find the dictionary key that matches the prod field value 0101, and put the dictionary value product number one into the data item, with the key being prodDICTSTR. Traverse dictValueMap, find the dictionary key that matches the flag field value Y, and put the dictionary value is into the data item, with the key being flagDICTSTR. For the second data item, it contains the fields prod and flag. Traverse dictValueMap, find the dictionary key that matches the prod field value 0201, and put the dictionary value product number two into the data item, with the key being prodDICTSTR. Traverse dictValueMap, find the dictionary key that matches the flag field value N, and put the dictionary value no into the data item with the key flagDICTSTR.

[0100] The converted data list is as follows:

[0101]

[0102]

[0103] You can see how to convert the field values ​​in the data item into dictionary values ​​and store them in the data item according to the dictionary configuration and dictionary value object list. This process can ensure the consistency and readability of the data and improve the understandability and maintainability of the data.

[0104] If the dictionary configuration list is empty, it means that no dictionary configuration is associated with the table name passed in, so no translation of the dictionary value can be performed. In this case, the original data list should be returned directly because no dictionary configuration can be applied to the data item. Here are the steps to handle this situation:

[0105] 1. Check if the dictionary configuration list is empty: Before starting processing, check if the dictionary configuration list obtained by dictTestMapper.getConfig(tableName) is empty. 2. Continue processing: If the dictionary configuration list is not empty, continue to execute the translation logic of the dictionary value. 3. Return the original data list: If the dictionary configuration list is empty and no dictionary value translation is required, directly return the passed in original data list.

[0106] This ensures that when no dictionary configuration is available, the original data is not modified and its integrity is preserved. This also avoids unnecessary processing and potential errors because no dictionary configuration can be applied to the data items.

[0107] This embodiment can simplify development and maintenance work. Developers do not need to hard-code various troublesome translation logics in the code. Instead, they can be uniformly managed and processed through the method of this embodiment, reducing code redundancy and complexity, improving development efficiency, reducing development costs, and reducing errors and core problems caused by inconsistent data definitions; it can ensure data consistency and accuracy in the system, ensure the use of consistent data definitions and terminology between different systems and applications, and use the data dictionary table as a standardized reference to avoid the problem of inconsistent naming and definition of the same data elements in different systems; the data dictionary table translator can provide documentation and explanations for the data, including descriptions of information such as data elements, data types, data formats, and data value ranges, to help users understand the meaning and purpose of the data, improve the comprehensibility and maintainability of the data, and through centralized management of the data dictionary table, better understand and maintain data elements, attributes and relationships, improve the efficiency and reliability of data management, and help manage and maintain data definitions and metadata information through the data dictionary table translator.

[0108] It is understandable that this embodiment can also add logging to key steps to facilitate debugging and tracking of processing flows. Add exception handling logic to ensure appropriate responses when errors occur. If the amount of data is large, consider using batch processing to improve performance. If the acquisition cost of dictionary value object lists is high, consider using cache to store these lists. If the processing time is long, consider using asynchronous processing to improve responsiveness. Before processing data, add data validation steps to ensure the integrity and correctness of the data. Allow users to provide callback functions to perform custom operations during processing.

[0109] It should be noted that the main features of dictionary tables include: key-value pairs: each element consists of a key and a value, the key is unique, and the value can be repeated. Fast search: In most cases, dictionary tables support fast search operations because they are usually implemented based on hash tables. Dynamic size: The size of the dictionary table can change dynamically as needed, and there is no need to predefine the size. Unordered: The elements in the dictionary table usually do not maintain a specific order, although some language implementations may provide dictionary tables that maintain insertion order. Dictionary tables are very commonly used in programming and are used to store and retrieve data, such as database indexes, caches, configuration file parsing, and other scenarios. The data dictionary table configuration method provided in this embodiment can obtain the dictionary and table field configuration relationship table associated in the dictionary table from the database according to the table name of the input data list, traverse the dictionary and table field configuration relationship table, obtain the dictionary code of each dictionary configuration, and obtain the dictionary value object list from the database according to the dictionary code, traverse each data item in the data list, and extract the field corresponding to the data item and the associated field value, traverse the dictionary value object list, determine the matching dictionary key according to the field value, map the dictionary value associated with the dictionary key, put the dictionary value into the data item, generate a dictionary escape list, and output the dictionary escape list, which solves the technical problem that the data dictionary table management tools on the current market are often separate products or tools, lack deep integration with other data management, integration and development tools, resulting in huge workload and low efficiency. It is no longer necessary to hard-code various cumbersome translation logics in the code, but to uniformly manage and process them through the translator, reduce code redundancy and complexity, improve development efficiency, and reduce development costs.

[0110] At the same time, when the data volume of the dictionary data corresponding to the dictionary table exceeds a preset threshold, the dictionary data is split into hot data and full data according to the query frequency, the hot data is stored in the database of the cache server, and the full data is stored in the database of the search server, thereby realizing unlimited expansion of the dictionary data and solving the problem that current products or tools in the industry are limited to specific platforms or technologies, which will limit their scope of use and cannot cover all application scenarios; lack of flexibility and scalability, unable to meet the customization requirements of specific systems, and may lead to technical problems such as the inability to fully adapt to the dictionary table requirements of the system in specific scenarios.

[0111] In one embodiment, a data dictionary table configuration device is provided, and the data dictionary table configuration device corresponds one-to-one to the data dictionary table configuration method in the above embodiment. Figure 3 As shown, the data dictionary table configuration device includes an acquisition module 101, a first traversal module 102, a second traversal module 103, and a dictionary escaped list module 104. The detailed description of each functional module is as follows:

[0112] The acquisition module 101 is used to acquire the dictionary and table field configuration relationship table associated with the dictionary table from the database according to the table name of the input data list;

[0113] The first traversal module 102 is used to traverse the dictionary and table field configuration relationship table, obtain the dictionary code of each dictionary configuration, and obtain a dictionary value object list from the database according to the dictionary code;

[0114] In one embodiment, the first traversal module 102 is specifically used for the following steps:

[0115] Traversing the dictionary and table field configuration relationship table by calling a database batch query function to obtain a dictionary code for each dictionary configuration;

[0116] A list of dictionary value objects is obtained from a database according to the dictionary code, and a mapping relationship between the dictionary value and the dictionary code is stored.

[0117] The second traversal module 103 is used to traverse each data item in the data list and extract the field corresponding to the data item and the associated field value;

[0118] The dictionary escaped list module 104 is used to traverse the dictionary value object list, determine the matching dictionary key according to the field value, map the dictionary value associated with the dictionary key, put the dictionary value into the data item, generate a dictionary escaped list, and output the dictionary escaped list.

[0119] In one embodiment, the dictionary escaped list module 104 is specifically used for the following steps:

[0120] Traversing the dictionary value object list, determining a matching dictionary key according to the field value, and searching and extracting the corresponding dictionary key in the dictionary value object list according to the field value;

[0121] Traversing the mapping relationship, and matching the dictionary value associated with the dictionary key according to the mapping relationship;

[0122] The dictionary value is placed in the data item to replace the original field value, a dictionary escaped list is generated, and the dictionary escaped list is output.

[0123] In this embodiment, it also includes:

[0124] A creation module, used to sequentially create a dictionary master table, a list of dictionary value objects, and a table of dictionary and table field configuration relationships;

[0125] A filling module is used to fill the acquired data into the dictionary main table, the dictionary value object list and the dictionary and table field configuration relationship table accordingly, and store the dictionary main table, the dictionary value object list and the dictionary and table field configuration relationship table in the database.

[0126] In one embodiment, a module is created, specifically for the following steps:

[0127] Create the dictionary master table according to the preset master table data structure;

[0128] Creating the dictionary value object list according to a preset dictionary value data structure;

[0129] Creating the dictionary and table field configuration relationship table according to a preset configuration data structure;

[0130] The dictionary main table is associated with the dictionary value object list and the dictionary and table field configuration relationship table respectively according to the dictionary item identifier.

[0131] In this embodiment, it also includes:

[0132] A data splitting module, configured to split the dictionary data into hot data and full data according to query frequency when the amount of the dictionary data corresponding to the dictionary table exceeds a preset threshold;

[0133] The data storage module is used to store the hot data in the database of the cache server and store the full data in the database of the search server.

[0134] In this embodiment, it also includes:

[0135] A first dictionary data query module, used to obtain a dictionary data request for querying the dictionary table sent by the front end, and preferentially query corresponding dictionary data from the database of the cache server;

[0136] A second dictionary data query module, configured to query the corresponding dictionary data from the database of the search server when the dictionary data does not exist in the database of the cache server;

[0137] A dictionary data recording module, used to record each dictionary data request and count the query frequency of the dictionary data request at a preset time point;

[0138] The dictionary data synchronization module is used to synchronize the dictionary codes of the dictionary data exceeding a preset query frequency from the database of the search server to the database of the cache server.

[0139] The data dictionary table configuration device provided in this embodiment can obtain the dictionary and table field configuration relationship table associated in the dictionary table from the database according to the table name of the input data list, traverse the dictionary and table field configuration relationship table, obtain the dictionary code of each dictionary configuration, and obtain the dictionary value object list from the database according to the dictionary code, traverse each data item in the data list, and extract the field corresponding to the data item and the associated field value, traverse the dictionary value object list, determine the matching dictionary key according to the field value, map the dictionary value associated with the dictionary key, put the dictionary value into the data item, generate a dictionary escape list, and output the dictionary escape list, which solves the technical problem that the data dictionary table management tools on the current market are often separate products or tools, lack deep integration with other data management, integration and development tools, resulting in huge workload and low efficiency. It is no longer necessary to hard-code various cumbersome translation logics in the code, but to uniformly manage and process them through the translator, reduce the redundancy and complexity of the code, improve development efficiency, and reduce development costs.

[0140] At the same time, when the data volume of the dictionary data corresponding to the dictionary table exceeds a preset threshold, the dictionary data is split into hot data and full data according to the query frequency, the hot data is stored in the database of the cache server, and the full data is stored in the database of the search server, thereby realizing unlimited expansion of the dictionary data and solving the problem that current products or tools in the industry are limited to specific platforms or technologies, which will limit their scope of use and cannot cover all application scenarios; lack of flexibility and scalability, unable to meet the customization requirements of specific systems, and may lead to technical problems such as the inability to fully adapt to the dictionary table requirements of the system in specific scenarios.

[0141] For the specific definition of the data dictionary table configuration device, please refer to the definition of the data dictionary table configuration method mentioned above, which will not be repeated here. The various modules in the above-mentioned data dictionary table configuration device can be implemented in whole or in part by software, hardware and their combination. The above-mentioned modules can be embedded in or independent of the processor in the computer device in the form of hardware, or can be stored in the memory of the computer device in the form of software, so that the processor can call and execute the operations corresponding to the above modules.

[0142] 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 4 As shown. The computer device includes a processor, a memory, a network interface and a database connected via 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 and / or 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 network interface of the computer device is used to communicate with an external client via a network connection. When the computer program is executed by the processor, it implements the functions or steps of a data dictionary table configuration method on the server side.

[0143] In one embodiment, a computer device is provided. The computer device may be a client, and its internal structure diagram may be as follows: Figure 5 As shown. The computer device includes a processor, a memory, a network interface, a display screen and an input device connected via 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 and a computer program. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The network interface of the computer device is used to communicate with an external server via a network connection. When the computer program is executed by the processor, it implements the functions or steps of the client side of a method for configuring a data dictionary table.

[0144] In one embodiment, a computer device is provided, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the following steps when executing the computer program:

[0145] According to the table name of the input data list, obtain the dictionary and table field configuration relationship table associated with the dictionary table from the database;

[0146] Traversing the dictionary and table field configuration relationship table, obtaining the dictionary code of each dictionary configuration, and obtaining a dictionary value object list from the database according to the dictionary code;

[0147] Traversing each data item in the data list, and extracting the field corresponding to the data item and the associated field value;

[0148] The list of dictionary value objects is traversed, a matching dictionary key is determined according to the field value, a dictionary value associated with the dictionary key is mapped, the dictionary value is placed in the data item, a dictionary escaped list is generated, and the dictionary escaped list is output.

[0149] The computer device provided in this embodiment can obtain the dictionary and table field configuration relationship table associated in the dictionary table from the database according to the table name of the input data list, traverse the dictionary and table field configuration relationship table, obtain the dictionary code of each dictionary configuration, and obtain the dictionary value object list from the database according to the dictionary code, traverse each data item in the data list, and extract the field corresponding to the data item and the associated field value, traverse the dictionary value object list, determine the matching dictionary key according to the field value, map the dictionary value associated with the dictionary key, put the dictionary value into the data item, generate a dictionary escape list, and output the dictionary escape list, which solves the technical problem that the data dictionary table management tools on the current market are often separate products or tools, lack deep integration with other data management, integration and development tools, resulting in huge workload and low efficiency. It is no longer necessary to hard-code various cumbersome translation logics in the code, but to uniformly manage and process them through the translator, reduce code redundancy and complexity, improve development efficiency, and reduce development costs.

[0150] At the same time, when the data volume of the dictionary data corresponding to the dictionary table exceeds a preset threshold, the dictionary data is split into hot data and full data according to the query frequency, the hot data is stored in the database of the cache server, and the full data is stored in the database of the search server, thereby realizing unlimited expansion of the dictionary data and solving the problem that current products or tools in the industry are limited to specific platforms or technologies, which will limit their scope of use and cannot cover all application scenarios; lack of flexibility and scalability, unable to meet the customization requirements of specific systems, and may lead to technical problems such as the inability to fully adapt to the dictionary table requirements of the system in specific scenarios.

[0151] In one embodiment, a computer readable storage medium is provided, on which a computer program is stored, and when the computer program is executed by a processor, the following steps are implemented:

[0152] According to the table name of the input data list, obtain the dictionary and table field configuration relationship table associated with the dictionary table from the database;

[0153] Traversing the dictionary and table field configuration relationship table, obtaining the dictionary code of each dictionary configuration, and obtaining a dictionary value object list from the database according to the dictionary code;

[0154] Traversing each data item in the data list, and extracting the field corresponding to the data item and the associated field value;

[0155] The list of dictionary value objects is traversed, a matching dictionary key is determined according to the field value, a dictionary value associated with the dictionary key is mapped, the dictionary value is placed in the data item, a dictionary escaped list is generated, and the dictionary escaped list is output.

[0156] The computer-readable storage medium provided in this embodiment can obtain the dictionary and table field configuration relationship table associated in the dictionary table from the database according to the table name of the input data list, traverse the dictionary and table field configuration relationship table, obtain the dictionary code of each dictionary configuration, and obtain the dictionary value object list from the database according to the dictionary code, traverse each data item in the data list, and extract the field corresponding to the data item and the associated field value, traverse the dictionary value object list, determine the matching dictionary key according to the field value, map the dictionary value associated with the dictionary key, put the dictionary value into the data item, generate a dictionary escape list, and output the dictionary escape list, which solves the technical problem that the data dictionary table management tools on the current market are often separate products or tools, lack deep integration with other data management, integration and development tools, resulting in huge workload and low efficiency. It is no longer necessary to hard-code various cumbersome translation logics in the code, but to uniformly manage and process them through the translator, reduce the redundancy and complexity of the code, improve development efficiency, and reduce development costs.

[0157] At the same time, when the data volume of the dictionary data corresponding to the dictionary table exceeds a preset threshold, the dictionary data is split into hot data and full data according to the query frequency, the hot data is stored in the database of the cache server, and the full data is stored in the database of the search server, thereby realizing unlimited expansion of the dictionary data and solving the problem that current products or tools in the industry are limited to specific platforms or technologies, which will limit their scope of use and cannot cover all application scenarios; lack of flexibility and scalability, unable to meet the customization requirements of specific systems, and may lead to technical problems such as the inability to fully adapt to the dictionary table requirements of the system in specific scenarios.

[0158] It should be noted that the above functions or steps that can be implemented by the computer-readable storage medium or computer device can refer to the relevant descriptions on the server side and the client side in the aforementioned method embodiment. To avoid repetition, they will not be described one by one here.

[0159] 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 in this application can include non-volatile and / or volatile memory. Non-volatile memory can include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM) or flash memory. Volatile memory can include random access memory (RAM) or external cache memory. As an illustration and not limitation, RAM is available in many forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous link (Synchlink) DRAM (SLDRAM), memory bus (Rambus) direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM).

[0160] Those skilled in the art can clearly understand that for the convenience and simplicity of description, only the division of the above-mentioned functional units and modules is used as an example. In actual applications, the above-mentioned functions can be distributed and completed by different functional units and modules as needed, that is, the internal structure of the device can be divided into different functional units or modules to complete all or part of the functions described above.

[0161] The embodiments described above are only used to illustrate the technical solutions of the present invention, rather than to limit the same. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that the technical solutions described in the aforementioned embodiments may still be modified, or some of the technical features may be replaced by equivalents. Such modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present invention, and should all be included in the protection scope of the present invention.

[0162] It should be noted that if software tools or components other than those of our company appear in the embodiments of the present application, they are only used for illustrative purposes and do not represent actual use.< / dictvalue> < / dictvalue>

Claims

1. A method for configuring a data dictionary table, characterized in that: include: According to the table name of the input data list, obtain the dictionary and table field configuration relationship table associated with the dictionary table from the database; Traversing the dictionary and table field configuration relationship table, obtaining the dictionary code of each dictionary configuration, and obtaining a dictionary value object list from the database according to the dictionary code; Traversing each data item in the data list, and extracting the field corresponding to the data item and the associated field value; The list of dictionary value objects is traversed, a matching dictionary key is determined according to the field value, a dictionary value associated with the dictionary key is mapped, the dictionary value is placed in the data item, a dictionary escaped list is generated, and the dictionary escaped list is output.

2. The method for configuring a data dictionary table according to claim 1, characterized in that: The traversing the dictionary and table field configuration relationship table, obtaining the dictionary code of each dictionary configuration, and obtaining a dictionary value object list from a database according to the dictionary code, includes: Traversing the dictionary and table field configuration relationship table by calling a database batch query function to obtain a dictionary code for each dictionary configuration; A list of dictionary value objects is obtained from a database according to the dictionary code, and a mapping relationship between the dictionary value and the dictionary code is stored.

3. The method for configuring a data dictionary table according to claim 2, characterized in that: Traversing the dictionary value object list, determining a matching dictionary key according to the field value, mapping a dictionary value associated with the dictionary key, placing the dictionary value into the data item, generating a dictionary escaped list, and outputting the dictionary escaped list, including: Traverse the dictionary value object list, and search and extract the corresponding dictionary key in the dictionary value object list according to the field value; Traversing the mapping relationship, and matching the dictionary value associated with the dictionary key according to the mapping relationship; The dictionary value is placed in the data item to perform original field value replacement processing, a dictionary escaped list is generated, and the dictionary escaped list is output.

4. The method for configuring a data dictionary table according to claim 1, characterized in that: The step of obtaining the associated dictionary and table field configuration relationship table according to the table name of the input data list also includes: Create a dictionary master table, a dictionary value object list, and a dictionary and table field configuration relationship table in sequence; The acquired data is correspondingly filled into the dictionary main table, the dictionary value object list and the dictionary and table field configuration relationship table, and the filled dictionary main table, the dictionary value object list and the dictionary and table field configuration relationship table are stored in the database.

5. The method for configuring a data dictionary table according to claim 4, characterized in that: The dictionary master table, the dictionary value object list and the dictionary and table field configuration relationship table are sequentially created, including: Create the dictionary master table according to the preset master table data structure; Creating the dictionary value object list according to a preset dictionary value data structure; Creating the dictionary and table field configuration relationship table according to a preset configuration data structure; The dictionary main table is associated with the dictionary value object list and the dictionary and table field configuration relationship table respectively according to the dictionary item identifier.

6. The method for configuring a data dictionary table according to claim 4 or 5, characterized in that: According to the table name of the input data list, the associated dictionary and table field configuration relationship table are obtained from the database, which also includes: When the amount of dictionary data corresponding to the dictionary table exceeds a preset threshold, the dictionary data is split into hot data and full data according to the query frequency; The hot data is stored in the database of the cache server, and the full data is stored in the database of the search server.

7. The method for configuring a data dictionary table according to claim 6, characterized in that: The hot data is stored in a database of a cache server, and the full data is stored in a database of a search server, and then the method further includes: Obtaining a dictionary data request for querying the dictionary table sent by the front end, and first querying the corresponding dictionary data from the database of the cache server; When the dictionary data does not exist in the database of the cache server, querying the corresponding dictionary data from the database of the search server; Record each dictionary data request and count the query frequency of the dictionary data request at a preset time point; The dictionary codes of the dictionary data exceeding a preset query frequency are synchronized from the database of the search server to the database of the cache server.

8. A data dictionary table configuration device, characterized in that: include: The acquisition module is used to obtain the dictionary and table field configuration relationship table associated with the dictionary table from the database according to the table name of the input data list; The first traversal module is used to traverse the dictionary and table field configuration relationship table, obtain the dictionary code of each dictionary configuration, and obtain a dictionary value object list from the database according to the dictionary code; A second traversal module, used for traversing each data item in the data list and extracting fields corresponding to the data items and associated field values; A dictionary escaped list module is used to traverse the dictionary value object list, determine the matching dictionary key according to the field value, map the dictionary value associated with the dictionary key, put the dictionary value into the data item, generate a dictionary escaped list, and output the dictionary escaped list.

9. A computer device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the computer program, the steps of the method for configuring the data dictionary table according to any one of claims 1 to 7 are implemented.

10. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the steps of the method for configuring the data dictionary table according to any one of claims 1 to 7 are implemented.

Citation Information

Cited By

  • Information processing method and device of big data component, equipment, medium and product

    CN120144593A

  • Dictionary object searching method and device, equipment, medium and product

    CN120448366A