A method, apparatus, device, medium and program product for processing a service parameter
By adopting a unified business parameter processing flow and a file-based processing method, the low efficiency caused by independent development of each type of business parameter was solved, and batch processing and efficient development were achieved.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- CHINA CONSTRUCTION BANK
- Filing Date
- 2023-01-18
- Publication Date
- 2026-05-01
AI Technical Summary
In existing technologies, each type of business parameter requires independent function development, resulting in repetitive work, wasted development resources, and low efficiency in processing business parameters.
Business parameters are processed in units of files, using a unified parameter attribute class and processing flow to achieve batch processing of business parameters, including parsing, validation and saving.
It improved the efficiency of processing business parameters, reduced repetitive operations, avoided errors caused by frequent modifications, and improved development efficiency.
Smart Images

Figure CN116048356B_ABST
Abstract
Description
A method, apparatus, equipment, medium, and program product for processing business parameters. Technical Field
[0001] This application relates to the field of data processing technology, specifically to a method, apparatus, device, medium, and program product for processing business parameters. Background Technology
[0002] Many business systems involve various business parameters. Only by properly handling the settings of these parameters can normal business operations be carried out effectively. Taking electronic resource management as an example, if an electronic resource verification form is sent to a customer, it is necessary to handle the settings of business parameters such as the format of the electronic resource verification form, the sending method, and the sending destination.
[0003] In related technologies, separate functions are developed for each type of business parameter, such as providing a separate page, a separate saving process, and a separate approval process for each type of business parameter. This involves a lot of repetitive work, resulting in a waste of development resources and low efficiency in processing business parameters.
[0004] Therefore, how to achieve batch processing of business parameters and improve the efficiency of business parameter processing has become an urgent problem to be solved. Summary of the Invention
[0005] This application provides a method, apparatus, device, medium, and program product for processing business parameters, which solves the problem of low efficiency in processing business parameters.
[0006] Firstly, this application provides a method for processing business parameters, the method comprising:
[0007] In response to a file import operation for a target business, the system obtains each initial business parameter file to be processed corresponding to the target business; wherein each initial business parameter file contains at least one parameter indicator and a business parameter corresponding to each of the at least one parameter indicator; the business parameters in each initial business parameter file are of the same category, and each category of business parameters corresponds to a pre-configured parameter attribute class;
[0008] For each initial business parameter file, perform the following operations:
[0009] Based on the categories of business parameters in the initial business parameter file, determine the parameter attribute class corresponding to the initial business parameter file;
[0010] Based on the mapping relationship between each attribute field in the parameter attribute class and each parameter indicator in the initial business parameter file, the business parameters filled in the initial business parameter file are parsed to the positions corresponding to the relevant attribute fields in the parameter attribute class.
[0011] Each business parameter in the parameter attribute class is validated, and the successfully validated business parameters are stored in the target business parameter file of the corresponding category.
[0012] In one possible embodiment, the initial business parameter file contains at least one business parameter; parsing the business parameter filled in the initial business parameter file to the position corresponding to the relevant attribute field in the parameter attribute class includes:
[0013] Based on the parameter indicators corresponding to each business parameter in the initial business parameter file, the business parameters are parsed to the positions corresponding to the relevant structure fields in the data structure file; the structure fields correspond one-to-one with the parameter indicators.
[0014] Fill the business parameters corresponding to each structure field in the data structure file into the corresponding positions of the relevant attribute fields in the parameter attribute class; the attribute fields correspond one-to-one with the structure fields.
[0015] In one possible embodiment, the data structure file is a hash mapping table, where the key information in the hash mapping table is the structure field and the value information is the corresponding business parameter.
[0016] In one possible embodiment, the step of validating each business parameter in the parameter attribute class and storing the successfully validated business parameters in the target business parameter file of the corresponding category includes:
[0017] Based on the pre-configured verification processing class, the business logic of each business parameter in the parameter attribute class is verified respectively;
[0018] For business parameters that are successfully verified, the corresponding business parameters are stored in the target business parameter file.
[0019] In one possible embodiment, before storing the successfully verified business parameters into the target business parameter file of the corresponding category, the method further includes:
[0020] For business parameters that pass verification, serialization is performed to convert the corresponding business parameter from the initial format to the target format and store it in the candidate business parameter file.
[0021] In response to the review operation of the candidate business parameter file, the content of each business parameter in the candidate business parameter file is reviewed respectively;
[0022] The step of storing successfully verified business parameters into the target business parameter file of the corresponding category includes:
[0023] Based on the pre-configured save processing class, the successfully approved business parameters are saved to the target business parameter file of the corresponding category.
[0024] In one possible embodiment, the step of saving successfully approved business parameters to the target business parameter file of the corresponding category based on a pre-configured save processing class includes:
[0025] For business parameters that have been successfully approved, the corresponding business parameters are converted from the target format to the initial format through deserialization processing.
[0026] Based on the pre-configured save processing class, the format-converted business parameters are saved to the target business parameter file of the corresponding category.
[0027] Secondly, this application provides a processing apparatus for business parameters, the apparatus comprising:
[0028] The acquisition module is used to acquire, in response to a file import operation for a target business, each initial business parameter file to be processed corresponding to the target business; wherein each initial business parameter file contains at least one parameter indicator and a business parameter corresponding to each of the at least one parameter indicator; the business parameters in each initial business parameter file are of the same category, and each category of business parameters corresponds to a pre-configured parameter attribute class;
[0029] For each initial business parameter file, perform the following operations:
[0030] The determination module is used to determine the parameter attribute class corresponding to the initial business parameter file based on the category of the business parameters in the initial business parameter file;
[0031] The parsing module is used to parse the business parameters filled in the initial business parameter file to the positions corresponding to the relevant attribute fields in the parameter attribute class, based on the mapping relationship between each attribute field in the parameter attribute class and each parameter indicator in the initial business parameter file.
[0032] The storage module is used to verify each business parameter in the parameter attribute class and store the successfully verified business parameters in the target business parameter file of the corresponding category.
[0033] In one possible embodiment, the parsing module is specifically used for:
[0034] Based on the parameter indicators corresponding to each business parameter in the initial business parameter file, the business parameters are parsed to the positions corresponding to the relevant structure fields in the data structure file; the structure fields correspond one-to-one with the parameter indicators.
[0035] Fill the business parameters corresponding to each structure field in the data structure file into the corresponding positions of the relevant attribute fields in the parameter attribute class; the attribute fields correspond one-to-one with the structure fields.
[0036] In one possible embodiment, the data structure file is a hash mapping table, where the key information in the hash mapping table is the structure field and the value information is the corresponding business parameter.
[0037] In one possible embodiment, the storage module is specifically used for:
[0038] Based on the pre-configured verification processing class, the business logic of each business parameter in the parameter attribute class is verified respectively;
[0039] For business parameters that are successfully verified, the corresponding business parameters are stored in the target business parameter file.
[0040] In one possible embodiment, the storage module is further configured to:
[0041] For business parameters that pass verification, serialization is performed to convert the corresponding business parameter from the initial format to the target format and store it in the candidate business parameter file.
[0042] In response to the review operation of the candidate business parameter file, the content of each business parameter in the candidate business parameter file is reviewed respectively;
[0043] The storage module is specifically used for:
[0044] Based on the pre-configured save processing class, the successfully approved business parameters are saved to the target business parameter file of the corresponding category.
[0045] In one possible embodiment, the storage module is specifically used for:
[0046] For business parameters that have been successfully approved, the corresponding business parameters are converted from the target format to the initial format through deserialization processing.
[0047] Based on the pre-configured save processing class, the format-converted business parameters are saved to the target business parameter file of the corresponding category.
[0048] Thirdly, this application provides an electronic device, comprising:
[0049] Memory, used to store program instructions;
[0050] A processor is configured to invoke program instructions stored in the memory and execute the steps of the method described in any one of the first aspects according to the obtained program instructions.
[0051] Fourthly, this application provides a computer-readable storage medium storing a computer program, the computer program including program instructions, which, when executed by a computer, cause the computer to perform the method described in any one of the first aspects.
[0052] Fifthly, this application provides a computer program product comprising: computer program code, which, when run on a computer, causes the computer to perform the method described in any one of the first aspects.
[0053] The beneficial effects of this application are as follows:
[0054] This application provides a method, apparatus, device, medium, and program product for processing business parameters. In this application, business parameters are filled into various initial business parameter files according to their categories, on a file-by-file basis. For each type of business parameter, a matching parameter attribute class is set. Based on this, a unified processing flow is provided for various types of business parameters, rather than providing independent processing flows for each type of business parameter. Specifically, after importing the various initial business parameter files for the target business with a single click via a file import operation, batch processing of business parameters can be achieved on a file-by-file basis according to the corresponding parameter attribute classes. This includes parsing the business parameters in each initial business parameter file into the corresponding parameter attribute class based on the mapping relationship between each attribute field and each parameter indicator, and storing the successfully verified business parameters in the parameter attribute class into the target business parameter file of the corresponding category. Through the above method, batch processing of initial business parameter files can be achieved, improving the efficiency of business parameter processing.
[0055] Other features and advantages of this application will be set forth in the description which follows, and will be apparent in part from the description, or may be learned by practicing the application. The objectives and other advantages of this application may be realized and obtained by means of the structures particularly pointed out in the written description, claims, and drawings. Attached Figure Description
[0056] The accompanying drawings, which are provided to further illustrate this application and form part of this application, illustrate exemplary embodiments of this application and are used to explain this application, but do not constitute an undue limitation of this application.
[0057] Figure 1 is a schematic diagram of an application scenario provided by an embodiment of this application;
[0058] Figure 2 is a flowchart illustrating the implementation of a business parameter processing method provided in an embodiment of this application;
[0059] Figure 3 is a schematic diagram of a correspondence table provided in an embodiment of this application;
[0060] Figure 4 is a schematic diagram of an initial service parameter table provided in an embodiment of this application;
[0061] Figure 5 is a schematic diagram of the specific implementation process of a business parameter processing method provided in an embodiment of this application;
[0062] Figure 6 shows a processing device for business parameters provided in an embodiment of this application;
[0063] Figure 7 is a structural diagram of an electronic device provided in an embodiment of this application. Detailed Implementation
[0064] To make the objectives, technical solutions, and advantages of this application clearer, the technical solutions in the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only a part of the embodiments of this application, and not all of them. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application. Unless otherwise specified, the embodiments and features in the embodiments of this application can be arbitrarily combined with each other. Furthermore, although a logical order is shown in the flowchart, in some cases, the steps shown or described may be performed in a different order than that shown here.
[0065] The technical solutions of this application involve data such as business parameters. When the various embodiments of this application are applied to specific products or technologies, user permission or consent is required, and the collection, dissemination, and use of related data must comply with the relevant laws, regulations and standards of the relevant countries and regions.
[0066] Before introducing a method for processing business parameters provided in the embodiments of this application, the technical background of the embodiments of this application will be described in detail below for ease of understanding.
[0067] Many business systems involve various business parameters. In related technologies, each type of business parameter requires the development of a separate function, which involves a lot of repetitive work, wastes development resources, and results in low parameter processing efficiency.
[0068] In view of this, embodiments of this application propose a method, apparatus, device, medium, and program product for processing business parameters. This application uses files as units, creating different files for various business parameters involved in the business system. Based on these files, independent file parsing, file verification, file approval, and file saving are provided for each type of business parameter. If a new type of business parameter is developed, only the corresponding parameter attribute class (such as a JavaBean) needs to be defined to complete the parsing, verification, and saving of the business parameter, thus improving development efficiency to a certain extent.
[0069] In addition, the related technologies involve a large amount of parameter processing, and errors are prone to occur when parameters need to be changed frequently.
[0070] This application provides a unified business parameter processing flow, which parses different types of business parameters into candidate business parameter files (such as general landing tables). At this time, the business parameters are not effective. If any problems are found, they can be modified or ignored. Then, the business parameters in the candidate business parameter files are stored into the corresponding target business parameter files (such as independent tables).
[0071] In summary, the business parameter processing flow provided in this application does not require the separate development of corresponding functions for each type of parameter. For example, it eliminates the need for separate pages, separate saving processes, and separate approval processes for each type of business parameter. This reduces repetitive operations and saves development resources. Furthermore, when dealing with a large number of business parameters, frequent modifications are unnecessary, avoiding errors and thus improving the efficiency of business parameter processing.
[0072] The following describes some of the concepts involved in the embodiments of this application.
[0073] Target business and business parameters: Target business refers to the transactions that need to be processed in the business system, such as electronic resource management, electronic resource access, and resource conversion. Business parameters refer to the various parameters involved in the processing of the target business. For example, for electronic resource management, the corresponding business parameters are the format, sending method, and destination of the electronic resource verification form; for electronic resource access, the corresponding business parameters are the electronic resource access object, access method, and access form verification; and for resource conversion, the corresponding business parameters are the electronic resource conversion method and conversion quantity.
[0074] Business parameter file: refers to a file used to store business parameters, such as an Excel spreadsheet; this application embodiment involves an initial business parameter file, a candidate business parameter file, and a target business parameter file. These types of business parameter files are all related to business parameters. In this application, for the sake of simplicity, different limiting methods are used as listed above. Among them, the initial business parameter file refers to a file used to store business parameters that have not yet been processed; the candidate business parameter file refers to a file corresponding to the business parameters that have been successfully verified and converted from the initial format to the target format through serialization processing; the target business parameter file refers to a file corresponding to the business parameters after verification and review processing.
[0075] Classes are the foundation for information encapsulation in Object-Oriented Programming (OOP). A class is a user-defined reference data type, also known as a class type. Each class contains data descriptions and a set of functions for manipulating data or passing messages.
[0076] Parameter attribute class: This is a new data type defined in this application for storing the parsed initial business parameter file.
[0077] Validation processing class: This is a new data type defined in this application for validating business parameters in parameter attribute classes.
[0078] Save Processing Class: This is a new data type defined in this application for saving business parameters that have been successfully approved after format conversion.
[0079] The embodiments of this application are described below with reference to the accompanying drawings. It should be understood that the embodiments described herein are for illustration and explanation only and are not intended to limit this application. Furthermore, the embodiments and features in the embodiments of this application can be combined with each other without conflict.
[0080] Referring to Figure 1, which is a schematic diagram of an application scenario provided by an embodiment of this application, the application scenario diagram includes two terminal devices 110 and one server 120.
[0081] In this embodiment, the terminal device 110 includes, but is not limited to, desktop computers, laptops, tablets, and other devices. The terminal device may have a client installed related to business parameter processing. This client can be software, a webpage, a mini-program, etc. The server 120 is a backend server corresponding to the software, webpage, mini-program, etc., or a server specifically used for business parameter processing; this application does not impose specific limitations. The server 120 can be an independent physical server, a server cluster or distributed system composed of multiple physical servers, or a cloud server providing basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communication, middleware services, domain name services, security services, content delivery networks (CDNs), and big data and artificial intelligence platforms.
[0082] It should be noted that the processing method of the business parameters in each embodiment of this application can be executed by an electronic device, which can be a terminal device 110 or a server 120. That is, the method can be executed by the terminal device 110 or the server 120 alone, or by the terminal device 110 and the server 120 together.
[0083] In one alternative implementation, the terminal device 110 and the server 120 can communicate via a communication network.
[0084] In one alternative implementation, the communication network is a wired network or a wireless network.
[0085] It should be noted that Figure 1 is only an example, and in reality, the number of terminal devices and servers is not limited, and no specific limitation is made in this embodiment.
[0086] In the embodiments of this application,
[0087] The calibration device for external parameters provided by the exemplary embodiments of this application will be described below with reference to the accompanying drawings and the application scenarios described above. It should be noted that the application scenarios described above are only shown to facilitate understanding of the spirit and principles of this application, and the embodiments of this application are not limited in any way in this respect.
[0088] Referring to Figure 2, which is a flowchart of a method for processing business parameters provided in an embodiment of this application, with a terminal device as the executing entity, the specific implementation process of this method includes the following steps S201-S204:
[0089] S201: In response to a file import operation for the target business, obtain the initial business parameter files to be processed corresponding to the target business.
[0090] In this application, the target business refers to the transactions that need to be processed in the business system, such as electronic resource management business, electronic resource access business, resource conversion business, etc. Business parameters refer to various parameters involved in the processing of the target business. For example, for electronic resource management business, the corresponding business parameters are the format, sending method, and sending destination of the electronic resource verification form; for electronic resource access business, the corresponding business parameters are the electronic resource access object, access method, and access form verification; and for resource conversion business, the corresponding business parameters are the electronic resource conversion method and conversion quantity.
[0091] Each initial business parameter file contains at least one parameter indicator and a corresponding business parameter for each parameter indicator. The business parameters in each initial business parameter file belong to the same category, and each category of business parameters corresponds to a pre-configured parameter attribute class.
[0092] In this embodiment of the application, the initial business parameter file refers to a file used to store business parameters that have not yet been processed. For each type of business parameter, there is a corresponding initial business parameter file.
[0093] In this embodiment, the business parameter file can be in formats such as Excel, Word (e.g., a table created within a Word document). This article primarily uses an Excel file as an example. For instance, each parameter indicator and its corresponding business parameter can be a column in an Excel file. Based on this, the initial business parameter file can also be referred to as the initial business parameter table.
[0094] For each initial business parameter file, perform the following operations S202-S204 respectively:
[0095] S202: Determine the parameter attribute class corresponding to the initial business parameter file based on the categories of business parameters in the initial business parameter file;
[0096] S203: Based on the mapping relationship between each attribute field in the parameter attribute class and each parameter indicator in the initial business parameter file, parse the business parameters filled in the initial business parameter file to the positions corresponding to the relevant attribute fields in the parameter attribute class.
[0097] Specifically, a parameter attribute class refers to a programming language (Java) class configured for each type of business parameter, corresponding to a table in a database, such as a reusable component (JavaBean). A JavaBean is a Java class with a parameterless constructor, all of which are private. Access to member attributes is achieved by providing methods for setting attribute values (setter) and retrieving attribute values (getter).
[0098] Each type of business parameter corresponds to a parameter attribute class, as shown in Figure 3, which is a schematic diagram of a correspondence table provided in an embodiment of this application. In this figure, each type of business parameter is represented by the letter 'a', and each parameter attribute class is represented by the letter 'b'. a1 corresponds to b1, a2 corresponds to b2, a3 corresponds to b3, and so on.
[0099] The initial business parameter file contains at least one business parameter, and each business parameter contains the specific parameter values corresponding to each parameter indicator in the initial business parameter file for each type of business parameter. Parameter indicators are the attribute information of each business parameter in the initial business parameter file.
[0100] Referring to Figure 4, which is a schematic diagram of an initial business parameter table provided in an embodiment of this application, the initial business parameter table includes four business parameters with corresponding IDs of 1, 2, 3, and 4, and three parameter indicators: name, gender, and age.
[0101] It should be noted that the initial business parameter files listed above are just simple examples and are not specifically limited in this article.
[0102] The business parameters filled in the initial business parameter file are parsed to the positions corresponding to the relevant attribute fields in the parameter attribute class. One possible implementation method is as follows: ①-②:
[0103] ① Based on the parameter indicators corresponding to each business parameter in the initial business parameter file, parse the business parameters to the corresponding positions of the relevant structure fields in the data structure file.
[0104] Specifically, a data structure file refers to a file used to store the parsed business parameters.
[0105] Optionally, the data structure file can be in the format of a hash map table, where the key information in the hash map table is the structure field and the value information is the corresponding business parameter.
[0106] When parsing each business parameter in the initial business parameter file, the Excel table can be read row by row, and each business parameter can be parsed into a hash map structure. In the hash map structure, the key information is the column name, and the value information is the cell value.
[0107] In the embodiments of this application, the structural fields and parameter indicators correspond one-to-one. For example, the structural fields and parameter indicators at the corresponding positions can be completely identical or have a certain correspondence.
[0108] For example, the initial business parameter file contains parameters for name, gender, and age. If the structure fields in the data structure file are name, gender, and age, then the structure fields and parameter indicators at the corresponding positions are exactly the same. If the structure fields in the data structure file are name, gender, and age, then there is a certain correspondence between the structure fields and parameter indicators at the corresponding positions.
[0109] ② Fill in the business parameters corresponding to each structure field in the data structure file into the corresponding positions of the relevant attribute fields in the parameter attribute class.
[0110] In the embodiments of this application, the attribute fields correspond one-to-one with the structure fields. For example, the structure fields and attribute fields at the corresponding positions can be completely identical or have a certain correspondence.
[0111] For example, if the structure fields in the data structure file are name, gender, and age, and the attribute fields in the parameter attribute class are name, gender, and age, then the structure fields and attribute fields at the corresponding positions will be exactly the same. If the attribute fields in the parameter attribute class are name_1, gender_1, and age_1, then the structure fields and attribute fields at the corresponding positions will have a certain correspondence.
[0112] Specifically, each attribute field in the parameter attribute class is configured with corresponding annotation information (@ExcelProperty). Based on @ExcelProperty, a one-to-one correspondence between each attribute field and the structure field can be established. That is, through the @ExcelProperty corresponding to each attribute field, the corresponding business parameter in the corresponding structure field can be found, thereby completing the filling of the business parameters corresponding to each structure field in the data structure file into the corresponding position of the relevant attribute field in the parameter attribute class.
[0113] In the above approach, each type of business parameter has a corresponding parameter attribute class. Therefore, if a new type of business parameter needs to be developed, it is only necessary to add the corresponding parameter attribute class, such as adding a definition for a JavaBean. This can improve development efficiency to a certain extent.
[0114] S204: Validate each business parameter in the parameter attribute class and store the successfully validated business parameters in the target business parameter file of the corresponding category.
[0115] In this embodiment of the application, in order to reduce operational risks, each piece of data (i.e., a business parameter) needs to be verified before proceeding to the next step.
[0116] Specifically, by validating each business parameter in the parameter attribute class, it is to verify whether each business parameter conforms to the preset rules. Business parameters that fail the verification are discarded directly, thereby ensuring the correctness of the business parameters.
[0117] In this application embodiment, an optional implementation method is as follows:
[0118] First, based on the pre-configured validation processing class, the business logic of each business parameter in the parameter attribute class is validated.
[0119] Furthermore, for business parameters that have been successfully verified, the corresponding business parameters are stored in the target business parameter file.
[0120] Among them, the validation processing class is a newly defined data type in this application used to perform validation processing on business parameters in the parameter attribute class. In the embodiments of this application, a validation processing class can be configured for each type of business parameter. When a piece of data is parsed, the validation processing class is called first, and the data can be stored after successful validation.
[0121] For example, a business parameter in the parameter attribute class is: Zhang San, male, 25 years old. Based on the preset validation processing class, the business parameter is validated. It is determined that the business parameter with an age of 18 years or above conforms to the business logic. Therefore, the business parameter is successfully validated and stored in the target business parameter file.
[0122] Specifically, the target business parameter file refers to the business parameter file corresponding to the business parameters after verification processing.
[0123] In this application, a validation processing class is configured for each type of business parameter. The validation processing class validates the business logic of each business parameter in the parameter attribute class. For business parameters that fail validation, the corresponding business parameters are discarded.
[0124] In addition, for successfully validated business parameters, before storing them in the target business parameter file of the corresponding category, the following operations are performed respectively:
[0125] First, for business parameters that have been successfully verified, the corresponding business parameters are converted from their initial format to the target format through serialization and stored in the candidate business parameter file.
[0126] Specifically, the target format refers to the conversion of each business parameter from its initial format into a unified string format. For example, it can be a lightweight data exchange format (JavaScript Object Notation, JSON) or other common formats. This article does not make any specific restrictions.
[0127] In this application, the candidate business parameter file refers to the business parameter file corresponding to the business parameters that have been successfully verified and converted from the initial format to the target format through serialization processing, and can be a general landing table.
[0128] Subsequently, the content of each business parameter in the candidate business parameter file was reviewed.
[0129] Specifically, the business parameters in the parsed and verified files are stored in a general landing table. For these parameters to truly take effect, they also need to be saved to a separate business parameter table for each type of business parameter. This requires business personnel to perform an approval operation on the interface.
[0130] In the above method, the business parameters stored in the candidate business parameter file are not yet effective. If a problem is found with the business parameters, they can be modified or ignored, thus making the review process more meaningful.
[0131] For example, a separate save processing class can be configured for each type of business parameter. When a business user initiates an approval operation, all records in the general landing table are retrieved, deserialized, and the save processing class is called. This saves the business parameters to a separate business parameter table, ensuring that the business parameters are successfully processed and take effect immediately. The specific details are as follows:
[0132] Scenario 1: For business parameters that fail the review, retain them in the candidate business parameter file.
[0133] Scenario 2: For successfully approved business parameters, based on the pre-configured save processing class, the successfully approved business parameters are saved to the target business parameter file of the corresponding category. Specifically, the following operations are performed:
[0134] ① For business parameters that have been successfully approved, the corresponding business parameters are converted from the target format to the initial format through deserialization.
[0135] ② Based on the pre-configured save processing class, the format-converted business parameters are saved to the target business parameter file of the corresponding category.
[0136] For example, for business parameters of category A1, a business parameter that has been successfully approved will be deserialized from a string format to an initial format; then, according to the pre-configured save processing class, the business parameter in the initial format will be saved to the target business parameter file of category A1.
[0137] From the perspective of business personnel, using Excel spreadsheets to batch edit business parameters is more intuitive and simple, and the one-click import function on the interface improves operational efficiency.
[0138] Based on the above method, business parameters can be processed in batches, thereby improving the processing efficiency of business parameters.
[0139] Referring to Figure 5, which is a schematic diagram of the specific implementation flow of a business parameter processing method in an embodiment of this application, the specific implementation flow of the method is as follows:
[0140] Step 501: Obtain the initial service parameter files for each service to be processed corresponding to the target service.
[0141] For each initial business parameter file, execute steps 502 to 509 respectively:
[0142] Step 502: Determine the parameter attribute class corresponding to the initial business parameter file based on the categories of business parameters in the initial business parameter file;
[0143] Step 503: Parse each business parameter in the initial business parameter file to the corresponding position of the relevant structure field in the data structure file;
[0144] Step 504: Fill in the business parameters corresponding to each structure field in the data structure file into the corresponding positions of the relevant attribute fields in the parameter attribute class;
[0145] Step 505: Based on the pre-configured validation processing class, validate the business logic of each business parameter in the parameter attribute class;
[0146] Step 506: For business parameters that have been successfully verified, the corresponding business parameters are converted from the initial format to the target format through serialization processing and stored in the candidate business parameter file;
[0147] Step 507: Review the content of each business parameter in the candidate business parameter file;
[0148] Step 508: For business parameters that have been successfully approved, convert the corresponding business parameters from the target format to the initial format through deserialization processing;
[0149] Step 509: Based on the pre-configured save processing class, save the format-converted business parameters to the target business parameter file of the corresponding category.
[0150] In the embodiments of this application, based on the above method, batch processing of business parameters can be achieved, thereby improving the efficiency of business parameter processing.
[0151] Based on the same inventive concept, this application provides a business parameter processing device 600, as shown in FIG6. The device includes:
[0152] The acquisition module 601 is used to acquire each initial business parameter file to be processed corresponding to the target business in response to the file import operation for the target business; wherein each initial business parameter file contains at least one parameter indicator and a business parameter corresponding to each of the at least one parameter indicator; the business parameters in each initial business parameter file are of the same category, and each category of business parameters corresponds to a pre-configured parameter attribute class;
[0153] For each initial business parameter file, perform the following operations:
[0154] The determination module 602 is used to determine the parameter attribute class corresponding to the initial business parameter file based on the category of the business parameters in the initial business parameter file;
[0155] The parsing module 603 is used to parse the business parameters filled in the initial business parameter file to the positions corresponding to the relevant attribute fields in the parameter attribute class, based on the mapping relationship between each attribute field in the parameter attribute class and each parameter indicator in the initial business parameter file.
[0156] The storage module 604 is used to verify each business parameter in the parameter attribute class and store the successfully verified business parameters in the target business parameter file of the corresponding category.
[0157] In one possible embodiment, the parsing module 603 is specifically used for:
[0158] Based on the parameter indicators corresponding to each business parameter in the initial business parameter file, the business parameters are parsed to the corresponding positions of the relevant structure fields in the data structure file; the structure fields and parameter indicators are in one-to-one correspondence.
[0159] Fill in the business parameters corresponding to each structure field in the data structure file into the corresponding positions of the relevant attribute fields in the parameter attribute class; the attribute fields correspond one-to-one with the structure fields.
[0160] In one possible embodiment, the data structure file is a hash map table, where the key information is the structure field and the value information is the corresponding business parameter.
[0161] In one possible embodiment, the storage module 604 is specifically used for:
[0162] Based on the pre-configured validation processing class, the business logic of each business parameter in the parameter attribute class is validated.
[0163] For business parameters that are successfully verified, the corresponding business parameters are stored in the target business parameter file.
[0164] In one possible embodiment, the storage module 604 is further configured to:
[0165] For business parameters that pass verification, serialization is performed to convert the corresponding business parameter from the initial format to the target format and store it in the candidate business parameter file.
[0166] In response to the review operation of the candidate business parameter file, the content of each business parameter in the candidate business parameter file is reviewed respectively;
[0167] The storage module 604 is specifically used for:
[0168] Based on the pre-configured save processing class, the successfully approved business parameters are saved to the target business parameter file of the corresponding category.
[0169] In one possible embodiment, the storage module 604 is specifically used for:
[0170] For business parameters that have been successfully approved, the corresponding business parameters are converted from the target format to the initial format through deserialization.
[0171] Based on the pre-configured save processing class, the format-converted business parameters are saved to the target business parameter file of the corresponding category.
[0172] The above approach provides a unified processing flow for various business parameters, enabling batch processing of business parameters on a file-by-file basis, thereby improving the processing efficiency of business parameters.
[0173] Based on the same inventive concept, this application provides an electronic device that can realize the functions of the business parameter processing device described above. Referring to FIG7, the device includes a processor 701 and a memory 702.
[0174] Based on the same inventive concept, embodiments of this application provide a computer-readable storage medium. The computer program product includes computer program code, which, when executed on a computer, causes the computer to perform a processing method for any of the business parameters discussed above. Since the principle by which the computer-readable storage medium solves the problem is similar to the processing method for business parameters, the implementation of the computer-readable storage medium can be found in the implementation of the method; repeated details will not be elaborated further.
[0175] Based on the same inventive concept, this application also provides a computer program product, which includes computer program code. When the computer program code is run on a computer, it causes the computer to execute any of the business parameter processing methods described above. Since the principle of solving the problem by the above-described computer program product is similar to the business parameter processing method, the implementation of the above-described computer program product can refer to the implementation of the method, and repeated details will not be repeated.
[0176] Those skilled in the art will understand that embodiments of this application can be provided as methods, systems, or computer program products. Therefore, this application can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, this application 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.
[0177] This application is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to this application. It should 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, create means for implementing the functions specified in one or more blocks of the flowchart illustrations and / or one or more blocks of the block diagrams.
[0178] 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 that implement the functions specified in one or more flowcharts and / or one or more block diagrams.
[0179] These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of user-operated steps to be performed on the computer or other programmable apparatus to produce a computer-implemented process, such that the instructions, which execute on the computer or other programmable apparatus, provide steps for implementing the functions specified in one or more flowcharts and / or one or more block diagrams.
[0180] Obviously, those skilled in the art can make various modifications and variations to this application without departing from the spirit and scope of this application. Therefore, if such modifications and variations fall within the scope of the claims of this application and their equivalents, this application also intends to include such modifications and variations.
Claims
1. A method for processing business parameters, characterized in that, The method includes: in response to a file import operation for a target business, obtaining each initial business parameter file to be processed corresponding to the target business; wherein each initial business parameter file contains at least one parameter indicator and business parameters corresponding to each of the at least one parameter indicator; the business parameters in each initial business parameter file belong to the same category, and each category of business parameters corresponds to a pre-configured parameter attribute class; for each initial business parameter file, performing the following operations: determining the parameter attribute class corresponding to the initial business parameter file based on the category of the business parameters in the initial business parameter file; the parameter attribute class refers to a programming language class configured for each category of business parameters; the parameter attribute class corresponds one-to-one with the category of the business parameters; based on the mapping relationship between each attribute field in the parameter attribute class and each parameter indicator in the initial business parameter file, parsing the business parameters filled in the initial business parameter file to the positions corresponding to the relevant attribute fields in the parameter attribute class; based on a pre-configured verification processing class, verifying the business logic of each business parameter in the parameter attribute class; for business parameters that pass verification, storing the corresponding business parameters in the target business parameter file; the verification processing class corresponds one-to-one with the category of the business parameters.
2. The method as described in claim 1, characterized in that, The initial business parameter file contains at least one business parameter; parsing the business parameter filled in the initial business parameter file to the position corresponding to the relevant attribute field in the parameter attribute class includes: parsing the business parameter to the position corresponding to the relevant structure field in the data structure file according to the parameter index corresponding to each business parameter in the initial business parameter file; the structure field corresponds one-to-one with the parameter index; filling the business parameter corresponding to each structure field in the data structure file to the position corresponding to the relevant attribute field in the parameter attribute class; the attribute field corresponds one-to-one with the structure field.
3. The method as described in claim 2, characterized in that, The data structure file is a hash mapping table, where the key information is the structure field and the value information is the corresponding business parameter.
4. The method according to any one of claims 1 to 3, characterized in that, Before storing the successfully verified business parameters into the target business parameter file of the corresponding category, the method further includes: for the successfully verified business parameters, converting the corresponding business parameters from the initial format to the target format through serialization processing and storing them into the candidate business parameter file; in response to the review operation of the candidate business parameter file, reviewing the content of each business parameter in the candidate business parameter file respectively; storing the successfully verified business parameters into the target business parameter file of the corresponding category includes: based on a pre-configured save processing class, saving the reviewed business parameters into the target business parameter file of the corresponding category.
5. The method as described in claim 4, characterized in that, The method of saving successfully approved business parameters to the target business parameter file of the corresponding category based on the pre-configured save processing class includes: for successfully approved business parameters, converting the corresponding business parameters from the target format to the initial format through deserialization processing; and saving the format-converted business parameters to the target business parameter file of the corresponding category based on the pre-configured save processing class.
6. A device for processing business parameters, characterized in that, The apparatus includes: an acquisition module, configured to acquire, in response to a file import operation for a target service, various pending initial service parameter files corresponding to the target service; wherein each initial service parameter file contains at least one parameter indicator and service parameters corresponding to each of the at least one parameter indicator; the service parameters in each initial service parameter file belong to the same category, and each category of service parameters corresponds to a pre-configured parameter attribute class; for each initial service parameter file, the following operations are performed: a determination module, configured to determine, based on the category of the service parameters in the initial service parameter file, the parameter attribute class corresponding to the initial service parameter file; the parameter attribute class refers to the parameter attribute class for each category of service parameter file. A programming language class for configuring business parameters; the parameter attribute class corresponds one-to-one with the category of the business parameter; a parsing module is used to parse the business parameters filled in the initial business parameter file to the positions corresponding to the relevant attribute fields in the parameter attribute class according to the mapping relationship between each attribute field in the parameter attribute class and each parameter indicator in the initial business parameter file; a saving module is used to verify the business logic of each business parameter in the parameter attribute class based on a pre-configured verification processing class; for business parameters that pass verification, the corresponding business parameters are stored in the target business parameter file; the verification processing class corresponds one-to-one with the category of the business parameter.
7. The apparatus as claimed in claim 6, characterized in that, The parsing module is specifically used to: parse the business parameters to the corresponding positions of the relevant structural fields in the data structure file according to the parameter indicators corresponding to each business parameter in the initial business parameter file; the structural fields correspond one-to-one with the parameter indicators; fill the business parameters corresponding to each structural field in the data structure file into the corresponding positions of the relevant attribute fields in the parameter attribute class; the attribute fields correspond one-to-one with the structural fields.
8. The apparatus as claimed in claim 7, characterized in that, The data structure file is a hash mapping table, where the key information is the structure field and the value information is the corresponding business parameter.
9. The apparatus according to any one of claims 6 to 8, characterized in that, The storage module is also used to: for business parameters that have been successfully verified, convert the corresponding business parameters from the initial format to the target format through serialization processing, and store them in the candidate business parameter file; In response to the review operation of the candidate business parameter file, the content of each business parameter in the candidate business parameter file is reviewed respectively; the saving module is specifically used to: save the successfully reviewed business parameters to the target business parameter file of the corresponding category based on the pre-configured saving processing class.
10. The apparatus as claimed in claim 9, characterized in that, The saving module is specifically used for: for business parameters that have been successfully approved, converting the corresponding business parameters from the target format to the initial format through deserialization processing; and saving the format-converted business parameters to the target business parameter file of the corresponding category based on the pre-configured saving processing class.
11. An electronic device, characterized in that, include: Memory, used to store program instructions; A processor is configured to invoke program instructions stored in the memory and execute the steps of the method according to 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, the computer program including program instructions that, when executed by a computer, cause the computer to perform the method as described in any one of claims 1 to 5.
13. A computer program product, characterized in that, The computer program product includes: computer program code, which, when run on a computer, causes the computer to perform the method described in any one of claims 1 to 5.
Citation Information
Patent Citations
Service parameter transmission method and device
CN110602056A