A method, device, equipment and medium for constructing an electrical equipment database
A customizable database architecture with horizontal and vertical data management formats addresses the limitations of existing electric software databases, enabling efficient storage of diverse electric data in shipbuilding.
Patent Information
- Application Number
- CN202311036096.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-08-16
- Publication Date
- 2025-07-15
- Estimated Expiration
- 2043-08-16
AI Technical Summary
The existing electrical software supporting database is difficult to meet the needs of the marine electrical industry, especially when applied across industries.
Build a new database architecture to form different project information tables, adopt horizontal and vertical table management forms, and store them flexibly according to the characteristics of electrical data.
It realizes flexible storage of different types of electrical data, meets the needs of the marine electrical industry, and improves the efficiency and flexibility of data management.
Smart Images

Figure CN116841990B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the technical field of ship electrical data. Specifically, it relates to a method, device, equipment, and medium for constructing an electrical equipment database. Background Art
[0002] Digital transformation has been a trend in recent years. In major industries, especially the chemical industry, some majors such as piping, process, instrumentation, pipe materials, and procurement have been partially digitized based on databases.
[0003] However, due to its particularity and complexity, the overall progress of digitalization in the electrical specialty lags behind. The databases supporting some electrical software on the market have some limitations, especially when crossing industries, so it is difficult to meet the requirements of the ship electrical industry. Summary of the Invention
[0004] In view of this, the purpose of this application is to provide a method, device, equipment, and medium for constructing an electrical equipment database, which can solve the problem in the existing technology that the databases supporting current electrical software are difficult to meet the requirements of the ship electrical industry by constructing a new database architecture and forming different project information tables for different project information, and form project information tables matching the data forms for different electrical data forms, achieving the effect of flexibly storing different types of electrical data.
[0005] In the first aspect, an embodiment of this application provides a method for constructing an electrical equipment database. The method includes: obtaining multiple electrical equipment data packets of ship drawings; forming at least a two-level database architecture according to the drawing names to which each electrical equipment data packet belongs, and each level of the database architecture includes at least one project; forming multiple project information tables for each project under each level of the database architecture; wherein, each project information table is formed through the following steps: determining the data management form of the table according to the project information stored in the project information table; forming the project information table according to the data management form of the table.
[0006] Optionally, the method further includes: in response to the creation of a new drawing, copying target data from the drawing according to the pre-set data copying conditions; determining the storage location and storage name of the drawing in the at least two-level database architecture according to the drawing name of the drawing; forming a target project according to the storage location, storage name of the drawing in the at least two-level database architecture, and the target data copied from the drawing, and storing the target project in the storage location.
[0007] Optionally, the data management form includes: a first type of data management form and a second type of data management form, and the project information table includes a first project information table and a second project information table: Among them, each first project information table is formed through the following steps: Determine whether the data management form of the project information table is a horizontal table management form; if the data management form of the project information table is a horizontal table management form, then form a first project information table according to the data in the project information table.
[0008] Optionally, the method further includes: in response to an increase in data of the drawing corresponding to the first project information table, adding a target data row corresponding to the data increase in the first project information table; the target data row includes: project data number, project type, project identification number.
[0009] Optionally, each second project information table is formed through the following steps: Determine whether the data management form of the project information table is a vertical table management form; if the data management form of the project information table is a vertical table management form, then form a second project information table according to the data in the project information table.
[0010] Optionally, the method further includes: in response to an increase in the attribute type of the drawing corresponding to the second project information table, adding a target attribute column corresponding to the increase in the attribute type in the second project information table; among them, the method further includes: in response to an increase in a new project of the drawing corresponding to the first project information table, adding a target data row corresponding to the new project in the first project information table.
[0011] In a second aspect, an embodiment of the present application further provides a construction device for an electrical equipment database, and the device includes:
[0012] A data packet acquisition module, configured to acquire a plurality of electrical equipment data packets of a ship drawing;
[0013] A database architecture formation module, configured to form at least a two-level database architecture according to the drawing name to which each electrical equipment data packet belongs, and each level of database architecture includes at least one project;
[0014] A project information table formation module, configured to form a plurality of project information tables for each project under each level of database architecture;
[0015] Among them, the project information table formation module is specifically configured to determine the data management form of the table according to the project information stored in the project information table; and form the project information table according to the data management form of the table.
[0016] In a third aspect, an embodiment of the present application further provides an electronic device, including: a processor, a memory, and a bus. The memory stores machine-readable instructions executable by the processor. When the electronic device runs, the processor communicates with the memory through the bus. When the machine-readable instructions are executed by the processor, the steps of the method for constructing the electrical equipment database as described above are executed.
[0017] In a fourth aspect, an embodiment of the present application further provides a computer-readable storage medium. A computer program is stored on the computer-readable storage medium. When the computer program is run by a processor, the steps of the method for constructing the electrical equipment database as described above are executed.
[0018] The method, device, equipment, and medium for constructing the electrical equipment database provided by the embodiments of the present application can construct a new database architecture and form different project information tables for different project information, solve the problem in the prior art that the database supporting the current electrical software is difficult to meet the requirements of the ship electrical industry, and form project information tables matching the data form for different electrical data forms, achieving the effect of flexibly storing different types of electrical data.
[0019] To make the above objects, features, and advantages of the present application more obvious and understandable, the following specifically enumerates preferred embodiments and, in conjunction with the accompanying drawings, details are described as follows. Description of the Drawings
[0020] To more clearly illustrate the technical solutions of the embodiments of the present application, the following briefly introduces the drawings required to be used in the embodiments. It should be understood that the following drawings only show some embodiments of the present application and should not be regarded as limiting the scope. For those of ordinary skill in the art, without creative efforts, other related drawings can also be obtained based on these drawings.
[0021] Figure 1 It is a flowchart of a method for constructing an electrical equipment database provided by an embodiment of the present application;
[0022] Figure 2 It is a schematic diagram of the first project information table provided by an embodiment of the present application;
[0023] Figure 3 It is a schematic diagram of the second project information table provided by an embodiment of the present application;
[0024] Figure 4 It is a schematic structural diagram of a device for constructing an electrical equipment database provided by an embodiment of the present application;
[0025] Figure 5 It is a schematic structural diagram of an electronic device provided by an embodiment of the present application. Detailed implementation manners
[0026] To make the objectives, technical solutions, and advantages of the embodiments of the present application clearer, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present application. Apparently, the described embodiments are only some of the embodiments of the present application, rather than all the embodiments. Components of the embodiments of the present application usually described and illustrated in the accompanying drawings here can be arranged and designed in various different configurations. Therefore, the following detailed description of the embodiments of the present application provided in the accompanying drawings is not intended to limit the scope of the present application claimed, but merely represents selected embodiments of the present application. Based on the embodiments of the present application, every other embodiment obtained by those skilled in the art without creative efforts belongs to the scope of protection of the present application.
[0027] First, the applicable application scenarios of the present application are introduced. The present application can be applied to the field of ship electrical data technology.
[0028] Through research, it is found that digital transformation is a trend in recent years. In major industrial sectors, especially the chemical industry, some digitalizations have been carried out for main specialties such as piping, process, instrumentation, pipe materials, and procurement based on databases.
[0029] However, due to its particularity and complexity, the overall progress of digitalization in the electrical specialty lags behind. The databases supporting some electrical software on the market have some limitations, especially when crossing industries, so it is difficult to meet the requirements of the ship electrical industry.
[0030] Based on this, the embodiments of the present application provide a method, device, equipment, and medium for constructing an electrical equipment database, which can solve the problem in the prior art that the databases supporting current electrical software are difficult to meet the requirements of the ship electrical industry by constructing a new database architecture and forming different project information tables for different project information, and form project information tables matching the data forms for different electrical data forms, achieving the effect of flexibly storing different types of electrical data.
[0031] Please refer to Figure 1 , Figure 1 which is a flowchart of a method for constructing an electrical equipment database provided by the embodiments of the present application. As shown in Figure 1 , the method for constructing an electrical equipment database provided by the embodiments of the present application includes:
[0032] S101. Obtain multiple electrical equipment data packets of ship drawings.
[0033] Optionally, the method further includes: in response to the creation of a new drawing, copying target data from the drawing according to preset data copying conditions; determining the storage location and storage name of the drawing in the at least two-level database architecture according to the drawing name of the drawing; forming a target project according to the storage location, storage name of the drawing in the at least two-level database architecture, and the target data copied from the drawing, and storing the target project in the storage location.
[0034] Among them, each electrical drawing includes multiple types of data, including object type, object attributes, operation logs, drawing directory tables, component library file tables, etc.
[0035] Specifically, the copying conditions can be preset through a data copying condition setting interface, and each type of data that can be copied in the electrical drawing can be set to determine whether to copy this item of data.
[0036] In this way,
[0037] S102. Form at least a two-level database architecture according to the drawing name to which each electrical equipment data packet belongs
[0038] Exemplarily, the A electrical equipment data packet belongs to the B sectional project drawing, and the B sectional project drawing is a part of the C ship drawing. Then the A electrical equipment data packet is stored under the B sectional project drawing data packet, and the B sectional project drawing data packet is stored under the C ship drawing electrical data packet.
[0039] In this way, a three-level data architecture is formed for the C ship drawing electrical data packet.
[0040] S103. For each project under each level of database architecture, form multiple project information tables.
[0041] Among them, each project information table is formed through the following steps: determining the data management form of the table according to the project information stored in the project information table; forming the project information table according to the data management form of the table.
[0042] Specifically, the data management form includes: the first type of data management form and the second type of data management form.
[0043] The project information table includes a first project information table and a second project information table.
[0044] Exemplarily, please refer to Figure 2 , Figure 2 which is a schematic diagram of the first project information table provided by the embodiment of the present application. As Figure 2As shown in the figure, the schematic diagram of the first project information table provided by the embodiment of the present application is an icon structure, and the first project information table is a horizontal table.
[0045] It should be noted that the table structure of the horizontal table is clearer and is used for data management of relatively fixed items, which is convenient for querying.
[0046] Specifically, each first project information table can be formed through the following steps: Determine whether the data management form of the project information table is a horizontal table management form; if the data management form of the project information table is a horizontal table management form, then form the first project information table according to the data in the project information table.
[0047] For example, in the table that needs to store all project engineering data, its structure should be in the form of a horizontal table. The first project information table can include names, such as: ec_enginedata_x (x is a specific number); the tag number or unique code of the engineering data, such as: TagNumber, such as: ObjectTypeID,, such as: engineDataID, etc. Since the information required for the table storing all project engineering data is relatively fixed, the columns of this table do not need to be added or deleted too much during project execution. For each new project, only one new row needs to be added.
[0048] Such as Figure 2 As shown in the figure, after creating a new project, only one row 201 needs to be added to the original table to complete the modification of the first project information table.
[0049] Specifically, the method further includes: in response to an increase in the data of the drawing corresponding to the first project information table, adding a target data row corresponding to the data increase in the first project information table;
[0050] The target data row includes: project data number, project type, project identification number.
[0051] Exemplarily, please refer to Figure 3 , Figure 3 is the schematic diagram of the second project information table provided by the embodiment of the present application. As Figure 3 As shown in the figure, the schematic diagram of the second project information table provided by the embodiment of the present application is an icon structure, and the second project information table is a vertical table.
[0052] It should be noted that the vertical table has better scalability, and dynamic data storage does not require changes to the table structure, which is used for relatively flexible electrical equipment data management.
[0053] Specifically, each second project information table can be formed through the following steps: Determine whether the data management form of the project information table is a vertical table management form; if the data management form of the project information table is a vertical table management form, then form a second project information table according to the data in the project information table.
[0054] For example, the table storing engineering data attributes in a project should have a vertical table structure. For example, the table name can be ec_enginedata_property_x (x is a specific number). The table includes multiple columns, such as the column engineDataID for the ID of engineering data, PropertyName for the property name, etc. One electrical component corresponds to multiple attributes, such as additional voltage, rated current, rated power, etc. The attributes of different electrical types are also different. For example, a cable has attributes such as cable specification and 9 other attributes. If it is necessary to add a 10th attribute, i.e., cable cross-sectional area, to the cable, and the horizontal table structure is still used, it will be necessary to substantially modify the table, thus changing the table structure. This is not conducive to the maintenance of the database by management personnel and the reuse between different projects.
[0055] This application adopts different data management forms for different types of data. For the storage of component attribute data, this application can automatically select a vertical table to store the data.
[0056] Exemplarily, as Figure 3 shown, when it is necessary to add the cross-sectional area attribute to the table, only need to add column 301 to the table to add the cross-sectional area attribute data for the corresponding cable name.
[0057] Optionally, the method further includes: in response to an increase in the attribute type of the drawing corresponding to the second project information table, adding a target attribute column corresponding to the increase in the attribute type to the second project information table;
[0058] Optionally, the method further includes: in response to an increase in a new project of the drawing corresponding to the first project information table, adding a target data row corresponding to the new project to the first project information table.
[0059] The method for constructing an electrical equipment database provided by the embodiments of this application can solve the problem in the prior art that the current database supporting electrical software is difficult to meet the requirements of the ship electrical industry by constructing a new database architecture and forming different project information tables for different project information, form project information tables matching the data form for different electrical data forms, and achieve the effect of flexibly storing different types of electrical data.
[0060] Based on the same inventive concept, an apparatus for constructing an electrical equipment database corresponding to the method for constructing an electrical equipment database is further provided in the embodiments of the present application. Since the principle of problem-solving of the apparatus in the embodiments of the present application is similar to that of the above-mentioned method for constructing an electrical equipment database in the embodiments of the present application, the implementation of the apparatus can refer to the implementation of the method, and the repeated parts will not be described again.
[0061] Please refer to Figure 4 , Figure 3 which is a schematic structural diagram of an apparatus for constructing an electrical equipment database provided in an embodiment of the present application. As Figure 3 shown in
[0062] The data packet acquisition module 401 is configured to acquire a plurality of electrical equipment data packets of ship drawings;
[0063] The database architecture formation module 402 is configured to form at least a two-level database architecture according to the drawing names to which each electrical equipment data packet belongs, and each level of the database architecture includes at least one item;
[0064] The project information table formation module 403 is configured to form a plurality of project information tables for each item under each level of the database architecture;
[0065] Among them, the project information table formation module 403 is specifically configured to determine the data management form of the table according to the project information stored in the project information table; and form the project information table according to the data management form of the table.
[0066] The apparatus for constructing an electrical equipment database provided in the embodiments of the present application can solve the problem that the database supporting the current electrical software in the prior art is difficult to meet the requirements of the ship electrical industry by constructing a new database architecture and forming different project information tables for different project information, and form project information tables matching the data form for different electrical data forms, so as to achieve the effect of flexibly storing different types of electrical data.
[0067] Please refer to Figure 5 , Figure 5 which is a schematic structural diagram of an electronic device provided in an embodiment of the present application. As Figure 5 shown in
[0068] The memory 520 stores machine-readable instructions executable by the processor 510. When the electronic device 500 runs, the processor 510 communicates with the memory 520 through the bus 530. When the machine-readable instructions are executed by the processor 510, they can execute as described above Figure 1The steps of the method for constructing the electrical equipment database in the method embodiments shown can be specifically implemented as seen in the method embodiments and will not be elaborated here.
[0069] An embodiment of the present application also provides a computer-readable storage medium, on which a computer program is stored. When the computer program is run by a processor, it can execute the steps of the method for constructing the electrical equipment database in the method embodiments shown as above Figure 1 The steps of the method for constructing the electrical equipment database in the method embodiments shown can be specifically implemented as seen in the method embodiments and will not be elaborated here.
[0070] Those skilled in the art can clearly understand that for the convenience and brevity of description, the specific working processes of the above-described systems, devices, and units can refer to the corresponding processes in the foregoing method embodiments and will not be elaborated here.
[0071] In several embodiments provided by the present application, it should be understood that the disclosed systems, devices, and methods can be implemented in other ways. The device embodiments described above are merely illustrative. For example, the division of the units is only a logical function division, and there can be other division methods in actual implementation. For another example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the displayed or discussed couplings or direct couplings or communication connections between each other can be through some communication interfaces. The indirect couplings or communication connections of the devices or units can be in electrical, mechanical, or other forms.
[0072] The units described as separate components may or may not be physically separated. The components displayed as units may or may not be physical units, that is, they can be located in one place or distributed to multiple network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0073] In addition, in each embodiment of the present application, the functional units can be integrated in a processing unit, or each unit can exist physically alone, or two or more units can be integrated in one unit.
[0074] When the above-mentioned functions are implemented in the form of software function units and sold or used as independent products, they can be stored in a non-volatile computer-readable storage medium executable by a processor. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, or a part of this technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the methods described in various embodiments of this application. The foregoing storage medium includes: various media that can store program codes, such as USB flash drives, mobile hard disks, read-only memories (ROM), random access memories (RAM), magnetic disks, or optical discs.
[0075] Finally, it should be noted that the above-mentioned embodiments are only specific implementation manners of this application, used to illustrate the technical solutions of this application, rather than limiting them. The protection scope of this application is not limited thereto. Although this application has been described in detail with reference to the foregoing embodiments, those of ordinary skill in the art should understand that: any person skilled in the art within the technical scope disclosed in this application can still modify the technical solutions recorded in the foregoing embodiments, or can easily think of changes, or perform equivalent replacements on some of the technical features; and these modifications, changes, or replacements do not make the essence of the corresponding technical solutions deviate from the spirit and scope of the technical solutions of the embodiments of this application, and should all be covered by the protection scope of this application. Therefore, the protection scope of this application should be subject to the protection scope of the claims.
Claims
1. A method for constructing an electrical equipment database, characterized in that, The method includes: Obtaining multiple electrical equipment data packets of the ship drawings; Forming at least a two - level database architecture according to the drawing names to which each electrical equipment data packet belongs, and each level of the database architecture includes at least one item; Forming multiple project information tables for each item under each level of the database architecture; Wherein, each project information table is formed through the following steps: Determining the data management form of the table according to the project information stored in the project information table, and the data management form includes a first - type data management form and a second - type data management form; Forming the project information table according to the data management form of the table, and the project information table includes a first project information table and a second project information table; Wherein, each first project information table is formed through the following steps: Judging whether the data management form of the project information table is a horizontal table management form; If the data management form of the project information table is a horizontal table management form, then forming a first project information table according to the data in the project information table; The method further includes: In response to the addition of data to the drawing corresponding to the first project information table, adding a target data row corresponding to the data addition to the first project information table, and the target data row includes: project data number, project type, project identification number; Each second project information table is formed through the following steps: Judging whether the data management form of the project information table is a vertical table management form; If the data management form of the project information table is a vertical table management form, then forming a second project information table according to the data in the project information table; The method further includes: In response to the creation of a new drawing, copying target data from the drawing according to the pre - set data copying conditions; Determining the storage location and storage name of the drawing in the at least two - level database architecture according to the drawing name of the drawing; Forming a target project according to the storage location, storage name of the drawing in the at least two - level database architecture and the target data copied from the drawing, and storing the target project at the storage location; 2. The method according to claim 1, characterized in that, The method further includes: In response to the addition of an attribute type to the drawing corresponding to the second project information table, adding a target attribute column corresponding to the addition of the attribute type to the second project information table; Wherein, the method further includes: in response to the addition of a new item to the drawing corresponding to the first project information table, adding a target data row corresponding to the new item to the first project information table.
3. An apparatus for constructing an electrical equipment database, characterized in that Applied to the method according to any one of claims 1 - 2, the device includes: A data packet acquisition module, configured to obtain multiple electrical equipment data packets of the ship drawings; A database architecture formation module, configured to form at least a two - level database architecture according to the drawing names to which each electrical equipment data packet belongs, and each level of the database architecture includes at least one item; A project information table formation module, configured to form multiple project information tables for each item under each level of the database architecture; Among them, the project information table forming module is specifically configured to determine the data management form of the table according to the project information stored in the project information table; and form the project information table according to the data management form of the table.
4. An electronic device, characterized in that, Including: A processor, a memory, and a bus. The memory stores machine-readable instructions executable by the processor. When the electronic device runs, the processor communicates with the memory through the bus, and the processor executes the machine-readable instructions to perform the steps of the method according to any one of claims 1 to 2.
5. A computer-readable storage medium, characterized in that, A computer program is stored on the computer-readable storage medium, and when the computer program is run by the processor, it performs the steps of the method according to any one of claims 1 to 2.
Citation Information
Patent Citations
Ship static data supplementing method and device, electronic equipment and readable storage medium
CN113836118A
Data Storage System for Providing Low Latency Search Query Responses
US20190325051A1