Tariff parameter script generation method, device, equipment and storage medium

By constructing a target scene template and generating parameter scripts based on user-updated element values, the problem of low efficiency and poor flexibility in generating parameter scripts in existing technologies is solved, achieving efficient and flexible parameter script generation.

CN115934064BActive Publication Date: 2025-11-25CHINA UNITED NETWORK COMM GRP CO LTD
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202211733803.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-12-30
Publication Date
2025-11-25
Estimated Expiration
2042-12-30

AI Technical Summary

Technical Problem

When business scenarios change, existing technologies generate parameter scripts that are inefficient and lack flexibility, requiring the development of new front-end interfaces or the creation of new templates and code updates.

Method used

By receiving the target scene selected by the user, a scene template is constructed based on the ID of the target scene. After the user updates the element values, the verification rules and construction algorithm are extracted from the scene template database, the scene SQL statement is generated, and the parameter script is concatenated, avoiding the need to modify the code separately.

Benefits of technology

It improves the flexibility and efficiency of parameter script generation, reduces repeated code modifications, and enhances the flexibility and efficiency of script generation.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115934064B_ABST
    Figure CN115934064B_ABST
Patent Text Reader

Abstract

The application provides a method, device and equipment for generating a tariff parameter script and a storage medium. The method comprises the following steps: receiving a target scenario selected by a user, constructing a target scenario template according to an ID of the target scenario and a preset scenario template database; extracting an element value checking rule, a scenario composition parameter and a construction algorithm of a scenario SQL statement from the scenario template database after the user updates the target scenario; extracting a matching relationship corresponding to an element value that passes a compliance check from a matching relationship between an element and the element value; extracting a corresponding field storage table and an operation type according to the matching relationship, splicing the operation type and the content in the field storage table according to the construction algorithm, and generating a scenario SQL statement corresponding to a COMP_ID; and generating a parameter script according to the scenario SQL statement corresponding to the COMP_ID. The method increases the efficiency of script generation and improves the flexibility of script generation.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of software development, and particularly relates to a method and device for generating a tariff parameter script, an equipment and a storage medium. BACKGROUND

[0002] A scripting language is a computer programming language created to shorten the edit-compile-link-run process. The common features of most scripting languages are: good rapid development, efficient execution, interpretation rather than compilation, and powerful communication with program components written in other languages, so the scripting language is widely used in the technical field of software development.

[0003] The prior art method for generating a data class script includes: developing a front-end interface for each business scenario, submitting a form after a user inputs relevant change content, and generating a final executable parameter change script through analysis and verification of back-end code; or formulating a fixed template for each business scenario, defining verification rules, analysis rules and script generation rules of the template content by a back-end program, and generating a final executable parameter script through imported scripts.

[0004] However, when the business scenario changes, developing a new front-end interface or formulating a new template, and updating the code for the new interface or template will reduce the efficiency of script generation and have poor flexibility. SUMMARY

[0005] The present application provides a method and device for generating a tariff parameter script, an equipment and a storage medium to solve the problem of low efficiency and poor flexibility in generating a parameter script.

[0006] In a first aspect, the present application provides a method for generating a tariff parameter script, comprising:

[0007] receiving a target scenario selected by a user, constructing a target scenario template according to an ID of the target scenario and a preset scenario template database, and sending the target scenario template to the user, wherein the target scenario template is used to prompt an element value corresponding to a scenario element included in the target scenario;

[0008] receiving an updated target scenario template of the user, wherein the updated target scenario template of the user adds the element value corresponding to the scenario element;

[0009] extracting, according to the ID of the target scene, an element value check rule, a scene constituting parameter and a construction algorithm of a scene SQL statement from the scene template database, the scene constituting parameter comprising: a scene SQL instance ID COMP_ID and a field storage table corresponding to the COMP_ID, an operation type and a matching relationship between an element and an element value;

[0010] performing compliance check on the element value according to the element value check rule to obtain an element value passing the compliance check;

[0011] extracting, from the matching relationship between the element and the element value, the matching relationship between the element and the element value corresponding to the element value passing the compliance check, and recording the COMP_ID corresponding to the matching relationship;

[0012] extracting, according to the recorded COMP_ID, the field storage table corresponding to the COMP_ID and the operation type, and splicing the operation type and the content in the field storage table according to the construction algorithm to generate a scene SQL statement corresponding to the COMP_ID;

[0013] generating a parameter script according to the scene SQL statement corresponding to the COMP_ID.

[0014] In a second aspect, the application provides a device for generating a parameter script, comprising:

[0015] a receiving module configured to receive a target scene selected by a user, construct a target scene template according to the ID of the target scene and a preset scene template database, and send the target scene template to the user, the target scene template being used to prompt the addition of an element value corresponding to a scene element included in the target scene;

[0016] The receiving module is further configured to receive an updated target scene template of the user, the updated target scene template of the user having the element value corresponding to the scene element added therein;

[0017] a calculating module configured to extract, according to the ID of the target scene, an element value check rule, a scene constituting parameter and a construction algorithm of a scene SQL statement from the scene template database, the scene constituting parameter comprising: a scene SQL instance ID COMP_ID and a field storage table corresponding to the COMP_ID, an operation type and a matching relationship between an element and an element value, and perform compliance check on the element value according to the element value check rule to obtain an element value passing the compliance check;

[0018] The computing module is further configured to extract the matching relationship between the element and the element value corresponding to the element value passing the compliance check from the matching relationship between the element and the element value, and record the COMP ID corresponding to the matching relationship;

[0019] The processing module is configured to extract the field storage table corresponding to the COMP ID and the operation type according to the recorded COMP ID, splice the operation type and the content in the field storage table according to the construction algorithm, generate a scene SQL statement corresponding to the COMP ID, and generate a parameter script according to the scene SQL statement corresponding to the COMP ID.

[0020] In a third aspect, the present application provides a device for generating a tariff parameter script, comprising:

[0021] a processor, a memory, and a communication interface;

[0022] The memory is configured to store executable instructions of the processor;

[0023] The processor is configured to execute the executable instructions to perform the method for generating a tariff parameter script according to the first aspect.

[0024] In a fourth aspect, the present application provides a readable storage medium, comprising:

[0025] The computer program is executed by the processor to perform the method for generating a tariff parameter script according to the first aspect.

[0026] The application provides a tariff parameter script generation method, device and equipment and a storage medium. The method comprises the following steps: receiving a target scene selected by a user, constructing a target scene template according to an ID of the target scene and a preset scene template database, sending the target scene template to the user, receiving an updated target scene template of the user, and adding an element value corresponding to a scene element in the updated target scene template. The preset scene template database contains parameters required in the construction process of the target scene template, so that the target scene template can be quickly generated according to the target scene selected by the user, and flexibility and efficiency are improved. Then, an element value checking rule, a scene composition parameter and a construction algorithm of a scene SQL statement are extracted from the scene template database according to the ID of the target scene. The preset scene template database stores various rules and parameters required in the parameter script generation process, and the server can select and use the parameters according to the ID of the target scene, thereby avoiding the process of separately modifying codes corresponding to each scene and improving the efficiency of script generation. Secondly, the element value is checked for compliance according to the element value checking rule, the matching relationship between an element and an element value corresponding to the element value that passes the compliance check is extracted from the matching relationship between the element and the element value, a COMP_ID corresponding to the matching relationship is recorded, a field storage table corresponding to the COMP_ID and an operation type are extracted according to the recorded COMP_ID, the operation type and the content in the field storage table are spliced according to the construction algorithm, a scene SQL statement corresponding to the COMP_ID is generated, and a parameter script is generated according to the scene SQL statement corresponding to the COMP_ID. The construction algorithm of the scene SQL statement is also extracted from the preset scene template database according to the ID of the target scene, so that the script generation process is more flexible and efficient. BRIEF DESCRIPTION OF DRAWINGS

[0027] The accompanying drawings, which are incorporated herein and form part of the specification, illustrate embodiments consistent with the present application and, together with the description, further serve to explain the principles of the application.

[0028] Figure 1 A flowchart of a tariff parameter script generation method provided by an embodiment of the application is shown in the figure.

[0029] Figure 2 A flowchart of a process of constructing a target scene template according to a target scene selected by a user and generating a parameter script according to a configuration scene template database provided by an embodiment of the application is shown in the figure.

[0030] Figure 3 A flowchart of a process of extracting a field storage table corresponding to a COMP_ID and an operation type according to the recorded COMP_ID, splicing the operation type and the content in the field storage table according to a construction algorithm, and generating a scene SQL statement corresponding to the COMP_ID provided by an embodiment of the application is shown in the figure.

[0031] Figure 4 A flowchart of a process for verifying an element value according to an element value verification rule, performing compliance verification on the element value, and extracting a COMP ID corresponding to a matching relationship between an element and an element value corresponding to the element value passing the compliance verification, is provided for an embodiment of the present application.

[0032] Figure 5 A program interaction interface example for a user is provided.

[0033] Figure 6 A structure diagram of a tariff parameter script generation device provided for an embodiment of the present application is provided.

[0034] Figure 7 A structure diagram of a tariff parameter script generation device provided for an embodiment of the present application is provided.

[0035] The above-described figures have shown the specific embodiments of the present application, which will be described in more detail hereinafter. These figures and the written description are not intended to limit the scope of the present application concept in any way, but to illustrate the present application concept to those skilled in the art by referring to specific embodiments. DETAILED DESCRIPTION

[0036] The exemplary embodiments will be described in detail herein with reference to the attached drawings. The same or similar components are denoted by the same or similar reference numerals throughout the drawings and the following description. The embodiments described in the following exemplary embodiments are not intended to represent all embodiments consistent with the present application. Rather, they are merely examples of apparatuses and methods consistent with some aspects of the present application as detailed in the appended claims.

[0037] The prior art method of generating a data class script includes developing a front-end interface for each business scenario, submitting a form after a user inputs relevant change content, and generating a final executable parameter change script through analysis and verification of back-end code. Or, a fixed template is formulated for each business scenario, the back-end program defines the verification rules, analysis rules, and script generation rules of the template content, and a final executable parameter script is generated through imported scripts. However, when the business scenario changes, developing a new front-end interface or formulating a new template, and updating the code for the new interface or template will reduce the efficiency of script generation and have poor flexibility.

[0038] The application receives a target scene selected by a user, constructs a target scene template according to an ID of the target scene and a preset scene template database, sends the target scene template to the user, receives a target scene template updated by the user, and adds an element value corresponding to a scene element in the target scene template updated by the user; then extracts an element value check rule, a scene composition parameter and a construction algorithm of a scene SQL statement from the scene template database according to the ID of the target scene; next, according to the element value check rule, performs compliance check on the element value, extracts a matching relationship between an element and an element value corresponding to the element value passing the compliance check from the matching relationship between the element and the element value, records a COMP_ID corresponding to the matching relationship, extracts a field storage table corresponding to the COMP_ID and an operation type according to the recorded COMP_ID, splices the operation type and content in the field storage table according to the construction algorithm, generates a scene SQL statement corresponding to the COMP_ID, and generates a parameter script according to the scene SQL statement corresponding to the COMP_ID.

[0039] The technical solutions of the application and how the technical solutions solve the above technical problems will be described in detail below with specific embodiments. The following specific embodiments can be combined with each other, and the same or similar concepts or processes can not be described again in some embodiments. The embodiments of the application will be described below with reference to the drawings.

[0040] Figure 1 A flowchart of a method for generating a tariff parameter script provided by the first embodiment of the application is shown.

[0041] As shown in Figure 1 , the method for generating a tariff parameter script can include the following steps:

[0042] S101, receiving a target scene selected by a user, constructing a target scene template according to an ID of the target scene and a preset scene template database, and sending the target scene template to the user, the target scene template being used to prompt addition of an element value corresponding to a scene element included in the target scene.

[0043] Specifically, after receiving the target scene selected by the user, the ID of the target scene corresponding to the target scene can be obtained according to the target scene selected by the user, wherein the scene can include a change scene of a tariff class parameter script used in an application program, for example: a scene of modifying the tariff name and description, and the ID of the scene refers to the ID corresponding to the scene selected by the user; then, according to the ID of the target scene, the related parameters corresponding to the ID of the target scene are screened from the preset scene template database, for example: scene definition parameters and scene element parameters and the like, and the related parameters are constructed into a target scene template for prompting the addition of element values corresponding to scene elements included in the target scene; finally, the target scene template is sent to the user, so that the user adds the element values corresponding to the scene elements included in the target scene according to the prompt, that is, the target scene template is updated.

[0044] The scene template database refers to a database preset and storing scene template construction parameter data, for example: scene definition parameters and scene element parameters and the like, and script generation required parameter data, for example: element value verification rules, scene composition parameters and scene SQL statement construction algorithms and the like. The scene template database can be updated with the addition of scenes.

[0045] The scene template refers to a template provided by the server to the user for collecting element values corresponding to the above-mentioned scene elements of the user. The template can be, for example: an excel table, and thus is also called an excel template.

[0046] S102, receiving the target scene template updated by the user, and the target scene template updated by the user adds element values corresponding to scene elements.

[0047] Specifically, as described in step S101, after receiving the target scene template sent by the server, the user can assign values to each scene element in the target scene according to the user's personal demand for the target scene, that is, add element values corresponding to the scene elements. The user can fill in or select element values in the scene template according to the user's personal demand for the selected scene. These element values change with the user's demand for the selected scene, and thus are variables. The user does not need to input or select corresponding element values for all elements. For example, when the user selects only to modify the element value of the tariff name at the element "NAME EXPLAIN-Please select the modification item", the user only needs to fill in or select the element values corresponding to "DISCAT_CODE-Target tariff" and "DISCAT_NAME-Modified target tariff name" two elements, and does not need to fill in the element value corresponding to "DISCAT EXPLAIN-Modified tariff description".

[0048] At this time, the target scene template is updated, and the user can submit the updated target template to the server. The server receives the updated target scene template of the user for generating a parameter script.

[0049] S103, extract the element value checking rule, scene composition parameter and scene SQL statement construction algorithm from the scene template database according to the ID of the target scene. The scene composition parameter includes: scene SQL instance ID COMP ID and field storage table corresponding to COMP ID, operation type and matching relationship between element and element value.

[0050] Specifically, after the server receives the updated target scene template of the user, the ID corresponding to the target scene, that is, the ID of the target scene, can be obtained. The required parameter data in the script generation process, such as the element value checking rule, the scene composition parameter and the scene SQL statement construction algorithm, can be extracted from the above-mentioned preset scene template database according to the ID of the target scene.

[0051] The element value checking rule refers to checking whether the element value filled in by the user conforms to the specified checking rule. The element value filled in by the user includes the element value added by the user in step S102 and the element value corresponding to the target scene generated by the target scene.

[0052] The scene composition parameters refer to important composition parameter data required in the parameter script generation process. The scene composition parameters can include a scene SQL instance ID COMP ID, a field storage table corresponding to the COMP ID, an operation type, and a matching relationship between an element and an element value.

[0053] Table 1

[0054]

[0055] The first column is a scene ID, the second column is a field storage table ID, the third column is a field storage table name, the fourth column is an operation type, the fifth column is a scene SQL instance ID ID, the sixth column is a matching type, the seventh column is a matching relationship between an element and an element value, and the eighth column is a note content of the matching relationship.

[0056] The scene SQL statement construction algorithm refers to a construction algorithm parameter required in the splicing process of the scene SQL statement. Different target scenes correspond to different construction algorithms, which are used to generate parameter scripts with different functions.

[0057] In S104, the element value is subjected to compliance verification according to the element value verification rule, and an element value passing the compliance verification is obtained.

[0058] Specifically, the element value corresponding to the scene element added in S102 can be subjected to compliance verification according to the element value verification rule extracted in S103. The element value passing the compliance verification can be used to extract a COMP ID corresponding to a matching relationship.

[0059] The element value verification rule refers to a verification rule for verifying whether the element value filled by the user conforms to the specified verification rule. The element value filled by the user includes the element value added by the user in S102 and the element value generated corresponding to the target scene.

[0060] The type of the element value verification rule can include a verification rule using a database query statement and a verification rule using a custom function call, etc. The custom function can include, for example, a regular expression function. For example, the verification rule using the database query statement can be used to verify whether the element value corresponding to the element “DISCAT_CODE-target tariff” exists in the scene template database. For example, the verification rule using the custom function call can be used to verify whether, for example, “unlimited” and the like that do not conform to the regulation exist in the element value corresponding to the element “modify tariff description as”.

[0061] S105. Extract the matching relationship between elements and element values ​​that corresponds to the element values ​​that have passed the compliance verification from the element-element matching relationship, and record the COMP_ID corresponding to the matching relationship.

[0062] Specifically, as described in step S103, the scene composition parameters corresponding to the target scene ID can be extracted from the scene template database based on the target scene ID. The scene composition parameters include: the scene SQL instance ID COMP_ID and the field storage table corresponding to COMP_ID, the operation type, and the matching relationship between elements and element values.

[0063] The element-value matching relationship refers to the matching relationship between scene elements and all element values. Element values ​​include all possible input, selection, and generated element values. For example, the element "NAME_EXPLAIN - Please select modification items" can include three matching relationships: "NAME_EXPLAIN = Modify name and description", "NAME_EXPLAIN = Modify only the tariff name", and "NAME_EXPLAIN = Modify only the tariff description".

[0064] Specifically, the element values ​​that passed the compliance check and the corresponding elements obtained in step S104 can be extracted and compared with the above matching relationships. The matching relationships corresponding to the element values ​​that passed the compliance check and the corresponding elements can be filtered out. For example, extract the element value that passed the compliance check - "Modify only the tariff name" and its corresponding element - "NAME_EXPLAIN - Please select the modification item". Compare the above matching relationship with the element - "NAME_EXPLAIN - Please select the modification item" and the element value - "Modify only the tariff name" to obtain the matching relationship "NAME_EXPLAIN = Modify only the tariff name" corresponding to the element value. Find the COMP_ID corresponding to the matching relationship according to the matching relationship and record it for use in generating the scenario SQL statement corresponding to COMP_ID.

[0065] S106. Extract the field storage table and operation type corresponding to COMP_ID based on the recorded COMP_ID. According to the construction algorithm, concatenate the operation type and the contents of the field storage table to generate the scenario SQL statement corresponding to COMP_ID.

[0066] Specifically, the field storage table and operation type corresponding to COMP_ID can be extracted based on COMP_ID recorded in step S105. The field storage table refers to the storage table that stores the important parameters required in the process of generating the scenario SQL statement. The specific values ​​of the parameters are updated with the update of the target scenario template, that is, they change with the user's needs for the target scenario.

[0067] Specifically, the operation type and the content in the field storage table can be spliced to generate the scene SQL statement corresponding to the COMP ID according to the construction algorithm of the scene SQL statement corresponding to the ID of the target scene extracted in step S103.

[0068] S107, generating a parameter script according to the scene SQL statement corresponding to the COMP ID.

[0069] Specifically, one COMP ID corresponds to one scene SQL statement. The scene SQL statement corresponding to the COMP ID generated above can be assembled to generate a parameter script.

[0070] The method for generating a tariff parameter script provided in the embodiment receives a target scene selected by a user, constructs a target scene template according to the ID of the target scene and a preset scene template database, sends the target scene template to the user, and then receives a target scene template updated by the user, wherein the target scene template updated by the user adds element values corresponding to scene elements; wherein the preset scene template data contains parameters required in the construction process of the target scene template, so that the target scene template can be quickly generated according to the target scene selected by the user, and flexibility and efficiency are improved. Then, the element value verification rule, the scene composition parameter and the construction algorithm of the scene SQL statement are extracted from the scene template database according to the ID of the target scene; wherein the preset scene template database stores various rules and parameters required in the parameter script generation process, and the server can select and use the rules and parameters according to the ID of the target scene, avoiding the process of separately modifying the code corresponding to each scene, and improving the efficiency of script generation. Secondly, the element value is verified for compliance according to the element value verification rule, the matching relationship between the elements and the element values corresponding to the element values that pass the compliance verification is extracted from the matching relationship between the elements and the element values, the COMP ID corresponding to the matching relationship is recorded, and the field storage table and the operation type corresponding to the COMP ID are extracted according to the recorded COMP ID, the operation type and the content in the field storage table are spliced according to the construction algorithm, the scene SQL statement corresponding to the COMP ID is generated, and the parameter script is generated according to the scene SQL statement corresponding to the COMP ID. The construction algorithm of the scene SQL statement is also extracted from the preset scene template database according to the ID of the target scene, so that the script generation process is more flexible and efficient.

[0071] Figure 2 The configuration scene template database provided in the second embodiment of the application generates a parameter script according to the user-selected target scene.

[0072] As Figure 2As shown, the configuration scenario template database of the embodiment, the target scenario template is constructed according to the target scenario selected by the user, and the generation parameter script can include the following steps:

[0073] Step S201, configure the scenario template database, and the scenario template database includes:

[0074] The scene ID and the scene definition parameter corresponding to the scene ID, the scene element parameter, the element value verification rule, the scene composition parameter and the construction algorithm of the scene SQL statement.

[0075] Specifically, before receiving the target scenario selected by the user and constructing the target scenario template according to the target scenario selected by the user, the scenario template database needs to be configured first. The scenario template database refers to a database that is preset and stores scenario template construction parameter data, such as scene definition parameters and scene element parameters and script generation required parameter data, such as element value verification rules, scene composition parameters and construction algorithms of scene SQL statements. The scenario template database can be updated as the scene is added.

[0076] Step S202, receiving the target scenario selected by the user.

[0077] Specifically, the user can select the target scenario in the program interaction interface, and the program interaction interface sends the target scenario selected by the user collected to the server, so as to generate the target scenario template according to the target scenario selected by the user.

[0078] Step S203, according to the target scenario, obtaining the ID of the target scenario from the scenario template database, and obtaining the target scene definition parameter and the target scene element parameter corresponding to the ID of the target scene according to the ID of the target scene.

[0079] Specifically, after the server receives the target scenario selected by the user, the ID of the target scenario can be obtained from the scenario template database set in step S201, and further the scene definition parameter and the scene element parameter corresponding to the ID of the target scene can be obtained according to the ID of the target scene.

[0080] The target scene definition parameter refers to the parameter for defining the concept of the target scene and the matters needing attention of the target scene, which can include scene name and scene operation parameter, etc. For example, when the scene ID is 1, the corresponding scene name is: modify the name of the fee, and the scene operation parameter can include: the description information of the scene, the operation matters needing attention, etc. For example, it can be: "selectable modification item, only modify the field corresponding to the corresponding modification item. For example, if you only modify the name of the fee, do not modify the description."

[0081] Table 2 is an example table of target scene definition parameters.

[0082] Table 2

[0083]

[0084] In the table, the first column is the target scene ID, the second column is the parameter of the target scene concept, and the third column is the parameter of the target scene note.

[0085] The target scene element parameter refers to a parameter describing the scene elements included in the target scene, which can include: element ID, element name, element Chinese name, element display order on the application interaction interface, element display format, and content list of the drop-down list when the element display format is a drop-down list, and other parameters.

[0086] In which, the element refers to: the scene parameters that the server needs to collect from the user when setting the scene, wherein the parameter values selected or filled in by the user are called element values. The element ID, element name and element Chinese name are one-to-one corresponding, for example: when the scene ID is 1, the corresponding element ID is 102-104, and the corresponding element and the Chinese name of the element are: "NAME_EXPLAIN-Please select the modification item", "DISCAT_CODE-Target tariff", "DISCAT_NAME-Modify the target tariff name as", "DISCAT_EXPLAIN Modify the tariff description as". The display order of the element on the application interaction interface refers to the display order of the element in the scene template, for example: the order of the element "DISCAT_CODE-Target tariff" is 1, the order of the element "NAME_EXPLAIN-Please select the modification item" is 2, the order of the element "DISCAT_NAME-Modify the target tariff name as" is 3, and the order of the element "DISCAT_EXPLAIN Modify the tariff description as" is 4.

[0087] Table 3 is an example table of target scene element parameters.

[0088] Table 3

[0089]

[0090]

[0091] In which, the first column is the scene ID, the second column is the element ID, the third column is the element name, the fourth column is the element Chinese name, the fifth column is the element display order, the sixth column is the element display format, and the seventh column is the content list of the element drop-down list.

[0092] The display format of the element includes a drop-down list and an input box. When the display format of the element is an input box, the user can input the element value corresponding to the element in the input box. When the display format of the element is a drop-down list, the content list of the drop-down list includes the element values for selection, and the user can click the drop-down list to select the element value corresponding to the element according to the content list of the drop-down list. For example, the display format of the element "NAME EXPLAIN - Please select the modification item" is a drop-down list, and the corresponding content list includes three element values: modifying the name and description, only modifying the tariff name, and only modifying the tariff description, wherein each element value is separated by a ",".

[0093] In step S204, a target scene template is constructed according to the target scene definition parameters and the target scene element parameters corresponding to the ID of the target scene.

[0094] Specifically, the target scene definition parameters and the target scene element parameters corresponding to the ID of the target scene described in step S203 can be integrated to construct a target scene template. The scene template refers to a template provided by the server to the user for collecting the element values corresponding to the above elements of the user. This template can be, for example, an excel table, and is therefore also called an excel template.

[0095] Table 4 is an example of a target scene template.

[0096] Table 4

[0097]

[0098] The first row is the parameter of the target scene concept, the second row is the parameter of the target scene matters needing attention, and the third row is the element value corresponding to the element, which is the content added by the user.

[0099] In step S205, the target scene template is sent to the user, and the updated target scene template of the user is received.

[0100] Specifically, after the construction of the above scene template is completed, the constructed scene template can be sent to the user. For example, the user can download the scene template after selecting a specific target scene.

[0101] The user can fill in or select the element value corresponding to the scene element according to the demand of the target scene, that is, update the target scene template, and send the updated target scene template to the server. The server can receive the updated target scene template of the user for generating a parameter script.

[0102] In step S206, a parameter script is generated according to the updated scene template of the user and the scene template database.

[0103] Specifically, after receiving the updated scene template of the user, the server can generate the parameter script corresponding to the scene according to the updated scene template and the scene template database. The specific generation process can refer to steps S103-S107 described above.

[0104] Step S207: return the generated parameter script to the user.

[0105] Specifically, the parameter script corresponding to the scene generated in step S206 can be returned to the user for calling and executing by the user.

[0106] The configuration scene template database provided by the embodiment, according to the user selected target scene to construct the target scene template, generates the parameter script process, describes the configuration process of the scene template database, the generation process of the target scene template and the processing process of the parameter script after the generation of the parameter script on the basis of the first embodiment. Among them, the configuration of the scene template database provides the basis for the generation of the target scene template, so that the generation process of the target scene template is more flexible, and the efficiency of the parameter script generation is further improved.

[0107] Figure 3 The flowchart of generating the scene SQL statement corresponding to the COMP ID according to the recorded COMP ID to extract the field storage table and the operation type corresponding to the COMP ID according to the construction algorithm, and splicing the contents in the field storage table and the operation type provided by the third embodiment of the present application.

[0108] As shown in Figure 3 The embodiment of generating the scene SQL statement corresponding to the COMP ID according to the recorded COMP ID to extract the field storage table and the operation type corresponding to the COMP ID according to the construction algorithm, and splicing the contents in the field storage table and the operation type can include the following steps:

[0109] Step S301: extracting the field storage table and the operation type corresponding to the COMP ID according to the recorded COMP ID.

[0110] Specifically, as described in step S106, the field storage table and the operation type corresponding to the COMP ID can be extracted according to the recorded COMP ID in step S105.

[0111] Specifically, the field storage table refers to a storage module for storing the fields of the scene SQL statement. Among them, the field storage table can include: field name, field value conversion type, to be converted value and identification of whether the field is used as a query part.

[0112] Table 5 is an example table of field conversion.

[0113] Table 5

[0114]

[0115] The first column is the scene SQL instance ID ID, the second column is the field name, the third column is the table name of the field storage table, the fourth column is the field value conversion type, the fifth column is the to-be-converted value, and the last column is the identification of whether the field is used as a query part.

[0116] The field name refers to the name of the field. For example, the field can be one-to-one corresponding to the element, and the field name is consistent with the element name.

[0117] The to-be-converted value refers to an element value converted into a field value according to a field value conversion rule.

[0118] The field value conversion type refers to the type of field value conversion mode corresponding to the type of element value. According to the description in step S103, the type of element value can include a constant value, a variable value, and a special type of value such as a time value. The field value corresponds to the field one-to-one, and different field value conversion types correspond to different field value conversion rules. The field value conversion rule includes a field value conversion rule corresponding to a constant value, a field value conversion rule corresponding to a variable value, and a field value conversion rule corresponding to a special type of value. For example, when the field value conversion type is 3, it corresponds to the field value conversion rule corresponding to the variable value. The element value filled in or selected by the user can be used as the field value. For example, when the field value conversion type is 1, it corresponds to the field value conversion mode corresponding to the constant value. The fixed constant value can be used as the field value.

[0119] The identification of whether the field is used as a query part is a reference identification of whether the field is used as a query part in the generation process of the scene SQL statement. For example, when the identification of whether the field is used as a query part is 1, the field can be used as a query part.

[0120] Step S302, updating the field storage table corresponding to COMP_ID, and extracting the content in the updated field storage table.

[0121] Specifically, the field storage table corresponding to the scene SQL instance ID COMP_ID can be updated according to the field value conversion rule corresponding to the field value conversion type described in step S301.

[0122] Firstly, the field storage table corresponding to the scene SQL instance ID COMP ID is determined, specifically, each scene SQL instance ID COMP ID has a corresponding field storage table for storing the fields and field values required for script statement generation and the like. Therefore, the field storage table corresponding to the scene SQL instance ID COMP ID can be determined according to the recorded scene SQL instance ID COMP ID.

[0123] Secondly, the element value corresponding to the scene element is converted into a field value according to the field value conversion rule corresponding to the field value conversion type; specifically, as described above, the fields in the field storage table correspond to the elements, that is, the field names and element names are consistent. Therefore, the element value corresponding to the scene element can be converted into a field value according to the field value conversion rule corresponding to the field value conversion type described above, saved to the field storage table, and the update of the field storage table corresponding to COMP ID is completed.

[0124] Finally, the content required in the scene SQL statement generation process can be extracted from the updated field storage table to generate the scene SQL statement.

[0125] Step S303, according to the construction algorithm, the operation type and the content in the updated field storage table are spliced to generate the scene SQL statement corresponding to COMP ID.

[0126] Specifically, first, the field name, field value, and whether the field is used as a query part identifier and the like can be extracted from the updated field storage table; second, the construction algorithm of the scene SQL statement can be extracted from the scene template database described in step S201, and the field storage table name operation type and the table name corresponding to the field storage table corresponding to COMP ID can be extracted; according to the splicing syntax of the scene SQL statement and whether the field is used as a query part identifier, the operation type, the name of the field storage table, the field, and the field value are spliced into the scene SQL statement corresponding to COMP ID.

[0127] In the process provided in the embodiment of extracting the field storage table and the operation type corresponding to COMP ID according to the recorded COMP ID, splicing the operation type and the content in the field storage table according to the construction algorithm to generate the scene SQL statement corresponding to COMP ID, it is proposed that the field storage table is updated according to the element value added by the user by using the field value conversion mode corresponding to the type of the element value stored in the scene template database, and the scene SQL statement is further generated according to the updated field storage table. The updating process of the field storage table does not need to be re-coded, and the updating can be directly performed according to the preset rules in the scene template database, which improves the generation efficiency of the scene SQL statement and further improves the generation efficiency of the parameter script.

[0128] Figure 4 This is a flowchart illustrating the process of performing compliance verification on element values ​​according to element value verification rules, and extracting COMP_ID corresponding to the matching relationship between the element and element value that passed the compliance verification, as provided in the fourth embodiment of this application.

[0129] like Figure 4 As shown, in this embodiment, the compliance verification of element values ​​according to element value verification rules, and the extraction of COMP_ID corresponding to the matching relationship between the element and the element value corresponding to the element value that passed the compliance verification, may include the following steps:

[0130] Step S401: Perform compliance verification on the element value according to the element value verification rules.

[0131] Specifically, as described in step S104, the element value can be validated for compliance according to the element value validation rules.

[0132] Step S402: Store the element values ​​that pass the compliance check and the corresponding elements in the cache, and return the results of the element values ​​that fail the compliance check to the user.

[0133] Specifically, the element values ​​that pass the compliance verification in step S401 and the corresponding elements can be stored in the cache. For example, the element value "Modify only the tariff name" can be verified using the element value verification rules retrieved from the scenario template database based on the target scenario ID. If the element value "Modify only the tariff name" exists in the scenario template database, then the element value has passed the compliance verification. The element value "Modify only the tariff name" and the element "NAME_EXPLAIN - Please select the modification item" can be stored in the cache for use in generating scenario SQL statements.

[0134] Specifically, the result of the element value failing the compliance check in step S401 can be returned to the user's program interaction interface, so that the user can update the target scene template according to the feedback result and re-upload it in the program interaction interface to generate the parameter script corresponding to the scene. Figure 5 This is an example of the user's program interface. The user interface includes functions such as target scene selection, target scene template download, importing updated target templates, parameter script presentation, and element value compliance verification result presentation.

[0135] Step S403: Extract the element value that has passed the compliance check and the element corresponding to the element value from the cache.

[0136] Specifically, the element value and the corresponding element that pass the compliance check in step S402 are extracted and compared with the matching relationship between the element and the element value described in step S103.

[0137] In step S404, the matching relationship between the element and the element value corresponding to the element value that passes the compliance check is extracted from the matching relationship between the element and the element value, and the COMP ID corresponding to the matching relationship is recorded.

[0138] Specifically, the matching relationship corresponding to the element value that passes the compliance check and the corresponding element is filtered by comparing the element value and the corresponding element that pass the compliance check with the matching relationship between the element and the element value described in step S103 in step S105; for example, the element value that passes the compliance check, "only modify the tariff name", and the corresponding element, "NAME_EXPLAIN-Please select the modification item", are extracted, the above matching relationship is compared with the element "NAME_EXPLAIN-Please select the modification item" and the element value "only modify the tariff name", and the matching relationship "NAME_EXPLAIN=only modify the tariff name" corresponding to the element value is obtained; the COMP ID corresponding to the matching relationship is found according to the matching relationship, and is recorded for generating the scenario SQL statement corresponding to the COMP ID.

[0139] The process of performing compliance check on the element value according to the element value check rule, extracting the COMP ID corresponding to the matching relationship between the element and the element value corresponding to the element value that passes the compliance check, provided by the embodiment, increases the description of the step of processing the situation that does not meet the compliance check after the compliance check on the element value, and makes the generation process of the parameter script more perfect.

[0140] Figure 6 A structure schematic diagram of a tariff parameter script generation device provided by the fifth embodiment of the application.

[0141] As shown in Figure 6 The tariff parameter script generation device 60 of the embodiment includes a receiving module 61, a calculation module 62, and a processing module 63.

[0142] The receiving module 61 is configured to receive a target scenario selected by a user, construct a target scenario template according to the ID of the target scenario and a preset scenario template database, and send the target scenario template to the user, where the target scenario template is used to prompt the addition of the element value corresponding to the scenario element included in the target scenario.

[0143] The receiving module 61 is further configured to receive the target scenario template updated by the user, and the target scenario template updated by the user includes the element value corresponding to the scenario element.

[0144] The computing module 62 is configured to extract the element value check rule, the scene construction parameter, and the construction algorithm of the scene SQL statement from the scene template database according to the ID of the target scene, the scene construction parameter including the scene SQL instance ID COMP ID and the field storage table corresponding to the COMP ID, the operation type, and the matching relationship between the element and the element value, and performing compliance check on the element value according to the element value check rule to obtain the element value passing the compliance check.

[0145] The computing module is further configured to extract the matching relationship between the element and the element value corresponding to the element value passing the compliance check from the matching relationship between the element and the element value, and record the COMP ID corresponding to the matching relationship.

[0146] The processing module 63 is configured to extract the field storage table corresponding to the COMP ID and the operation type according to the recorded COMP ID, splice the operation type and the content in the field storage table according to the construction algorithm, generate the scene SQL statement corresponding to the COMP ID, and generate the parameter script according to the scene SQL statement corresponding to the COMP ID.

[0147] The apparatus for generating the tariff parameter script provided in the embodiment can be used to execute the technical solutions of the method embodiments Figures 1 to 4 , and has similar implementation principles and technical effects, which will not be described herein again.

[0148] Figure 7 FIG. 7 is a structural schematic diagram of an apparatus for generating a tariff parameter script provided in the sixth embodiment of the present application.

[0149] As shown in FIG. 7, the apparatus 70 for generating a tariff parameter script in the embodiment includes a processor 71, a memory 72, and a communication interface 73. Figure 7 The memory 72 is configured to store executable instructions of the processor.

[0150] The processor 71 is configured to execute the executable instructions to execute the method for generating a tariff parameter script in any of the method embodiments.

[0151] Figures 1 to 4 The present application also provides a readable storage medium having a computer program stored thereon, wherein the computer program is executed by the processor to implement the method for generating a tariff parameter script in any of the method embodiments.

[0152] The present application also provides a readable storage medium having a computer program stored thereon, wherein the computer program is executed by the processor to implement the method for generating a tariff parameter script in any of the method embodiments. Figures 1 to 4

[0153] ​​It should be noted that the user information (including but not limited to user equipment information, user personal information, etc.) and data (including but not limited to data for analysis, stored data, displayed data, etc.) involved in the present application are all information and data authorized by the user or authorized by all parties, and the collection, use and processing of related data need to comply with relevant laws, regulations and standards of countries and regions, and provide corresponding operation entrances for users to choose authorization or refusal.

[0154] Other embodiments of the application will be apparent to those skilled in the art from consideration of the specification and practice of the application disclosed herein. It is intended that the specification and examples be considered as exemplary only, with the true scope and spirit of the application being indicated by the following claims.

[0155] It should be understood that the application is not limited to the precise construction that has been described above and shown in the accompanying drawings, and that various modifications and changes can be made by those skilled in the art without departing from the scope of the application. The scope of the application is limited only by the appended claims.

Claims

1. A method of generating a tariff parameter script, characterized by, Comprise: Receiving a target scene selected by a user, constructing a target scene template according to an ID of the target scene and a preset scene template database, and sending the target scene template to the user, wherein the target scene template is used to prompt an element value corresponding to a scene element included in the target scene; the target scene comprises a change scene of a tariff parameter script used in an application program; Receiving an updated target scene template of the user, wherein the updated target scene template of the user adds the element value corresponding to the scene element; Extracting an element value checking rule, a scene constituting parameter and a construction algorithm of a scene SQL statement from the scene template database according to the ID of the target scene, wherein the scene constituting parameter comprises a scene SQL instance ID COMP_ID, a field storage table corresponding to the COMP_ID, an operation type and a matching relationship between an element and an element value; According to the element value checking rule, the element value is checked for compliance, and an element value passing the compliance check is obtained; Extracting the matching relationship between the element and the element value corresponding to the element value passing the compliance check from the matching relationship between the element and the element value, and recording the COMP_ID corresponding to the matching relationship; According to the recorded COMP_ID, the field storage table corresponding to the COMP_ID and the operation type are extracted, the operation type and the content in the field storage table are spliced according to the construction algorithm, and the scene SQL statement corresponding to the COMP_ID for changing the tariff parameter is generated; According to the scene SQL statement corresponding to the COMP_ID, a tariff parameter script is generated; The scene template database comprises the scene ID and the scene definition parameter, the scene element parameter, the element value checking rule, the scene constituting parameter and the construction algorithm of the scene SQL statement corresponding to the scene ID.

2. The method of claim 1, wherein, Before the receiving a target scene selected by a user, it further comprises configuring a scene template database.

3. The method of claim 2, wherein, The receiving a target scene selected by a user, constructing a target scene template according to an ID of the target scene and a preset scene template database, comprises: Receiving a target scene selected by a user; According to the target scene, obtaining the ID of the target scene from the scene template database, and obtaining the target scene definition parameter and the target scene element parameter corresponding to the ID of the target scene according to the ID of the target scene; According to the target scene definition parameter and the target scene element parameter corresponding to the ID of the target scene, constructing the target scene template.

4. The method of claim 1, wherein, According to the recorded COMP_ID, the field storage table corresponding to the COMP_ID and the operation type are extracted, the operation type and the content in the field storage table are spliced according to the construction algorithm, and the scene SQL statement corresponding to the COMP_ID is generated, comprising: According to the recorded COMP_ID, the field storage table corresponding to the COMP_ID and the operation type are extracted; updating the field storage table corresponding to the COMP_ID, extracting the content in the updated field storage table; according to the construction algorithm, splicing the operation type and the content in the updated field storage table to generate a scene SQL statement corresponding to the COMP_ID.

5. The method of claim 1, wherein, After generating the parameter script according to the scene SQL statement corresponding to the COMP_ID, the method further comprises: returning the generated parameter script to the user.

6. The method of claim 1, wherein, After performing the compliance check on the element value according to the element value check rule to obtain the element value passing the compliance check, the method further comprises: storing the element value passing the compliance check and the element corresponding to the element value in the cache; returning the result of the element value failing the compliance check to the user.

7. The method of claim 6, wherein, Before extracting the matching relationship between the element and the element value corresponding to the element value passing the compliance check from the matching relationship between the element and the element value, and recording the COMP_ID corresponding to the matching relationship, the method further comprises: extracting the element value passing the compliance check and the element corresponding to the element value from the cache.

8. An apparatus for generating a tariff parameter script, characterized by The method comprises: a receiving module configured to receive a target scene selected by a user, construct a target scene template according to an ID of the target scene and a preset scene template database, and send the target scene template to the user, the target scene template being used to prompt an element value corresponding to a scene element included in the target scene, and the target scene including a change scene of a tariff parameter script used in an application program; the receiving module is further configured to receive an updated target scene template of the user, the updated target scene template of the user having the element value corresponding to the scene element added therein; a calculation module configured to extract an element value check rule, a scene construction parameter, and a construction algorithm of a scene SQL statement from the scene template database according to the ID of the target scene, the scene construction parameter including a scene SQL instance ID COMP_ID, a field storage table corresponding to the COMP_ID, an operation type, and a matching relationship between an element and an element value, and perform a compliance check on the element value according to the element value check rule to obtain an element value passing the compliance check; the calculation module is further configured to extract the matching relationship between the element and the element value corresponding to the element value passing the compliance check from the matching relationship between the element and the element value, and record the COMP_ID corresponding to the matching relationship; a processing module configured to extract the field storage table corresponding to the COMP_ID and the operation type according to the recorded COMP_ID, splice the operation type and the content in the field storage table according to the construction algorithm to generate a scene SQL statement corresponding to the COMP_ID for changing a tariff parameter, and generate a tariff parameter script according to the scene SQL statement corresponding to the COMP_ID. The scene template database comprises the scene ID and scene definition parameters, scene element parameters, the element value check rule, the scene composition parameters and the scene SQL statement construction algorithm corresponding to the scene ID.

9. An apparatus for generating a tariff parameter script, characterized by Comprise: A processor, a memory, a communication interface; The memory is used for storing executable instructions of the processor; Wherein, the processor is configured to execute the executable instructions to execute the tariff parameter script generation method of any one of claims 1 to 7.

10. A readable storage medium, having stored thereon a computer program, characterized in that, The computer program is executed by the processor to implement the tariff parameter script generation method of any one of claims 1 to 7.

Citation Information

Patent Citations

  • Database operation method and device

    CN106776638A

  • Test script generation method and integrated development environment

    CN112925698A

  • Index data acquisition method and device, computer equipment and storage medium

    CN115220731A