Database object naming detection method and device, equipment and storage medium
By constructing a naming convention knowledge base and a large language model detection model, the naming conventions of database objects are automatically detected, solving the problem of non-standard database object naming and improving detection accuracy and efficiency.
Patent Information
- Application Number
- CN202511041381.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-07-28
- Publication Date
- 2025-11-21
AI Technical Summary
In existing technologies, non-standard naming of database objects is common, resulting in poor data asset management and system collaboration, and low accuracy and efficiency of manual inspection.
A knowledge base on naming conventions for database objects is constructed, and a naming convention detection model is built using a large language model. The detection model automatically detects whether the named fields of the target database objects conform to the naming conventions and provides the naming detection results.
It improves the accuracy and efficiency of database object naming detection, reduces manual processing, and enhances the stability and consistency of detection results.
Smart Images

Figure CN120994635A_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present disclosure relates to the technical field of database, and particularly relates to a database object naming detection method and device, equipment and storage medium. BACKGROUND
[0002] At present, there are various non-standard phenomena in database object naming in database design, and the main problem types include spelling errors, semantic ambiguity, inconsistent styles, reserved word conflicts, inconsistent abbreviations, and cross-system inconsistencies, which bring adverse effects to data asset management, system collaboration and database application.
[0003] At present, whether the database object naming is standard can be detected manually, but manual detection mainly depends on experience, and the detection results of the same object naming by different persons are quite different, the accuracy of detection is poor, and the detection efficiency is low, which is difficult to meet the current detection requirements of database object naming. SUMMARY
[0004] In order to solve the above technical problems, the present disclosure provides a database object naming detection method, device, equipment and storage medium.
[0005] The first aspect of the present disclosure provides a database object naming detection method, comprising:
[0006] constructing a naming specification knowledge base of a database object;
[0007] obtaining a naming field of a target database object and a naming detection prompt corresponding to the target database object;
[0008] inputting the naming specification knowledge base, the naming field of the target database object and the naming detection prompt into a preset naming specification detection model, detecting whether the naming field of the target database object conforms to the naming specification in the naming specification knowledge base based on the naming specification detection model, and obtaining a naming detection result of the target database object;
[0009] displaying the naming detection result.
[0010] The second aspect of the present disclosure provides a database object naming detection device, comprising:
[0011] a construction module configured to construct a naming specification knowledge base of a database object;
[0012] an obtaining module configured to obtain a naming field of a target database object and a naming detection prompt corresponding to the target database object;
[0013] The detection module is configured to input the naming specification knowledge base, the naming field of the target database object, and the naming detection prompt into a preset naming specification detection model, detect whether the naming field of the target database object conforms to the naming specification in the naming specification knowledge base based on the naming specification detection model, and obtain a naming detection result of the target database object.
[0014] The display module is configured to display the naming detection result.
[0015] The third aspect of the present disclosure provides a computer device including a memory and a processor, wherein the memory stores a computer program, and when the computer program is executed by the processor, the database object naming detection method of the first aspect can be implemented.
[0016] The fourth aspect of the present disclosure provides a computer-readable storage medium, wherein the storage medium stores a computer program, and when the computer program is executed by the processor, the database object naming detection method of the first aspect can be implemented.
[0017] Compared with the prior art, the technical solutions provided by the present disclosure have the following advantages:
[0018] The present disclosure constructs a naming specification knowledge base of a database object, obtains a naming field of a target database object and a naming detection prompt corresponding to the target database object, inputs the naming specification knowledge base, the naming field of the target database object, and the naming detection prompt into a preset naming specification detection model, detects whether the naming field of the target database object conforms to the naming specification in the naming specification knowledge base based on the naming specification detection model, obtains a naming detection result of the target database object, and displays the naming detection result. The present disclosure can detect whether the naming of the database object is standardized based on the constructed naming specification knowledge base of the database object and the preset naming specification detection model, obtain a naming detection result of the database object, and display the naming detection result, thereby greatly reducing the amount of manual processing of the naming detection of the database object, improving the detection accuracy and efficiency of the naming of the database object, and improving the stability of the naming detection effect of the database object. BRIEF DESCRIPTION OF DRAWINGS
[0019] The accompanying drawings, which are incorporated into and form part of the specification, illustrate embodiments consistent with the present disclosure and, together with the specification, serve to explain the principles of the present disclosure.
[0020] In order to more clearly illustrate the technical solutions in the embodiments of the present disclosure or the prior art, the accompanying drawings needed to be used in the embodiments or prior art description will be briefly introduced. Obviously, for those skilled in the art, other drawings can also be obtained without creative labor based on these drawings.
[0021] Figure 1 is a flowchart of a database object naming detection method provided by an embodiment of the present disclosure;
[0022] Figure 2 is a flowchart of another database object naming detection method provided by an embodiment of the present disclosure;
[0023] Figure 3 is a flowchart of a database object naming specification knowledge base construction method provided by an embodiment of the present disclosure;
[0024] Figure 4 is a structural schematic diagram of a database object naming detection device provided by an embodiment of the present disclosure;
[0025] Figure 5 is a structural schematic diagram of a computer device provided by an embodiment of the present disclosure. DETAILED DESCRIPTION
[0026] In order to more clearly understand the above-mentioned purposes, features and advantages of the present disclosure, the schemes of the present disclosure will be further described below. It should be noted that the embodiments of the present disclosure and the features in the embodiments can be combined with each other without conflict.
[0027] In the following description, a large number of specific details are set forth in order to facilitate a thorough understanding of the present disclosure, but the present disclosure can also be implemented in other manners different from those described herein; obviously, the embodiments described in the specification are only a part of the embodiments of the present disclosure, and not all the embodiments.
[0028] It should be understood that each step recorded in the method embodiments of the present disclosure can be executed in different orders and / or in parallel. In addition, the method embodiments can include additional steps and / or omit the execution of the steps shown. The scope of the present disclosure is not limited in this respect.
[0029] It should be noted that, in this document, relational terms such as "first" and "second", and the like, are used solely to distinguish one entity or action from another entity or action, without necessarily requiring or implying any actual such relationship or order between or among the entities or actions. Moreover, the terms "comprises", "comprising", or any other variations thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but can include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without more limitations, an element defined by the phrase "comprising a..." does not exclude the existence of additional identical elements in the process, method, article, or apparatus that includes the element.
[0030] It should be noted that the modification of "one", "multiple" mentioned in the present disclosure is illustrative but not restrictive, and those skilled in the art should understand that unless the context clearly indicates otherwise, it should be understood as "one or more".
[0031] Currently, there are many non-standard phenomena in the naming of database objects in database design. The main problem types include spelling errors, semantic ambiguity, inconsistent style, reserved word conflicts, inconsistent abbreviations, and cross-system inconsistencies, which have adverse effects on data asset management, system collaboration, and database applications.
[0032] Table 1
[0033]
[0034] Currently, whether the naming of a database object is standard can be detected manually, but manual detection mainly relies on experience, and the detection results of different personnel on the same object naming differ greatly, the accuracy of detection is poor, and the detection efficiency is low, which is difficult to meet the current detection requirements of database object naming.
[0035] For example, Table 1 shows the counterexamples and positive examples corresponding to the multiple problem types of database object naming.
[0036] The method provided by the embodiments of the present disclosure can be executed by a computer device, which can be understood as any device with processing and computing capabilities, which can include but is not limited to electronic devices such as smartphones, laptops, personal digital assistants (PDAs), tablet computers (PADs), wearable devices, digital TVs, desktop computers, etc.
[0037] In order to better understand the inventive concept of the embodiments of the present disclosure, the technical solutions of the embodiments of the present disclosure will be described below in conjunction with exemplary embodiments.
[0038] Figure 1 It is a flowchart of a database object naming detection method provided by the embodiments of the present disclosure. The method can be executed by a computer device, which can be understood as any device with computing function and processing capability. As shown in Figure 1 The database object naming detection method provided by the present embodiment includes the following steps:
[0039] Step 110, constructing a naming specification knowledge base of database objects.
[0040] In the embodiments of the present disclosure, the computer device can construct a naming specification knowledge base of database objects. The naming specification knowledge base of database objects includes multiple naming specifications of database objects.
[0041] Specifically, the naming specification knowledge base of the database object can include one or more of an enterprise database object naming specification knowledge base, an industry database object naming specification knowledge base, and a general database object naming specification knowledge base.
[0042] In step 120, a naming field of the target database object and a naming detection prompt corresponding to the target database object are obtained.
[0043] In the embodiments of the present disclosure, the target database object is a database object to be detected.
[0044] The naming detection prompt corresponding to the target database object can be understood as a statement prompting the naming specification detection model to detect the naming field of the target database object.
[0045] In step 130, the naming specification knowledge base, the naming field of the target database object, and the naming detection prompt are input into a preset naming specification detection model, and based on the naming specification detection model, it is detected whether the naming field of the target database object conforms to the naming specification in the naming specification knowledge base, to obtain a naming detection result of the target database object.
[0046] In the embodiments of the present disclosure, the computer device can input the naming specification knowledge base, the naming field of the target database object, and the naming detection prompt corresponding to the target database object into a preset naming specification detection model, and based on the naming specification detection model, it is detected whether the naming field of the target database object conforms to the naming specification in the naming specification knowledge base, to obtain a naming detection result of the target database object.
[0047] For example, the naming detection prompt corresponding to the target database object can be "You are a data governance expert, please detect whether the naming field of the target database object conforms to the naming specification in the naming specification knowledge base according to the naming specification knowledge base, and output the naming detection result of the target database object.
[0048] The naming specification detection model can be understood as a model constructed based on a large language model (LLM). The large language model, also known as a large model, is a deep learning model based on the Transformer architecture, which learns general language representation and generation capabilities through self-supervised pre-training of massive text data, and the typical parameter scale exceeds one hundred million.
[0049] In some embodiments, after obtaining the naming detection result of the target database object, the computer device can record the naming detection result in a database table, such as DB_OBJECT_FIX.
[0050] For example, the naming specification knowledge base can include a plurality of enterprise database object naming specification knowledge bases corresponding to respective enterprises, a plurality of industry database object naming specification knowledge bases corresponding to respective industry fields, and a general database object naming specification knowledge base.
[0051] For example, the naming specification in the enterprise database object naming specification knowledge base corresponding to the enterprise can be as shown in Table 2.
[0052] For example, the naming specification in the industry database object naming specification knowledge base corresponding to the respective industry fields can be as shown in Table 3.
[0053] Table 2
[0054]
[0055] Table 3
[0056]
[0057] For example, the naming specification in the general database object naming specification knowledge base can include:
[0058] a) Basic naming principles:
[0059] Character rules: Only use lowercase letters, numbers, and underscores, prohibit uppercase letters and special characters, and numbers cannot be used as the beginning;
[0060] Separator: Multiple English words are connected by underscores (such as user_name), and camel case or continuous concatenation is prohibited;
[0061] Avoid keywords: Prohibit the use of database reserved words (such as order, time, password, etc.) alone;
[0062] Length limit: Generally no more than 3 English words (or 32 characters), to ensure brevity and clarity.
[0063] b) Specific field type specification:
[0064] Primary key: id or end with _id (such as order_id), foreign key consistent with the primary key name of the associated table;
[0065] Association field ends with _id (such as department_id), to ensure that the foreign key can be identified;
[0066] Business field: Format [business meaning]_[attribute] (such as order_amount), avoid redundant prefixes;
[0067] Time field: distinguish date and time: [event]_date (e.g. create_date) or [event]_time (e.g. create_time);
[0068] Status field: status or_status suffix (e.g. order_status);
[0069] Boolean field: start with is_ (e.g. is_active), data type is tinyint, 0 means false, 1 means true.
[0070] c) Other important rules:
[0071] Avoid abbreviations: use full words (e.g. user_id instead of uid) to improve readability;
[0072] Description information: all fields need to add comments to explain the purpose;
[0073] Consistency: the same semantic field needs to be named uniformly (e.g. account_id or acc_id, either one).
[0074] For example, the target database object can be a database table, the naming field of the target database object can be the naming field of the database table, and the naming field of the target database object can include:
[0075] ① Database table: CGJYWXX106140 Urban Management Bureau Business Information;
[0076] Naming field:
[0077] STREETID Street ID;
[0078] TASKNUM Task number;
[0079] STREETNAME Street name;
[0080] VERIFYPICNUM Verify the actual number of pictures;
[0081] ACCEPTTIME Acceptance time;
[0082] BIZNAME Business name;
[0083] EVENTDESC Problem description.
[0084] ② Database table: JZLJHZ102352 Building Waste Disposal Approval;
[0085] Naming field:
[0086] SQDWDDH Application unit fixed phone;
[0087] ZJHM certificate number;
[0088] SQDWSJ application unit mobile phone;
[0089] SLJTDD specific location of acceptance;
[0090] CNSX commitment time limit;
[0091] YZBM postal code;
[0092] ZJLX certificate type;
[0093] SSJG implementing agency;
[0094] SXMC matter name;
[0095] SQSL number of applications.
[0096] For example, the naming detection result of the target database object can include:
[0097]
[0098]
[0099] Step 140, display the naming detection result.
[0100] In the embodiments of the present disclosure, after obtaining the naming detection result of the target database object, the computer device can display the naming detection result.
[0101] Therefore, the naming of the database object can be detected based on the constructed naming specification knowledge base of the database object and the preset naming specification detection model to obtain the naming detection result of the database object and display it, which greatly reduces the manual processing amount of the database object naming detection, improves the detection accuracy and efficiency of the database object naming, and improves the stability of the database object naming detection effect.
[0102] Figure 2 is a flowchart of a database object naming detection method provided by the present disclosure. The method can be executed by a computer device, which can be understood as any device with computing function and processing capability. As shown in Figure 2 The database object naming detection method provided by the present embodiment includes the following steps:
[0103] Step 210, construct a naming specification knowledge base of a database object.
[0104] Step 220, obtain the naming field of the target database object and the naming detection prompt corresponding to the target database object.
[0105] Step 230, input the naming specification knowledge base, the naming field of the target database object, and the naming detection prompt into the preset naming specification detection model, and based on the naming specification detection model, identify whether the target enterprise corresponding to the target database object belongs to the enterprise database object naming specification knowledge base in the naming specification knowledge base.
[0106] In the embodiment of the present disclosure, after the naming specification knowledge base, the naming field of the target database object, and the naming detection prompt are input into the preset naming specification detection model, the computer device can identify whether the target enterprise corresponding to the target database object belongs to the enterprise database object naming specification knowledge base in the naming specification knowledge base based on the naming specification detection model.
[0107] The enterprise database object naming specification knowledge base corresponding to the target enterprise can be understood as a naming specification knowledge base composed of the naming specification of the database object required by the target enterprise.
[0108] Step 240, when the enterprise database object naming specification knowledge base corresponding to the target enterprise exists in the naming specification knowledge base, based on the naming specification detection model, identify whether the naming field of the target database object conforms to the naming specification in the enterprise database object naming specification knowledge base corresponding to the target enterprise, to obtain the naming detection result of the target database object.
[0109] Step 250, when the enterprise database object naming specification knowledge base corresponding to the target enterprise does not exist in the naming specification knowledge base, based on the naming specification detection model, identify whether the target industry field corresponding to the target database object belongs to the industry database object naming specification knowledge base in the naming specification knowledge base.
[0110] The industry database object naming specification knowledge base corresponding to the target industry field can be understood as a naming specification knowledge base composed of the naming specification of the database object required by the target industry field.
[0111] The industry field can include the government industry field, the energy industry field, the financial industry field, the health industry field, the central and state-owned enterprise industry field, the e-commerce industry field, and the like.
[0112] Step 260, when the industry database object naming specification knowledge base corresponding to the target industry field exists in the naming specification knowledge base, based on the naming specification detection model, identify whether the naming field of the target database object conforms to the naming specification in the industry database object naming specification knowledge base corresponding to the target industry field, to obtain the naming detection result of the target database object.
[0113] Step 270, when the industry database object naming specification knowledge base corresponding to the target industry field does not exist in the naming specification knowledge base, identifying whether the naming field of the target database object conforms to the naming specification in the database object general naming specification knowledge base in the naming specification knowledge base based on the naming specification detection model, to obtain a naming detection result of the target database object.
[0114] The database object general naming specification knowledge base can be understood as a naming specification knowledge base composed of general naming specifications of database objects.
[0115] Among them, the naming specification requirement of the database object general naming specification knowledge base is lower than that of the industry database object naming specification knowledge base, and the naming specification requirement of the industry database object naming specification knowledge base is lower than that of the enterprise database object naming specification knowledge base.
[0116] Step 280, displaying the naming detection result.
[0117] Therefore, based on the constructed naming specification knowledge base of the database object and the preset naming specification detection model, whether the naming of the database object is normative can be detected, the naming detection result of the database object is obtained and displayed, the manual processing amount of the database object naming detection is greatly reduced, the detection accuracy and efficiency of the database object naming are improved, and the stability of the database object naming detection effect is improved.
[0118] In some embodiments of the present disclosure, the naming specification knowledge base includes the enterprise database object naming specification knowledge base corresponding to each enterprise, the industry database object naming specification knowledge base corresponding to each industry field, and the database object general naming specification knowledge base. Figure 3 is a flowchart of a database object naming specification knowledge base construction method provided by an embodiment of the present disclosure. The method can be executed by a computer device, which can be understood as any device with computing function and processing capability. As shown in Figure 3 The database object naming specification knowledge base construction method provided by the present embodiment includes the following steps:
[0119] Step 310, obtaining the enterprise standard naming specification of each enterprise in the plurality of enterprises for the database object.
[0120] In some embodiments, the computer device can obtain, for each of a plurality of enterprises, a naming field of a to-be-processed database object of the enterprise; construct a naming specification extraction prompt and extraction principle corresponding to the database object of the enterprise; input the naming field of the to-be-processed database object, the naming specification extraction prompt, and the extraction principle into a preset naming specification extraction model, extract a standard naming specification of the naming field of the to-be-processed database object based on the naming specification extraction model, and obtain an enterprise standard naming specification of the enterprise for the database object.
[0121] For example, the naming specification extraction prompt corresponding to the database object of the enterprise can include: "You are a database expert, and there is a batch of database tables and table fields. Please extract the table naming specification from them, extract high-frequency words, synonyms, unified prefixes, and unified suffixes, etc. The results are output in json format, classified by category, and the reason for each extraction is given."
[0122] For example, the extraction principle can include:
[0123] Table naming specification: all table names follow a consistent naming pattern, facilitating the identification, classification, and maintenance of database objects. The prefix indicates the system module, the entity abbreviation indicates the specific content, the camel case or underscore separation, the pinyin full name, the pinyin initial letter abbreviation, the English word or abbreviation;
[0124] High-frequency words: words that repeatedly appear in multiple tables or fields represent core concepts (such as identification, attributes, relationships), which helps to understand the general pattern of database design;
[0125] Synonyms: different words are similar in semantics but used in different contexts (such as language differences in names or entity types of identification), which reflects the flexibility and standardization needs of the data model;
[0126] Unified prefix: prefix used to quickly classify field types (such as Boolean attributes), improving readability and query efficiency;
[0127] Unified suffix: suffix used to identify the data type or relationship of the field (such as foreign keys), ensuring data consistency and reference integrity.
[0128] For example, the to-be-processed database object of the enterprise can be a database table, and the naming field of the to-be-processed database object can be a table field. The naming field of the to-be-processed database object of the enterprise can include:
[0129] (1) Database table: MX_SS_LJST | Logical entity table;
[0130] Field list corresponding to the naming field:
[0131] ID | Primary key;
[0132] MC|Name;
[0133] DM|Code;
[0134] CJR_ID|Creator ID.
[0135] (2) Database table: MX_WD_LJSX|Logical attribute table;
[0136] Naming field corresponding field list:
[0137] ID|Primary key ID;
[0138] LJST_ID|Logical entity ID;
[0139] ZWM|Chinese name;
[0140] YWM|English name;
[0141] CD|Length;
[0142] XSW|Decimal place;
[0143] SFWK|Is null;
[0144] SFZJ|Is primary key;
[0145] SFWY|Is unique;
[0146] WYJFL|Unique key classification;
[0147] QSGL|Default dimension;
[0148] CJR_ID|Creator ID.
[0149] (3) Database table: MX_SS_MXTYJL|Model projection record table; Naming field corresponding field list:
[0150] ID|Primary key;
[0151] TYFS|Projection mode;
[0152] TYZT|Projection state;
[0153] SJYLX|Data source type;
[0154] SJY_ID|Data source ID;
[0155] CJR_ID|Creator ID.
[0156] (4) Database table: MX_SS_WLB|Physical table;
[0157] Naming field corresponding field list:
[0158] ID|Primary key;
[0159] LJST_ID|Logical entity ID;
[0160] SJFC_ID|Data layer ID;
[0161] WLBMC|Physical table name;
[0162] WLBYWM|Physical table English name; CJR_ID|Creator ID.
[0163] (5) Database table: MX_WD_WLBZD|Physical table field table;
[0164] List of fields corresponding to the named fields:
[0165] ID|;
[0166] WLB_ID|Physical table ID;
[0167] LJSTSX_ID|Logical entity attribute ID;
[0168] ZDYWM|Field English name;
[0169] ZDZWM|Field Chinese name;
[0170] ZDLX|Field type;
[0171] CD|Length;
[0172] XSW|Decimal places;
[0173] SFWK|Is null;
[0174] SFZJ|Is primary key;
[0175] SFWJ|Is foreign key;
[0176] SFWY|Is unique;
[0177] CJR_ID|Creator ID.
[0178] For example, the enterprise standard naming specification of an enterprise for a database object can include:
[0179]
[0180]
[0181]
[0182] In step 320, for each enterprise, an enterprise database object naming specification knowledge base corresponding to the enterprise is constructed based on the enterprise standard naming specification of the enterprise for the database object.
[0183] In step 330, an industry standard naming specification of each industry field for the database object is obtained.
[0184] In step 340, for each industry field, an industry database object naming specification knowledge base corresponding to the industry field is constructed based on the industry standard naming specification of the industry field for the database object.
[0185] In step 350, a plurality of general naming specifications of the database object are obtained.
[0186] In step 360, a database object general naming specification knowledge base is constructed based on the plurality of general naming specifications of the database object.
[0187] In step 370, a naming specification knowledge base of the database object is constructed based on the enterprise database object naming specification knowledge base corresponding to each enterprise, the industry database object naming specification knowledge base corresponding to each industry field, and the database object general naming specification knowledge base.
[0188] Thus, the naming specification knowledge base of the database object can be constructed, and the accuracy and comprehensiveness of the naming specification knowledge base are improved.
[0189] In some embodiments of the present disclosure, the naming detection prompt corresponding to the target database object can include judging whether the naming field of the target database object conforms to the naming specification in the naming specification knowledge base, giving the reason why the naming field of the target database object does not conform to the naming specification, and the suggested naming field corresponding to the naming field of the target database object.
[0190] When the naming field of the target database object does not conform to the naming specification in the naming specification knowledge base, the naming detection result can include that the naming field of the target database object does not conform to the naming specification in the naming specification knowledge base, the reason why the naming field of the target database object does not conform to the naming specification, and the suggested naming field corresponding to the naming field of the target database object.
[0191] After the naming detection result is displayed, the computer device can also modify the naming field of the target database object to the suggested naming field in response to receiving a correction instruction of the naming field of the target database object from the user.
[0192] Based on the suggested naming field of the target database object, the naming specification in the naming specification knowledge base is updated to obtain an updated naming specification knowledge base.
[0193] If the user accepts the suggested naming field corresponding to the naming field of the target database object, they can click the naming correction button on the computer device, and the computer device will receive the user's correction instruction for the naming field of the target database object.
[0194] For example, computer devices can execute JDBC calibration commands by calling specific database connections via SQL;
[0195] Java Database Connectivity (JDBC) is an application programming interface in the Java language that specifies how client programs access databases, providing methods such as querying and updating data in the database.
[0196] Structured Query Language (SQL) is a special-purpose programming language, a database query and programming language used to access, query, update, and manage relational database systems.
[0197] This allows for timely correction of database object names that do not conform to naming conventions, thus improving the efficiency of database object naming correction.
[0198] In some embodiments, the computer device can verify the database object naming detection effect of the updated naming convention knowledge base based on the knowledge base online verification module (MOCK module), which facilitates dynamic updating and adjustment of the naming convention knowledge base.
[0199] In some embodiments of this disclosure, after displaying the naming detection results as described above, the computer device may also respond to receiving a user's confirmation instruction on the naming detection results, determine that the naming detection results are correct, and save the naming detection results;
[0200] The computer device can also determine that the naming detection result is incorrect in response to a negative instruction from the user regarding the naming detection result.
[0201] After the naming detection results are displayed, users can check whether the naming detection results match the actual results. If the naming detection results match the actual results, users can confirm that the naming detection results are correct. Users can click the naming detection result confirmation button on the computer device, and the computer device can receive the user's confirmation instruction for the naming detection results.
[0202] If the naming detection result does not match the actual result, the user can confirm that the naming detection result is incorrect. The user can click the naming detection result negation button on the computer device, and the computer device will receive the user's negation instruction for the naming detection result.
[0203] Therefore, by adding manual review of the naming detection results, problems in database object naming detection can be identified in a timely manner, enabling users to promptly check and address issues during the database object naming detection process and ensuring the accuracy of database object naming detection.
[0204] Figure 4 This is a schematic diagram of a database object naming detection device provided in an embodiment of this disclosure. This device can be understood as the aforementioned computer equipment or a functional module within the aforementioned computer equipment. Figure 4 As shown, the database object naming detection device 400 includes:
[0205] Module 410 is used to build a knowledge base for naming conventions of database objects;
[0206] Module 420 is used to obtain the naming fields of the target database object and the naming detection prompts corresponding to the target database object;
[0207] The detection module 430 is used to input the naming convention knowledge base, the naming fields of the target database object and the naming detection prompt into the preset naming convention detection model. Based on the naming convention detection model, it detects whether the naming fields of the target database object conform to the naming conventions in the naming convention knowledge base and obtains the naming detection result of the target database object.
[0208] Display module 440 is used to display the naming detection results.
[0209] Optionally, the above detection module includes:
[0210] The first identification submodule is used to identify, based on the naming convention detection model, whether there is an enterprise database object naming convention knowledge base in the naming convention knowledge base corresponding to the target enterprise to which the target database object belongs.
[0211] The second identification submodule is used to identify, based on the naming convention detection model, whether the naming fields of the target database object conform to the naming convention in the naming convention knowledge base corresponding to the target enterprise when the naming convention knowledge base exists, and to obtain the naming detection result of the target database object.
[0212] Optionally, the above detection module includes:
[0213] The third identification submodule is used to identify, based on the naming convention detection model, whether there is an industry database object naming convention knowledge base corresponding to the target industry field to which the target database object belongs in the naming convention knowledge base when there is no enterprise database object naming convention knowledge base corresponding to the target enterprise in the naming convention knowledge base.
[0214] The fourth identification submodule is used to identify, based on the naming convention detection model, whether the naming fields of the target database object conform to the naming conventions in the industry database object naming convention knowledge base corresponding to the target industry field when the naming convention knowledge base exists, and to obtain the naming detection result of the target database object.
[0215] Optionally, the above detection module includes:
[0216] The fifth identification submodule is used to identify, based on the naming convention detection model, whether the naming fields of the target database object conform to the naming conventions in the general naming conventions knowledge base of database objects within the naming conventions knowledge base when the naming conventions knowledge base does not contain an industry database object naming conventions knowledge base corresponding to the target industry domain, and to obtain the naming detection result of the target database object.
[0217] Optionally, the naming convention knowledge base mentioned above includes an enterprise database object naming convention knowledge base corresponding to each enterprise, an industry database object naming convention knowledge base corresponding to each industry field, and a general database object naming convention knowledge base.
[0218] The above-mentioned building modules include:
[0219] The first acquisition submodule is used to acquire the enterprise standard naming conventions for database objects from each of the multiple enterprises.
[0220] The first construction submodule is used to construct a knowledge base for the naming conventions of database objects for each enterprise, based on the enterprise's standard naming conventions for database objects.
[0221] The second acquisition submodule is used to acquire the industry standard naming conventions for database objects in each of multiple industry sectors.
[0222] The second construction submodule is used to construct an industry database object naming convention knowledge base for each industry field based on the industry standard naming convention for database objects in that industry field.
[0223] The third submodule is used to obtain multiple common naming conventions for database objects;
[0224] The third construction submodule is used to build a database object common naming convention knowledge base based on multiple common naming conventions for database objects.
[0225] The fourth submodule is used to construct a database object naming convention knowledge base based on the enterprise database object naming convention knowledge base corresponding to each enterprise, the industry database object naming convention knowledge base corresponding to each industry field, and the database object general naming convention knowledge base.
[0226] Optionally, the first acquisition submodule mentioned above includes:
[0227] The acquisition unit is used to acquire the named fields of the database object to be processed for each of the multiple enterprises.
[0228] The construction unit is used to construct the naming convention extraction prompts and extraction principles corresponding to the database objects of the enterprise.
[0229] The extraction unit is used to input the naming fields of the database object to be processed, the naming specification extraction prompts, and the extraction principles into a preset naming specification extraction model, and based on the naming specification extraction model, extract the standard naming specifications of the naming fields of the database object to be processed to obtain the enterprise's standard naming specifications for the database object.
[0230] Optionally, the naming detection prompts corresponding to the target database object include determining whether the naming fields of the target database object conform to the naming conventions in the naming convention knowledge base, providing the reason why the naming fields of the target database object do not conform to the naming conventions, and suggesting naming fields corresponding to the naming fields of the target database object;
[0231] When the naming field of the target database object does not conform to the naming conventions in the naming conventions knowledge base, the naming detection result includes the naming field of the target database object not conforming to the naming conventions in the naming conventions knowledge base, the reason why the naming field of the target database object does not conform to the naming conventions, and the suggested naming field corresponding to the naming field of the target database object;
[0232] The aforementioned database object naming detection device includes:
[0233] The modification module is used to modify the name field of the target database object to the suggested name field in response to receiving a user's correction instruction for the name field of the target database object;
[0234] The update module is used to update the naming conventions in the naming convention knowledge base based on the suggested naming fields of the target database object, so as to obtain the updated naming convention knowledge base.
[0235] The database object naming detection device provided in this disclosure can implement the method of any of the above embodiments, and its execution method and beneficial effects are similar, so they will not be described again here.
[0236] This disclosure also provides a computer device, which includes a processor and a memory, wherein the memory stores a computer program. When the computer program is executed by the processor, it can implement the methods of any of the above embodiments. The execution method and beneficial effects are similar, and will not be described again here.
[0237] The computer device in this disclosure can be understood as any device with processing and computing capabilities, including but not limited to electronic devices such as smartphones, laptops, personal digital assistants (PDAs), tablets (PADs), wearable devices, digital TVs, and desktop computers.
[0238] Figure 5 This is a schematic diagram of the structure of a computer device provided in an embodiment of this disclosure, such as... Figure 5 As shown, the computer device 500 may include a processor 510 and a memory 520. The memory 520 stores a computer program 521. When the computer program 521 is executed by the processor 510, it can implement the method provided in any of the above embodiments. Its execution mode and beneficial effects are similar and will not be described again here.
[0239] Of course, for the sake of simplicity, Figure 5 Only some of the components of the computer device 500 relevant to the present invention are shown in this illustration; components such as buses, input / output interfaces, input devices, and output devices are omitted. In addition, the computer device 500 may include any other suitable components depending on the specific application.
[0240] This disclosure provides a computer-readable storage medium storing a computer program. When the computer program is executed by a processor, it can implement the methods of any of the above embodiments. The execution method and beneficial effects are similar, and will not be described again here.
[0241] The aforementioned computer-readable storage medium may be any combination of one or more readable media. A readable medium may be a readable signal medium or a readable storage medium. A readable storage medium may, for example, include, but is not limited to, electrical, magnetic, optical, electromagnetic, infrared, or semiconductor systems, apparatuses, or devices, or any combination thereof. More specific examples of readable storage media (a non-exhaustive list) include: electrical connections having one or more wires, portable disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fibers, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination thereof.
[0242] The computer program described above can be written in any combination of one or more programming languages to perform the operations of the embodiments of this disclosure. The programming languages include object-oriented programming languages such as Java and C++, as well as conventional procedural programming languages such as C or similar languages. The program code can be executed entirely on the user's computer device, partially on the user's device, as a standalone software package, partially on the user's computer device and partially on a remote computer device, or entirely on a remote computer device or server.
[0243] The above description is merely a preferred embodiment of this disclosure and an explanation of the technical principles employed. Those skilled in the art should understand that the scope of this disclosure is not limited to technical solutions formed by specific combinations of the above-described technical features, but should also cover other technical solutions formed by arbitrary combinations of the above-described technical features or their equivalents without departing from the above-described concept. For example, technical solutions formed by substituting the above features with (but not limited to) technical features disclosed in this disclosure that have similar functions.
[0244] Furthermore, while the operations are described in a specific order, this should not be construed as requiring these operations to be performed in the specific order shown or in a sequential order. In certain environments, multitasking and parallel processing may be advantageous. Similarly, while several specific implementation details are included in the above discussion, these should not be construed as limiting the scope of this disclosure. Certain features described in the context of individual embodiments may also be implemented in combination in a single embodiment. Conversely, various features described in the context of a single embodiment may also be implemented individually or in any suitable sub-combination in multiple embodiments.
[0245] The above description is merely a specific embodiment of this disclosure, enabling those skilled in the art to understand or implement it. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of this disclosure. Therefore, this disclosure is not to be limited to the embodiments described herein, but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.
Claims
1. A database object naming detection method, characterized in that, include: Build a knowledge base for naming conventions of database objects; Obtain the naming fields of the target database object and the naming detection prompts corresponding to the target database object; The naming convention knowledge base, the naming fields of the target database object, and the naming detection prompt are input into a preset naming convention detection model. Based on the naming convention detection model, the naming fields of the target database object are detected to see if they conform to the naming conventions in the naming convention knowledge base, and the naming detection result of the target database object is obtained. The naming detection results are displayed.
2. The method according to claim 1, characterized in that, The step of detecting whether the named fields of the target database object conform to the naming conventions in the naming convention knowledge base based on the naming convention detection model includes: Based on the naming convention detection model, identify whether there is a naming convention knowledge base for enterprise database objects corresponding to the target enterprise to which the target database object belongs in the naming convention knowledge base; When the naming convention knowledge base for the target enterprise exists, the naming convention detection model is used to identify whether the naming fields of the target database object conform to the naming conventions in the naming convention knowledge base for the target enterprise database object, thereby obtaining the naming detection result of the target database object.
3. The method according to claim 2, characterized in that, The method further includes: If the naming convention knowledge base for the target enterprise does not exist in the naming convention knowledge base, the naming convention detection model is used to identify whether the naming convention knowledge base for the target database object belongs to the target industry domain. When the naming convention knowledge base contains an industry database object naming convention knowledge base corresponding to the target industry domain, the naming convention detection model is used to identify whether the naming fields of the target database object conform to the naming conventions in the industry database object naming convention knowledge base corresponding to the target industry domain, thereby obtaining the naming detection result of the target database object.
4. The method according to claim 3, characterized in that, The method further includes: If the naming convention knowledge base for the target industry domain does not exist in the naming convention knowledge base, the naming field of the target database object is identified based on the naming convention detection model to determine whether it conforms to the naming convention in the general naming convention knowledge base for database objects within the naming convention knowledge base, thereby obtaining the naming detection result of the target database object.
5. The method according to any one of claims 1-4, characterized in that, The naming convention knowledge base includes enterprise database object naming convention knowledge bases corresponding to each enterprise, industry database object naming convention knowledge bases corresponding to each industry field, and general database object naming convention knowledge bases. The naming convention knowledge base for constructing database objects includes: Retrieve the enterprise-standard naming conventions for database objects from each of multiple enterprises; For each of the aforementioned enterprises, a knowledge base for enterprise database object naming conventions is constructed based on the enterprise's standard naming conventions for database objects. Obtain the industry-standard naming conventions for database objects in each of multiple industry sectors; For each of the aforementioned industry sectors, an industry database object naming convention knowledge base is constructed based on the industry standard naming conventions for database objects in that industry sector. Obtain multiple common naming conventions for database objects; A knowledge base for common naming conventions of database objects is constructed based on multiple common naming conventions for database objects. A database object naming convention knowledge base is constructed based on the enterprise database object naming convention knowledge base corresponding to each enterprise, the industry database object naming convention knowledge base corresponding to each industry field, and the general database object naming convention knowledge base.
6. The method according to claim 5, characterized in that, The process of obtaining the enterprise-standard naming conventions for database objects for each of the multiple enterprises includes: For each of the multiple enterprises, obtain the named field of the database object to be processed for that enterprise; Construct the naming convention extraction prompts and extraction principles for the database objects of the enterprise; The naming fields of the database object to be processed, the naming specification extraction prompts, and the extraction principles are input into a preset naming specification extraction model. Based on the naming specification extraction model, the standard naming specifications of the naming fields of the database object to be processed are extracted to obtain the enterprise's standard naming specifications for database objects.
7. The method according to claim 1, characterized in that, The naming detection prompts for the target database object include determining whether the naming fields of the target database object conform to the naming conventions in the naming convention knowledge base, providing the reason why the naming fields of the target database object do not conform to the naming conventions, and suggesting naming fields corresponding to the naming fields of the target database object; When the naming field of the target database object does not conform to the naming conventions in the naming conventions knowledge base, the naming detection result includes the naming field of the target database object not conforming to the naming conventions in the naming conventions knowledge base, the reason why the naming field of the target database object does not conform to the naming conventions, and the suggested naming field corresponding to the naming field of the target database object; After displaying the naming detection results, the method further includes: In response to receiving a user's correction instruction for the naming field of the target database object, the naming field of the target database object is modified to the suggested naming field; Based on the suggested naming fields of the target database object, the naming conventions in the naming convention knowledge base are updated to obtain the updated naming convention knowledge base.
8. A database object naming detection device, characterized in that, include: The building module is used to build a knowledge base for naming conventions of database objects; The acquisition module is used to acquire the naming fields of the target database object and the naming detection prompts corresponding to the target database object; The detection module is used to input the naming convention knowledge base, the naming fields of the target database object, and the naming detection prompt into a preset naming convention detection model. Based on the naming convention detection model, it detects whether the naming fields of the target database object conform to the naming conventions in the naming convention knowledge base, and obtains the naming detection result of the target database object. The display module is used to display the naming detection results.
9. A computer device, characterized in that, include: A memory and a processor, wherein the memory stores a computer program that, when executed by the processor, implements the database object naming detection method as described in any one of claims 1-7.
10. A computer-readable storage medium, characterized in that, The storage medium stores a computer program, which, when executed by a processor, implements the database object naming detection method as described in any one of claims 1-7.