Method, system and equipment for generating machine account data dictionary and medium
The method and system generate a ledger data dictionary by organizing equipment into hierarchical systems, addressing data duplication and enhancing data management efficiency by ensuring unique entries.
Patent Information
- Application Number
- CN202411093437.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-09
- Publication Date
- 2024-12-10
AI Technical Summary
Existing systems lack an efficient method to manage and organize large amounts of equipment data from static ledgers, leading to data duplication and a lack of clarity in the relationship between system levels and entries, making it difficult to encode standardized static ledgers.
A method and system for generating a ledger data dictionary that organizes equipment types into multiple levels of systems, adding non-existent entries to a dictionary table, and converting queried data into a Map collection using the dictionary name + '|\'+ parent_id as the key, ensuring unique data entries.
The solution ensures unique data entries by organizing equipment into hierarchical systems, preventing data duplication and enabling intuitive management of static ledgers.
Smart Images

Figure CN119106022A_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the field of data and relates to a method, system, device and medium for generating a ledger data dictionary. Background Art
[0002] In programs, it is often necessary to store and retrieve large amounts of data. Although traditional arrays or lists can achieve this function, they may not be efficient enough when dealing with certain specific problems. Dictionaries, as a common data structure, are widely integrated into various languages. The background of dictionaries in programs mainly stems from the needs of data storage and retrieval, the expression of key-value pairs, language design considerations, and the needs of actual application scenarios. As the group's business continues to expand, the group has entered static ledger data, and with the change of equipment types, the amount of equipment data has increased. If only a single static ledger is stored, and there is no dictionary to manage equipment types, system levels, etc., it will appear messy, and it will be impossible to intuitively see the relationship between the system level and the entry, and it will be impossible to encode the standardized static ledger. There are situations such as duplication of static ledger data, but the prior art does not provide a method for generating the ledger data dictionary. Summary of the invention
[0003] The purpose of the present invention is to overcome the shortcomings of the above-mentioned prior art and provide a method, system, device and medium for generating a ledger data dictionary, which can generate a ledger data dictionary.
[0004] In order to achieve the above object, the present invention adopts the following technical scheme:
[0005] In one aspect, the present invention provides a method for generating a ledger data dictionary, comprising:
[0006] Get the static ledger to be imported;
[0007] According to the static ledger to be imported, organize the Excel table, determine the equipment type, and divide the equipment into several levels of systems, where the first level system corresponds to several next level systems, and the last level system corresponds to several parts;
[0008] Obtain the dictionary table, and determine in turn whether the equipment type, systems at all levels, and components exist in the dictionary table. When the equipment type, any level of system, or any component does not exist, add the non-existent equipment type, system, and part to the dictionary table to complete the generation of the ledger data dictionary.
[0009] The method for generating a ledger data dictionary of the present invention is further improved in that:
[0010] Furthermore, according to the static ledger to be imported, before determining the device type, the following is further included:
[0011] Add a new dictionary on the background management interface.
[0012] Furthermore, it also includes:
[0013] When the static ledger uses any data, the equipment type, systems at all levels, and components are queried in the dictionary table in turn, and the queried data is converted into a Map collection, where the key of the Map collection is the dictionary name + '|' + parent_id (parent id).
[0014] Furthermore, according to the static ledger to be imported, the Excel table is sorted, the equipment type is determined according to the import constraints, and the equipment is divided into several levels of systems, where the first level system corresponds to several next level systems, and the last level system corresponds to several parts;
[0015] Furthermore, the process of arranging the Excel table is as follows:
[0016] The equipment types, systems at all levels and components are matched step by step. When the equipment types, systems at all levels and components are matched successfully, the matched equipment types, systems at all levels and components are entered into the Excel table.
[0017] In a second aspect of the present invention, the present invention provides a system for generating a ledger data dictionary, comprising:
[0018] The acquisition module is used to obtain the static ledger to be imported;
[0019] The classification module is used to organize the Excel table according to the static ledger to be imported, determine the equipment type, and divide the equipment into several levels of systems, where the previous level system corresponds to several next level systems, and the last level system corresponds to several parts;
[0020] Add a module to obtain a dictionary table, and determine in turn whether the equipment type, systems at all levels, and components exist in the dictionary table. When the equipment type, any level of system, or any component does not exist, the non-existent equipment type, system, and part are added to the dictionary table to complete the generation of the ledger data dictionary.
[0021] The system for generating a ledger data dictionary of the present invention is further improved in that:
[0022] Also includes:
[0023] The query module is used to query the equipment type, systems at all levels, and components in the dictionary table in turn when the static ledger uses any data, and convert the queried data into a Map collection, where the key of the Map collection is the dictionary name + '|' + parent_id (parent id).
[0024] Also includes:
[0025] Input module, used for Excel input.
[0026] In a third aspect of the present invention, the present invention provides a computer device, including 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 method for generating a ledger data dictionary when executing the computer program.
[0027] In a fourth aspect of the present invention, the present invention provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the method for generating a ledger data dictionary are implemented.
[0028] The present invention has the following beneficial effects:
[0029] The method, system, device and medium for generating a ledger data dictionary described in the present invention determine the equipment type during specific operation and divide the equipment into several levels of systems, wherein the previous level system corresponds to several next level systems, and the last level system corresponds to several components. When the equipment type, any level system or any component does not exist, the non-existent equipment type, system and parts are added to the dictionary table to form a ledger data dictionary, wherein the equipment type, system and components in the ledger data dictionary correspond to the static ledger, so that multiple static ledgers can use the same component together to solve the problem of data duplication. BRIEF DESCRIPTION OF THE DRAWINGS
[0030] The accompanying drawings constituting a part of the present invention are used to provide a further understanding of the present invention. The exemplary embodiments of the present invention and their descriptions are used to explain the present invention and do not constitute an improper limitation of the present invention. In the accompanying drawings:
[0031] Figure 1 This is a flow chart of Example 2. DETAILED DESCRIPTION
[0032] In order to enable those skilled in the art to better understand the scheme of the present invention, the technical scheme in the embodiment of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiment of the present invention. Obviously, the described embodiment is only an embodiment of a part of the present invention, not all embodiments, and is not intended to limit the scope of the present invention. In addition, in the following description, the description of well-known structures and technologies is omitted to avoid unnecessary confusion of the concepts disclosed in the present invention. Based on the embodiments in the present invention, all other embodiments obtained by ordinary technicians in this field without making creative work should fall within the scope of protection of the present invention.
[0033] The accompanying drawings show schematic diagrams of structures according to embodiments disclosed in the present invention. These figures are not drawn to scale, and some details are magnified and some details may be omitted for the purpose of clear expression. The shapes of various regions and layers shown in the figures and the relative sizes and positional relationships therebetween are only exemplary, and may deviate in practice due to manufacturing tolerances or technical limitations, and those skilled in the art may additionally design regions / layers with different shapes, sizes, and relative positions according to actual needs.
[0034] Embodiment 1
[0035] The method for generating a ledger data dictionary described in this embodiment includes:
[0036] 1) Obtain the static ledger to be imported;
[0037] 2) According to the static ledger to be imported, organize the Excel table, determine the equipment type, and divide the equipment into several levels of systems, where the previous level system corresponds to several next level systems, and the last level system corresponds to several parts;
[0038] 3) Obtain the dictionary table, and determine in turn whether the equipment type, systems at all levels, and components exist in the dictionary table. When the equipment type, any level of system, or any component does not exist, add the non-existent equipment type, system, and part to the dictionary table to complete the generation of the ledger data dictionary.
[0039] As an implementation manner of the present invention, according to the static ledger to be imported, before determining the device type, the method further includes: adding a dictionary on the background management interface.
[0040] As an implementation mode of the present invention, it also includes: when the static ledger uses any data, the device type, systems at all levels and components are queried in the dictionary table in turn, and the queried data is converted into a Map set, wherein the key of the Map set is the dictionary name + '|' + parent_id (parent id).
[0041] As an implementation mode of the present invention, according to the static ledger to be imported, the Excel table is sorted, the equipment type is determined according to the import constraints, and the equipment is divided into several levels of systems, wherein the first level system corresponds to several next level systems, and the last level system corresponds to several parts;
[0042] As an implementation mode of the present invention, the process of organizing the Excel table is: matching the equipment type, systems at all levels and components step by step, and when the equipment type, systems at all levels and components are successfully matched, the successfully matched equipment type, systems at all levels and components are entered into the Excel table.
[0043] Embodiment 2
[0044] refer to Figure 1 In this embodiment, a fan is used as an example. The method for generating a ledger data dictionary of the present invention includes the following steps:
[0045] 1) Added background management;
[0046] The operation and maintenance personnel add a new dictionary on the background management interface, and decide which level of subset is currently added based on the selected parent.
[0047] 2) Obtain the static ledger to be imported;
[0048] 3) Arrange the excel sheet, where, according to the import constraints, the excel sheet includes key header file information such as header file system 1, system 2, system 3 and parts. Corresponding to the fan equipment information in the sheet page, it includes equipment type (fan) -> system 1 (level 1 system) -> system 2 (level 2 system) -> system 3 (level 3 system) -> parts (specific parts of the current equipment), where one equipment type corresponds to multiple systems 1, one system 1 corresponds to multiple systems 2, and so on, and only parts are unique.
[0049] 4) According to the tree structure, the fan has a 5-layer structure. When all static ledgers are entered into the fan, all fans will use the fan in the dictionary table. When the device type in the dictionary table does not exist, a request is made to add the non-existent device type to the dictionary table. After the business party confirms it, the non-existent device type is added to the dictionary table.
[0050] 5) Similarly, all devices in system 1 will use the names in the dictionary. When the device type in the dictionary table does not exist, you need to make a note in the imported sheet page and add the device type that does not exist in the dictionary table to the dictionary table. When the system does not exist, add system 1. When the system already exists, it will not be added. The same applies to the remaining systems and components.
[0051] 6) All data will remain unique, guaranteed by the current dictionary name + parent_Id (parent id). When entering, it is a layer-by-layer association. The purpose is to unify all systems and components to avoid redundant dictionary data and ledger data.
[0052] 7) When using data in the static ledger, query the equipment type, system 1, system 2, system 3 and parts in turn, and convert the queried data into a Map collection. The key of the Map is the dictionary name + '|' + parent_id (parent id). When entering in Excel, first compare the equipment type, and then match the system after the equipment type is successfully matched. The matching rule of system 1 is the value of system 1 in Excel + the dictionary id of the successfully matched equipment type; the matching rule of system 2 is the value of system 2 in Excel + the dictionary id of the successfully matched system 1, and so on until the parts.
[0053] Embodiment 3
[0054] This embodiment discloses a system for generating a ledger data dictionary, which is characterized by comprising:
[0055] The acquisition module is used to obtain the static ledger to be imported;
[0056] The classification module is used to organize the Excel table according to the static ledger to be imported, determine the equipment type, and divide the equipment into several levels of systems, where the previous level system corresponds to several next level systems, and the last level system corresponds to several parts;
[0057] Add a module to obtain a dictionary table, and determine in turn whether the equipment type, systems at all levels, and components exist in the dictionary table. When the equipment type, any level of system, or any component does not exist, the non-existent equipment type, system, and part are added to the dictionary table to complete the generation of the ledger data dictionary.
[0058] As an implementation mode of the present invention, it also includes: a query module, which is used to query the device type, systems at all levels and components in the dictionary table in sequence when the static ledger uses any data, and convert the queried data into a Map set, wherein the key of the Map set is the dictionary name + '|' + parent_id (parent id).
[0059] As an implementation mode of the present invention, it also includes: an input module for inputting data into Excel.
[0060] The division of modules in the embodiments of the present application is schematic and is only a logical function division. There may be other division methods in actual implementation. In addition, each functional module in each embodiment of the present application may be integrated into a processor, or may exist physically separately, or two or more modules may be integrated into one module. The above-mentioned integrated modules may be implemented in the form of hardware or in the form of software functional modules.
[0061] The division of modules in the embodiments of the present application is schematic and is only a logical function division. There may be other division methods in actual implementation. In addition, each functional module in each embodiment of the present application may be integrated into a processor, or may exist physically separately, or two or more modules may be integrated into one module. The above-mentioned integrated modules may be implemented in the form of hardware or in the form of software functional modules.
[0062] Embodiment 3
[0063] The present invention also provides a computer device, comprising: a memory for storing computer programs; and a processor for executing the steps of the method for generating a ledger data dictionary.
[0064] The processor implements the steps of the method for generating the above-mentioned ledger data dictionary when executing the computer program, for example: 1) obtaining a static ledger to be imported; 2) organizing an Excel spreadsheet according to the static ledger to be imported, determining the equipment type, and dividing the equipment into several levels of systems, wherein the previous level system corresponds to several next level systems, and the last level system corresponds to several components; 3) obtaining a dictionary table, determining in turn whether the equipment type, various levels of systems, and various components exist in the dictionary table; when the equipment type, any level of system, or any component does not exist, the non-existent equipment type, system, and part are added to the dictionary table to complete the generation of the ledger data dictionary.
[0065] Alternatively, the processor implements the functions of each module in the above system when executing the computer program, for example: an acquisition module for acquiring a static ledger to be imported; a grading module for organizing an Excel spreadsheet according to the static ledger to be imported, determining the equipment type, and dividing the equipment into several levels of systems, wherein the previous level system corresponds to several next level systems, and the last level system corresponds to several components; an adding module for acquiring a dictionary table, determining in turn whether the equipment type, various levels of systems, and various components exist in the dictionary table; when the equipment type, any level of system, or any component does not exist, the non-existent equipment type, system, and part are added to the dictionary table to complete the generation of the ledger data dictionary.
[0066] Exemplarily, the computer program may be divided into one or more modules / units, which are stored in the memory and executed by the processor to implement the present invention. The one or more modules / units may be a series of computer program instruction segments capable of implementing preset functions, and the instruction segments are used to describe the execution process of the computer program in the computer device.
[0067] The computer device may be a computing device such as a desktop computer, a notebook, a PDA, and a cloud server. The computer device may include, but is not limited to, a processor and a memory. Those skilled in the art will appreciate that the above are examples of computer processing devices and do not constitute a limitation on the computer device, which may include more components than the above, or a combination of certain components, or different components. For example, the computer device may also include input and output devices, network access devices, buses, etc.
[0068] The processor may be a central processing unit (CPU), other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor may be a microprocessor or any conventional processor, etc. The processor is the control center of the computer device, and uses various interfaces and lines to connect various parts of the entire computer device.
[0069] The memory may be used to store the computer programs and / or modules, and the processor implements various functions of the computer device by running or executing the computer programs and / or modules stored in the memory and calling the data stored in the memory.
[0070] The memory may mainly include a program storage area and a data storage area, wherein the program storage area may store an operating system, an application required for at least one function (such as a sound playback function, an image playback function, etc.), etc.; the data storage area may store data created according to the use of the mobile phone (such as audio data, a phone book, etc.), etc. In addition, the memory may include a high-speed random access memory, and may also include a non-volatile memory, such as a hard disk, a memory, a plug-in hard disk, a smart memory card (SmartMediaCard, SMC), a secure digital (SecureDigital, SD) card, a flash card (FlashCard), at least one disk storage device, a flash memory device, or other volatile solid-state storage devices.
[0071] Embodiment 4
[0072] The present invention also provides a computer-readable storage medium, which stores a computer program. When the computer program is executed by a processor, the steps of the method for generating a ledger data dictionary are implemented, for example, including: 1) obtaining a static ledger to be imported; 2) organizing an Excel spreadsheet according to the static ledger to be imported, determining the equipment type, and dividing the equipment into several levels of systems, wherein the previous level system corresponds to several next level systems, and the last level system corresponds to several components; 3) obtaining a dictionary table, determining in turn whether the equipment type, various levels of systems, and various components exist in the dictionary table; when the equipment type, any level of system, or any component does not exist, the non-existent equipment type, system, and part are added to the dictionary table to complete the generation of the ledger data dictionary.
[0073] If the system integrated module / unit generated by the ledger data dictionary 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.
[0074] Based on this understanding, the present invention implements all or part of the processes in the above-mentioned method for generating a ledger data dictionary, and can also be completed by instructing related hardware through a computer program, and the computer program can be stored in a computer-readable storage medium, and when the computer program is executed by a processor, the steps of the above-mentioned method for generating a ledger data dictionary can be implemented. Among them, the computer program includes computer program code, and the computer program code can be in source code form, object code form, executable file or preset intermediate form, etc.
[0075] The computer-readable storage medium may include: any entity or device capable of carrying the computer program code, recording medium, USB flash drive, mobile hard disk, magnetic disk, optical disk, computer memory, read-only memory (ROM), random access memory (RAM), electrical carrier signal, telecommunication signal and software distribution medium, etc.
[0076] It should be noted that the content contained in the computer-readable storage medium can be appropriately increased or decreased according to the requirements of legislation and patent practice in the jurisdiction. For example, in some jurisdictions, according to legislation and patent practice, computer-readable storage media do not include electrical carrier signals and telecommunication signals.
[0077] The above embodiment is only one of the implementation methods that can realize the technical solution of the present invention. The scope of protection claimed by the present invention is not limited only to this embodiment, but also includes changes, replacements and other implementation methods that can be easily thought of by any technician familiar with the technical field within the technical scope disclosed by the present invention.
Claims
1. A method for generating a ledger data dictionary, characterized in that: include; Get the static ledger to be imported; According to the static ledger to be imported, organize the Excel table, determine the equipment type, and divide the equipment into several levels of systems, where the previous level system corresponds to several next level systems, and the last level system corresponds to several parts; Obtain the dictionary table, and determine in turn whether the equipment type, systems at all levels, and components exist in the dictionary table. When the equipment type, any level of system, or any component does not exist, add the non-existent equipment type, system, and part to the dictionary table to complete the generation of the ledger data dictionary.
2. The method for generating a ledger data dictionary according to claim 1, characterized in that: According to the static ledger to be imported, before determining the device type, the following steps are also included: Add a new dictionary on the background management interface.
3. The method for generating a ledger data dictionary according to claim 1, characterized in that: Also includes: When the static ledger uses any data, the equipment type, systems at all levels, and components are queried in the dictionary table in turn, and the queried data is converted into a Map collection, where the key of the Map collection is the dictionary name + '|' + parent_id (parent id).
4. The method for generating a ledger data dictionary according to claim 1, characterized in that: According to the static ledger to be imported, organize the Excel spreadsheet, determine the equipment type according to the import constraints, and divide the equipment into several levels of systems, where the previous level system corresponds to several next level systems, and the last level system corresponds to several parts.
5. The method for generating a ledger data dictionary according to claim 4, characterized in that: The process of arranging the Excel table is as follows: The equipment types, systems at all levels and components are matched step by step. When the equipment types, systems at all levels and components are matched successfully, the matched equipment types, systems at all levels and components are entered into the Excel table.
6. A system for generating a ledger data dictionary, characterized in that: include: The acquisition module is used to obtain the static ledger to be imported; The classification module is used to organize the Excel table according to the static ledger to be imported, determine the equipment type, and divide the equipment into several levels of systems, where the previous level system corresponds to several next level systems, and the last level system corresponds to several parts; Add a module to obtain a dictionary table, and determine in turn whether the equipment type, systems at all levels, and components exist in the dictionary table. When the equipment type, any level of system, or any component does not exist, the non-existent equipment type, system, and part are added to the dictionary table to complete the generation of the ledger data dictionary.
7. The system for generating a ledger data dictionary according to claim 1, characterized in that: Also includes: The query module is used to query the equipment type, systems at all levels, and components in the dictionary table in turn when the static ledger uses any data, and convert the queried data into a Map collection, where the key of the Map collection is the dictionary name + '|' + parent_id (parent id).
8. The system for generating a ledger data dictionary according to claim 1, characterized in that: Also includes: Input module, used for Excel input.
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, it implements the steps of the method for generating a ledger data dictionary as described in any one of claims 1 to 5.
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 generating a ledger data dictionary as described in any one of claims 1 to 5 are implemented.
