A visual configuration method and system for document data processing services
By parsing the document template to generate a visual configuration interface, providing multiple configuration parameters and automatically generating service codes, it solves the problem of tight coupling between document data processing services and databases, and realizes efficient and flexible document data processing service configuration and release.
Patent Information
- Application Number
- CN202110527971.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-05-14
- Publication Date
- 2025-09-16
- Estimated Expiration
- 2041-05-14
AI Technical Summary
In the existing technology, the configuration method of document data processing services is tightly coupled with the database, resulting in difficult code maintenance, poor reusability and scalability, and inability to apply to complex document data acquisition. In addition, configuration personnel need to understand the table structure of each business system, which makes it not very applicable.
Provides a visual configuration method for document data processing services. By parsing the document template file, a visual configuration interface is generated. It supports multiple document templates, provides multiple configuration parameters, automatically generates service codes, supports the release of multiple service types, and reduces technical difficulty and communication costs.
It realizes loosely coupled document data service configuration, reduces technical difficulty and communication costs, improves code standardization and reusability, covers a wide range of applicable scenarios, and supports the calling and deployment of multiple service types.
Smart Images

Figure CN115344318B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of data processing technology, and in particular to a visual configuration method and system for document data processing services. Background Art
[0002] As more and more business systems are built in enterprises, the data interaction between business systems is becoming more and more complex. How to quickly develop data interaction services between business systems, how to meet service calls of different protocols, and how to better manage complex data interaction services are issues that need to be addressed urgently.
[0003] Traditionally, service-side developers develop code based on specific business needs, then publish it as a service for third-party system calls. The quality of code developed this way is determined by the developer's technical skills, and differences in coding methods and thinking often lead to difficult code maintenance, poor reusability, and poor scalability.
[0004] Some existing configuration methods are to bind the data source through visual configuration, generate SQL scripts for obtaining data in the service code through the configuration of field rules, and then return the data to the third-party system after obtaining it through SQL query. This method takes into account the pressure on the target system database when the SQL script is executed. It is only suitable for third-party systems to obtain data from public databases or data marts, and is not suitable for the instant transmission and reception of document data between systems; some are to bind the data source and select tables and fields in the service configuration. This method is suitable for obtaining the required field data from a single table or two tables, but is not suitable for the acquisition of complex document data. Moreover, once the service configuration is related to the data source, the configuration personnel need to be clear about the tables and fields of each data source. The service configuration of each business system can only be completed by personnel who are familiar with the current system table structure, and its applicability is not high. Summary of the Invention
[0005] In view of the above analysis, the embodiments of the present invention aim to provide a visual configuration method and system for document data processing services to solve the problems of simple existing document data processing, tight coupling of service configuration and database tables, and single service publishing method.
[0006] In one aspect, an embodiment of the present invention provides a method for visually configuring a document data processing service, comprising the following steps:
[0007] Receive the application information parameters of the document, parse the document template file to obtain the document template attributes and classification identifier, create the document application, and generate the corresponding configuration operations and visual configuration interface based on the classification identifier;
[0008] Receive configuration commands, obtain document template attributes according to the corresponding classification identifier, create a document attribute configuration list based on the selected document template attributes, receive configuration parameters for each document attribute in the document attribute configuration list, and generate document attribute configuration information for each category;
[0009] Receive input and output configuration commands, merge the document attributes in each type of document attribute configuration information, and generate input attributes for the document data processing service; generate output attributes for the document data processing service based on preset output attributes; receive input attributes and output attributes, and generate input and output configuration information;
[0010] Receive the service configuration parameters of the document application and create service configuration information;
[0011] Receive the release command of the document application, generate the source code of the document data processing service based on the service configuration information, as well as the attribute configuration information and input and output configuration information of each type of document, execute the compilation and packaging command, and generate the document data processing service package.
[0012] Furthermore, the document attribute configuration information is used to define the rules for data processing and verification of attribute values in the data processing service; the configuration parameters of the document attributes include: basic configuration parameters, mapping configuration parameters, simple conversion parameters, and verification rule parameters; wherein,
[0013] Basic configuration parameters include: field name, field description, whether the field is required, whether the field is empty, field default value, field value source. Field value sources include: fixed value, from field, and mixed splicing;
[0014] Mapping configuration parameters include: pre-mapping data identification and post-mapping data identification, or selecting mapping rules;
[0015] Simple conversion parameters include: value before conversion, value after conversion;
[0016] Validation rule parameters include: string, number, date, time, and regular expression.
[0017] Furthermore, the input attributes of the document data processing service are used to define the attributes received in the data processing service, including document attributes whose field value sources in each type of document attribute configuration information are non-fixed values, and user-defined input attributes;
[0018] In the visual interface, the left side displays the document attributes whose field values in each type of document attribute configuration information are non-fixed values in a tree structure, and the right side displays the description information of the document attributes in JSON and XML formats respectively.
[0019] Receive the add command, display the input attribute addition interface, receive the customized input attributes, add the input attributes in the tree structure on the left, and add the corresponding json and xml format description information on the right.
[0020] Further, receiving service configuration parameters of the document application and creating service configuration information for defining relevant information of the document application generation and publishing service;
[0021] Service configuration parameters include: service identification parameters, service description parameters, service type parameters and service extension parameters; among them,
[0022] Service identification parameter, which serves as the prefix of the document data processing service name;
[0023] Service description parameters, used to describe the role and usage scenarios of the document data processing service;
[0024] Service type parameter, used to define the published service type, including: webservice, http, jms;
[0025] Service extension parameters, used to select the extension method generated in the data processing service, including: data reception extension method, data feedback extension method;
[0026] The deployment package type parameter is used to select the deployment package type based on the operating environment of the document data processing service, including: jar, zip, and war;
[0027] Publish a document data processing service according to each service configuration information.
[0028] Furthermore, the source code of the document data processing service includes service class code, document input object class code, document output object class code, document processing class code, and document application configuration file, wherein:
[0029] Service class code, based on the service type parameter in the service configuration information, finds the corresponding service class code template and generates a service class code with a service identification parameter in the name, which is used to publish the service call interface;
[0030] The document input object class code is generated based on the input attributes in the input and output configuration information and is used in the data receiving method of the document processing class code to convert the received initial parameters into data of the document input object class structure;
[0031] The document output object class code is generated based on the output attributes in the input and output configuration information. It is used in the data feedback method of the document processing class code to convert the parameters returned by the service provider into data of the document output object class structure.
[0032] The document processing class code generates a general class based on the document processing class code template. This class is used to convert received initial parameters according to the document input object class in the data receiving method, convert return parameters according to the document output object class in the data feedback method, and perform data processing and verification on attribute values in the data processing method according to the attribute configuration information of each type of document. When service extension configuration parameters are identified in the service configuration information, a data receiving extension method and / or a data feedback extension method are generated based on the selected service extension configuration parameters.
[0033] The document application configuration file is an XML configuration file generated by merging the attribute configuration information, input and output configuration information, and service configuration information of each type of document.
[0034] Furthermore, the compilation and packaging command is executed to generate a document data processing service package, including:
[0035] Compile the source code, package it to generate a service deployment package, and upload it to the deployment directory;
[0036] Compress the source code and generate a source code compression package;
[0037] Compress the service deployment package and source code compression package to generate a document data processing service package.
[0038] Furthermore, the document template file is parsed to obtain document attributes, including:
[0039] Identify the suffix of the document template file. If it is json, call the json parser; if it is xml, call the xml parser; if it is xls or xlsx, call the excel parser. If it is in other formats, prompt that it does not meet the template file requirements;
[0040] Parse the document template file according to the template file specification. If the parsing fails, return an error message. If the parsing succeeds, generate the document template attributes in XML format according to the classification identifier of the document attributes in the template file.
[0041] Furthermore, each type of document attribute configuration information, input and output configuration information, and service configuration information of the document application are saved in the fields of the document application information table in XML format. During configuration, first identify whether the document application already has relevant configuration information. If it does exist, parse the original configuration information and display it in the visual interface. After configuration, generate new configuration information in XML format to overwrite the original configuration information.
[0042] On the other hand, an embodiment of the present invention provides a visual configuration system for a document data processing service, characterized by comprising: a document application management module, a configuration interface generation module, a general attribute configuration module, a data parsing and encapsulation module, a service compilation module, and a service download module, wherein:
[0043] The document application management module is used to receive document application information parameters, parse document template files, and create document applications. It also manages the basic configuration information of document applications, the attribute configuration information of each document type, and the input and output configuration information. It also manages the service configuration information of document applications and provides operations such as publishing document applications and downloading document data processing services.
[0044] Configuration interface generation module, used to generate configuration operations and dynamic configuration interface according to the classification identifier in the document application template;
[0045] The general attribute configuration module is used to manage the initial configuration of the general attributes of the document and preset the output attributes of the document;
[0046] Data parsing and encapsulation module, used to parse json, xml format data and excel files, and encapsulate objects into json, xml format data;
[0047] The service compilation module is used to receive the release command of the document application, generate the source code of the document data processing service according to the configuration information of the document application, execute the compilation and packaging command, and generate the document data processing service package, including the service deployment package and the source code package;
[0048] The service download module is used to display the access address of the document data processing service and download the document data processing service package.
[0049] Furthermore, in the service compilation module, data processing services are published according to the service type and service identifier in the service configuration information of the document application, including webservice, http, and jms; deployment packages are generated according to the deployment package type in the service configuration information of the document application, including: jar, zip, and war.
[0050] Compared with the prior art, the present invention can achieve at least one of the following beneficial effects:
[0051] The visual configuration of document data service does not require binding to the data source. It starts with the document template and focuses on the reception and conversion of document data, which reduces technical difficulty and communication costs and can be operated by personnel who understand the business. It supports multiple types of document templates to facilitate on-demand provision by the service provider, and dynamically generates multiple visual configuration interfaces according to the classification identifier of the document template, classifying the configuration and simplifying the complex. It provides multiple configuration parameters for each document attribute to improve the coverage of applicable scenarios. It automatically generates service code according to the configuration to improve the standardization and accuracy of the code, and classifies the generated service class code, data processing class code, and object class code into categories, which are loosely coupled and highly reusable. It supports the release of multiple service types to facilitate third-party system calls. It provides data processing source code and deployment package downloads to facilitate the expansion of code in special scenarios and deployment to other environments.
[0052] In the present invention, the above-mentioned technical solutions can be combined with each other to achieve more preferred combinations. Other features and advantages of the present invention will be described in the following description, and some advantages will become apparent from the description or be learned through practice of the present invention. The objectives and other advantages of the present invention can be realized and obtained through the contents particularly pointed out in the description and drawings. BRIEF DESCRIPTION OF THE DRAWINGS
[0053] The accompanying drawings are only for the purpose of illustrating particular embodiments and are not to be considered limiting of the present invention. Like reference symbols denote like parts throughout the drawings.
[0054] Figure 1 This is a flowchart of the visual configuration method for the document data processing service in Example 1 of the present invention. DETAILED DESCRIPTION
[0055] The preferred embodiments of the present invention will be described in detail below in conjunction with the accompanying drawings, wherein the accompanying drawings constitute a part of this application and are used together with the embodiments of the present invention to illustrate the principles of the present invention, and are not used to limit the scope of the present invention.
[0056] Example 1,
[0057] A specific embodiment of the present invention discloses a visual configuration method for document data processing services, such as Figure 1 As shown, the following steps are included:
[0058] S11: Receive application information parameters of the document, parse the document template file to obtain document template attributes and classification identifiers, create a document application, and generate corresponding configuration operations and a visual configuration interface based on the classification identifiers;
[0059] S12: Receive a configuration command, obtain document template attributes according to the corresponding classification identifier, create a document attribute configuration list based on the selected document template attributes, receive configuration parameters for each document attribute in the document attribute configuration list, and generate document attribute configuration information for each category;
[0060] S13: Receive input and output configuration commands, merge document attributes in each type of document attribute configuration information, and generate input attributes for the document data processing service; generate output attributes for the document data processing service based on preset output attributes; receive input attributes and output attributes, and generate input and output configuration information;
[0061] S14: Receive service configuration parameters for the document application and create service configuration information;
[0062] S15: Receive the release command of the document application, generate the source code of the document data processing service based on the service configuration information, as well as the attribute configuration information and input and output configuration information of each type of document, execute the compilation and packaging command, and generate the document data processing service package.
[0063] During implementation, the imported document template is parsed to obtain the document attribute range and document attribute classification that need to be transferred, and multiple visual configuration interfaces are generated based on the document attribute classification. According to the document attribute configuration, conversion and verification rules are configured for each selected attribute. Then, based on the configuration information, the attributes that need to be dynamically transferred are identified as the input model, and the output model is directly configured according to the preset output attributes. During service configuration, multiple configuration information can be set to generate service codes for different protocols, and automatic compilation, packaging and deployment are realized, and data processing service packages are provided for download.
[0064] Compared with the existing technology, the visual configuration method of the document data processing service provided in this embodiment does not require binding to the data source. Starting from the document template, it focuses on the reception and conversion of document data, which reduces the technical difficulty and communication cost, and can be operated by personnel who understand the business; it supports multiple types of document templates, which is convenient for the service party to provide on demand, and dynamically generates multiple visual configuration interfaces according to the classification identification of the document template, classifies the configuration, and simplifies the complexity; provides multiple configuration parameters for each document attribute, which improves the coverage of applicable scenarios; automatically generates service code according to the configuration, which improves the standardization and accuracy of the code, and classifies the generated service class code, data processing class code, and object class code, which are loosely coupled and highly reusable; supports the release of multiple service types, which is convenient for third-party system calls; provides data processing source code and multiple types of deployment packages for download, which is convenient for the expansion of code in special scenarios and also for deployment in multiple environments.
[0065] Specifically, in step S11, the document is the business information exchanged between systems and is used to promote the flow of business processes. The application information parameters filled in when creating the document are used to describe the two interacting systems and the business scope of the document, including: application name, caller system, service provider system, business scope, and business limitations. The uniqueness of the document application record is determined by the application information parameters. The document template file is used to define the field information that the service provider needs to receive.
[0066] For example, it can be purchase order information pushed by the trading system to the financial system. The financial system will generate cost sheet information based on the purchase order information. When filling in the application information parameters of the document, the calling system is the trading system and the service system is the financial system. The document template file defines the field name, Chinese description and field type required for the financial system to generate cost sheet information.
[0067] Document template files support multiple formats, including JSON, XML, and Excel. After selecting a document template file, the system identifies the file extension. If it is JSON, the JSON parser is called; if it is XML, the XML parser is called; if it is XLS or XLSX, the Excel parser is called. If it is in other formats, a prompt appears indicating that it does not meet the template file requirements. When creating an application in the background, the uniqueness of the application information parameters is verified, and the document template is parsed according to the template file specifications. If the verification fails or the parsing fails, an error message is returned. If the verification and parsing succeed, the document template attributes in XML format are generated according to the classification identifier of the document attributes in the template file, and saved together with the document's application information parameters as a document application record. After creation is complete, multiple configuration operations are generated according to the classification identifier of the document attributes, and each operation corresponds to a visual configuration interface. Exemplarily, the document template is divided into basic information, master document information, and sub-document information, which defines the field information of each part, including field name, Chinese description, and field type. Three parts of XML format content are generated according to the classification for storage. After saving, the document application generates basic information configuration, master document information configuration, and sub-document information configuration operations to simplify the process and facilitate classification configuration and saving by operators; if the document template has no classification identification, the document application generates a configuration operation by default, corresponding to a visual configuration interface.
[0068] In step S12, a configuration command is received, and according to the corresponding classification identifier, it is first determined whether relevant configuration information already exists for the document application. If it does, the original configuration information is parsed and displayed in the visual interface. After configuration, new configuration information in XML format is generated to overwrite the original configuration information. If it does not exist, according to the classification identifier corresponding to the current operation, the document template attributes saved in step S11 are obtained, parsed and displayed in a list form. According to the actual situation, one or more attributes are selected from them to generate a document attribute configuration list.
[0069] It should be noted that each attribute in the list corresponds to a document attribute configuration operation, which is used to define data processing and validation rules for each attribute value; the configuration parameters of document attributes include: basic configuration parameters, mapping configuration parameters, simple conversion parameters, and validation rule parameters; among them,
[0070] Basic configuration parameters include: field name, field description, whether the field is required, whether the field is empty, field default value, field value source. Field value sources include: fixed value, from field, and mixed splicing;
[0071] Note that the field names and descriptions default to the same as the document attributes in the document template and can be modified. For example, if the document attribute configuration list includes the document number orderno and the document type ordertype, and "Document Number" needs to be dynamically transferred, select "From Field" for the field value source. The default field name is "orderno" and can be changed to "ordercode" according to the interface parameter specification. "Document Type" is fixed to "01" and does not need to be transferred dynamically. Select "Fixed Value" for the field value source and enter "01" as the default value.
[0072] Mapping configuration parameters include: pre-mapping data identification and post-mapping data identification, or selecting mapping rules;
[0073] It should be noted that the mapping configuration is suitable for data conversion of complex rules. Preferably, the mapping relationship of different data identifiers is configured through the mapping component, and the converted value can be obtained according to the incoming attribute value, the data identifier before mapping and the data identifier after mapping. For example, the "unit code" in the incoming document attribute is the management area and needs to be converted into the administrative area. If there is a direct mapping rule from the management area to the administrative area, it is directly selected from the mapping rule. If it does not exist, the data identifier of the management area is configured in the data identifier before mapping, and the data identifier of the administrative area is configured in the data identifier after mapping. In the document data processing class code, the mapping configuration parameters will be generated, and the mapping component method will be called to obtain the mapped value.
[0074] Simple conversion parameters include: value before conversion, value after conversion;
[0075] For example, there are only two statuses for "document status": normal and cancelled. However, the status values in the two systems are not consistent. In the caller's system, the normal status corresponds to 1, and the cancelled status corresponds to 0. In the service provider's system, the normal status corresponds to 2, and the cancelled status corresponds to 1. In this case, two conversion rules are configured. One rule is: the value before conversion is 1, and the value after conversion is 2; the other rule is: the value before conversion is 0, and the value after conversion is 1.
[0076] Validation rule parameters include: string, number, date, time, and regular expression.
[0077] It should be noted that the validation rule parameter list provides encapsulated validation rules by default, such as: string, number, date, time. Preferably, validation rules can be dynamically added through the background to support more scenario requirements. For complex requirements, select "Regular Expression" to configure a custom regular expression. For example, if the "Document Business Code" requires "a string of 6-12 characters starting with a letter and consisting of letters and numbers", the regular expression is set to "^[A-Za-z][A-Za-z0-9]{5,11}$".
[0078] Preferably, initialization configuration information for the document's general attributes is provided according to the service interface specification. Upon receiving an initialization configuration command, the document attribute field names are identified to determine whether they are consistent with the general attribute field names in the initialization configuration. If they are consistent, the initialization configuration information is set in the current document attributes based on the field names. For example, configuration parameters are set for general attributes such as the document user code, document summary, document creation date, and document creation department code. This initialization configuration improves configuration efficiency.
[0079] After each document attribute is configured, the configuration parameters of each document attribute in the document attribute configuration list are received, and the configuration information of each type of document attribute in XML format is generated.
[0080] In step S13, input and output attributes are configured for the document application, where input attributes are used to define the attributes received in the data processing service. Considering that the field value sources in the document attributes are fixed values, there is no need to transfer them dynamically. Therefore, the input attributes include the document attributes whose field value sources are non-fixed values in each type of document attribute configuration information, as well as customized input attributes.
[0081] In the visual interface, there is no need to select document attributes again. Based on the document attribute configuration information for each type generated in step S12, document attributes with non-fixed field values are obtained and displayed in a tree structure on the left side of the interface. The document attribute description information is displayed in JSON and XML formats on the right side.
[0082] It should be noted that the descriptive information of the document attributes here mainly includes the field name and field description, and there is no need to display the conversion and validation rules of the document attribute configuration.
[0083] Receive the add command, display the input attribute addition interface, receive the customized input attributes, add the input attributes in the tree structure on the left, and add the corresponding json and xml format description information on the right.
[0084] Output attributes for document applications define the attributes returned to third-party systems during data processing. Select the desired output attributes from the preset output attributes. Modify the field names and descriptions as needed. For example, select the document ID, document type, and service provider association ID as output attributes.
[0085] After the document attributes and input and output configurations are completed, in step S14, service configuration information is created for the document application to define the relevant information for generating and publishing services for the document application;
[0086] Service configuration parameters include: service identification parameters, service description parameters, service type parameters and service extension parameters; among them,
[0087] Service identification parameter, which serves as the prefix of the document data processing service name;
[0088] Service description parameters, used to describe the role and usage scenarios of the document data processing service;
[0089] Service type parameter, used to define the published service type, including: webservice, http, jms;
[0090] Service extension parameters, used to select the extension method generated in the data processing service, including: data reception extension method, data feedback extension method;
[0091] The deployment package type parameter is used to select the deployment package type based on the operating environment of the document data processing service, including: jar, zip, and war;
[0092] For example, when jar is selected, it supports independent operation and can be deployed in the JDK environment; when zip is selected, it can be deployed in the operating environment of the serviceMix open source framework; when war is selected, it can be deployed in an application server, such as Tomcat or WebLogic.
[0093] A document data processing service is published based on each service configuration information. A document application can create multiple service configuration information to publish services with different protocols, which is convenient for third-party system calls.
[0094] Specifically, in step S15, the release command of the document application is received, and based on the service configuration information, as well as the attribute configuration information and input and output configuration information of each type of document, the source code of the document data processing service is automatically generated to improve the standardization and accuracy of the code. The source code includes: service class code, document input object class code, document output object class code, document processing class code, and document application configuration file, among which,
[0095] Service class code, based on the service type parameter in the service configuration information, finds the corresponding service class code template and generates a service class code with a service identification parameter in the name, which is used to publish the service call interface;
[0096] It should be noted that the service class code of each document application is a specific instance class, which will inherit the general service class of the service type. In the method of implementing the general service class, the document processing class is loaded through the template class to achieve loose coupling between codes.
[0097] The document input object class code is generated based on the input attributes in the input and output configuration information and is used in the data receiving method of the document processing class code to convert the received initial parameters into data of the document input object class structure;
[0098] Exemplarily, a JavaBean class of the input object is generated, and Get and Set methods are generated for each input attribute.
[0099] The document output object class code is generated based on the output attributes in the input and output configuration information. It is used in the data feedback method of the document processing class code to convert the parameters returned by the service provider into data of the document output object class structure.
[0100] Exemplarily, a JavaBean class of the output object is generated, and Get and Set methods are generated for each output attribute.
[0101] The document processing class code generates a general class based on the document processing class code template. This class is used to convert received initial parameters according to the document input object class in the data receiving method, convert return parameters according to the document output object class in the data feedback method, and perform data processing and verification on attribute values in the data processing method according to the attribute configuration information of each type of document. When service extension configuration parameters are identified in the service configuration information, a data receiving extension method and / or a data feedback extension method are generated based on the selected service extension configuration parameters.
[0102] It should be noted that in order to improve reusability, the data processing method is a general method. In the code, each document attribute is traversed, all possible selections for each configuration parameter are enumerated, and corresponding processing code is written. During runtime, based on the actual parameters passed in, the matching conditions are identified, the corresponding code is executed, and the processed data value is obtained.
[0103] The document application configuration file is an XML configuration file generated by merging the attribute configuration information, input and output configuration information, and service configuration information of each type of document.
[0104] After the source code is generated, the compilation and packaging commands will be automatically executed to generate a document data processing service package, which facilitates the expansion of the code in special scenarios and the deployment in multiple environments.
[0105] Specifically, the compilation and packaging process includes: compiling the source code, packaging and generating a service deployment package according to the configuration of the deployment package type, and uploading it to the deployment directory; compressing the source code to generate a source code compressed package; compressing the service deployment package and the source code compressed package to generate a document data processing service package.
[0106] Example 2,
[0107] A visual configuration system for document data processing services is provided to implement the visual configuration method in Example 1. The specific implementation of each module refers to the corresponding description in Example 1. The system includes: a document application management module, a configuration interface generation module, a general attribute configuration module, a data parsing and packaging module, a service compilation module, and a service download module, wherein:
[0108] The document application management module is used to receive document application information parameters, parse document template files, and create document applications. It also manages the basic configuration information of document applications, the attribute configuration information of each document type, and the input and output configuration information. It also manages the service configuration information of document applications and provides operations such as publishing document applications and downloading document data processing services.
[0109] Configuration interface generation module, used to generate configuration operations and dynamic configuration interface according to the classification identifier in the document application template;
[0110] The general attribute configuration module is used to manage the initial configuration of the general attributes of the document and preset the output attributes of the document;
[0111] Data parsing and encapsulation module, used to parse json, xml format data and excel files, and encapsulate objects into json, xml format data;
[0112] The service compilation module is used to receive the release command of the document application, generate the source code of the document data processing service according to the configuration information of the document application, execute the compilation and packaging command, and generate the document data processing service package, including the service deployment package and the source code package;
[0113] It should be noted that data processing service types include: webservice, http, jms, and service deployment package types include: jar, zip, war.
[0114] The service download module is used to display the access address of the document data processing service and download the document data processing service package.
[0115] Compared with the existing technology, this embodiment obtains the parameters that need to be passed for data processing services by parsing the document template, reducing technical difficulty and communication costs. According to the classification identifier in the template, multiple visual configuration interfaces are dynamically generated to realize classified configuration, simplify the complex and facilitate operator configuration; multiple configuration parameters are provided for each document attribute, meeting more business scenarios and improving configuration capabilities; initialization configuration is provided for common attributes in the document, improving configuration efficiency; support is provided for the release of multiple service types, facilitating third-party system calls; data processing source code and multiple types of deployment packages are provided for download, which facilitates the expansion of code in special scenarios and deployment in multiple environments.
[0116] Those skilled in the art will appreciate that all or part of the process steps of the above-described embodiments can be implemented by instructing related hardware through a computer program, and the program can be stored in a computer-readable storage medium, such as a magnetic disk, an optical disk, a read-only memory, or a random access memory.
[0117] The above description is only a preferred specific embodiment of the present invention, but the scope of protection of the present invention is not limited thereto. Any changes or substitutions that can be easily thought of by any technician familiar with this technical field within the technical scope disclosed by the present invention should be covered by the scope of protection of the present invention.
Claims
1. A visual configuration method for document data processing services, characterized in that: The steps include: Receive the application information parameters of the document, parse the document template file to obtain the document template attributes and classification identifier, create the document application, and generate the corresponding configuration operations and visual configuration interface according to the classification identifier; Receive a configuration command, obtain document template attributes according to the corresponding classification identifier, create a document attribute configuration list based on the selected document template attributes, receive configuration parameters for each document attribute in the document attribute configuration list, and generate document attribute configuration information for each category; Receive input and output configuration commands, merge the document attributes in each type of document attribute configuration information, and generate input attributes for the document data processing service; Generate output attributes of the document data processing service based on preset output attributes; receive the input attributes and output attributes, and generate input and output configuration information; Receive service configuration parameters of the document application and create service configuration information; The service configuration parameters are used to define the relevant information of the document application generation and publishing service, including: service identification parameters, service description parameters, service type parameters and service extension parameters; Receive a release command for a document application, generate source code for a document data processing service based on the service configuration information, as well as the attribute configuration information and input / output configuration information of each type of document, execute a compile and package command, and generate a document data processing service package; the source code for the document data processing service includes a service class code, a document input object class code, a document output object class code, a document processing class code, and a document application configuration file, wherein the service class code finds a corresponding service class code template based on the service type parameter in the service configuration information, generates a service class code with the service identification parameter in the name, and is used for publishing a service call interface; the document input object class code is generated based on the input attributes in the input / output configuration information, and is used in a data receiving method of the document processing class code to convert the received initial parameters into data of a document input object class structure; the document output object class code The image class code is generated based on the output attributes in the input and output configuration information, and is used in the data feedback method of the document processing class code to convert the parameters returned by the service party into data of the document output object class structure; the document processing class code generates a general class based on the document processing class code template, which is used to convert the received initial parameters according to the document input object class in the data receiving method, convert the return parameters according to the document output object class in the data feedback method, and perform data processing and verification on the attribute values in turn according to each type of document attribute configuration information in the data processing method; when it is recognized that there are service extension configuration parameters in the service configuration information, a data reception extension method and / or a data feedback extension method is generated according to the selected service extension configuration parameters; the document application configuration file is an XML configuration file generated by merging the document attribute configuration information, input and output configuration information and service configuration information of each type.
2. The visual configuration method for document data processing services according to claim 1, characterized in that: The document attribute configuration information of each type is used to define the rules for data processing and verification of attribute values in the data processing service; the configuration parameters of the document attributes include: basic configuration parameters, mapping configuration parameters, simple conversion parameters, and verification rule parameters; wherein, Basic configuration parameters include: field name, field description, whether the field is required, whether the field is empty, field default value, and field value source. The field value source includes: fixed value, field, and mixed splicing; The mapping configuration parameters include: pre-mapping data identification and post-mapping data identification, or mapping rules; Simple conversion parameters include: value before conversion, value after conversion; Validation rule parameters include: string, number, date, time, and regular expression.
3. The visual configuration method for document data processing services according to claim 2, characterized in that: The input attributes of the document data processing service are used to define the attributes received in the data processing service, including document attributes whose field value sources in each type of document attribute configuration information are non-fixed values, and user-defined input attributes; In the visual interface, the document attributes whose field values in each type of document attribute configuration information are non-fixed values are displayed in a tree structure on the left, and the description information of the document attributes is displayed in JSON and XML formats on the right. Receive the add command, display the input attribute addition interface, receive the customized input attributes, add the input attributes in the tree structure on the left, and add the corresponding json and xml format description information on the right.
4. The visual configuration method for document data processing services according to any one of claims 1 to 3, characterized in that: In the service configuration parameters, Service identification parameter, which serves as the prefix of the document data processing service name; Service description parameters, used to describe the role and usage scenarios of the document data processing service; Service type parameter, used to define the published service type, including: webservice, http, jms; Service extension parameters, used to select the extension method generated in the data processing service, including: data reception extension method, data feedback extension method; The deployment package type parameter is used to select the deployment package type based on the operating environment of the document data processing service, including: jar, zip, and war; Publish a document data processing service according to each service configuration information.
5. The visual configuration method for document data processing services according to claim 4, characterized in that: The execution of the compile and package command to generate a document data processing service package includes: Compile the source code, package it to generate a service deployment package, and upload it to the deployment directory; Compressing the source code to generate a source code compressed package; Compress the service deployment package and source code compression package to generate a document data processing service package.
6. The visual configuration method for document data processing services according to claim 4, characterized in that: The document template file is parsed to obtain document template attributes and classification identifiers, including: Identify the suffix of the document template file. If it is json, call the json parser; if it is xml, call the xml parser; if it is xls or xlsx, call the excel parser. If it is in other formats, prompt that it does not meet the template file requirements; According to the template file specification, the document template file is parsed. If the parsing fails, an error message is returned; if the parsing succeeds, the document template attributes in XML format are generated according to the classification identifiers of the document attributes in the template file.
7. The visual configuration method for document data processing services according to claim 4, characterized in that: Each type of document attribute configuration information, input and output configuration information, and service configuration information of the document application are respectively saved in the fields of the document application information table in XML format. During configuration, it is first identified whether the document application already has relevant configuration information. If it does exist, the original configuration information is parsed and displayed in the visual interface. After configuration, new configuration information in XML format is generated to overwrite the original configuration information.
8. A visual configuration system for document data processing services, characterized in that: include: Document application management module, configuration interface generation module, general attribute configuration module, data analysis and packaging module, service compilation module, and service download module, including: The document application management module is used to receive document application information parameters, parse document template files, and create document applications; manage the basic configuration information of the document application, the configuration information of each document type's attributes, and the input and output configuration information; manage the service configuration information of the document application, and provide operations for publishing document applications and downloading document data processing services; the service configuration information is created based on the service configuration parameters of the document application; the service configuration parameters are used to define relevant information for the document application's generation and publishing services, including: service identification parameters, service description parameters, service type parameters, and service extension parameters; Configuration interface generation module, used to generate configuration operations and dynamic configuration interface according to the classification identifier in the document application template; The general attribute configuration module is used to manage the initial configuration of the general attributes of the document and preset the output attributes of the document; Data parsing and encapsulation module, used to parse json, xml format data and excel files, and encapsulate objects into json, xml format data; A service compilation module is used to receive a release command of a document application, generate source code of a document data processing service based on configuration information of the document application, execute a compilation and packaging command, and generate a document data processing service package, including a service deployment package and a source code package; the source code of the document data processing service includes a service class code, a document input object class code, a document output object class code, a document processing class code, and a document application configuration file, wherein the service class code finds a corresponding service class code template based on the service type parameter in the service configuration information, generates a service class code with the service identification parameter in the name, and is used to publish a service call interface; the document input object class code is generated based on the input attributes in the input and output configuration information, and is used in the data receiving method of the document processing class code to convert the received initial parameters into data of the document input object class structure; the document output An object class code is generated based on the output attributes in the input and output configuration information and is used in the data feedback method of the document processing class code to convert parameters returned by the service provider into data of the document output object class structure. The document processing class code generates a general class based on the document processing class code template, which is used to convert the received initial parameters according to the document input object class in the data receiving method, convert the return parameters according to the document output object class in the data feedback method, and perform data processing and verification on the attribute values in the data processing method according to each type of document attribute configuration information. When service extension configuration parameters are identified in the service configuration information, a data reception extension method and / or a data feedback extension method are generated according to the selected service extension configuration parameters. The document application configuration file is an XML configuration file generated by merging the document attribute configuration information, input and output configuration information, and service configuration information for each type of document. The service download module is used to display the access address of the document data processing service and download the document data processing service package.
9. The visual configuration system for document data processing services according to claim 8, characterized in that: In the service compilation module, data processing services are published according to the service type and service identifier in the service configuration information of the document application. The service types include: webservice, http, and jms; and deployment packages are generated according to the deployment package type in the service configuration information of the document application. The deployment package types include: jar, zip, and war.
Citation Information
Patent Citations
Bill data management method and system
CN102654874A
Method and device for rapid application development and deployment for stream-oriented computation
CN104267938A
Form designing method based on modularization
CN105630514A