CN113312033A - Template protocol generation and management method - Google Patents
Template protocol generation and management method Download PDFInfo
- Publication number
- CN113312033A CN113312033A CN202110384687.3A CN202110384687A CN113312033A CN 113312033 A CN113312033 A CN 113312033A CN 202110384687 A CN202110384687 A CN 202110384687A CN 113312033 A CN113312033 A CN 113312033A
- Authority
- CN
- China
- Prior art keywords
- protocol
- template
- variable
- generating
- templated
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Withdrawn
Links
- 238000007726 management method Methods 0.000 title claims abstract description 46
- 238000000034 method Methods 0.000 claims abstract description 25
- 238000012545 processing Methods 0.000 claims description 12
- 238000004458 analytical method Methods 0.000 claims description 6
- 238000004590 computer program Methods 0.000 claims description 6
- 238000003032 molecular docking Methods 0.000 claims description 5
- 230000004044 response Effects 0.000 claims description 3
- 238000012827 research and development Methods 0.000 abstract description 5
- 230000007547 defect Effects 0.000 description 2
- 238000013461 design Methods 0.000 description 1
- 238000011161 development Methods 0.000 description 1
- 238000005516 engineering process Methods 0.000 description 1
- 210000001503 joint Anatomy 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 238000012360 testing method Methods 0.000 description 1
- 239000002699 waste material Substances 0.000 description 1
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F8/00—Arrangements for software engineering
- G06F8/30—Creation or generation of source code
- G06F8/31—Programming languages or programming paradigms
- G06F8/315—Object-oriented languages
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F8/00—Arrangements for software engineering
- G06F8/20—Software design
- G06F8/24—Object-oriented
Abstract
The invention discloses a templated protocol generation and management method, which comprises the following steps: constructing a configuration tool program file, and predefining interface variable names; generating a target protocol template; judging the common text content and the variable value field of the protocol by using a regular expression; replacing the variable value with $ + variable code value, and recording as a special variable; splicing the replaced character strings with html tags, and storing the html tags in a database; inquiring the replaced character string to generate a protocol file in pdf format, and carrying out protocol signing; when the service protocol needs to be changed, the template is inquired, the variable to be modified is edited, and the latest protocol template is generated. The method can manage the template, configure the interface and the variable corresponding to the business, add the protocol template and configure the corresponding business variable, generate the protocol template which can be filled with the corresponding data according to the actual business scene, manage the protocol of the financial platform of the supply chain, save the research and development manpower resources and improve the working efficiency.
Description
Technical Field
The invention relates to the technical field of computers, in particular to a templated protocol generation and management method.
Background
At present, when business butt joint is carried out between each large supply chain financial platform and a capital end, related business protocols need to be signed, and research and development personnel need to manually develop jsp pages one by one in the business related protocols. After the jsp page is developed, a value-taking part needs to be tested, and when the environment is switched, the situation that the jsp file part is forgotten to be replaced occurs; when the protocol required by each user is configured, different types of fields need to be input again, the operation is complex, although partial protocol templates are similar, the fields still need to be developed again, the resource waste is caused in the aspects of product design, research and development, testing and the like, and the working efficiency is influenced.
In order to overcome the defects in the prior art, a templated protocol generation and management method is provided, a protocol template is generated, and only the configuration of a specific position needs to be modified and tested, so that the expansibility is enhanced.
Disclosure of Invention
The technical problem to be solved by the invention is to provide a templated protocol generation and management method aiming at the defects involved in the background technology, to manage the supply chain financial platform and the business thereof, and to solve the problems of large development workload, low efficiency and low protocol expansibility in the prior art.
The technical problems of the invention are realized by adopting the following technical scheme:
a templated protocol generation and management method includes:
(1) constructing a configuration tool program file, predefining variable names of a supply chain financial platform docking code interface, including but not limited to variable codes, variable preview values and variable types, and constructing a protocol template file with a preset format;
(2) generating a target protocol template according to a configuration tool program file, adding protocol contents through a rich text editor with an operable page, and selecting an interface and selecting variables needing to be valued in a protocol to be added into the protocol template during editing;
(3) after editing is finished, judging the common text content and the variable value field of the protocol by using a regular expression, wherein the symbol of { "is arranged in the front of the field, and the symbol of" } is arranged behind the field, and the judgment is taken as the variable value, otherwise, the judgment is taken as the common text content;
(4) replacing the variable value with a $ + variable code value by using a replacement method in JavaScript, marking as a special variable, and marking the special variable after replacement by using an expression in freeMark and a label in freeMark;
(5) after editing is finished, splicing the character string which is replaced by the freeMark tag with an html tag head, splicing the html tag tail after the html tag head is spliced, and storing the html tag tail into a database;
(6) inquiring the replaced character string, generating a protocol file in pdf format by using freeMark and itext, and carrying out protocol signing;
(7) when the service protocol needs to be changed, the template is inquired, the variable to be modified is edited, and the latest protocol template is generated.
Preferably, in the step (3), the common text content and variable value field includes a field name, a field header, and a field type.
Preferably, the html header in step (5) includes a basic style required by the protocol.
Preferably, when the protocol is signed, the corresponding database is queried according to the protocol template, the signature mode is obtained, the coordinates of the signature position corresponding to the protocol are obtained according to the signature mode, or the keywords corresponding to the protocol are obtained, and the signature is carried out according to the coordinates and the keywords of the signature position.
Preferably, in the step (2), generating the target protocol template according to the configuration tool program file includes:
acquiring the protocol template file;
analyzing the data in the protocol template file to obtain analyzed data;
and importing the analyzed data into the configuration tool program file to generate a target protocol template.
Preferably, in the step (6), querying the replaced character string, generating a protocol file in pdf format by using freeMark and itext, and performing protocol signing includes:
acquiring a template number and a variable value of the template;
finding a template according to the template number, and transmitting a variable value;
generating a protocol file in pdf format, uploading the protocol file to a memory, and returning to fileNO;
and confirming the signature, storing the signature protocol and returning to the fileNO, and calling back the service processing logic to perform service processing.
Preferably, in the step (1), constructing a protocol template file with a preset format further includes:
and establishing a protocol template library according to the protocol type, managing the protocol template, debugging a service protocol by adopting the protocol template library, and editing, deleting, newly adding and forbidding the protocol template.
Preferably, the templated protocol generating and managing method further includes platform management and variable management, including a platform management module and a variable management module, and performs management of a calling platform of the protocol template and variable configuration management, and calls a management interface, where the called interface includes, but is not limited to, an adding, editing, viewing, and deleting interface.
Preferably, the platform management and the variable management comprise:
determining the type of the issued instruction;
according to the instruction type, acquiring instructions in a request queue corresponding to the instruction type according to a preset sequence, and sending the instructions;
after receiving the response information of the instruction, reading corresponding protocol data according to the message format of the protocol template, adding the protocol data into a corresponding analysis queue, and waiting for analysis;
and processing the instruction on the analyzed data to obtain processed data.
Preferably, the templated protocol generating and managing method includes a storage and a processing for a medium, and a computer program stored in the storage and executable on the processor, and the processor implements the steps of the templated protocol generating and managing method according to any of the above embodiments when executing the computer program.
The protocol generation and management method provided by the invention can be used for template management, configuring interfaces and variables corresponding to services, adding protocol templates and configuring corresponding service variables by service personnel by using the template management module, generating a set of protocol templates capable of filling corresponding data according to actual service scenes, performing protocol management of a supply chain financial platform, saving research and development human resources and improving the working efficiency.
Detailed Description
The technical solution of the present invention will be described in further detail below. It is understood that the embodiments described are only a few embodiments, not all embodiments, and that all other embodiments obtained by those skilled in the art without the use of inventive faculty are within the scope of the invention.
It will be understood that, although the terms first, second, third, etc. may be used herein to describe various elements, components and/or sections, these elements, components and/or sections should not be limited by these terms.
A templated protocol generation and management method includes:
(1) constructing a configuration tool program file, predefining variable names of a supply chain financial platform docking code interface, including but not limited to variable codes, variable preview values and variable types, and constructing a protocol template file with a preset format;
(2) generating a target protocol template according to a configuration tool program file, adding protocol contents through a rich text editor with an operable page, and selecting an interface and selecting variables needing to be valued in a protocol to be added into the protocol template during editing;
(3) after editing is finished, judging the common text content and the variable value field of the protocol by using a regular expression, wherein the symbol of { "is arranged in the front of the field, and the symbol of" } is arranged behind the field, and the judgment is taken as the variable value, otherwise, the judgment is taken as the common text content;
(4) replacing the variable value with a $ + variable code value by using a replacement method in JavaScript, marking as a special variable, and marking the special variable after replacement by using an expression in freeMark and a label in freeMark;
(5) after editing is finished, splicing the character string which is replaced by the freeMark tag with an html tag head, splicing the html tag tail after the html tag head is spliced, and storing the html tag tail into a database;
(6) inquiring the replaced character string, generating a protocol file in pdf format by using freeMark and itext, and carrying out protocol signing;
(7) when the service protocol needs to be changed, the template is inquired, the variable to be modified is edited, and the latest protocol template is generated.
Preferably, in the step (3), the common text content and variable value field includes a field name, a field header, and a field type.
Preferably, the html header in step (5) includes a basic style required by the protocol.
Preferably, when the protocol is signed, the corresponding database is queried according to the protocol template, the signature mode is obtained, the coordinates of the signature position corresponding to the protocol are obtained according to the signature mode, or the keywords corresponding to the protocol are obtained, and the signature is carried out according to the coordinates and the keywords of the signature position.
Preferably, in the step (2), generating the target protocol template according to the configuration tool program file includes:
acquiring the protocol template file;
analyzing the data in the protocol template file to obtain analyzed data;
and importing the analyzed data into the configuration tool program file to generate a target protocol template.
Preferably, in the step (6), querying the replaced character string, generating a protocol file in pdf format by using freeMark and itext, and performing protocol signing includes:
acquiring a template number and a variable value of the template;
finding a template according to the template number, and transmitting a variable value;
generating a protocol file in pdf format, uploading the protocol file to a memory, and returning to fileNO;
and confirming the signature, storing the signature protocol and returning to the fileNO, and calling back the service processing logic to perform service processing.
Preferably, in the step (1), constructing a protocol template file with a preset format further includes:
and establishing a protocol template library according to the protocol type, managing the protocol template, debugging a service protocol by adopting the protocol template library, and editing, deleting, newly adding and forbidding the protocol template.
Preferably, the templated protocol generating and managing method further includes platform management and variable management, including a platform management module and a variable management module, and performs management of a calling platform of the protocol template and variable configuration management, and calls a management interface, where the called interface includes, but is not limited to, an adding, editing, viewing, and deleting interface.
Preferably, the platform management and the variable management comprise:
determining the type of the issued instruction;
according to the instruction type, acquiring instructions in a request queue corresponding to the instruction type according to a preset sequence, and sending the instructions;
after receiving the response information of the instruction, reading corresponding protocol data according to the message format of the protocol template, adding the protocol data into a corresponding analysis queue, and waiting for analysis;
and processing the instruction on the analyzed data to obtain processed data.
Preferably, the templated protocol generating and managing method includes a storage and a processing for a medium, and a computer program stored in the storage and executable on the processor, and the processor implements the steps of the templated protocol generating and managing method according to any of the above embodiments when executing the computer program.
In one embodiment, a platform management module is used for adding a protocol template docking platform and service nodes thereof;
using an interface variable management module to carry out variable configuration, providing a protocol template, an environment variable and a template variable configuration mode by a docking platform, and selecting a platform and a service node to add corresponding variables;
editing the contents and variables of the protocol template, generating a protocol template number, configuring a template required by the service according to the template number, and generating a template file in an html format;
according to the template number, the variable value inquired by the service is transmitted, the interface for generating the template is called, the pdf format protocol is generated and uploaded to the memory, and the filename of the fileNO file is returned and returned to the user for display;
and confirming the signature, directly calling the signed pdf-format protocol file, calling back a callback interface of the service, and processing the service logic by the processor.
The protocol generation and management method provided by the invention can be used for template management, configuring interfaces and variables corresponding to services, adding protocol templates and configuring corresponding service variables by service personnel by using the template management module, generating a set of protocol templates capable of filling corresponding data according to actual service scenes, performing protocol management of a supply chain financial platform, saving research and development human resources and improving the working efficiency.
The preferred embodiments of the present specification disclosed above are intended only to aid in the description of the specification. Alternative embodiments are not exhaustive and do not limit the invention to the precise embodiments described. Obviously, many modifications and variations are possible in light of the above teaching. The embodiments were chosen and described in order to best explain the principles of the specification and its practical application, to thereby enable others skilled in the art to best understand the specification and its practical application. The specification is limited only by the claims and their full scope and equivalents.
Claims (10)
1. A templated protocol generation and management method, comprising:
(1) constructing a configuration tool program file, predefining variable names of a supply chain financial platform docking code interface, including but not limited to variable codes, variable preview values and variable types, and constructing a protocol template file with a preset format;
(2) generating a target protocol template according to a configuration tool program file, adding protocol contents through a rich text editor with an operable page, and selecting an interface and selecting variables needing to be valued in a protocol to be added into the protocol template during editing;
(3) after editing is finished, judging the common text content and the variable value field of the protocol by using a regular expression, wherein the symbol of { "is arranged in the front of the field, and the symbol of" } is arranged behind the field, and the judgment is taken as the variable value, otherwise, the judgment is taken as the common text content;
(4) replacing the variable value with a $ + variable code value by using a replacement method in JavaScript, marking as a special variable, and marking the special variable after replacement by using an expression in freeMark and a label in freeMark;
(5) after editing is finished, splicing the character string which is replaced by the freeMark tag with an html tag head, splicing the html tag tail after the html tag head is spliced, and storing the html tag tail into a database;
(6) inquiring the replaced character string, generating a protocol file in pdf format by using freeMark and itext, and carrying out protocol signing;
(7) when the service protocol needs to be changed, the template is inquired, the variable to be modified is edited, and the latest protocol template is generated.
2. The templated protocol generating and managing method of claim 1, wherein in step (3), the plain text content and variable value field includes a field name, a field header, and a field type.
3. The templated protocol generating and managing method of claim 1, wherein the html header in step (5) includes a basic pattern required by the protocol.
4. The templated protocol creating and managing method according to claim 1, wherein the signing process is performed by querying the corresponding database according to the protocol template to obtain the signing mode, obtaining the coordinates of the signing position corresponding to the protocol according to the signing mode, or obtaining the keywords corresponding to the protocol, and performing the signing process according to the coordinates of the signing position and the keywords.
5. The templated protocol generating and managing method of claim 1, wherein the step (2) of generating the target protocol template according to the configuration tool program file comprises:
acquiring the protocol template file;
analyzing the data in the protocol template file to obtain analyzed data;
and importing the analyzed data into the configuration tool program file to generate a target protocol template.
6. The templated protocol generating and managing method of claim 1, wherein in the step (6), the substituted character string is queried, and the freeMark and itext are used to generate the protocol file with pdf format, and the performing the protocol signature comprises:
acquiring a template number and a variable value of the template;
finding a template according to the template number, and transmitting a variable value;
generating a protocol file in pdf format, uploading the protocol file to a memory, and returning to fileNO;
and confirming the signature, storing the signature protocol and returning to the fileNO, and calling back the service processing logic to perform service processing.
7. The templated protocol generating and managing method according to claim 1, wherein in the step (1), the constructing a protocol template file with a preset format further comprises:
and establishing a protocol template library according to the protocol type, managing the protocol template, debugging a service protocol by adopting the protocol template library, and editing, deleting, newly adding and forbidding the protocol template.
8. The templated protocol generating and managing method according to claim 1, wherein the templated protocol generating and managing method further comprises platform management and variable management, including a platform management module and a variable management module, performing platform calling management and variable configuration management of the protocol template, and performing calling of management interfaces, including but not limited to add-on, edit, view, and delete interfaces.
9. The templated protocol generating and managing method of claim 1, wherein the platform management and variable management comprises:
determining the type of the issued instruction;
according to the instruction type, acquiring instructions in a request queue corresponding to the instruction type according to a preset sequence, and sending the instructions;
after receiving the response information of the instruction, reading corresponding protocol data according to the message format of the protocol template, adding the protocol data into a corresponding analysis queue, and waiting for analysis;
and processing the instruction on the analyzed data to obtain processed data.
10. The templated protocol generating and managing method according to claim 1, wherein the templated protocol generating and managing method preferably stores and processes the media by a memory, a processor, and a computer program stored in the memory and executable on the processor, and the processor implements the steps of the templated protocol generating and managing method according to any of the above embodiments when executing the computer program.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202110384687.3A CN113312033A (en) | 2021-04-09 | 2021-04-09 | Template protocol generation and management method |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202110384687.3A CN113312033A (en) | 2021-04-09 | 2021-04-09 | Template protocol generation and management method |
Publications (1)
Publication Number | Publication Date |
---|---|
CN113312033A true CN113312033A (en) | 2021-08-27 |
Family
ID=77372152
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202110384687.3A Withdrawn CN113312033A (en) | 2021-04-09 | 2021-04-09 | Template protocol generation and management method |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN113312033A (en) |
Cited By (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN115103034A (en) * | 2022-06-27 | 2022-09-23 | 京东科技信息技术有限公司 | Message protocol conversion method and device |
CN115373655A (en) * | 2022-10-25 | 2022-11-22 | 中国人民解放军国防科技大学 | Information protocol code automatic generation method based on standardized template |
CN116151774A (en) * | 2023-04-18 | 2023-05-23 | 北京江融信科技有限公司 | Visual management method and system for automatically generating protocol template and electronic equipment |
-
2021
- 2021-04-09 CN CN202110384687.3A patent/CN113312033A/en not_active Withdrawn
Cited By (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN115103034A (en) * | 2022-06-27 | 2022-09-23 | 京东科技信息技术有限公司 | Message protocol conversion method and device |
CN115373655A (en) * | 2022-10-25 | 2022-11-22 | 中国人民解放军国防科技大学 | Information protocol code automatic generation method based on standardized template |
CN115373655B (en) * | 2022-10-25 | 2023-02-07 | 中国人民解放军国防科技大学 | Information protocol code automatic generation method based on standardized template |
CN116151774A (en) * | 2023-04-18 | 2023-05-23 | 北京江融信科技有限公司 | Visual management method and system for automatically generating protocol template and electronic equipment |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN109508191B (en) | Code generation method and system | |
CN113312033A (en) | Template protocol generation and management method | |
CN100507839C (en) | Method and system for mapping content between a starting template and a target template | |
CN106844307B (en) | System and method for converting Excel into Word based on mark | |
US20130110769A1 (en) | Service providing apparatus, information processing system and methods | |
CN108762743B (en) | Data table operation code generation method and device | |
CN108228119A (en) | Method of printing, terminal device and storage medium based on HXML | |
CN110705237B (en) | Automatic document generation method, data processing device and storage medium | |
WO2018036342A1 (en) | Csar-based template design visualization method and device | |
CN112650533A (en) | Interface document generation method and device and terminal equipment | |
CN112799718A (en) | Enumerated document generation method and device, electronic equipment and storage medium | |
CN111414168B (en) | Web application development method and device based on mind map and electronic equipment | |
CN111026604B (en) | Log file analysis method and device | |
KR100762712B1 (en) | Method for transforming of electronic document based on mapping rule and system thereof | |
JP2019101889A (en) | Test execution device and program | |
CN108766513B (en) | Intelligent health medical data structured processing system | |
JP2006065467A (en) | Device for creating data extraction definition information and method for creating data extraction definition information | |
CN115712375A (en) | Service arrangement method, flow processing method based on service arrangement and computing equipment | |
CN111882419B (en) | Method and device for quality inspection of files and server | |
CN111651531B (en) | Data importing method, device, equipment and computer storage medium | |
JP2007079906A (en) | Source code generator | |
CN111783391A (en) | Online artificial text marking system and method | |
CN113448572A (en) | Software project development method and device, computer storage medium and computer equipment | |
CN112328246A (en) | Page component generation method and device, computer equipment and storage medium | |
CN113221507B (en) | Document editing operation synchronization method, computing device and storage medium |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
WW01 | Invention patent application withdrawn after publication | ||
WW01 | Invention patent application withdrawn after publication |
Application publication date: 20210827 |