Parameter localization method and apparatus
By identifying fields and syntax keywords in the parameter file, constructing and executing a localized control loop, the cumbersome problem of parameter file localization is solved, and efficient and fully automated parameter localization is achieved.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- BANK OF CHINA
- Filing Date
- 2022-09-07
- Publication Date
- 2026-07-24
AI Technical Summary
Existing technologies lack efficient and fully automated methods for parameter localization, resulting in a cumbersome and error-prone process for parameter file localization.
By identifying the fields in the parameter file that need to be localized, determining the preceding keywords in the syntax, constructing parameter localization control loops, and executing these loops to achieve the localization of parameter fields.
It improves the accuracy and efficiency of parameter localization and enables efficient and fully automated processing of complex parameter files.
Smart Images

Figure CN115729623B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of distributed technology, and more particularly to a method and apparatus for parameter localization. Background Technology
[0002] This section is intended to provide background or context for the embodiments of the invention set forth in the claims. The description herein is not an admission that it is prior art simply because it is included in this section.
[0003] For large-scale application systems, in order to meet the needs of parallel development in multiple batches, multiple development environments, testing environments, and independent production environments are often configured. Therefore, frequent baseline and version matching is required between multiple environments. A very important task in this process is localization, especially the localization of parameters such as database, environment prefix, and storage path. However, as the number of development batches increases, the parameter library accumulates parameter files submitted from multiple development environments in various batches. This results in the original values of fields that need to be localized in the parameter files being complex and varied. Localization is no longer something that can be solved by one or two simple replacement statements. It becomes very tedious and error-prone.
[0004] Currently, there is a lack of a method and device that can achieve high-efficiency, fully automated customization of complex parameter files. Summary of the Invention
[0005] This invention provides a parameter localization method based on syntax analysis to achieve high-efficiency, high-accuracy, and fully automated parameter localization. The method includes:
[0006] Identify the parameter fields that need to be localized for each statement in the parameter file;
[0007] Determine the first keywords involved in the syntax used in the parameter file;
[0008] Based on the preceding keyword and the parameter fields that need to be localized, multiple parameter localization control loops are constructed. The parameter localization control loops are used to describe the processing timing and processing actions of the parameter fields that need to be parameterized in the parameter file.
[0009] Execute multiple parameter localization control loops to obtain the parameter fields after localization processing.
[0010] This invention also provides a parameter localization device based on syntax analysis to achieve high-efficiency, high-accuracy, and fully automated parameter localization. The device includes:
[0011] The identification module is used to identify the parameter fields that need to be localized for each statement in the parameter file.
[0012] The module for determining preceding keywords is used to determine the preceding keywords involved in the syntax used in the parameter file;
[0013] The control loop construction module constructs multiple parameter localization control loops based on the preceding keyword and the parameter fields that need to be localized. The parameter localization control loops are used to describe the processing timing and processing actions of the parameter fields that need to be parameterized in the parameter file.
[0014] The execution module is used to execute multiple parameter localization control loops to obtain the parameter fields after localization processing.
[0015] This invention also provides a computer device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the above-described parameter localization method.
[0016] This invention also provides a computer-readable storage medium storing a computer program that, when executed by a processor, implements the above-described parameter localization method.
[0017] This invention also provides a computer program product, which includes a computer program that, when executed by a processor, implements the above-described parameter localization method.
[0018] In this embodiment of the invention, the following steps are taken: First, identify the parameter fields that need to be localized for each statement in the parameter file. Second, determine the preceding keywords involved in the syntax used in the parameter file. Third, construct multiple parameter localization control loops based on the preceding keywords and the parameter fields that need to be localized. These loops describe the processing timing and actions for the parameter fields that need to be parameterized in the parameter file. Fourth, execute the multiple parameter localization control loops to obtain the localized parameter fields. In this process, a parameter localization control loop is constructed. By merging the state transition diagrams of all statements through preparatory and trigger states, a parameter localization control loop for this operation type is obtained. This ensures high accuracy and efficiency in the parameter localization process, solving the problem of cumbersome parameter file localization and achieving efficient, fully automated processing of complex parameter files. Attached Figure Description
[0019] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort. In the drawings:
[0020] Figure 1 This is a flowchart of the parameter localization method in an embodiment of the present invention;
[0021] Figure 2 This is a state transition diagram for creating a table in an embodiment of the present invention;
[0022] Figure 3 This is a state transition diagram for creating tablespaces in an embodiment of the present invention;
[0023] Figure 4 This invention provides a state transition diagram for creating a table of synonyms in an embodiment of the invention.
[0024] Figure 5 This is a state transition diagram for creating an index in an embodiment of the present invention;
[0025] Figure 6 This is the parameter localization control loop after merging the four states in this embodiment of the invention;
[0026] Figure 7 This is a schematic diagram of the parameter localization device in an embodiment of the present invention;
[0027] Figure 8 This is a schematic diagram of a computer device in an embodiment of the present invention. Detailed Implementation
[0028] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the embodiments of the present invention will be further described in detail below with reference to the accompanying drawings. Here, the illustrative embodiments of the present invention and their descriptions are used to explain the present invention, but are not intended to limit the present invention.
[0029] To simplify the parameter file localization process and improve the accuracy and efficiency of parameter localization, embodiments of the present invention provide a parameter localization method, such as... Figure 1 As shown, the method may include:
[0030] Step 101: Identify the parameter fields that need to be localized for each statement in the parameter file;
[0031] Step 102: Determine the first keywords involved in the syntax used in the parameter file;
[0032] Step 103: Based on the preceding keyword and the parameter fields that need to be localized, construct multiple parameter localization control loops. The parameter localization control loops are used to describe the processing timing and processing actions of the parameter fields that need to be parameterized in the parameter file.
[0033] Step 104: Execute multiple parameter localization control loops to obtain the parameter fields after localization processing.
[0034] In step 101, the parameter fields that need to be localized for each statement in the parameter file are identified.
[0035] In one embodiment, the parameter fields that need to be localized for each statement in the parameter file are identified, and the preceding keywords involved in the syntax used in the parameter file are determined, including:
[0036] The statements in the parameter file that need to be localized are categorized and parsed according to different syntaxes to identify the parameter fields that need to be localized.
[0037] Taking DB2 DDL as an example, in the following DDL statement syntax, the parameter fields that need to be localized are marked in bold. The "*" character indicates that the text unrelated to localization is omitted at the current position. In addition, repeatable items can be wrapped with the "{" character and "}" character.
[0038] Create a tablespace:
[0039] CREATE*TABLESPACE*IN DATABASE-NAME*STOGROUP STOGROUP-NAME*;
[0040] Create a table:
[0041] CREATE TABLE OWNER-NAME.TABLE-NAME*IN DATABASE-NAME.TABLE-SPACE-NAME*;
[0042] Create an index:
[0043] CREATE*INDEX*ON OWNER-NAME.TABLE-NAME*STOGROUP STOGROUP-NAME*;
[0044] Create synonyms:
[0045] CREATE SYNONYM*FOR OWNER-NAME.TABLE-NAME
[0046] Based on the prefix keywords of each statement in the parameter file, such as the DDL statement for creating a table, the parameter field OWNER-NAME immediately following the TABLE prefix keyword must be localized, and the parameter field DATABASE-NAME immediately following the IN prefix keyword must also be localized. When processing the table creation statement, it is read word by word sequentially, and when a marked prefix keyword is encountered, the field immediately following it is localized.
[0047] By identifying keywords, we can determine the parameter fields that need to be localized, thus masking the problem of different values from multiple sources.
[0048] In step 102, the preceding keywords involved in the syntax used by the parameter file are determined.
[0049] In the embodiment described, the preceding keywords in the syntax of the DDL statement include TABLE, ON, FOR, etc.
[0050] In step 103, multiple parameter localization control loops are constructed based on the preceding keyword and the parameter fields that need to be localized. The parameter localization control loops are used to describe the processing timing and processing actions of the parameter fields that need to be parameterized in the parameter file.
[0051] In one embodiment, the parameter localization control loop includes:
[0052] Processing status and processing actions;
[0053] The processing states include: preparatory state, triggering state, and execution state. The preparatory state is the initial state before the parameter localization control loop starts executing; the triggering state is the state when the parameter localization control loop is triggered; and the execution state is the state after the processing action is executed.
[0054] The processing actions include: reading the preceding keyword action and localizing the parameter field action. The reading the preceding keyword action is the action of reading the preceding keyword in the execution statement; the localizing the parameter field action is the action of performing localization processing on the parameter fields that need to be localized.
[0055] In one embodiment, multiple parameter localization control loops are constructed based on the preceding keyword and the parameter fields that need to be localized, including:
[0056] Based on the first keyword of each statement in the parameter file and the parameter fields that need to be localized, determine the state transition diagram for each statement;
[0057] For all statements of the same operation type, the state transition diagrams of all statements are merged through the preparatory state and the triggering state to obtain the parameter localization control loop for that operation type.
[0058] In one embodiment, based on the first keyword of each statement in the parameter file and the parameter fields that need to be localized, a state transition diagram for each statement is determined, including:
[0059] For each statement, based on the preceding keyword in the statement, determine multiple actions to read the preceding keyword, and determine the execution status corresponding to the completion of each action to read the preceding keyword;
[0060] Retrieve the parameter field immediately following each preceding keyword in the statement, determine the actions of multiple localized parameter fields, and determine the execution status corresponding to the completion of each localized parameter field action;
[0061] Based on the obtained execution status, the action of reading the preceding keyword, and the action of localizing the parameter field, determine the state transition diagram of the statement.
[0062] Taking the operation type as creation as an example, in specific implementation, such as Figure 2 The diagram shown illustrates the state transitions for creating a table according to an embodiment of the present invention. The determination process of this state transition module includes:
[0063] As mentioned earlier, the statement for creating the table is:
[0064] CREATE TABLE OWNER-NAME.TABLE-NAME*IN DATABASE-NAME.TABLE-SPACE-NAME*;
[0065] For the above statements, the execution state in the state transition diagram is represented by a circle, and the processing action is represented by a line. Then, the preceding keywords are determined to be TABLE and IN.
[0066] Among them, the action of reading the preceding key corresponding to TABLE is to read "TABLE", and the execution status corresponding to the completion of the action of reading the preceding key is "TABLE";
[0067] Among them, the action of reading the preceding key corresponding to IN is to read "IN", and the execution status corresponding to the completion of the action of reading the preceding key is "TABIN";
[0068] Then, the parameter field immediately following the TABLE is obtained as OWNER-NAME, the corresponding localization parameter field action is localization of "OWNER-NAME", and the execution status corresponding to the completion of the localization parameter field action is "TABDEF";
[0069] The parameter field immediately following IN is DATABASE-NAME. The corresponding localization parameter field action is to localize "DATABASE-NAME", and the execution status after the localization parameter field action is completed is "TABFIN".
[0070] Finally, connect the execution states and processing actions in the order of circles and lines to complete the construction of the state transition diagram for creating the table.
[0071] Taking the operation type as creation as an example, in specific implementation, such as Figure 3 The diagram shown illustrates the state transitions for creating a tablespace according to an embodiment of the present invention. The process for determining this state transition module includes:
[0072] The statement to create a tablespace is:
[0073] CREATE*TABLESPACE*IN DATABASE-NAME*STOGROUP STOGROUP-NAME*
[0074] For the above statements, the execution state in the state transition diagram is represented by a circle, and the processing action is represented by a line. Then, the preceding keywords are determined to be TABLESPACE, IN, and STOGROUP.
[0075] Among them, the action to read the preceding key for TABLESPACE is to read "TABLESPACE", and the execution status after the action to read the preceding key is "TSPACE" is completed.
[0076] Among them, the action of reading the preceding key corresponding to IN is to read "IN", and the execution status corresponding to the completion of the action of reading the preceding key is "TSIN";
[0077] Then, the parameter field immediately following IN is obtained as DATABASE-NAME, the corresponding localization parameter field action is to localize "DATABASE-NAME", and the execution status corresponding to the completion of the localization parameter field action is "TSUSE".
[0078] The parameter field immediately following STOGROUP is STOGROUP-NAME. The action to read the preceding keyword corresponding to STOGROUP is to read "STOGROUP". After the action to read the preceding keyword is completed, the execution status is "TSTOG". The corresponding action to localize the parameter field is to localize "STOGROUP-NAME". After the action to localize the parameter field is completed, the execution status is "TSFIN".
[0079] Finally, connect the execution states and processing actions in the order of circles and lines to complete the construction of the state transition diagram for creating the tablespace.
[0080] Taking the operation type as creation as an example, in specific implementation, such as Figure 4 The diagram shown illustrates the state transitions for creating synonyms according to an embodiment of the present invention. The determination process of this state transition module includes:
[0081] The statement for creating a synonym is:
[0082] CREATE SYNONYM*FOR OWNER-NAME.TABLE-NAME
[0083] For the above statement, determine that the execution state in the state transition diagram is represented by a circle, and the processing action is represented by a line. Then determine that the preceding keywords are SYNONYM and FOR.
[0084] Among them, the action of reading the preceding key corresponding to SYNONYM is to read "SYNONYM", and the execution status corresponding to the completion of the action of reading the preceding key is "SYNONYM";
[0085] Among them, the action corresponding to FOR is to read the preceding key, and the execution status after the action of reading the preceding key is completed is "SYNFOR";
[0086] Then, the parameter field immediately following FOR is obtained as OWNER-NAME, the corresponding localized parameter field action is to localize "OWNER-NAME", and the execution status corresponding to the completion of the localized parameter field action is "SYNFIN";
[0087] Finally, connect the execution states and processing actions in the order of circles and lines to complete the construction of the state transition diagram for creating synonyms.
[0088] Taking the operation type as creation as an example, in specific implementation, such as Figure 5 The diagram shown illustrates the state transitions for index creation according to an embodiment of the present invention. The determination process of this state transition module includes:
[0089] The statement to create an index is:
[0090] CREATE*INDEX*ON OWNER-NAME.TABLE-NAME*STOGROUP STOGROUP-NAME*
[0091] For the above statement, the execution state in the state transition diagram is represented by a circle, and the processing action is represented by a line. Then, the preceding keywords are determined to be INDEX, ON, and STOGROUP.
[0092] Among them, the action of reading the preceding key corresponding to INDEX is to read "INDEX", and the execution status corresponding to the completion of the action of reading the preceding key is "INDEX";
[0093] Among them, the action corresponding to ON is to read the preceding key, which is to read "ON", and the execution status after the action of reading the preceding key is completed is "INXON";
[0094] After that, the parameter field immediately following ON is OWNER-NAME, the corresponding localized parameter field action is to localize "OWNER-NAME", and the execution status corresponding to the completion of the localized parameter field action is "IDXUSE";
[0095] The parameter field immediately following STOGROUP is STOGROUP-NAME. The action to read the preceding keyword corresponding to STOGROUP is to read "STOGROUP". After the action to read the preceding keyword is completed, the execution status is "IDXSTOG". The corresponding action to localize the parameter field is to localize "STOGROUP-NAME". After the action to localize the parameter field is completed, the execution status is "IDXFIN".
[0096] Finally, connect the execution states and processing actions in the order of circles and lines to complete the construction of the state transition diagram for creating the index.
[0097] A complete creation statement begins with the `CREATE` keyword (triggering state) and ends with a semicolon (;). To handle all creation statements, including those creating tables, tablespaces, indexes, and synonyms, two states are introduced based on the state transition diagrams listed above: READY and CREATE. When processing a creation statement, the process starts in the READY state. Upon reading `CREATE`, it enters the CREATE state. In the CREATE state, depending on the keyword read, it enters the INDEX, SYNONYM, TSPACE, or TABLE states to complete subsequent processing. At any time, reading a semicolon (;) indicates the completion of a creation statement, and the process returns to the READY state. These two states connect the four state transition diagrams, resulting in a parameter-localized control loop as follows: Figure 6 As shown, the above control loop can automate the processing of all parameters in the repository that need to be localized.
[0098] The above describes the construction process of a parameter-localized control loop for operation type creation. For other cases such as insertion and deletion, the above creation process can be referred to, and will not be repeated here.
[0099] In step 104, multiple parameter localization control loops are executed to obtain the parameter fields after localization processing.
[0100] In one embodiment, multiple parameter localization control loops are executed to obtain localized parameter fields, including:
[0101] For each parameter localization control loop, starting from the preparatory state, after receiving the trigger instruction corresponding to the operation type of the parameter localization control loop, it enters the trigger state;
[0102] Starting from the processing action after the trigger state, the process proceeds to the next execution state, until it returns to the preparatory state, and obtains the parameter field after the localized processing of the parameter localization control loop.
[0103] Taking the state transition of executing a table creation statement as an example, after reading the TABLE keyword, the system enters the TABLE state. In this state, the next parameter field is identified as OWNER-NAME and localized. After completing this process, the system enters the TABDEF state. In the TABDEF state, after reading the IN keyword, the system enters the TABIN state. In the TABIN state, the next parameter field is unconditionally treated as DATABASE-NAME and localized. After completing this process, the system enters the TABFIN state, which is the end state of table creation. During the entire state transition process, the localization of a table creation statement is also completed.
[0104] In summary, the method proposed in this embodiment of the invention identifies the parameter fields that need to be localized for each statement in the parameter file; determines the preceding keywords involved in the syntax used in the parameter file; constructs multiple parameter localization control loops based on the preceding keywords and the parameter fields that need to be localized, and these control loops describe the processing timing and actions of the parameter fields that need to be parameterized in the parameter file; and executes these multiple control loops to obtain the localized parameter fields. In the above process, a parameter localization control loop is constructed, and the state transition diagrams of all statements are merged through preparatory and trigger states to obtain the parameter localization control loop for this operation type. This ensures high accuracy and efficiency in the parameter localization process, solves the problem of cumbersome parameter file localization, and thus achieves efficient and fully automated processing of complex parameter files.
[0105] This invention also provides a parameter localization device, as described in the following embodiments. Since the principle by which this device solves the problem is similar to that of the parameter localization method, the implementation of this device can be referred to the implementation of the parameter localization method, and repeated details will not be elaborated further.
[0106] To simplify the parameter file localization process and improve the accuracy and efficiency of parameter localization, embodiments of the present invention provide a parameter localization apparatus, such as... Figure 7 As shown, the device includes:
[0107] The identification module 701 is used to identify the parameter fields that need to be localized for each statement in the parameter file.
[0108] The preceding keyword determination module 702 is used to determine the preceding keywords involved in the syntax used in the parameter file;
[0109] The control loop construction module 703 is used to construct multiple parameter localization control loops based on the preceding keyword and the parameter fields that need to be localized. The parameter localization control loops are used to describe the processing timing and processing actions of the parameter fields that need to be parameterized in the parameter file.
[0110] Execution module 704 is used to execute multiple parameter localization control loops to obtain the parameter fields after localization processing.
[0111] In one embodiment, the identification module 701 is specifically used for:
[0112] The statements in the parameter file that need to be localized are categorized and parsed according to different syntax types, and the parameter fields that need to be localized are identified according to the corresponding syntax rules.
[0113] In one embodiment, the control loop construction module 703 includes:
[0114] The state transition module is used to determine the state transition diagram for each statement based on the first keyword of each statement in the parameter file and the parameter fields that need to be localized.
[0115] The merging module is used to merge all statements of the same operation type through the prepared state and the triggered state, and obtain the parameter localization control loop of that operation type.
[0116] In one embodiment, the parameter localization control loop construction module includes:
[0117] Processing status and processing actions;
[0118] The processing states include: a preparatory state and an execution state. The preparatory state is the initial state before the parameter localization control loop starts execution. The execution state is the state corresponding to the keyword read.
[0119] The processing actions include: reading and localization, where,
[0120] "Read" refers to reading the preceding keyword; "localize" refers to performing localization processing on the parameter fields that need to be localized.
[0121] In one embodiment, the state transition module is specifically used for:
[0122] For each statement, based on the preceding keyword in the statement, determine multiple actions to read the preceding keyword, and determine the execution status corresponding to the completion of each action to read the preceding keyword;
[0123] Retrieve the parameter fields following each preceding keyword in the statement, determine the actions of multiple localized parameter fields, and determine the execution status corresponding to the completion of each localized parameter field action;
[0124] Based on the obtained execution status, the action of reading the preceding keyword, and the action of localizing the parameter field, determine the state transition diagram of the statement.
[0125] In one embodiment, the execution module 704 is specifically used for:
[0126] For each parameter localization control loop, starting from the preparatory state, after receiving the trigger instruction corresponding to the operation type of the parameter localization control loop, it enters the trigger state;
[0127] Starting from the processing action after the trigger state, the process proceeds to the next execution state after the processing action is executed, until it returns to the preparatory state, and obtains the parameter field after localized processing obtained after the localized control loop is executed.
[0128] In summary, the apparatus proposed in this embodiment of the invention identifies the parameter fields that need to be localized for each statement in the parameter file; determines the preceding keywords involved in the syntax used in the parameter file; constructs multiple parameter localization control loops based on the preceding keywords and the parameter fields that need to be localized, and the parameter localization control loops are used to describe the processing timing and processing actions of the parameter fields that need to be parameterized in the parameter file; and executes the multiple parameter localization control loops to obtain the localized parameter fields. In the above process, a parameter localization control loop is constructed, and the state transition diagrams of all statements are merged through a preparatory state and a trigger state to obtain the parameter localization control loop for this operation type. This makes the parameter localization process accurate and efficient, solves the problem of cumbersome parameter file localization, and thus achieves efficient and fully automated processing of complex parameter files.
[0129] This invention also provides a computer device. Figure 8 This is a schematic diagram of a computer device in an embodiment of the present invention. The computer device 800 includes a memory 810, a processor 820, and a computer program 830 stored in the memory 810 and executable on the processor 820. When the processor 820 executes the computer program 830, it implements the aforementioned blockchain-based coupon payment method. This embodiment of the present invention also provides a computer-readable storage medium storing a computer program. When the computer program is executed by a processor, it implements the aforementioned parameter localization method.
[0130] This invention also provides a computer program product, which includes a computer program that, when executed by a processor, implements the above-described parameter localization method.
[0131] Those skilled in the art will understand that embodiments of the present invention can be provided as methods, systems, or computer program products. Therefore, the present invention can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, the present invention can take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0132] This invention is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the invention. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, generate instructions for implementing the flowchart illustrations and / or block diagrams. Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.
[0133] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.
[0134] These computer program instructions may also be loaded onto a computer or other programmable data processing equipment to cause a series of operational steps to be performed on the computer or other programmable equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.
[0135] The specific embodiments described above further illustrate the purpose, technical solution, and beneficial effects of the present invention. It should be understood that the above descriptions are merely specific embodiments of the present invention and are not intended to limit the scope of protection of the present invention. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the scope of protection of the present invention.
Claims
1. A parameter localization method, characterized in that, include: Identify the parameter fields that need to be localized for each statement in the parameter file; The parameter file is a file containing Database Definition Language (DDL) statements; Determine the preceding keywords used in the syntax of the parameter file; in the syntax of DDL statements, the preceding keywords include TABLE, ON, and FOR. Based on the preceding keyword and the parameter fields that need to be localized, multiple parameter localization control loops are constructed. The parameter localization control loops are used to describe the processing timing and processing actions of the parameter fields that need to be parameterized in the parameter file. Execute multiple parameter localization control loops to obtain the parameter fields after localization processing; Identify the parameter fields that need to be localized for each statement in the parameter file, including: The statements in the parameter file that need to be localized are categorized and parsed according to different syntaxes to identify the parameter fields that need to be localized; when processing the statements, they are read in order word by word, and when a marked keyword is encountered, the field immediately following it is localized.
2. The method as described in claim 1, characterized in that, The parameter localization control loop includes: Processing status and processing actions; The processing states include: preparatory state, triggering state, and execution state. The preparatory state is the initial state before the parameter localization control loop starts executing; the triggering state is the state when the parameter localization control loop is triggered; and the execution state is the state after the processing action is executed. The processing actions include: reading the preceding keyword action and localizing the parameter field action. The reading the preceding keyword action is the action of reading the preceding keyword in the execution statement; the localizing the parameter field action is the action of performing localization processing on the parameter fields that need to be localized.
3. The method as described in claim 2, characterized in that, Based on the preceding keyword and the parameter fields that need to be localized, construct multiple parameter localization control loops, including: Based on the first keyword of each statement in the parameter file and the parameter fields that need to be localized, determine the state transition diagram for each statement; For all statements of the same operation type, the state transition diagrams of all statements are merged through the preparatory state and the triggering state to obtain the parameter localization control loop for that operation type.
4. The method as described in claim 3, characterized in that, Based on the first keyword of each statement in the parameter file and the parameter fields that need to be localized, determine the state transition diagram for each statement, including: For each statement, based on the preceding keyword in the statement, determine multiple actions to read the preceding keyword, and determine the execution status corresponding to the completion of each action to read the preceding keyword; Retrieve the parameter field immediately following each preceding keyword in the statement, determine the actions of multiple localized parameter fields, and determine the execution status corresponding to the completion of each localized parameter field action; Based on the obtained execution status, the action of reading the preceding keyword, and the action of localizing the parameter field, determine the state transition diagram of the statement.
5. The method as described in claim 2, characterized in that, Execute multiple parameter localization control loops to obtain the localized parameter fields, including: For each parameter localization control loop, starting from the preparatory state, after receiving the trigger instruction corresponding to the operation type of the parameter localization control loop, it enters the trigger state; Starting from the processing action after the trigger state, the processing action is executed, and the next execution state is entered until the preparation state is returned, and the parameter field after the localized processing after the localized control loop is obtained.
6. A parameter localization device, characterized in that, include: The identification module is used to identify the parameter fields that need to be localized for each statement in the parameter file. The parameter file is a file containing Database Definition Language (DDL) statements; The module for determining preceding keywords is used to determine the preceding keywords involved in the syntax used in the parameter file; in the syntax of DDL statements, the preceding keywords include TABLE, ON, and FOR. The control loop construction module is used to construct multiple parameter localization control loops based on the preceding keyword and the parameter fields that need to be localized. The parameter localization control loops are used to describe the processing timing and processing actions of the parameter fields that need to be parameterized in the parameter file. The execution module is used to execute multiple parameter localization control loops to obtain the parameter fields after localization processing; The recognition module is specifically used for: The statements in the parameter file that need to be localized are categorized and parsed according to different syntaxes to identify the parameter fields that need to be localized; when processing the statements, they are read in order word by word, and when a marked keyword is encountered, the field immediately following it is localized.
7. The apparatus as claimed in claim 6, characterized in that, The parameter localization control loop includes: Processing status and processing actions; The processing states include: preparatory state, triggering state, and execution state. The preparatory state is the initial state before the parameter localization control loop starts executing; the triggering state is the state when the parameter localization control loop is triggered; and the execution state is the state after the processing action is executed. The processing actions include: reading the preceding keyword action and localizing the parameter field action. The reading the preceding keyword action is the action of reading the preceding keyword in the execution statement; the localizing the parameter field action is the action of performing localization processing on the parameter fields that need to be localized.
8. The apparatus as claimed in claim 7, characterized in that, The control loop building block includes: The state transition module is used to determine the state transition diagram for each statement based on the first keyword of each statement in the parameter file and the parameter fields that need to be localized. The merging module is used to merge all statements of the same operation type through the prepared state and the triggered state, and obtain the parameter localization control loop of that operation type.
9. The apparatus as claimed in claim 8, characterized in that, The state transition module is specifically used for: For each statement, based on the preceding keyword in the statement, determine multiple actions to read the preceding keyword, and determine the execution status corresponding to the completion of each action to read the preceding keyword; Retrieve the parameter fields following each preceding keyword in the statement, determine the actions of multiple localized parameter fields, and determine the execution status corresponding to the completion of each localized parameter field action; Based on the obtained execution status, the action of reading the preceding keyword, and the action of localizing the parameter field, determine the state transition diagram of the statement.
10. The apparatus as claimed in claim 7, characterized in that, The execution module is specifically used for: For each parameter localization control loop, starting from the preparatory state, after receiving the trigger instruction corresponding to the operation type of the parameter localization control loop, it enters the trigger state; Starting from the processing action after the trigger state, the process proceeds to the next execution state after the processing action is executed, until it returns to the preparatory state, and obtains the parameter field after localized processing obtained after the localized control loop is executed.
11. A computer device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the computer program, it implements the method of any one of claims 1 to 5.
12. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program that, when executed by a processor, implements the method of any one of claims 1 to 5.
13. A computer program product, characterized in that, The computer program product includes a computer program that, when executed by a processor, implements the method of any one of claims 1 to 5.