
技术领域technical field
本发明涉及一种把不同来源的数据按一定规则进行集成,并通过CA技术进行数字认证,自动生成嵌入数字签名的文档的方法和程序,属于用计算机技术进行文档处理领域。The invention relates to a method and program for integrating data from different sources according to certain rules, performing digital authentication through CA technology, and automatically generating documents embedded with digital signatures, belonging to the field of document processing with computer technology.
背景技术Background technique
目前,数据电子化已深入各行业,随之而来的应用方向之一是电子数据的可视化、安全性,常见的有在线可视化WEB方式表单与离线可视化(excel无签名方式)等几种,如在行业表单领域,需要在WEB页面中生成一些文本输入框,当数据较多时,表单拉得较长,通过人工方式填报不直观,操作繁琐,不可整体复制粘贴,无安全数字验证;方式二是先定制静态excel模版(当文档中包含统计图表时还需要结合Excel等Office组件),通过人工方式进行复制粘贴以生成最终文档,主要存在工作效率低且出错率高,EXCE中计算繁琐的问题,无法结构化存储;方式三是用编程接口来操纵office(含word/excel)模版,由于微软只开放了office文档的部分接口,导致此类方案复杂度高,生成的文档兼容性差,排版效果也不好,一旦文档格式固定下来,再进行二次调整会相当困难;方式四则是采用excel的开发接口来生成文档,虽然pdf是完全开放的标准,但通过API进行开发的难度仍然很高,此方式的缺点与方式三一致。针对以上方案的缺点,本方案采用了CA技术为核心,通过程序将odf文档模版,进而代替传统表单,生成可结构化保存高质量的安全文档。odf模板是一种具有高度的可用性和扩展性,涵盖了文字、二维表格、数学公式、静态图片、矢量图片、统计图表等元素,同时可在其中设置CA安全数据认证签名,CA数字认证借助于数字认证中心进行数字签名后,集成到odf文档中,实现将高度复杂、高度灵活的文档格式导出成对应文档代码;使用ODF标准协议,采用libreoffice、odftool等开源软件,接口完全开放,使用成本低,学习成本也相对较低;同时,用计算机程序操纵odf文档相对于API方式更简单也便于人工操作,文档版式和文档结构更容易调整,对于大型文档可以拆分成若干小文档分别编辑,最后再组装,可提高工作效率;另外,libreoffice具有跨平台能力,在主流操作系统(Windows、IOS、Linux、Unix)上都有具体的实现,其中相关开源软件可进行二次开发,满足自定义的高级需求。At present, data electronization has penetrated into various industries, and one of the following application directions is the visualization and security of electronic data. The common ones include online visualization WEB form and offline visualization (excel without signature), such as In the field of industrial forms, it is necessary to generate some text input boxes on the WEB page. When there is a lot of data, the form will be drawn for a long time. It is not intuitive to fill in the form manually, and the operation is cumbersome. It cannot be copied and pasted as a whole, and there is no secure digital verification; First customize the static excel template (when the document contains statistical charts, it needs to be combined with Office components such as Excel), and manually copy and paste to generate the final document, which mainly has the problems of low work efficiency, high error rate, and tedious calculation in EXCE. No structured storage; the third method is to use the programming interface to manipulate the office (including word/excel) templates. Since Microsoft only opens part of the interface of the office document, this type of solution is highly complex, the generated document has poor compatibility, and the typesetting effect is also poor. No, once the document format is fixed, it will be very difficult to make secondary adjustments; the fourth method is to use the excel development interface to generate documents. Although pdf is a completely open standard, it is still very difficult to develop through API. The disadvantage of the method is the same as that of the third method. In view of the shortcomings of the above solutions, this solution adopts CA technology as the core, and replaces the traditional form with the odf document template through the program to generate high-quality security documents that can be structured and stored. The odf template is a highly usable and extensible, covering elements such as text, two-dimensional tables, mathematical formulas, static pictures, vector pictures, statistical charts, etc. At the same time, CA security data certification signatures can be set in it, and CA digital certification uses After the digital signature is performed in the digital certification center, it is integrated into the odf document to export the highly complex and highly flexible document format into the corresponding document code; using the ODF standard protocol, using libreoffice, odftool and other open source software, the interface is completely open, and the cost of use low, and the learning cost is relatively low; at the same time, using computer programs to manipulate odf documents is simpler and more convenient for manual operation than API methods, and the document layout and document structure are easier to adjust. Large documents can be split into several small documents for editing separately. The final assembly can improve work efficiency; in addition, libreoffice has cross-platform capabilities, and has specific implementations on mainstream operating systems (Windows, IOS, Linux, Unix), among which related open source software can be secondary developed to meet custom advanced requirements.
发明内容SUMMARY OF THE INVENTION
本发明要解决的技术问题包括:The technical problems to be solved by the present invention include:
CA技术应用于工程当中:模板数据的动态合成、数据结构化功能、查看CA签名信息,解决数据安全问题;CA technology is applied in engineering: dynamic synthesis of template data, data structuring function, viewing CA signature information, and solving data security problems;
odf文档模版定义:odf模版包含静态内容,也包含动态内容,通常由人工先编写,进行调试后把可变的数据部分用占位符、配置文件来替换,这就涉及到占位符、配置文件、CA签字位置如何设计及准确定位的问题;Definition of odf document template: odf template contains static content as well as dynamic content, which is usually written first by humans. After debugging, the variable data part is replaced with placeholders and configuration files, which involves placeholders and configuration. How to design and accurately locate documents and CA signature positions;
动态数据获取:数据来源包括从关系型数据库获得数据、从人工编写的类excel文件获得数据、从数据服务中心获取、从科学计算及数据分析语言获得数据的第三方应用程序、从大数据平台获得数据,针对不同的数据源适配不同的取数程序;Dynamic data acquisition: data sources include data obtained from relational databases, data obtained from manually written excel-like files, data obtained from data service centers, third-party applications obtained from scientific computing and data analysis languages, and data obtained from big data platforms Data, adapt different fetching programs for different data sources;
odf文档模版插入:采用占位符解析,并按照占位符语法的标准来生成占位符可选参数,把获得的数据准确地插入odf文档模版,从而形成odf文档实例;odf document template insertion: placeholder parsing is adopted, placeholder optional parameters are generated according to the standard of placeholder grammar, and the obtained data is accurately inserted into the odf document template, thereby forming an odf document instance;
效率低下:针对效率低的问题,主要采用了数据与文档分离的思路,取数时可以并发执行,而数据整合时则把数据先装入内存,再统一进行占位符解析及数据整合,同时保存非结构数据备份;Inefficiency: For the problem of low efficiency, the idea of separating data and documents is mainly adopted. When fetching data, it can be executed concurrently. When data integration, the data is first loaded into the memory, and then placeholder parsing and data integration are performed uniformly. Save unstructured data backups;
维护难度和成本高:采用了统一的配置文件,并且配置文件格式简单,配置项尽量支持中文,以达到降低维护难度和成本的目的;High maintenance difficulty and cost: a unified configuration file is adopted, and the configuration file format is simple, and the configuration items support Chinese as much as possible to achieve the purpose of reducing maintenance difficulty and cost;
为解决上述技术问题,本发明提出一种CA技术为核心,通过程序操纵odf文档模版,进而生成高质量高安全性的文档的方法和程序。定义了一套用于描述解决多字段表单的安全文档,上述odf模板到占位符语法,语法中采用了部分ASCII标点符号、字母、数字及汉字、公式、图片的组合,可以准确地定义出数据元素格式,并且占位符不会与自身的宏命令和文字混淆以导致解析错误,占位符主要包括三个部分:In order to solve the above technical problems, the present invention proposes a method and a program for generating high-quality and high-security documents by manipulating the odf document template through a program as the core of the CA technology. A set of security documents for describing and solving multi-field forms is defined. The above odf template to placeholder grammar uses some ASCII punctuation marks, letters, numbers and combinations of Chinese characters, formulas and pictures, which can accurately define data Element format, and the placeholder will not be confused with its own macro commands and text to cause parsing errors. The placeholder mainly includes three parts:
采用占位符类型标识码及数据文件标识码标识该占位符是哪一类,以及该占位符从哪个数据文件取数,其中占位符类型标识码用字母标识,数据文件标识码则可用汉字、字母和数字的任意组合来标识,由于大型文档中可能会引用几百至上千个数据文件,因此支持汉字来作为标识符可以提高可维护性;The placeholder type identification code and the data file identification code are used to identify the type of the placeholder and the data file from which the placeholder takes data. The placeholder type identification code is identified by letters, and the data file identification code is It can be identified by any combination of Chinese characters, letters and numbers. Since hundreds to thousands of data files may be referenced in large documents, supporting Chinese characters as identifiers can improve maintainability;
采用选参数定义取数范围、取数方向、数据格式。通过分析odf模板文档的特点,二维数据可指定其在数据文件中的具体位置范围,如第m1行n1列至m2行n2列,m1、m2<=M,n1、n2<=N,位置起止范围可指定正数(从前往后)或负数(从后往前),取数方向共有8种:先从上至下、再从左至右,先从上至下,再从右至左,先从下至上、再从左至右,先从下至上、再从右至左,先从左至右、再从上至下,先从右至左,再从上至下,先从下至上,再从左至右,先从下至上,再从右至左,可指定元素间分隔符、元素包围符、行末分隔符、行间分隔符、空值替换符。通过单独开发的取数程序来完成数据获取,对应于不同的数据源分别开发,可以适配数据源:microsoft sql server、mysql、oracle等多种数据源。按照占位符的定义,把数据元素插入odf模版中,形成odf实例,把数据文件装入内存,以数据文件标识符为键,以M x N的二维数组为值,形成键-值映射结构以方便程序取数,采用了正则表达式来解析占位符语法,数据的填充则完全按照占位符定义的格式要求来进行。CA数字验证采用非对称加密算法,把公钥和实体绑定,由CA中心把实体的信息和实体的公钥制作成数字证书,每一个文档都具有留痕信息,在文档中会记录了每一个环节文档由谁创建,填写了什么内容,什么时候经过了那些部门的审核,由那些人进行审核,审核意见等一系列信息,并将签名准确定位在odf模板对应位置中。用程序对生成的代码进行自动或人工编译而形成目标类ODF文档。Use optional parameters to define the range, direction, and data format. By analyzing the characteristics of the odf template document, the two-dimensional data can specify its specific position range in the data file, such as the m1 row and n1 column to the m2 row and n2 column, m1, m2<=M, n1, n2<=N, position The starting and ending ranges can be specified as positive numbers (from front to back) or negative numbers (from back to front). There are 8 directions for taking numbers: first from top to bottom, then from left to right, first from top to bottom, then from right to left , first from bottom to top, then from left to right, first from bottom to top, then from right to left, first from left to right, then from top to bottom, first from right to left, then from top to bottom, first from bottom Top, then left to right, first bottom to top, then right to left, you can specify inter-element delimiters, element enclosing characters, end-of-line delimiters, inter-line delimiters, and null replacements. The data acquisition is completed through a separately developed number fetching program, which is developed separately for different data sources, and can be adapted to data sources: microsoft sql server, mysql, oracle and other data sources. According to the definition of the placeholder, insert the data element into the odf template to form an odf instance, load the data file into the memory, use the data file identifier as the key, and use the M x N two-dimensional array as the value to form a key-value mapping structure to It is convenient for the program to fetch numbers, using regular expressions to parse the placeholder syntax, and filling the data according to the format requirements defined by the placeholders. CA digital verification uses an asymmetric encryption algorithm to bind the public key to the entity, and the CA center makes the entity's information and entity's public key into a digital certificate. Each document has trace information, and each document will be recorded in the document. A link document is created by who, what content is filled in, when it has been reviewed by those departments, who will review it, review comments and a series of information, and accurately locate the signature in the corresponding position of the odf template. The generated code is automatically or manually compiled by the program to form the target class ODF document.
具体实施方式Detailed ways
下面将结合本发明实施例中的附图,对本发明实施例中的技术方案进行清楚、完整地描述,所述的实施例仅仅是本发明一部分实施例,而不是全部的实施例,基于本发明中的实施例,本领域普通技术人员在没有做出创新性劳动前提下所获得的所有其他实施例,都属于本发明保护的范围。请参阅图1,将CA数字签名与数据动态合成、数据结构化整合生成文档的方法及其实现程序,具体包括以下步骤:The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present invention. The embodiments in the present invention, all other embodiments obtained by those of ordinary skill in the art without innovative work, belong to the protection scope of the present invention. Referring to Figure 1, a method for dynamically synthesizing a CA digital signature with data, and data structure integration to generate a document and its implementation program include the following steps:
单独开发可实现自定义查询和支持并发运行的数据动态合成、自主结构化的动态表单程序,生成的数据文件格式可以定制字符集、分隔符、格式化文本或数字;Independently develop a dynamic form program that can realize custom query and support concurrent data dynamic synthesis and self-structure, and the generated data file format can customize character set, delimiter, formatted text or number;
设计占位符,满足文档中的二维表格、静态图片、公式等要素的要求;Design placeholders to meet the requirements of two-dimensional tables, static pictures, formulas and other elements in the document;
对应占位符语法解析找到数据元素,通过CA认证中心实现CA电子签名,并按照占位符规定格式把数据元素写入odf文件中;The corresponding placeholder grammar parses to find the data element, realizes the CA electronic signature through the CA certification center, and writes the data element into the odf file according to the format specified by the placeholder;
用平台对生成的代码进行自动或人工编译而形成目标odf文档,实现用户可视化的表单填报与计算、以及业务流转中的电子签名从而减少人工工作量。一个项目需要每个月从业务系统数据库中抽取数据生成大量数据文档,涉及的数据项有上千个,生成的表格文档约上百个,以前是采用系统表单填报,实际使用中无法批量复制粘贴、无法结构化查询统计、无法直观查看签名,存在效率低下模版调整困难的问题,采用新方案之后,5分钟以内即可完成数据采集过程,1-2分钟即可完成文档签名流转,并编译出最终的odf文档后,最后由1-2人进行审核和调整即可。Use the platform to automatically or manually compile the generated code to form the target odf document, realize the user's visual form filling and calculation, and the electronic signature in the business flow, thereby reducing the manual workload. A project needs to extract data from the business system database to generate a large number of data documents every month. There are thousands of data items involved, and about a hundred form documents are generated. Previously, the system form was used to fill in the report, and batch copy and paste cannot be used in actual use. , Unable to structured query statistics, unable to visually check the signature, there is the problem of low efficiency and difficult template adjustment. After adopting the new scheme, the data collection process can be completed within 5 minutes, and the document signature circulation can be completed in 1-2 minutes, and compiled After the final odf document, it can be reviewed and adjusted by 1-2 people.
附图说明Description of drawings
图1为一种将CA数字签名与数据动态合成、数据结构化整合生成文档的方法及其实现程序图。Fig. 1 is a method of dynamically synthesizing CA digital signature and data, and integrating data structure to generate a document and its realization procedure diagram.
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN202011116787.XACN114386374A (en) | 2020-10-19 | 2020-10-19 | A method and program for generating odf documents using CA signature for data integration |
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN202011116787.XACN114386374A (en) | 2020-10-19 | 2020-10-19 | A method and program for generating odf documents using CA signature for data integration |
| Publication Number | Publication Date |
|---|---|
| CN114386374Atrue CN114386374A (en) | 2022-04-22 |
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| CN202011116787.XAPendingCN114386374A (en) | 2020-10-19 | 2020-10-19 | A method and program for generating odf documents using CA signature for data integration |
| Country | Link |
|---|---|
| CN (1) | CN114386374A (en) |
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US20230274084A1 (en)* | 2022-02-28 | 2023-08-31 | Adobe Inc. | Facilitating generation of fillable document templates |
| CN119513093A (en)* | 2024-11-15 | 2025-02-25 | 深圳小步奔跑科技集团有限公司 | Document information processing method and computer equipment |
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN105808775A (en)* | 2016-03-30 | 2016-07-27 | 北京奎牛科技有限公司 | Method and device for synchronizing layout file information into database |
| CN107480111A (en)* | 2016-06-07 | 2017-12-15 | 福建福昕软件开发股份有限公司 | A kind of the automatic of interconnection document makes a report on method |
| CN110889341A (en)* | 2019-11-12 | 2020-03-17 | 广州供电局有限公司 | Form image recognition method and device based on AI (Artificial Intelligence), computer equipment and storage medium |
| CN110929489A (en)* | 2019-11-18 | 2020-03-27 | 有时数联科技(北京)有限公司 | Form generation and form data processing method and system |
| CN111159979A (en)* | 2019-12-23 | 2020-05-15 | 昆明安泰得软件股份有限公司 | Method and program for generating pdf document by integrating dynamic data |
| CN111783407A (en)* | 2020-07-17 | 2020-10-16 | 西思艾(北京)软件有限公司 | An electronic form creation system |
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN105808775A (en)* | 2016-03-30 | 2016-07-27 | 北京奎牛科技有限公司 | Method and device for synchronizing layout file information into database |
| CN107480111A (en)* | 2016-06-07 | 2017-12-15 | 福建福昕软件开发股份有限公司 | A kind of the automatic of interconnection document makes a report on method |
| CN110889341A (en)* | 2019-11-12 | 2020-03-17 | 广州供电局有限公司 | Form image recognition method and device based on AI (Artificial Intelligence), computer equipment and storage medium |
| CN110929489A (en)* | 2019-11-18 | 2020-03-27 | 有时数联科技(北京)有限公司 | Form generation and form data processing method and system |
| CN111159979A (en)* | 2019-12-23 | 2020-05-15 | 昆明安泰得软件股份有限公司 | Method and program for generating pdf document by integrating dynamic data |
| CN111783407A (en)* | 2020-07-17 | 2020-10-16 | 西思艾(北京)软件有限公司 | An electronic form creation system |
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US20230274084A1 (en)* | 2022-02-28 | 2023-08-31 | Adobe Inc. | Facilitating generation of fillable document templates |
| US11868714B2 (en)* | 2022-02-28 | 2024-01-09 | Adobe Inc. | Facilitating generation of fillable document templates |
| CN119513093A (en)* | 2024-11-15 | 2025-02-25 | 深圳小步奔跑科技集团有限公司 | Document information processing method and computer equipment |
| Publication | Publication Date | Title |
|---|---|---|
| US10671671B2 (en) | Supporting tuples in log-based representations of graph databases | |
| US8930418B2 (en) | Interoperability format translation and transformation between IFC architectural design file and simulation file formats | |
| US9672247B2 (en) | Translating queries into graph queries using primitives | |
| US9378303B1 (en) | Representing compound relationships in a graph database | |
| US9378241B1 (en) | Concatenated queries based on graph-query results | |
| US20180239796A1 (en) | Multi-tenant distribution of graph database caches | |
| US8990157B2 (en) | Replication support for structured data | |
| US20180089331A1 (en) | Pattern-based searching of log-based representations of graph databases | |
| US20060048107A1 (en) | Enhanced compiled representation of transformation formats | |
| US20100125828A1 (en) | Data transformation based on a technical design document | |
| CN108027818A (en) | Inquiry based on figure | |
| US9378239B1 (en) | Verifying graph-based queries | |
| CN104461531B (en) | A kind of implementation method of reporting system SQL | |
| US20200097615A1 (en) | Difference-based comparisons in log-structured graph databases | |
| CN104536987B (en) | A kind of method and device for inquiring about data | |
| CN101859303A (en) | Metadata management method and management system | |
| CN105354036A (en) | Database operation code generating method and apparatus | |
| CN114281331A (en) | Method and device for generating front-end and back-end code files for accessing database | |
| CN110134596A (en) | Test document generation method and terminal device | |
| US20210026894A1 (en) | Branch threading in graph databases | |
| CN116541411A (en) | SQL sentence acquisition method, report generation device, computer equipment and storage medium | |
| CN114386374A (en) | A method and program for generating odf documents using CA signature for data integration | |
| US20180357278A1 (en) | Processing aggregate queries in a graph database | |
| CN112464279A (en) | Method and system for realizing form design based on service drive | |
| EP3635580A1 (en) | Functional equivalence of tuples and edges in graph databases |
| 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 | ||
| RJ01 | Rejection of invention patent application after publication | ||
| RJ01 | Rejection of invention patent application after publication | Application publication date:20220422 |