Dictionary data acquisition method, device, storage medium and electronic device

By obtaining and parsing field label information, dictionary data is automatically loaded from the data dictionary, which solves the problem of inefficient manual search in the prior art and realizes efficient data dictionary management and update.

CN115080616BActive Publication Date: 2025-09-02BOE TECHNOLOGY GROUP CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202210667528.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-06-13
Publication Date
2025-09-02
Estimated Expiration
2042-06-13

AI Technical Summary

Technical Problem

In the prior art, obtaining dictionary data from data dictionaries requires manual search, resulting in inefficiency.

Method used

By obtaining predefined field tag information, the golang language reflection mechanism parses the tag information, and automatically loading the corresponding dictionary data from the preset data dictionary, including the classification management of static and dynamic data dictionaries.

Benefits of technology

It realizes automatic loading of dictionary data, reduces the tedious steps of manual search, and improves work efficiency, especially the workload of front-end and back-end R&D personnel.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115080616B_ABST
    Figure CN115080616B_ABST
Patent Text Reader

Abstract

The present invention provides a dictionary data acquisition method, device, storage medium, and electronic device, relating to the field of data dictionary technology. The method comprises: acquiring tag information for a field; wherein both the field and the tag information are predefined; parsing the tag information to obtain data loading information; and based on the data loading information, loading dictionary data corresponding to the data loading information from a preset data dictionary; wherein the dictionary data includes information describing the field. The technical solution provided by the present invention can automatically load required dictionary data from a data dictionary, thereby greatly improving work efficiency.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of data dictionaries, and in particular to a dictionary data acquisition method, device, storage medium and electronic equipment. Background Art

[0002] A data dictionary is a collection of information describing data, a collection of definitions for all data elements used in a system. It helps developers understand the type and value of each data item, as well as their relationship to real-world objects. However, in related technologies, obtaining dictionary data from a data dictionary requires manual search. This manual search is time-consuming and labor-intensive, reducing work efficiency. Summary of the Invention

[0003] In response to the above-mentioned problems in the prior art, the present application proposes a dictionary data acquisition method, device, storage medium and electronic device, which can automatically load the required dictionary data from the data dictionary, thereby greatly improving work efficiency.

[0004] To achieve the above object, the technical solution of the present invention is achieved as follows:

[0005] In a first aspect, an embodiment of the present invention provides a method for obtaining dictionary data, the method comprising:

[0006] Obtaining tag information of a field; wherein the field and the tag information are both predefined;

[0007] Parsing the tag information to obtain data loading information;

[0008] Based on the data loading information, dictionary data corresponding to the data loading information is loaded from a preset data dictionary; wherein the dictionary data includes information describing the field.

[0009] In some embodiments, the method further comprises:

[0010] A loaded data dictionary is generated based on the dictionary data corresponding to the data loading information.

[0011] In some embodiments, the data loading information includes: a data item name, a data storage type, and a data storage location information; the at least two preset data dictionaries are respectively used to store dictionary data of different data storage types; and the step of loading dictionary data corresponding to the data loading information from the preset data dictionary based on the data loading information includes:

[0012] Based on the data storage type, determining a target data dictionary from the preset data dictionary;

[0013] Based on the data storage location information, dictionary data corresponding to the data item name is loaded from the target data dictionary.

[0014] In some embodiments, the data storage types include static storage and dynamic storage; the preset data dictionary includes a static data dictionary for storing static storage type data, and a dynamic data dictionary for storing dynamic storage type data.

[0015] In some embodiments, the method further comprises:

[0016] Receive data update request;

[0017] Based on the data update request, update the dictionary data in the dynamic data dictionary;

[0018] Based on the data update request, dictionary data in the loaded data dictionary is updated.

[0019] In some embodiments, the dynamic data dictionary is stored in a database; and the loaded data dictionary is stored in a server cache.

[0020] In some embodiments, the method further comprises:

[0021] Receiving a data call request from an application-end device; wherein the data call request includes a data item name;

[0022] Based on the data item name, searching for dictionary data corresponding to the data item name from the loaded data dictionary to obtain target data;

[0023] Send the target data to the application-end device.

[0024] In some embodiments, the fields and the tag information are predefined in Golang; parsing the tag information to obtain data loading information includes:

[0025] The tag information is parsed using the reflection mechanism of the golang language to obtain the data loading information.

[0026] In a second aspect, an embodiment of the present invention provides a dictionary data acquisition device, the device comprising:

[0027] A label acquisition unit, configured to acquire label information of a field; wherein both the field and the label information are predefined;

[0028] A parsing unit, configured to parse the tag information to obtain data loading information;

[0029] A loading unit is configured to load dictionary data corresponding to the data loading information from a preset data dictionary based on the data loading information; wherein the dictionary data includes information describing the fields.

[0030] In a third aspect, an embodiment of the present invention provides a non-transitory computer-readable storage medium having program code stored thereon. When the program code is executed by a processor, the dictionary data acquisition method as described in any one of the above embodiments is implemented.

[0031] In a fourth aspect, an embodiment of the present invention provides an electronic device, comprising a memory and a processor, wherein the memory stores program code that can be run on the processor, and when the program code is executed by the processor, the dictionary data acquisition method as described in any one of the above embodiments is implemented.

[0032] The dictionary data acquisition method, apparatus, storage medium, and electronic device provided by embodiments of the present invention obtain label information for predefined fields and parse the label information to obtain data loading information. Based on this data loading information, the dictionary data corresponding to the data loading information is loaded from a preset data dictionary. This allows embodiments of the present invention to directly load dictionary data describing a field based on the field's label information. Specifically, the technical solution provided by embodiments of the present invention can automatically load required dictionary data from a data dictionary, significantly improving the work efficiency of relevant technicians by avoiding the tedious manual data search. BRIEF DESCRIPTION OF THE DRAWINGS

[0033] The scope of the present invention can be better understood by reading the following detailed description of exemplary embodiments in conjunction with the accompanying drawings, which include:

[0034] Figure 1 The method flow of the embodiment of the present invention is Figure 1 ;

[0035] Figure 2 The method flow of the embodiment of the present invention is Figure 2 ;

[0036] Figure 3 This is a flowchart of the overall system workflow of an embodiment of the present invention;

[0037] Figure 4 The device structure of the embodiment of the present invention Figure 1 ;

[0038] Figure 5 The device structure of the embodiment of the present invention Figure 2 . DETAILED DESCRIPTION

[0039] In order to make the objectives, technical solutions and advantages of the present invention clearer, the implementation method of the present invention will be described in detail below with reference to the accompanying drawings and embodiments, so that the implementation process of how the present invention applies technical means to solve technical problems and achieve technical effects can be fully understood and implemented accordingly.

[0040] In the following description, many specific details are set forth to facilitate a full understanding of the present invention. However, the present invention may also be implemented in other ways different from those described herein. Therefore, the scope of protection of the present invention is not limited to the specific embodiments disclosed below.

[0041] Example 1

[0042] The embodiment of the present invention provides a dictionary data acquisition method, such as Figure 1 As shown, the method described in this embodiment includes step S101, step S102 and step S103. The specific contents of these steps are described in detail below:

[0043] Step S101, obtaining tag information of a field; wherein the field and the tag information are both predefined;

[0044] In this embodiment, the fields refer to fields in a structure. A structure is a data type defined by developers that represents a collection of fields (primitive or reference data types). During program development, sometimes it makes more sense to treat multiple data as a whole rather than using them individually. In this case, a structure is suitable, and each data in the structure can be called a field.

[0045] In this embodiment, the developer can define a tag for each field in the structure, that is, a string of characters can be added after the structure field as the tag for the field, and the tag is used to describe the attributes of the field.

[0046] Taking the IoT platform as an example, a structure is defined as follows:

[0047]

[0048] Among them, CountryEnum string is one field, and DeviceTypeEnum string is another field. The structure after defining label information for these two fields is as follows:

[0049]

[0050] The tag information is enclosed in backquotes and consists of one or more key-value pairs, with spaces used to separate the key values.

[0051] Among them, dict:"country" represents the data item name used to describe the CountryEnum string field, type:"dynamic" represents the data storage type used to describe the CountryEnum string field, and source="t_dict" represents the data storage location information used to describe the CountryEnum string field; dict:"deviceType" represents the data item name used to describe the DeviceTypeEnum string field, type:"static" represents the data storage type used to describe the DeviceTypeEnum string field, and source="pkg.DeviceTypeEnum" represents the data storage location information used to describe the DeviceTypeEnum string field.

[0052] With the development of Internet of Things (IoT) technology, more and more devices need to be connected to the IoT platform. The access and management of IoT platform devices involves the interaction between front-end devices and back-end servers. This process requires unified standardization of device attributes, operational attributes, management attributes, and business attributes of large amounts of data. Establishing a data dictionary is key to achieving front-end and back-end information collaboration. Due to the Golang language's obvious advantages in concurrency and the ability to run multiple processes simultaneously, this embodiment uses the Golang language to predefine the aforementioned structures, fields, and tag information in order to more efficiently obtain dictionary data.

[0053] Step S102: parsing the tag information to obtain data loading information;

[0054] In order to parse the tag information more efficiently, this embodiment uses the golang language to pre-define the structure, field and tag information, and then uses the golang language's reflection mechanism to parse the above tag information to obtain data loading information.

[0055] For example, you can use the following code to parse the tag information:

[0056]

[0057] In this embodiment, the content of the data loading information obtained by parsing is the same as the content defined by the tag information, that is, the data loading information includes: data item name, data storage type, and data storage location information.

[0058] Step S103 : Based on the data loading information, dictionary data corresponding to the data loading information is loaded from a preset data dictionary; wherein the dictionary data includes information describing the fields.

[0059] In this embodiment, the information describing the field may be a specific value of the field, or may be information describing the field in text.

[0060] In this embodiment, there are at least two preset data dictionaries, each used to store dictionary data of a different data storage type; loading the dictionary data corresponding to the data loading information from the preset data dictionary based on the data loading information includes: determining a target data dictionary from the preset data dictionary based on the data storage type; and loading the dictionary data corresponding to the data item name from the target data dictionary based on the data storage location information.

[0061] In this embodiment, the data storage types include static storage and dynamic storage. The preset data dictionary includes a static data dictionary for storing static storage type data and a dynamic data dictionary for storing dynamic storage type data. In actual applications, the dictionary data in the static data dictionary is generally not modifiable or updateable, while the dictionary data in the dynamic data dictionary can be modified or updated by authorized technicians.

[0062] In this embodiment, when the system determines that the data storage type defined by the tag information is static storage, the corresponding dictionary data is loaded from the static data dictionary; when the system determines that the data storage type defined by the tag information is dynamic storage, the corresponding dictionary data is loaded from the dynamic data dictionary. This method of using different data dictionaries to store dictionary data of different data storage types can effectively classify and manage dictionary data, further improving data acquisition efficiency.

[0063] Specifically, taking the IoT platform as an example, "product category" is a type of modifiable data whose data storage type is dynamic storage. Define a tag for "product category": `dict:"category"type:"dynamic"source="t_category"`. After parsing this tag, the system learns that the data item in this field is named category, the data storage type is dynamic storage, and the data storage location is the data pointed to by t_category. At this point, the system loads the data pointed to by t_category from the dynamic data dictionary, storing it in the server cache as a key-value pair (where the key is category and the value is a data array).

[0064] For example, the overall structure of the dictionary data cache is: {{"dict":"category","value":[{"1001":"Sensor"},{"1002":"Controller"}]},{"dict":"deviceType","value":[{"2001":"Smart Meter"},{"2002":"Smart Light"}]}}

[0065] In the above tag information, if the key value corresponding to type is "static", it indicates that the field is statically stored. In this case, the system will load the corresponding data from the static data dictionary. This means that this embodiment can flexibly load dynamic and static data, effectively improving the efficiency of dictionary data acquisition.

[0066] like Figure 3 As shown, the IoT platform described in this embodiment includes a front-end, a back-end, and a database. The front-end is the application side, where operators and ordinary users can perform related operations; the back-end is the server side, to which the methods described in this embodiment can be applied; and the database can be set up on the server side or independently of the server side.

[0067] In this embodiment, the above steps S101, S102 and S103 can be executed when the backend server is started. That is, when the backend server is started, the tag information of the fields in the structure is parsed one by one to load the corresponding dictionary data.

[0068] In order to enable front-end users to call dictionary data more efficiently, such as Figure 2 As shown, the method described in this embodiment further includes: step S104, generating a loaded data dictionary based on the dictionary data corresponding to the data loading information. That is, in this embodiment, based on the set of dictionary data loaded according to all tag information, a new dictionary data can be formed for the front-end to call data, eliminating the need for the front-end to search for the corresponding data in the program code.

[0069] In this embodiment, the dynamic data dictionary is stored in a database, and the loaded data dictionary is stored in a server cache, so as to perform more effective and unified management of the data dictionary and facilitate the front-end user to call the data.

[0070] In order to further effectively manage the data dictionary, the method described in this embodiment also includes: receiving a data update request; updating the dictionary data in the dynamic data dictionary based on the data update request; and updating the dictionary data in the loaded data dictionary based on the data update request.

[0071] That is, in this embodiment, data can be updated simultaneously on the dynamic data dictionary in the database and the loaded data dictionary in the server cache, so as to automatically maintain the consistency of the dictionary data.

[0072] Specifically, if Figure 3 As shown, operators can maintain the dynamic data dictionary. When operators need to update dictionary data, they can send a data update request from the front-end device to the back-end server's data write interface. Upon receiving the data update request, the back-end server will be informed of the specific update type, such as whether to add data, delete one or more items, or modify one or more items. Based on the specific update type, the back-end server simultaneously updates the dynamic data dictionary and the loaded data dictionary.

[0073] Because this embodiment generates a loaded data dictionary based on the loaded dictionary data, front-end users can directly call data from the loaded data dictionary. Specifically, the method described in this embodiment further includes: receiving a data call request from an application-side device; wherein the data call request includes a data item name; based on the data item name, searching the loaded data dictionary for dictionary data corresponding to the data item name to obtain target data; and sending the target data to the application-side device.

[0074] In this embodiment, the application-end device is the front-end device.

[0075] Specifically, if Figure 3 As shown, a user performs operations on a front-end device. When the front-end device needs to access dictionary data, it sends a data call request to the back-end server's data read interface. After receiving the data call request, the back-end server obtains the data item name from the request. Based on the data item name, the back-end server searches the loaded data dictionary for the corresponding dictionary data and sends it to the front-end device. The front-end device then renders the page based on the received dictionary data.

[0076] For example, when an ordinary user clicks "Product Category" on an e-commerce platform page, the front-end device transmits the data item name "category" to the back-end server through the data reading interface. The back-end server searches for the data corresponding to the category from the loaded data dictionary based on the category and sends it to the front-end device. The front-end device renders the page based on the acquired category data, that is, loads the category data onto the front-end device page for the user to view. The user can perform subsequent business operations based on the rendered page, such as submitting a form. The back-end server provides a business service interface to process the business operations submitted by the user, for example, saving the form (business data table) submitted by the user to the database.

[0077] In related technologies, the data dictionary of an IoT platform is maintained through documents, and front-end and back-end developers perform development based on these documents. When a data item needs to be added, the data dictionary document is updated first, and then the front-end and back-end developers are notified to adjust the code. This increases the workload for both front-end and back-end developers, and manual maintenance of the dictionary document is prone to omissions.

[0078] The solution provided by this embodiment includes: R&D personnel pre-define structures, fields, and field tag information; the system parses the field tag information; the system loads dictionary data; and the system generates a data dictionary based on the loaded dictionary data. By defining a static data dictionary and a dynamic data dictionary, combined with parsing tag information, this embodiment enables the system to automatically load the corresponding dictionary data into the server cache at startup and provide an interface for use by front-end devices. At the same time, the dynamic data dictionary supports updating data without downtime and updates the dictionary data in the server cache in real time. This reduces the need to maintain documents and notify R&D personnel of dictionary changes, thereby enabling unified and effective management of the data dictionary, reducing R&D workload and improving work efficiency.

[0079] The dictionary data acquisition method provided by an embodiment of the present invention obtains label information for predefined fields, parses the label information, and obtains data loading information. Based on this data loading information, the dictionary data corresponding to the data loading information is loaded from a preset data dictionary. This allows the embodiment of the present invention to directly load dictionary data describing a field based on the field's label information. In other words, the technical solution provided by an embodiment of the present invention can automatically load required dictionary data from a data dictionary, significantly improving the work efficiency of relevant technicians by avoiding the tedious manual data search.

[0080] Example 2

[0081] Corresponding to the above method embodiment, the present invention also provides a dictionary data acquisition device, such as Figure 4 As shown, the device includes:

[0082] The label acquisition unit 201 is used to acquire label information of a field; wherein the field and the label information are both predefined;

[0083] The parsing unit 202 is used to parse the tag information to obtain data loading information;

[0084] The loading unit 203 is configured to load dictionary data corresponding to the data loading information from a preset data dictionary based on the data loading information; wherein the dictionary data includes information describing the fields.

[0085] Furthermore, if Figure 5 As shown, the device described in this embodiment also includes:

[0086] The dictionary generating unit 204 is configured to generate a loaded data dictionary based on the dictionary data corresponding to the data loading information.

[0087] In this embodiment, the data loading information includes: data item name, data storage type, and data storage location information; there are at least two preset data dictionaries, each used to store dictionary data of different data storage types; the loading unit 203 loads the dictionary data corresponding to the data loading information from the preset data dictionary in the following manner:

[0088] Based on the data storage type, determining a target data dictionary from the preset data dictionary;

[0089] Based on the data storage location information, dictionary data corresponding to the data item name is loaded from the target data dictionary.

[0090] In this embodiment, the data storage types include static storage and dynamic storage; the preset data dictionary includes a static data dictionary for storing static storage type data, and a dynamic data dictionary for storing dynamic storage type data.

[0091] Furthermore, if Figure 5 As shown, the device described in this embodiment also includes:

[0092] Receiving unit 205, configured to receive a data update request;

[0093] A first updating unit 206, configured to update dictionary data in the dynamic data dictionary based on the data update request;

[0094] The second updating unit 207 is configured to update the dictionary data in the loaded data dictionary based on the data update request.

[0095] In this embodiment, the dynamic data dictionary is stored in a database; and the loaded data dictionary is stored in a server cache.

[0096] Furthermore, the receiving unit 205 is further configured to receive a data call request from an application-end device; wherein the data call request includes a data item name.

[0097] like Figure 5 As shown, the device described in this embodiment also includes:

[0098] A search unit 208 is configured to search the loaded data dictionary for dictionary data corresponding to the data item name based on the data item name received by the receiving unit 205 to obtain target data;

[0099] The sending unit 209 is configured to send the target data to the application-end device.

[0100] In this embodiment, the fields and the tag information are predefined in the Golang language; the parsing unit 202 parses the tag information in the following manner to obtain data loading information:

[0101] The tag information is parsed using the reflection mechanism of the golang language to obtain the data loading information.

[0102] The working principle, workflow and other contents of the above device related to the specific implementation can be found in the specific implementation of the dictionary data acquisition method provided by the present invention, and the same technical contents will not be described in detail here.

[0103] The dictionary data acquisition device provided by an embodiment of the present invention obtains label information for predefined fields, parses the label information, and obtains data loading information. Based on the data loading information, the device then loads dictionary data corresponding to the data loading information from a preset data dictionary. This allows the embodiment of the present invention to directly load dictionary data describing a field based on the field's label information. In other words, the technical solution provided by an embodiment of the present invention can automatically load required dictionary data from a data dictionary, significantly improving the work efficiency of relevant technicians by eliminating the tedious manual data search.

[0104] Example 3

[0105] According to an embodiment of the present invention, a non-transitory computer-readable storage medium is further provided. The non-transitory computer-readable storage medium stores program code. When the program code is executed by a processor, the dictionary data acquisition method described in the above embodiment is implemented.

[0106] Example 4

[0107] According to an embodiment of the present invention, an electronic device is further provided. The electronic device includes a memory and a processor. The memory stores program code that can be run on the processor. When the program code is executed by the processor, the dictionary data acquisition method described in the above embodiment is implemented.

[0108] The dictionary data acquisition method, apparatus, storage medium, and electronic device provided by embodiments of the present invention obtain label information for predefined fields and parse the label information to obtain data loading information. Based on this data loading information, the dictionary data corresponding to the data loading information is loaded from a preset data dictionary. This allows embodiments of the present invention to directly load dictionary data describing a field based on the field's label information. Specifically, the technical solution provided by embodiments of the present invention can automatically load required dictionary data from a data dictionary, significantly improving the work efficiency of relevant technicians by avoiding the tedious manual data search.

[0109] The present invention also has the following advantages:

[0110] 1. The present invention supports automatic generation of required dictionary data from a standardized static data dictionary and a dynamic data dictionary.

[0111] 2. The present invention supports generating required dictionary data from standard format codes.

[0112] 3. The present invention supports unified management of data dictionaries and automatic loading of dictionary data, which reduces the difficulty of maintaining the data dictionary, thereby making the method of obtaining dictionary data more efficient and improving the work efficiency of front-end and back-end R&D personnel.

[0113] In the several embodiments provided in this application, it should be understood that the disclosed devices and methods can be implemented in other ways. For example, the device embodiments described above are merely illustrative. For example, the division of units is merely a logical functional division. In actual implementation, other division methods may be used, such as combining or integrating multiple units or components into another system, or ignoring or not implementing certain features.

[0114] Units described as separate components may or may not be physically separate, and components shown as units may or may not be physical units, that is, they may be located in one place or distributed across multiple network units. Some or all of these units may be selected based on actual needs to achieve the objectives of the embodiments of the present invention.

[0115] In addition, the functional units in the various embodiments of the present invention may be integrated into a single processing unit, each unit may exist physically separately, or two or more units may be integrated into a single unit. The aforementioned integrated units may be implemented in the form of hardware or software functional units.

[0116] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention is essentially or the part that contributes to the prior art, or all or part of the technical solution can be embodied in the form of a software product. The computer software product is stored in a storage medium and includes several instructions for enabling an electronic device (which can be a personal computer, server, or network device, etc.) to execute all or part of the steps of the various embodiments of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk, and other media that can store program code.

[0117] Although the embodiments disclosed herein are as described above, the contents described herein are merely embodiments for facilitating understanding of the present invention and are not intended to limit the present invention. Any person skilled in the art may make any modifications and variations in the form and details of the embodiments without departing from the spirit and scope of the present invention. However, the scope of protection of the present invention shall remain subject to the scope defined by the appended claims.

Claims

1. A dictionary data acquisition method, characterized in that: The method comprises: Obtain tag information of a field in a structure; wherein the field and the tag information are both predefined, the structure represents a collection of several fields, each field is each data in the structure, and each field in the structure defines a tag information, and the tag information is used to describe the attributes of the field; Parsing the tag information to obtain data loading information; the data loading information includes: data item name, data storage type and data storage location information; the data storage type includes static storage and dynamic storage; Based on the data storage type, determining a target data dictionary from a preset data dictionary; wherein the preset data dictionary includes: a static data dictionary for storing static storage type data, and a dynamic data dictionary for storing dynamic storage type data; Based on the data storage location information, dictionary data corresponding to the data item name is loaded from the target data dictionary, where the dictionary data includes information describing the field.

2. The dictionary data acquisition method according to claim 1, characterized in that: The method further comprises: A loaded data dictionary is generated based on the dictionary data corresponding to the data loading information.

3. The dictionary data acquisition method according to claim 1, characterized in that: The method further comprises: Receive data update request; Based on the data update request, update the dictionary data in the dynamic data dictionary; Based on the data update request, dictionary data in the loaded data dictionary is updated.

4. The dictionary data acquisition method according to claim 1, wherein: The dynamic data dictionary is stored in a database; the loaded data dictionary is stored in a server cache.

5. The dictionary data acquisition method according to claim 2, characterized in that: The method further comprises: Receiving a data call request from an application-end device; wherein the data call request includes a data item name; Based on the data item name, searching for dictionary data corresponding to the data item name from the loaded data dictionary to obtain target data; Send the target data to the application-end device.

6. The dictionary data acquisition method according to claim 1, characterized in that: The fields and the tag information are predefined in Golang language; parsing the tag information to obtain data loading information includes: The tag information is parsed using the reflection mechanism of the golang language to obtain the data loading information.

7. A dictionary data acquisition device, characterized in that: The device comprises: a label acquisition unit, configured to acquire label information of a field in a structure; wherein the field and the label information are both predefined, the structure represents a collection of several fields, each field is each data in the structure, and each field in the structure defines a label information, wherein the label information is used to describe the attributes of the field; a parsing unit, configured to parse the tag information to obtain data loading information, wherein the data loading information includes: a data item name, a data storage type, and a data storage location information; the data storage type includes static storage and dynamic storage; A loading unit is used to determine a target data dictionary from a preset data dictionary based on the data storage type; wherein the preset data dictionary includes: a static data dictionary for storing static storage type data, and a dynamic data dictionary for storing dynamic storage type data, and based on the data storage location information, loads dictionary data corresponding to the data item name from the target data dictionary, the dictionary data including information describing the field.

8. A non-transitory computer-readable storage medium having program code stored thereon, characterized in that: When the program code is executed by a processor, the dictionary data acquisition method according to any one of claims 1 to 6 is implemented.

9. An electronic device, characterized in that: The electronic device includes a memory and a processor. The memory stores program codes that can be run on the processor. When the program codes are executed by the processor, the dictionary data acquisition method according to any one of claims 1 to 6 is implemented.

Citation Information

Patent Citations

  • Dictionary data operation method and device, readable storage medium and terminal equipment

    CN111611241A