CN109241163B - Electronic certificate generation method and terminal equipment - Google Patents

Electronic certificate generation method and terminal equipment Download PDF

Info

Publication number
CN109241163B
CN109241163B CN201810961263.7A CN201810961263A CN109241163B CN 109241163 B CN109241163 B CN 109241163B CN 201810961263 A CN201810961263 A CN 201810961263A CN 109241163 B CN109241163 B CN 109241163B
Authority
CN
China
Prior art keywords
electronic certificate
user
generation
data
generation instruction
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.)
Active
Application number
CN201810961263.7A
Other languages
Chinese (zh)
Other versions
CN109241163A (en
Inventor
任练
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Ping An Life Insurance Company of China Ltd
Original Assignee
Ping An Life Insurance Company of China Ltd
Priority date (The priority date 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 date listed.)
Filing date
Publication date
Application filed by Ping An Life Insurance Company of China Ltd filed Critical Ping An Life Insurance Company of China Ltd
Priority to CN201810961263.7A priority Critical patent/CN109241163B/en
Publication of CN109241163A publication Critical patent/CN109241163A/en
Application granted granted Critical
Publication of CN109241163B publication Critical patent/CN109241163B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Landscapes

  • Management, Administration, Business Operations System, And Electronic Commerce (AREA)

Abstract

The invention is suitable for the technical field of data processing, and provides a method for generating an electronic certificate and terminal equipment, wherein a configuration file is operated through a configuration instruction so as to establish connection with external databases in various data formats; according to the generation instruction of the electronic certificate, a plurality of data source files are respectively obtained from a plurality of external databases through sparkContext, the data source files with uniform formats are processed in a unified mode, the generated elastic distributed data set RDD is the data source files with uniform formats, basic data are extracted from the RDD based on the corresponding relation between the preset generation instruction of the electronic certificate and the generation template of the electronic certificate, target verification logic is selected and the basic data are verified based on the corresponding relation between the preset generation instruction of the electronic certificate and verification logic, if verification is passed, the basic data are filled into the generation template of the electronic certificate, and the generation table of the electronic certificate is generated, so that multiple types of data sources are integrated smoothly and efficiently.

Description

Electronic certificate generation method and terminal equipment
Technical Field
The invention belongs to the technical field of data processing, and particularly relates to a method for generating an electronic certificate and terminal equipment.
Background
Currently, a financial institution needs to check data and integrate files based on a large amount of data of a user according to the needs of the user, and finally outputs a certificate according to the integration result to complete the generation work of the electronic certificate. For example: in the generation process of the life insurance electronic certificate, a large amount of structured, unstructured and user life insurance data with different data formats are required to be processed, and finally, the business data subjected to format verification and the generation information of the added electronic certificate are stored into a generation table of the life insurance electronic certificate together, so that the generation of the electronic certificate is completed.
However, the existing electronic certificate generation production line is difficult to deal with a large number of original data in different formats, the problem that the original data cannot be integrated and processed may occur, in addition, the original data needs to be manually called, checked and typeset, and then the electronic certificate generation equipment is sent for manufacturing and classified distribution, so that the error rate in the electronic certificate generation process is high, and a large amount of labor cost is required.
Disclosure of Invention
In view of the above, the embodiment of the invention provides a method and terminal equipment for generating an electronic certificate, so as to solve the problems that in the prior art, data of different data sources are difficult to integrate in the process of generating the electronic certificate, and the degree of automation is low.
A first aspect of an embodiment of the present invention provides a method for generating an electronic certificate, including:
running configuration files stored in a local database according to configuration instructions input by a user, and connecting with a plurality of external databases by running the configuration files, wherein the external databases are stored with data source files in various formats, and the data source files record the corresponding relation between data and data types;
according to a generation instruction of an electronic certificate input by a user, respectively acquiring a plurality of data source files from a plurality of external databases through sparkContext, and carrying out format unification processing on the plurality of data source files to generate an elastic distributed data set RDD;
based on the corresponding relation between a preset electronic certificate generation instruction and an electronic certificate generation template, taking a plurality of data types in the electronic certificate generation template corresponding to the electronic certificate generation instruction as target data types, and extracting data corresponding to the plurality of target data types from the RDD as basic data;
based on the corresponding relation between a preset electronic certificate generation instruction and verification logic, taking the verification logic corresponding to the electronic certificate generation instruction as target verification logic, and verifying the basic data through the target verification logic;
and if the basic data passes the verification, storing the basic data into a generation template of the electronic certificate to generate a generation table of the electronic certificate.
A second aspect of an embodiment of the present invention provides a terminal device, including a memory and a processor, where the memory stores a computer program executable on the processor, and when the processor executes the computer program, the processor implements the following steps:
running configuration files stored in a local database according to configuration instructions input by a user, and connecting with a plurality of external databases by running the configuration files, wherein the external databases are stored with data source files in various formats, and the data source files record the corresponding relation between data and data types;
according to a generation instruction of an electronic certificate input by a user, respectively acquiring a plurality of data source files from a plurality of external databases through sparkContext, and carrying out format unification processing on the plurality of data source files to generate an elastic distributed data set RDD;
based on the corresponding relation between a preset electronic certificate generation instruction and an electronic certificate generation template, taking a plurality of data types in the electronic certificate generation template corresponding to the electronic certificate generation instruction as target data types, and extracting data corresponding to the plurality of target data types from the RDD as basic data;
based on the corresponding relation between a preset electronic certificate generation instruction and verification logic, taking the verification logic corresponding to the electronic certificate generation instruction as target verification logic, and verifying the basic data through the target verification logic;
and if the basic data passes the verification, storing the basic data into a generation template of the electronic certificate to generate a generation table of the electronic certificate.
A third aspect of the embodiments of the present invention provides a computer readable storage medium storing a computer program which when executed by a processor performs the steps of:
running configuration files stored in a local database according to configuration instructions input by a user, and connecting with a plurality of external databases by running the configuration files, wherein the external databases are stored with data source files in various formats, and the data source files record the corresponding relation between data and data types; according to a generation instruction of an electronic certificate input by a user, respectively acquiring a plurality of data source files from a plurality of external databases through sparkContext, and carrying out format unification processing on the plurality of data source files to generate an elastic distributed data set RDD; based on the corresponding relation between a preset electronic certificate generation instruction and an electronic certificate generation template, taking a plurality of data types in the electronic certificate generation template corresponding to the electronic certificate generation instruction as target data types, and extracting data corresponding to the plurality of target data types from the RDD as basic data; based on the corresponding relation between a preset electronic certificate generation instruction and verification logic, taking the verification logic corresponding to the electronic certificate generation instruction as target verification logic, and verifying the basic data through the target verification logic; and if the basic data passes the verification, storing the basic data into a generation template of the electronic certificate to generate a generation table of the electronic certificate.
Further, the step of obtaining a plurality of data source files from a plurality of external databases through SparkContext according to a generation instruction of the electronic certificate input by the user, and performing format unification processing on the plurality of data source files includes:
sending a format query instruction to the external database according to the generation instruction of the electronic certificate; receiving formats corresponding to the data source files returned by the plurality of external databases; and calling a function corresponding to the format preset in the sparkContext according to the format corresponding to the data source file, reading the data source file from the external database through the function, and converting the format of the data source file into a preset unified format.
Further, before the receiving the configuration instruction input by the user and the generation instruction of the electronic certificate, the method further comprises:
acquiring a code of verification logic input by a user;
writing the code of the verification logic into a Spark task;
generating a generation instruction of the electronic certificate corresponding to the Spark task to establish a corresponding relation between the generation instruction of the electronic certificate and the verification logic.
Further, the method further comprises:
if the basic data does not pass the verification, storing the corresponding relation between the generation instruction of the electronic certificate and the user into an abnormal task log table; if the basic data passes the verification, storing the corresponding relation between the generation instruction of the electronic certificate and the user into a compliance task log table; and shielding users which do not accord with a preset admittance rule based on the abnormal task log table and the compliance task log table.
Further, the shielding the user not conforming to the preset admittance rule based on the abnormal task log table and the compliance task log table includes:
counting the number of the generation instructions of the electronic certificates corresponding to each user in the abnormal task log table in a preset time period, and taking the number as the generation abnormal constant of the electronic certificates of each user; counting the number of the generation instructions of the electronic certificates corresponding to each user in the compliance task log table in a preset time period, and taking the number as the generation compliance number of the electronic certificates of each user; by the formula:
Figure BDA0001773889420000041
calculating the abnormal probability of the generation instruction of the electronic certificate of the user in a preset time period, wherein the log err Generating abnormal constants for the electronic certificates of the user, wherein logmeans is the abnormal constants for the electronic certificates of the user, and logmean is the abnormal probability of the generation instruction of the electronic certificates of the user in a preset time period; if the abnormality probability of the user in the preset time period is greater than or equal to a preset abnormality threshold, early warning information is displayed to the user, and the generation instruction of the electronic certificate sent by the user is shielded before a trigger instruction is received.
In the embodiment of the invention, the configuration files in the local database are operated through the configuration instruction so as to establish connection with external databases with various data formats; according to the generation instruction of the electronic certificate, a plurality of data source files are respectively obtained from a plurality of external databases through sparkContext, format unification processing is carried out on the plurality of data source files, the generated elastic distributed data sets RDD are all data source files with uniform formats, basic data are extracted from the RDD based on the corresponding relation between the preset generation instruction of the electronic certificate and the generation template of the electronic certificate, target verification logic is selected and verified based on the corresponding relation between the preset generation instruction of the electronic certificate and verification logic, and if verification is passed, the basic data are filled into the generation template of the electronic certificate to generate generation tables of the electronic certificate, so that multiple types of data sources are integrated smoothly and efficiently, and the degree of automation of generation of the electronic certificate is provided.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings that are needed in the embodiments or the description of the prior art will be briefly described below, it being obvious that the drawings in the following description are only some embodiments of the present invention, and that other drawings may be obtained according to these drawings without inventive effort for a person skilled in the art.
FIG. 1 is a flowchart of an implementation of a method for generating an electronic certificate provided by an embodiment of the present invention;
FIG. 2 is a flowchart of a specific implementation of a method S102 for generating an electronic certificate according to an embodiment of the present invention;
FIG. 3 is a flowchart of a specific implementation of a method for handling electronic certificate exceptions according to an embodiment of the present invention;
FIG. 4 is a block diagram of an electronic certificate generation device according to an embodiment of the present invention;
fig. 5 is a schematic diagram of a terminal device according to an embodiment of the present invention.
Detailed Description
In the following description, for purposes of explanation and not limitation, specific details are set forth such as the particular system architecture, techniques, etc., in order to provide a thorough understanding of the embodiments of the present invention. It will be apparent, however, to one skilled in the art that the present invention may be practiced in other embodiments that depart from these specific details. In other instances, detailed descriptions of well-known systems, devices, circuits, and methods are omitted so as not to obscure the description of the present invention with unnecessary detail.
In order to illustrate the technical scheme of the invention, the following description is made by specific examples.
Fig. 1 shows an implementation flow of a method for generating an electronic certificate according to an embodiment of the present invention, where the method flow includes steps S101 to S106. The specific implementation principle of each step is as follows.
S101: and running configuration files stored in a local database according to configuration instructions input by a user, and connecting with a plurality of external databases by running the configuration files, wherein the external databases are stored with data source files in various formats, and the data source files record the corresponding relation between data and data types.
In the embodiment of the invention, two types of databases, namely a local database and a plurality of external databases, exist, wherein the external databases respectively store a plurality of types of data related to the generation of the electronic certificates, and the local databases store a plurality of configuration files.
In the embodiment of the invention, after receiving the configuration instruction input by the user, the related configuration files stored in the local database are operated according to the preset corresponding relation, so that the connection with a plurality of external databases can be established, and the external databases provide the original data for the generation of the electronic certificate. It will be appreciated that in the embodiment of the present invention, different configuration files are run according to different configuration instructions, so that the local server may be connected to different external databases.
In an embodiment of the present invention, an external database may store data source files in various formats, such as text format data source files, JSON format data source files, CSV format data source files, and sequenceFiles format data source files. Each data source file stores a plurality of pieces of data, and data types corresponding to the pieces of data, wherein the data types can be: contract amount, contract time, discount fee, late fee, etc., and the data corresponding to each data type is a specific value corresponding to the data type, for example; the contract amount is 1000 ten thousand, the data is 1000 ten thousand, and the data type is contract amount.
S102, according to a generation instruction of an electronic certificate input by a user, respectively acquiring a plurality of data source files from a plurality of external databases through sparkContext, and carrying out format unification processing on the plurality of data source files to generate an elastic distributed data set RDD.
According to the above, the data required for calculation and comparison of the electronic certificate is stored in different data source files, and the formats of the different data source files may be different, which is disadvantageous for subsequent unified calculation. Therefore, in the embodiment of the invention, the data source files are respectively acquired from the external databases through SparkContext, so that the format of the read data source file can be output into a uniform format in the reading process.
Notably, spark is a computing engine for processing big data, is a generic parallel framework, and Spark context is a class used to write Spark programs, which includes a number of specific functional components.
It will be appreciated that the electronic certificate generation instructions, in which the data types desired to be invoked are described, and with which validation logic the data corresponding to these data types are verified, are different from the previous configuration instructions.
In the embodiment of the invention, the elastic distributed data set (Resilient Distributed Dataset, RDD) is a data set with uniform format, which is generated after different data source files are read through sparkContext, so that the RDD stores data which is read according to a generation instruction of an electronic certificate and has uniform format, and each data has a corresponding data type.
As an embodiment of the present invention, as shown in fig. 2, the step S102 includes:
s1021: and sending a format query instruction to the external database according to the generation instruction of the electronic certificate.
S1022: and receiving formats corresponding to the data source files returned by the plurality of external databases.
S1023: and calling a function corresponding to the format preset in the SparkContext according to the format corresponding to the data source file, reading the data source file from the external database through the function, and converting the format of the data source file into a preset unified format.
Optionally, reading a data source file in a text format through a textFile () function in a SparkContext, and converting the text format into a preset unified format; reading a JSON format data source file through an importjson function in a sparkContext, and converting the JSON format into a preset unified format; reading a CSV format data source file through an import CSV function, and converting the CSV format into a preset unified format; and reading the data source file in the sequence file format through a val data=sc.sequence file () function, and converting the sequence file format into a preset unified format.
In the embodiment of the invention, the format of the data source file to be called by the generation instruction of the electronic certificate is acquired by sending the format inquiry instruction, and the data source file is read and converted into the preset unified format based on the function corresponding to the format preset in the SparkContext, so that the data in the unified format is provided for the generation of the electronic certificate, and the generation speed of the electronic certificate and the automation degree of the subsequent verification are improved.
S103: based on the corresponding relation between a preset electronic certificate generation instruction and an electronic certificate generation template, taking a plurality of data types in the electronic certificate generation template corresponding to the electronic certificate generation instruction as target data types, and extracting data corresponding to the target data types from the RDD as basic data.
It can be understood that, according to the generation instruction of the electronic certificate, a large amount of data is included in the data source file read from each external database, and in the generation process of the electronic certificate, data corresponding to all data types in each data source file is not needed, so that after the formats are unified, secondary screening is needed for the data in the RDD, and the screened data is the data really needed for generating the electronic certificate.
Optionally, a generating template of the electronic certificate may be determined according to the generating instruction of the electronic certificate, where the generating template of the electronic certificate has a plurality of data types, and in the embodiment of the present invention, the data type in the generating template of the electronic certificate is used as the target data type.
S104, based on the corresponding relation between the preset generation instruction of the electronic certificate and the verification logic, taking the verification logic corresponding to the generation instruction of the electronic certificate as target verification logic, and verifying the basic data through the target verification logic.
Notably, in the embodiment of the present invention, the correspondence between the generation instruction of the electronic certificate and the verification logic is determined before receiving the configuration instruction input by the user and the generation instruction of the electronic certificate. Optionally, the method for setting the correspondence between the generation instruction of the electronic certificate and the verification logic includes:
acquiring a code of verification logic input by a user; writing the code of the verification logic into a Spark task; generating a generation instruction of the electronic certificate corresponding to the Spark task to establish a corresponding relation between the generation instruction of the electronic certificate and the verification logic.
It can be understood that in the process of manufacturing an electronic certificate, whether the data corresponding to the multiple target data types meet the verification logic needs to be judged, and the verification logic under different application scenarios is different.
And S105, if the basic data passes the verification, storing the basic data into a generation template of the electronic certificate to generate a generation table of the electronic certificate.
And S106, if the basic data does not pass the verification, not storing the basic data into a generation template of the electronic certificate.
In the embodiment of the invention, the configuration files in the local database are operated through the configuration instruction so as to establish connection with external databases with various data formats; according to the generation instruction of the electronic certificate, a plurality of data source files are respectively obtained from a plurality of external databases through sparkContext, format unification processing is carried out on the plurality of data source files, the generated elastic distributed data sets RDD are all data source files with uniform formats, basic data are extracted from the RDD based on the corresponding relation between the preset generation instruction of the electronic certificate and the generation template of the electronic certificate, target verification logic is selected and verified based on the corresponding relation between the preset generation instruction of the electronic certificate and verification logic, and if verification is passed, the basic data are filled into the generation template of the electronic certificate to generate generation tables of the electronic certificate, so that multiple types of data sources are integrated smoothly and efficiently, and the degree of automation of generation of the electronic certificate is provided.
Optionally, the invention also provides a method for processing the electronic certificate exception, which is described in detail as follows:
storing the corresponding relation between the generation instruction of the electronic certificate and the user into an abnormal task log table; if the basic data passes the verification, storing the corresponding relation between the generation instruction of the electronic certificate and the user into a compliance task log table; and shielding users which do not accord with a preset admittance rule based on the abnormal task log table and the compliance task log table.
As an embodiment of the present invention, as shown in fig. 3, the method for processing the generation exception of the electronic certificate includes:
s301, counting the number of generation instructions of the electronic certificates corresponding to each user in the abnormal task log table in a preset time period, and taking the number as a generation abnormal constant of the electronic certificates of each user.
S302, counting the number of generating instructions of the electronic certificates corresponding to each user in the compliance task log table in a preset time period, and taking the number as the generated compliance number of the electronic certificates of each user.
S303, calculating the abnormal probability of the generation instruction of the electronic certificate of the user in the preset time period through the formula 1.
Alternatively, the formula 1 is:
Figure BDA0001773889420000101
the log is err The logmeans is the abnormal probability of the generation instruction of the electronic certificate of the user in a preset time period.
S304, if the abnormality probability of the user in the preset time period is greater than or equal to a preset abnormality threshold, early warning information is displayed to the user, and the generation instruction of the electronic certificate sent by the user is shielded before a trigger instruction is received.
It can be appreciated that in the embodiment of the invention, by shielding the user frequently generating abnormal electronic certificates, the unnecessary workload of the electronic certificates during generation can be reduced, and the method and the device are also beneficial to identifying and preventing the attack and the wrong and repeated use of the electronic certificate generation system by abnormal users.
Corresponding to the method for generating an electronic certificate described in the foregoing embodiments, fig. 4 shows a block diagram of a device for generating an electronic certificate according to an embodiment of the present invention, and for convenience of explanation, only a portion related to the embodiment of the present invention is shown.
Referring to fig. 4, the apparatus includes:
the configuration module 401 is configured to run a configuration file stored in a local database according to a configuration instruction input by a user, and connect with a plurality of external databases by running the configuration file, where the external databases store data source files with multiple formats, and the data source files record a corresponding relationship between data and data types;
the reading module 402 is configured to obtain a plurality of data source files from a plurality of external databases through SparkContext according to a generation instruction of an electronic certificate input by a user, and perform format unification processing on the plurality of data source files, so as to generate an elastic distributed data set RDD;
the extracting module 403 is configured to extract, based on a correspondence between a preset electronic certificate generation instruction and a preset electronic certificate generation template, data corresponding to a plurality of target data types from the RDD by using the plurality of data types in the electronic certificate generation template corresponding to the electronic certificate generation instruction as target data types, as basic data;
the verification module 404 is configured to verify the basic data by using a verification logic corresponding to a generation instruction of the electronic certificate as a target verification logic based on a corresponding relation between the generation instruction of the preset electronic certificate and the verification logic;
and the generating module 405 is configured to store the basic data into the generating template of the electronic certificate to generate a generating table of the electronic certificate if the basic data passes the verification.
Further, the reading module includes:
the sending submodule is used for sending a format inquiry instruction to the external database according to the generation instruction of the electronic certificate;
the receiving sub-module is used for receiving formats corresponding to the data source files returned by the plurality of external databases;
and the calling sub-module is used for calling a function corresponding to the format preset in the SparkContext according to the format corresponding to the data source file, reading the data source file from the external database through the function, and converting the format of the data source file into a preset unified format.
Optionally, the apparatus further comprises:
the acquisition module is used for acquiring verification logic input by a user;
the writing module is used for writing the verification logic into a Spark task;
the establishing module is used for distributing a generating instruction of the electronic certificate for the Spark task so as to establish the corresponding relation between the generating instruction of the electronic certificate and the verification logic.
Further, the apparatus further comprises:
the first recording module is used for storing the corresponding relation between the generation instruction of the electronic certificate and the user into an abnormal task log table if the basic data do not pass verification;
the second recording module is used for storing the corresponding relation between the generation instruction of the electronic certificate and the user into a compliance task log table if the basic data passes the verification;
and the shielding module is used for shielding users which do not accord with a preset admittance rule based on the abnormal task log table and the compliance task log table.
Optionally, the shielding module is specifically configured to:
counting the number of the generation instructions of the electronic certificates corresponding to each user in the abnormal task log table in a preset time period, and taking the number as the generation abnormal constant of the electronic certificates of each user;
counting the number of the generation instructions of the electronic certificates corresponding to each user in the compliance task log table in a preset time period, and taking the number as the generation compliance number of the electronic certificates of each user;
by the formula:
Figure BDA0001773889420000121
calculating the abnormal probability of the generation instruction of the electronic certificate of the user in a preset time period, wherein the log err Generating abnormal constants for the electronic certificates of the user, wherein logmeans is the abnormal constants for the electronic certificates of the user, and logmean is the abnormal probability of the generation instruction of the electronic certificates of the user in a preset time period;
if the abnormality probability of the user in the preset time period is greater than or equal to a preset abnormality threshold, early warning information is displayed to the user, and the generation instruction of the electronic certificate sent by the user is shielded before a trigger instruction is received.
In the embodiment of the invention, the configuration files in the local database are operated through the configuration instruction so as to establish connection with external databases with various data formats; according to the generation instruction of the electronic certificate, a plurality of data source files are respectively obtained from a plurality of external databases through sparkContext, format unification processing is carried out on the plurality of data source files, the generated elastic distributed data sets RDD are all data source files with uniform formats, basic data are extracted from the RDD based on the corresponding relation between the preset generation instruction of the electronic certificate and the generation template of the electronic certificate, target verification logic is selected and verified based on the corresponding relation between the preset generation instruction of the electronic certificate and verification logic, and if verification is passed, the basic data are filled into the generation template of the electronic certificate to generate generation tables of the electronic certificate, so that multiple types of data sources are integrated smoothly and efficiently, and the degree of automation of generation of the electronic certificate is provided.
Fig. 5 is a schematic diagram of a terminal device according to an embodiment of the present invention. As shown in fig. 5, the terminal device 5 of this embodiment includes: a processor 50, a memory 51 and a computer program 52, such as an electronic credential generation program, stored in the memory 51 and executable on the processor 50. The steps of the above-described embodiments of the method of generating electronic certificates are implemented by the processor 50 when executing the computer program 52, such as steps 101 to 106 shown in fig. 1. Alternatively, the processor 50 may perform the functions of the modules/units of the apparatus embodiments described above, such as the units 401 to 405 of fig. 4, when executing the computer program 52.
By way of example, the computer program 52 may be partitioned into one or more modules/units that are stored in the memory 51 and executed by the processor 50 to complete the present invention. The one or more modules/units may be a series of computer program instruction segments capable of performing specific functions for describing the execution of the computer program 52 in the terminal device 5.
The terminal device 5 may be a computing device such as a desktop computer, a notebook computer, a palm computer, a cloud server, etc. The terminal device may include, but is not limited to, a processor 50, a memory 51. It will be appreciated by those skilled in the art that fig. 5 is merely an example of the terminal device 5 and does not constitute a limitation of the terminal device 5, and may include more or less components than illustrated, or may combine certain components, or different components, e.g., the terminal device may further include an input-output device, a network access device, a bus, etc.
The processor 50 may be a central processing unit (Central Processing Unit, CPU), other general purpose processors, digital signal processors (Digital Signal Processor, DSP), application specific integrated circuits (Application Specific Integrated Circuit, ASIC), off-the-shelf programmable gate arrays (Field-Programmable Gate Array, FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, or the like. A general purpose processor may be a microprocessor or the processor may be any conventional processor or the like.
The memory 51 may be an internal storage unit of the terminal device 5, such as a hard disk or a memory of the terminal device 5. The memory 51 may be an external storage device of the terminal device 5, such as a plug-in hard disk, a Smart Media Card (SMC), a Secure Digital (SD) Card, a Flash memory Card (Flash Card) or the like, which are provided on the terminal device 5. Further, the memory 51 may also include both an internal storage unit and an external storage device of the terminal device 5. The memory 51 is used for storing the computer program as well as other programs and data required by the terminal device. The memory 51 may also be used to temporarily store data that has been output or is to be output.
It will be apparent to those skilled in the art that, for convenience and brevity of description, only the above-described division of the functional units and modules is illustrated, and in practical application, the above-described functional distribution may be performed by different functional units and modules according to needs, i.e. the internal structure of the apparatus is divided into different functional units or modules to perform all or part of the above-described functions. The functional units and modules in the embodiment may be integrated in one processing unit, or each unit may exist alone physically, or two or more units may be integrated in one unit, where the integrated units may be implemented in a form of hardware or a form of a software functional unit. In addition, specific names of the functional units and modules are only for convenience of distinguishing from each other, and are not used for limiting the protection scope of the present application. The specific working process of the units and modules in the above system may refer to the corresponding process in the foregoing method embodiment, which is not described herein again.
In the foregoing embodiments, the descriptions of the embodiments are emphasized, and in part, not described or illustrated in any particular embodiment, reference is made to the related descriptions of other embodiments.
The units described as separate units may or may not be physically separate, and units shown as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
The integrated modules/units, if implemented in the form of software functional units and sold or used as stand-alone products, may be stored in a computer readable storage medium. Based on such understanding, the present invention may implement all or part of the flow of the method of the above embodiment, or may be implemented by a computer program to instruct related hardware, where the computer program may be stored in a computer readable storage medium.
The above embodiments are only for illustrating the technical solution of the present invention, and not for limiting the same; although the invention has been described in detail with reference to the foregoing embodiments, it will be understood by those of ordinary skill in the art that: the technical scheme described in the foregoing embodiments can be modified or some technical features thereof can be replaced by equivalents; such modifications and substitutions do not depart from the spirit and scope of the technical solutions of the embodiments of the present invention, and are intended to be included in the scope of the present invention.

Claims (6)

1. A method for generating an electronic certificate, comprising:
running configuration files stored in a local database according to configuration instructions input by a user, and connecting with a plurality of external databases by running the configuration files, wherein the external databases are stored with data source files in various formats, and the data source files record the corresponding relation between data and data types;
according to a generation instruction of an electronic certificate input by a user, respectively acquiring a plurality of data source files from a plurality of external databases through sparkContext, and carrying out format unification processing on the plurality of data source files to generate an elastic distributed data set RDD;
based on the corresponding relation between a preset electronic certificate generation instruction and an electronic certificate generation template, taking a plurality of data types in the electronic certificate generation template corresponding to the electronic certificate generation instruction as target data types, and extracting data corresponding to the plurality of target data types from the RDD as basic data;
based on the corresponding relation between a preset electronic certificate generation instruction and verification logic, taking the verification logic corresponding to the electronic certificate generation instruction as target verification logic, and verifying the basic data through the target verification logic;
if the basic data passes the verification, the basic data is stored in a generation template of the electronic certificate to generate a generation table of the electronic certificate;
if the basic data does not pass the verification, storing the corresponding relation between the generation instruction of the electronic certificate and the user into an abnormal task log table;
if the basic data passes the verification, storing the corresponding relation between the generation instruction of the electronic certificate and the user into a compliance task log table;
counting the number of the generation instructions of the electronic certificates corresponding to each user in the abnormal task log table in a preset time period, and taking the number as the generation abnormal constant of the electronic certificates of each user;
counting the number of the generation instructions of the electronic certificates corresponding to each user in the compliance task log table in a preset time period, and taking the number as the generation compliance number of the electronic certificates of each user;
by the formula:
Figure FDA0004070242600000021
calculating the abnormal probability of the generation instruction of the electronic certificate of the user in a preset time period, wherein the log err Generating abnormal constants for the electronic certificates of the user, wherein logmeans is the generated compliance number of the electronic certificates of the user, and logmeans is the abnormal probability of a generation instruction of the electronic certificates of the user in a preset time period;
if the abnormality probability of the user in the preset time period is greater than or equal to a preset abnormality threshold, early warning information is displayed to the user, and the generation instruction of the electronic certificate sent by the user is shielded before a trigger instruction is received.
2. The method for generating electronic certificate according to claim 1, wherein said obtaining a plurality of said data source files from a plurality of said external databases through SparkContext, respectively, and performing a format unification process on a plurality of said data source files according to a generation instruction of electronic certificate inputted by a user, comprises:
sending a format query instruction to the external database according to the generation instruction of the electronic certificate;
receiving formats corresponding to the data source files returned by the plurality of external databases;
and calling a function corresponding to the format preset in the SparkContext according to the format corresponding to the data source file, reading the data source file from the external database through the function, and converting the format of the data source file into a preset unified format.
3. The method of generating electronic certificates as recited in claim 1, further comprising, prior to said receiving the configuration instruction entered by the user and the generation instruction of the electronic certificates:
acquiring a code of verification logic input by a user;
writing the code of the verification logic into a Spark task;
generating a generation instruction of the electronic certificate corresponding to the Spark task to establish a corresponding relation between the generation instruction of the electronic certificate and the verification logic.
4. A terminal device comprising a memory and a processor, said memory storing a computer program executable on said processor, characterized in that said processor, when executing said computer program, performs the steps of:
running configuration files stored in a local database according to configuration instructions input by a user, and connecting with a plurality of external databases by running the configuration files, wherein the external databases are stored with data source files in various formats, and the data source files record the corresponding relation between data and data types;
according to a generation instruction of an electronic certificate input by a user, respectively acquiring a plurality of data source files from a plurality of external databases through sparkContext, and carrying out format unification processing on the plurality of data source files to generate an elastic distributed data set RDD;
based on the corresponding relation between a preset electronic certificate generation instruction and an electronic certificate generation template, taking a plurality of data types in the electronic certificate generation template corresponding to the electronic certificate generation instruction as target data types, and extracting data corresponding to the plurality of target data types from the RDD as basic data;
based on the corresponding relation between a preset electronic certificate generation instruction and verification logic, taking the verification logic corresponding to the electronic certificate generation instruction as target verification logic, and verifying the basic data through the target verification logic;
if the basic data passes the verification, the basic data is stored in a generation template of the electronic certificate to generate a generation table of the electronic certificate;
if the basic data does not pass the verification, storing the corresponding relation between the generation instruction of the electronic certificate and the user into an abnormal task log table;
if the basic data passes the verification, storing the corresponding relation between the generation instruction of the electronic certificate and the user into a compliance task log table;
counting the number of the generation instructions of the electronic certificates corresponding to each user in the abnormal task log table in a preset time period, and taking the number as the generation abnormal constant of the electronic certificates of each user;
counting the number of the generation instructions of the electronic certificates corresponding to each user in the compliance task log table in a preset time period, and taking the number as the generation compliance number of the electronic certificates of each user;
by the formula:
Figure FDA0004070242600000031
calculating the abnormal probability of the generation instruction of the electronic certificate of the user in a preset time period, wherein the log err Generating abnormal constants for the electronic certificates of the user, wherein logmeans is the generated compliance number of the electronic certificates of the user, and logmeans is the abnormal probability of a generation instruction of the electronic certificates of the user in a preset time period;
if the abnormality probability of the user in the preset time period is greater than or equal to a preset abnormality threshold, early warning information is displayed to the user, and the generation instruction of the electronic certificate sent by the user is shielded before a trigger instruction is received.
5. The terminal device of claim 4, further comprising:
the step of obtaining a plurality of data source files from a plurality of external databases through SparkContext according to a generation instruction of an electronic certificate input by a user, and performing format unification processing on the plurality of data source files comprises the following steps:
sending a format query instruction to the external database according to the generation instruction of the electronic certificate;
receiving formats corresponding to the data source files returned by the plurality of external databases;
and calling a function corresponding to the format preset in the SparkContext according to the format corresponding to the data source file, reading the data source file from the external database through the function, and converting the format of the data source file into a preset unified format.
6. A computer readable storage medium storing a computer program, characterized in that the computer program when executed by a processor implements the steps of the method according to any one of claims 1 to 3.
CN201810961263.7A 2018-08-22 2018-08-22 Electronic certificate generation method and terminal equipment Active CN109241163B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201810961263.7A CN109241163B (en) 2018-08-22 2018-08-22 Electronic certificate generation method and terminal equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810961263.7A CN109241163B (en) 2018-08-22 2018-08-22 Electronic certificate generation method and terminal equipment

Publications (2)

Publication Number Publication Date
CN109241163A CN109241163A (en) 2019-01-18
CN109241163B true CN109241163B (en) 2023-06-02

Family

ID=65068436

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810961263.7A Active CN109241163B (en) 2018-08-22 2018-08-22 Electronic certificate generation method and terminal equipment

Country Status (1)

Country Link
CN (1) CN109241163B (en)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110855625A (en) * 2019-10-17 2020-02-28 新华三信息安全技术有限公司 Streaming processing-based anomaly analysis method and device and storage medium
CN111681028A (en) * 2020-04-16 2020-09-18 上海淇玥信息技术有限公司 Resource allocation method and device, electronic equipment and computer readable storage medium
CN113763011A (en) * 2020-11-19 2021-12-07 北京沃东天骏信息技术有限公司 Distribution processing method, device, equipment and storage medium of electronic certificate

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101853454A (en) * 2009-04-01 2010-10-06 华为技术有限公司 Electronic certificate realization method and device
CN104392184A (en) * 2014-11-13 2015-03-04 北京海泰方圆科技有限公司 Multi-stage electronic file record generating and checking method

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8522335B2 (en) * 2009-12-01 2013-08-27 International Business Machines Corporation Token mediation service in a data management system

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101853454A (en) * 2009-04-01 2010-10-06 华为技术有限公司 Electronic certificate realization method and device
CN104392184A (en) * 2014-11-13 2015-03-04 北京海泰方圆科技有限公司 Multi-stage electronic file record generating and checking method

Also Published As

Publication number Publication date
CN109241163A (en) 2019-01-18

Similar Documents

Publication Publication Date Title
CN110309125B (en) Data verification method, electronic device and storage medium
US10402427B2 (en) System and method for analyzing result of clustering massive data
CN110162662B (en) Verification method, device and equipment for data records in block chain type account book
CN109241163B (en) Electronic certificate generation method and terminal equipment
CN108876213B (en) Block chain-based product management method, device, medium and electronic equipment
CN108460068B (en) Method, device, storage medium and terminal for importing and exporting report
CN109902493B (en) Script issuing method and server
CN112163412B (en) Data verification method and device, electronic equipment and storage medium
CN111475494A (en) Mass data processing method, system, terminal and storage medium
US8195645B2 (en) Optimized bulk computations in data warehouse environments
CN113434542A (en) Data relation identification method and device, electronic equipment and storage medium
CN116993523A (en) Configurable account checking method, device, equipment and storage medium
CN109446054B (en) Processing method and terminal equipment for override operation request based on big data
US20210165907A1 (en) Systems and methods for intelligent and quick masking
CN116719822A (en) Method and system for storing massive structured data
CN111143461A (en) Mapping relation processing system and method and electronic equipment
CN114356454B (en) Reconciliation data processing method, device, storage medium and program product
US10474666B2 (en) Metadata validation tool
CN111897728B (en) Interface debugging method and related equipment
CN114238349A (en) Data verification method, device, equipment and medium
CN113760864A (en) Data model generation method and device
CN114297236A (en) Data blood relationship analysis method, terminal equipment and storage medium
CN113434734A (en) Method, device, equipment and storage medium for generating file and reading file
CN117076546B (en) Data processing method, terminal device and computer readable storage medium
CN112686759A (en) Account checking monitoring method, device, equipment and 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
GR01 Patent grant
GR01 Patent grant