CN107861963B - Generation method and device of dangerous contract - Google Patents

Generation method and device of dangerous contract Download PDF

Info

Publication number
CN107861963B
CN107861963B CN201710094908.7A CN201710094908A CN107861963B CN 107861963 B CN107861963 B CN 107861963B CN 201710094908 A CN201710094908 A CN 201710094908A CN 107861963 B CN107861963 B CN 107861963B
Authority
CN
China
Prior art keywords
field
data table
contract
dangerous
risk
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
CN201710094908.7A
Other languages
Chinese (zh)
Other versions
CN107861963A (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 Technology Shenzhen Co Ltd
Original Assignee
Ping An Technology Shenzhen Co 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 Technology Shenzhen Co Ltd filed Critical Ping An Technology Shenzhen Co Ltd
Priority to CN201710094908.7A priority Critical patent/CN107861963B/en
Publication of CN107861963A publication Critical patent/CN107861963A/en
Application granted granted Critical
Publication of CN107861963B publication Critical patent/CN107861963B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/22Indexing; Data structures therefor; Storage structures
    • G06F16/2282Tablespace storage structures; Management thereof
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q40/00Finance; Insurance; Tax strategies; Processing of corporate or income taxes
    • G06Q40/08Insurance

Abstract

The invention discloses a method for generating a dangerous seed contract, which comprises the following steps: when a generation instruction of a risky contract is received, determining a risky contract to be generated; based on the determined dangerous seed number corresponding to the dangerous seed, capturing a preset field corresponding to the dangerous seed number in a pre-stored data table; and taking the captured preset field as a judgment condition field corresponding to the dangerous seed number, and generating a dangerous seed contract corresponding to the dangerous seed according to the dangerous seed and the judgment condition field. The invention also discloses a device for generating the dangerous seed contract. After the dangerous type is determined, if the field corresponding to the dangerous type is required to be inquired, the preset field is directly grabbed in the data table, so that the time spent on generating the dangerous type contract is shortened, and the generation efficiency of the dangerous type contract is improved.

Description

Generation method and device of dangerous contract
Technical Field
The invention relates to the field of insurance, in particular to a method and a device for generating a dangerous seed contract.
Background
The traditional dangerous seed contract is obtained by adding a corresponding judgment condition field to a dangerous seed, and is particularly realized by a judgment execution statement of if … … else, when a contract is generated by an if … … else statement, each statement is nested with a plurality of layers of if … … else, when the dangerous seed and the last judgment condition field in a system generate a contract, the judgment execution statement is adopted, the judgment needs to be carried out by the if … … else layer by layer, and the contract can be generated until the last judgment condition field is confirmed, and the judgment process possibly needs to execute dozens of lines of codes, so that a large amount of time is spent, and the generation efficiency of the insurance contract is low.
Disclosure of Invention
The invention mainly aims to provide a method and a device for generating a risk contract, and aims to solve the technical problem that the generation efficiency of an insurance contract is low due to the fact that a large amount of time is consumed by the conventional risk contract generation mode.
In order to achieve the above object, the present invention provides a method for generating a risky contract, including:
when a generation instruction of a risky contract is received, determining a risky contract to be generated;
based on the determined dangerous seed number corresponding to the dangerous seed, capturing a preset field corresponding to the dangerous seed number in a pre-stored data table;
and taking the captured preset field as a judgment condition field corresponding to the dangerous seed number, and generating a dangerous seed contract corresponding to the dangerous seed according to the dangerous seed and the judgment condition field.
Preferably, before the step of determining the risky species of the risky contract to be generated when the generation instruction of the risky contract is received, the method further includes:
acquiring a data table template, setting the attribute of a preset column of the data table template as a dangerous seed number, and setting the attribute of the rest columns as different field numbers;
extracting each field associated with each risk seed number from the database;
and adding each field associated with each risk type number to the row of each corresponding risk type number in the data table template to obtain a data table, and storing the data table.
Preferably, the step of adding each field associated with each risk type number to the row of the corresponding risk type number in the data table template to obtain the data table includes:
determining the priority corresponding to each field associated with each dangerous seed number;
and sequentially adding fields associated with the risk types to the row of the corresponding risk types in the data table template according to the priority order to obtain the data table.
Preferably, before the step of determining the risky species of the risky contract to be generated when the generation instruction of the risky contract is received, the method further includes:
acquiring a data table template, setting the attribute of a preset column of the data table template as a risk seed number, and setting the attribute of the rest columns as different field identifications;
determining each field identification associated with each risk type number in the database;
and in the data table template, setting the zone bit of the position of the field mark associated with each dangerous seed number as a preset value, so as to obtain the data table according to the zone bit set in the data table template by each dangerous seed number.
Preferably, after the step of generating the seed risk contract corresponding to the seed risk according to the seed risk and the judgment condition field, the method further includes:
when an increasing instruction of a field is received, acquiring a newly added field, and determining a dangerous seed number of the field to be increased;
adding the determined seed number to the data table, and adding the newly added field to the row where the added seed number is located.
Further, to achieve the above object, the present invention provides a generation apparatus of a risky contract, including:
the determining module is used for determining the dangerous seeds of the dangerous seed contract to be generated when receiving the generating instruction of the dangerous seed contract;
the grabbing module is used for grabbing a preset field corresponding to the dangerous seed number in a pre-stored data table based on the determined dangerous seed number corresponding to the dangerous seed;
and the processing module is used for taking the captured preset field as a judgment condition field corresponding to the dangerous seed number and generating the dangerous seed contract corresponding to the dangerous seed according to the dangerous seed and the judgment condition field.
Preferably, the apparatus further comprises:
the first acquisition setting module is used for acquiring a data table template, setting the attributes of preset columns of the data table template as risk types, and setting the attributes of the rest columns as different field numbers;
the extraction module is used for extracting each field associated with each risk type number from the database;
the first adding module is used for adding each field associated with each risk type number to the row of each corresponding risk type number in the data table template to obtain a data table;
and the storage module is used for storing the data table.
Preferably, the first adding module comprises:
the determining unit is used for determining the priority corresponding to each field associated with each dangerous seed number;
and the adding unit is used for sequentially adding each field associated with each risk type number to the row of each corresponding risk type number in the data table template according to the priority order to obtain the data table.
Preferably, the apparatus further comprises:
the second acquisition setting module is used for acquiring a data table template, setting the attribute of a preset column of the data table template as a risk seed number and setting the attribute of the rest columns as different field identifications;
the determining module is further configured to determine, in the database, each field identifier associated with each risk seed number;
the processing module is further configured to set a flag bit of a position where a field identifier associated with each dangerous seed number is located in the data table template to a preset value, so as to obtain a data table according to the flag bit set in the data table template by each dangerous seed number.
Preferably, the processing module is further configured to, when an instruction to add a field is received, obtain a newly added field, and determine a risk type number of the field to be added;
the device further comprises:
and the second adding module is used for adding the determined risk types in the data table and adding the newly added fields in the row where the added risk types are located.
When a generation instruction of a dangerous contract is received, firstly determining a dangerous type of the contract to be generated, then grabbing a preset field corresponding to the dangerous type number in a prestored data table based on the determined dangerous type number corresponding to the dangerous type, taking the grabbed preset field as a judgment condition field corresponding to the dangerous type number, and finally generating the dangerous contract corresponding to the dangerous type according to the dangerous type and the judgment condition field. According to the scheme, after the dangerous seed is determined, if the field corresponding to the dangerous seed is to be inquired, the field corresponding to the dangerous seed is not inquired layer by layer through the if … … else statement, but the preset field is directly captured in the data table, so that the time spent on generating the dangerous seed contract is shortened, and the generation efficiency of the dangerous seed contract is improved.
Drawings
FIG. 1 is a schematic flow chart of a method for generating a risky contract according to a first embodiment of the present invention;
FIG. 2 is a schematic flow chart illustrating a second embodiment of a method for generating a risky contract according to the present invention;
FIG. 3 is a detailed flowchart of step S60 in FIG. 2;
FIG. 4 is a flow chart illustrating a third embodiment of a method for generating a risky contract according to the present invention;
FIG. 5 is a schematic flow chart of a fourth embodiment of a method for generating a risky contract according to the present invention;
FIG. 6 is a functional block diagram of a first embodiment of an apparatus for generating a risky contract according to the present invention;
FIG. 7 is a functional block diagram of a second embodiment of the dangerous seed contract generating device according to the present invention;
FIG. 8 is a block diagram of a refinement function of the add-on block 60 of FIG. 7;
FIG. 9 is a functional block diagram of a third embodiment of an apparatus for generating a risky contract according to the present invention;
fig. 10 is a functional block diagram of a fourth embodiment of the dangerous seed contract generating device of the present invention.
The implementation, functional features and advantages of the objects of the present invention will be further explained with reference to the accompanying drawings.
Detailed Description
It should be understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention.
It can be understood that when the original risk is just classified to be screened for the risk species of the precondition, the business personnel manually operate one by one, the policy-preserving amount is increased suddenly along with the business development, and the daily work of the business personnel is heavily burdened by the one by one manual operation; the conventional clinical division reconstruction method is implemented by the following steps: if the judgment condition field comprises a plurality of fields, the fields are classified into unconventional contracts to be specially processed, namely a plurality of if … … else branches are adopted for judgment.
Examples are:
assuming that the corresponding S01 contract can be obtained by adding 1122 risk to the judgment condition field 01 under the conventional condition, and in this case, the conventional 1122+01 — S01 is adopted;
however, assume now that 1122 is at risk for an additional 1123 into the S02 contract, and 1123+1124 is at risk for an additional S03 contract. In this case, a single "a dangerous kind — a contract" is difficult to express, and special processing is required in the program, that is:
If 1122+1123then
contract S02
Else 1122+1123+1124then
Contract S03
……
Here, only the case where the additional risk species is considered, i.e., the judgment condition 1;
if the current 1122 risk is very special, a decision condition 2 may be required to validate the contract, such as:
1122, when the occupation is 01, the contract is S04;
1122, when the occupation is 02, the contract is S05;
……
that is, a risk category may correspond to different judgment conditions, and may also correspond to a varied contract type. If special processing of if … … else is performed in the conventional storage process, the final special processing code becomes very long with the richness of the service types, and a large amount of redundant content is generated, so that the readability is reduced, and the difficulty of code post-maintenance is improved.
Still take 1122 dangerous species for example, if the special treatment on 1122 is long, i.e. nesting multiple layers of if … … else. When modifying the code, the code maintainer needs a layer of if … … else to make a judgment to confirm that when 1122 dangerous seeds finally belong to what contract, dozens of lines of codes may be read to determine a contract, which not only consumes a lot of manpower, but also does not accord with the security policy.
In view of the situation, the invention provides a method for generating the dangerous seed contract.
Referring to fig. 1, fig. 1 is a schematic flow chart of a first embodiment of a method for generating a risk contract according to the present invention.
In this embodiment, the method for generating the seed risk contract includes:
when a generation instruction of a risky contract is received, determining a risky contract to be generated; based on the determined dangerous seed number corresponding to the dangerous seed, capturing a preset field corresponding to the dangerous seed number in a pre-stored data table; and taking the captured preset field as a judgment condition field corresponding to the dangerous seed number, and generating a dangerous seed contract corresponding to the dangerous seed according to the dangerous seed and the judgment condition field.
The following are specific steps for realizing generation of the dangerous seed contract step by step in this embodiment:
step S10, when receiving the generation instruction of the risky contract, determining the risky contract to be generated;
in this embodiment, the method for generating an insurance contract is applied to an insurance system, and the determining, when receiving a generation instruction of an insurance contract, the insurance of the insurance contract to be generated includes:
a. the insurance system displays a preset interface, the preset interface displays a generation control of the dangerous contract, when the generation control of the dangerous contract receives a click operation or a touch operation, a selection window of the dangerous contract pops up, when the selection window of the dangerous contract receives a selection completion operation of the dangerous contract, the insurance system equivalently receives a generation instruction of the dangerous contract, and the dangerous contract selected based on the selection window is used as the dangerous contract to be generated.
b. The insurance system displays a preset interface, the preset interface displays a generation control of the dangerous contract, when the generation control based on the dangerous contract receives a click operation or a touch operation, the insurance system equivalently receives a generation instruction of the dangerous contract, then the insurance system pops up a selection window of the dangerous contract based on the generation instruction of the dangerous contract, and when the selection window based on the dangerous contract receives a selection completion operation of the dangerous contract, the dangerous contract selected based on the selection window is used as the dangerous contract to be generated.
In this embodiment, in order to facilitate the selection of the dangerous seeds, the selection window of the dangerous seeds is preferably a drop-down input box, and when the selection window is the drop-down input box, the existing dangerous seeds may be selected based on the drop-down input box, and the selected dangerous seeds may be input into the selection window.
Step S20, based on the determined dangerous seed number corresponding to the dangerous seed, capturing a preset field corresponding to the dangerous seed number in a pre-stored data table;
in this embodiment, after determining the dangerous seeds corresponding to the contract to be generated, the dangerous seed number corresponding to the dangerous seeds is determined first, and then the preset field corresponding to the dangerous seed number is captured in the pre-stored data table. It should be understood that a plurality of risk types are stored in the pre-stored data table, each risk type is associated with a preset number of fields, and when a risk type is associated with only one field, the field corresponding to the risk type is captured in the pre-stored data table. However, in the present embodiment, the case where a plurality of fields are associated with the risk type number is mainly solved, and therefore, it is preferable that a plurality of fields are associated with each risk type number in the prestored data table.
Then, after determining the risk seed number corresponding to the risk seed, the capturing a preset field corresponding to the risk seed number in a pre-stored data table based on the determined risk seed number corresponding to the risk seed comprises: if the field corresponding to the dangerous seed number is captured for the first time, capturing the first field corresponding to the dangerous seed number, setting a captured identifier for the captured field after the current capture, and capturing the first field which is not captured by the dangerous seed number after the field corresponding to the dangerous seed number is captured for the Nth time, namely capturing the Nth field.
And step S30, using the captured preset field as a judgment condition field corresponding to the dangerous seed number, and generating a dangerous seed contract corresponding to the dangerous seed according to the dangerous seed and the judgment condition field.
After capturing the preset field corresponding to the dangerous seed number, taking the captured preset field as the judgment condition field corresponding to the dangerous seed number, where taking the captured preset field as the judgment condition field corresponding to the dangerous seed number may include: and associating the captured preset field with the risk type number to use the preset field as a judgment condition field corresponding to the risk type number. For example, if there is a current risk category number 1122 and the captured field is 01, the field 01 is associated with the risk category number 1122 to use the field 01 as the judgment condition field of the risk category number 1122. The judgment condition field is the judgment condition mentioned above, and then the dangerous seed contract corresponding to the dangerous seed is generated according to the dangerous seed and the judgment condition field, specifically, the generation mode is consistent with the existing mode, and details are not described here.
In the method for generating the risky contract provided in this embodiment, when a command for generating the risky contract is received, a risky type of the risky contract to be generated is determined, then, based on a determined risky type number corresponding to the risky type, a preset field corresponding to the risky type number is captured in a pre-stored data table, the captured preset field is used as a judgment condition field corresponding to the risky type number, and finally, the risky contract corresponding to the risky type is generated according to the risky type and the judgment condition field. According to the scheme, after the dangerous seed is determined, if the field corresponding to the dangerous seed is to be inquired, the field corresponding to the dangerous seed is not inquired layer by layer through the if … … else statement, but the preset field is directly captured in the data table, so that the time spent on generating the dangerous seed contract is shortened, and the generation efficiency of the dangerous seed contract is improved.
Meanwhile, the original multi-layer if … … else judgment is simplified into a simple table look-up statement, so that the code complexity is reduced, the program look-up speed is increased, and the code maintenance difficulty is reduced.
Further, a second embodiment of the method for generating a risky contract according to the present invention is provided based on the first embodiment, and in this embodiment, referring to fig. 2, before the step S10, the method further includes:
step S40, acquiring a data table template, setting the attributes of the preset columns of the data table template as risk seed numbers, and setting the attributes of the rest columns as different field numbers;
step S50, extracting each field associated with each risk type number from the database;
and step S60, adding each field associated with each risk type number to the row of each corresponding risk type number in the data table template to obtain a data table, and storing the data table.
In this embodiment, a data table template is obtained first, and then the data table template is set, specifically: setting the attribute of a preset column of the data table template as a risk type number, and setting the attribute of the rest columns as different field numbers, wherein the preset column is preferably a first column, the risk type number is 1122, 1123, 1124 and the like, and the field number is field 1, field 2, field 3 and the like.
After the column attributes of the data table template are set, each field associated with each risk type number is extracted from the database, in this embodiment, one risk type number is associated with a plurality of fields, and the fields are used as judgment condition fields, so that the risk type number can finally generate different individual risk type contracts, for example, each field associated with the risk type number 1122, such as 01, 02, 03, can finally generate three different contracts, that is, three different contracts, namely, 1122+01 — S01, 1122+02 — S02, and 1122+03 — S03, can be generated by associating the three fields 01, 02, 03.
And after extracting each field associated with each risk type number from the database, adding each field associated with each risk type number to the row of each corresponding risk type number in the data table template to obtain the data table. Specifically, referring to fig. 3, the step S60 includes:
step S61, determining the priority corresponding to each field associated with each risk type number;
and step S62, sequentially adding each field associated with each risk type number to the row of each corresponding risk type number in the data table template according to the priority order to obtain the data table.
That is to say, after extracting each field associated with each risk type number from the database, determining the priority corresponding to each field associated with each risk type number, and then sequentially adding each field associated with each risk type number to the row where each corresponding risk type number is located in the data table template according to the order of the priority to obtain the data table. For example, the priority of the fields 01, 02, 03 associated with the risk seed number 1122 is: 02. 01, 03, then, the fields of risk number 1122 are added to the row of the data table template in the order of 02, 01, 03, in which the corresponding risk number is located.
For better understanding, the data table with the added seed number and associated fields is shown in the following table:
dangerous seed number Field 1 Field 2 Field 3
1122 02 01 03
1123
1124
It can be understood that the above table only fills in the associated field with the risk type number 1122, and the processing manner of the fields associated with other risk type numbers is consistent with the above manner, which is not described herein for redundancy.
Through the processing mode, the data table can be obtained, and the data table is finally stored, so that the generation of the risk contract can be carried out according to the stored data table.
In this embodiment, a generation manner of the data table is introduced, so that generation of the risk contract is performed according to the generated data table, and the generation of the risk contract is realized by table lookup, and the query is not nested layer by layer through the if … … else statement, but the preset field is directly captured in the data table, so that time spent on generating the risk contract is shortened, and the generation efficiency of the risk contract is improved.
Further, a third embodiment of the method for generating a risky contract according to the present invention is provided based on the first embodiment, and in this embodiment, referring to fig. 4, before the step S10, the method further includes:
step S70, acquiring a data table template, and setting the attribute of the preset column of the data table template as a risk seed number and the attribute of the rest columns as different field identifications;
step S80, determining each field identification associated with each risk type number in the database;
and step S90, in the data sheet template, setting the zone bit of the position of the field mark associated with each dangerous seed number as a preset value, so as to obtain the data sheet according to the zone bit set in the data sheet template by each dangerous seed number.
In this embodiment, a data table template is obtained first, and then the data table template is set, specifically: the attributes of the preset columns of the data table template are set as risk types such as 1122, 1123, 1124 and the like, and the attributes of the rest of the columns are set as different field identifications, wherein the preset columns are preferably the first columns, and the field identifications such as 011, 012, 013, 014, 015 and the like.
After the column attribute of the data table template is set, each field identifier associated with each risk type number is determined in the database, in this embodiment, it is possible that a plurality of risk type numbers all correspond to the same field identifier in the database, that is, the field identifier corresponding to the risk type number 1122 may be 011, 012, 013, the field identifier corresponding to the risk type number 1123 may be 013, 014, 015, and the field identifier corresponding to the risk type number 1124 may be 011, 013, 014.
After determining each field identifier associated with each dangerous type number in the database, in the data table template, setting a flag bit of a position where the field identifier associated with each dangerous type number is located to a preset value, for example, setting the flag bit of the position where the field identifier associated with each dangerous type number is located to 1, to indicate that the dangerous type number corresponds to the field identifier. For a better understanding of the present embodiment, reference may be made to the following table:
Figure BDA0001228779450000091
Figure BDA0001228779450000101
and finally, obtaining the data table according to the flag bit set in the data table template by each dangerous seed number. It should be understood that a risk number is associated with a plurality of field identifications, and the field identifications correspond to judgment condition fields, so that the risk number can finally generate different risk contracts.
It is to be understood that, in this embodiment, although the data table includes a plurality of field identifiers, each risk type number does not correspond to a field identifier in each column, that is, some columns are empty and there is no field, and therefore, when capturing fields of the risk type number in the data table in the first embodiment, a preset field is captured as a judgment condition field to generate a risk type contract.
In this embodiment, a generation manner of the data table is introduced, so that generation of the risk contract is performed subsequently according to the generated data table, and the generation manner of the risk contract can be realized by table lookup, and the query is not performed layer by layer through the if … … else statement, but the preset field is directly captured in the data table, so that time spent on generating the risk contract is shortened, and generation efficiency of the risk contract is improved. Moreover, the generation method of the data table is different from that of the second embodiment, and only the flag bit of the position where the field identifier associated with each dangerous seed number is located in the data table template is set as a preset value, so that the generation method of the data table is more flexible.
Further, a fourth embodiment of the method for generating a seed contract under risk of the present invention is proposed based on the first to third embodiments, and in this embodiment, referring to fig. 5, after the step S30, the method further includes:
step S100, when an increasing instruction of a field is received, acquiring a newly added field and determining a dangerous seed number of the field to be increased;
and step S110, adding the determined risk types in the data table, and adding the newly added fields in the row of the risk types in the data table.
In this embodiment, after the security contract corresponding to the security contract is generated according to the security contract and the judgment condition field, if an instruction for increasing the security contract is received, a newly added security contract is obtained, the security contract number of the security contract number to be increased is determined, the determined security contract number is added to the data table, and the newly added security contract number is added to the security contract number row of the data table, so as to update the data table. Since the second embodiment and the third embodiment respectively detail two different generation manners of the data table, a manner of adding the newly added field to the row of the risky seed number of the data table is consistent with the manner of the second embodiment and the third embodiment, and redundant description is not repeated here.
In this embodiment, the data table may be updated, so that the subsequently generated seed risk contract is updated correspondingly, and the data table does not need to be re-established, thereby improving the working efficiency. Meanwhile, fields in the data table can be infinitely extended, namely the fields can be extended to the field N all the time, so that the code multiplexing property is improved, and the extension is easier.
The invention further provides a device for generating the dangerous seed contract.
Referring to fig. 6, fig. 6 is a functional block diagram of a first embodiment of the dangerous seed contract generating device 001 of the present invention.
It should be emphasized that the functional module diagram shown in fig. 6 is merely an exemplary diagram of a preferred embodiment, and those skilled in the art can easily supplement new functional modules around the functional module of the risk contract generation apparatus 001 shown in fig. 6; the names of the function modules are self-defined names, which are only used for assisting understanding of the program function blocks of the generation device 001 of the seed contract, and are not used for limiting the technical scheme of the present invention.
In this embodiment, the generation device 001 of the seed risk contract includes:
the determining module 10 is configured to determine, when a generation instruction of a risky contract is received, a risky species of the risky contract to be generated;
in this embodiment, the generating device 001 of the risky contract is applied to an insurance system, and the determining module 10 determines, when receiving the generating instruction of the risky contract, the manner of the risky contract to be generated, including:
a. the method comprises the steps of displaying a preset interface, displaying a generation control of the dangerous contract, popping up a selection window of the dangerous contract when the generation control of the dangerous contract receives a click operation or a touch operation, receiving a selection completion operation of the dangerous contract based on the selection window of the dangerous contract, receiving a generation instruction of the dangerous contract by the determination module 10, and taking the dangerous contract selected based on the selection window as the dangerous contract to be generated.
b. The method comprises the steps of displaying a preset interface, displaying a generation control of the risky contract, receiving a click operation or a touch operation based on the generation control of the risky contract, equivalently receiving a generation instruction of the risky contract, popping up a selection window of the risky contract based on the generation instruction of the risky contract, and when receiving a selection completion operation of the risky contract based on the selection window of the risky contract, using the risky contract selected based on the selection window as the risky contract to be generated by a determination module 10.
In this embodiment, in order to facilitate the selection of the dangerous seeds, the selection window of the dangerous seeds is preferably a drop-down input box, and when the selection window is the drop-down input box, the existing dangerous seeds may be selected based on the drop-down input box, and the selected dangerous seeds may be input into the selection window.
The grabbing module 20 is configured to grab a preset field corresponding to the dangerous seed number in a pre-stored data table based on the determined dangerous seed number corresponding to the dangerous seed;
in this embodiment, after the determining module 10 determines the dangerous seed corresponding to the contract to be generated, the dangerous seed number corresponding to the dangerous seed is determined first, and then the capturing module 20 captures the preset field corresponding to the dangerous seed number in the pre-stored data table. It should be understood that a plurality of risk types are stored in the pre-stored data table, and each risk type is associated with a preset number of fields, when a risk type is associated with only one field, the grasping module 20 grasps a field corresponding to the risk type in the pre-stored data table. However, in the present embodiment, the case where a plurality of fields are associated with the risk type number is mainly solved, and therefore, it is preferable that a plurality of fields are associated with each risk type number in the prestored data table.
Then, after determining the risk seed number corresponding to the risk seed, the fetching module 20 fetches a preset field corresponding to the risk seed number in a pre-stored data table based on the determined risk seed number corresponding to the risk seed, including: if the field corresponding to the dangerous seed number is captured for the first time, the capturing module 20 captures the first field corresponding to the dangerous seed number, and after the current capturing, a captured identifier is set for the captured field, and if the field corresponding to the dangerous seed number is captured for the subsequent nth time, the capturing module 20 captures the first field which is not captured by the dangerous seed number, which is equivalent to capturing the nth field.
And the processing module 30 is configured to use the captured preset field as a judgment condition field corresponding to the dangerous seed number, and generate a dangerous seed contract corresponding to the dangerous seed according to the dangerous seed and the judgment condition field.
After capturing the preset field corresponding to the dangerous seed number, the processing module 30 uses the captured preset field as the judgment condition field corresponding to the dangerous seed number, and the processing module 30 may use the captured preset field as the judgment condition field corresponding to the dangerous seed number, where: and associating the captured preset field with the risk type number to use the preset field as a judgment condition field corresponding to the risk type number. For example, if there is a current risk category number 1122 and the captured field is 01, the field 01 is associated with the risk category number 1122 to use the field 01 as the judgment condition field of the risk category number 1122. The judgment condition field is the judgment condition mentioned above, and then the dangerous seed contract corresponding to the dangerous seed is generated according to the dangerous seed and the judgment condition field, specifically, the generation mode is consistent with the existing mode, and details are not described here.
When a generation instruction of a dangerous contract is received, the generation device 001 of the dangerous contract provided in this embodiment first determines a dangerous type of the contract to be generated, then captures a preset field corresponding to the dangerous type number in a pre-stored data table based on the determined dangerous type number corresponding to the dangerous type, uses the captured preset field as a judgment condition field corresponding to the dangerous type number, and finally generates the dangerous contract corresponding to the dangerous type according to the dangerous type and the judgment condition field. According to the scheme, after the dangerous seed is determined, if the field corresponding to the dangerous seed is to be inquired, the field corresponding to the dangerous seed is not inquired layer by layer through the if … … else statement, but the preset field is directly captured in the data table, so that the time spent on generating the dangerous seed contract is shortened, and the generation efficiency of the dangerous seed contract is improved.
Meanwhile, the original multi-layer if … … else judgment is simplified into a simple table look-up statement, so that the code complexity is reduced, the program look-up speed is increased, and the code maintenance difficulty is reduced.
Further, a second embodiment of the device 001 for generating a seed contract at risk of the present invention is proposed based on the first embodiment, and in this embodiment, referring to fig. 7, the device 001 further includes:
the first acquisition setting module 40 is configured to acquire a data table template, set the attributes of preset columns of the data table template as risk types, and set the attributes of the remaining columns as different field numbers;
an extracting module 50, configured to extract, from the database, each field associated with each risk seed number;
a first adding module 60, configured to add each field associated with each risk type number to a row of each risk type number corresponding to the data table template to obtain a data table;
a storage module 70 for storing the data table.
In this embodiment, the first obtaining and setting module 40 first obtains a data table template, and then sets the data table template, specifically: setting the attribute of a preset column of the data table template as a risk type number, and setting the attribute of the rest columns as different field numbers, wherein the preset column is preferably a first column, the risk type number is 1122, 1123, 1124 and the like, and the field number is field 1, field 2, field 3 and the like.
After the column attributes of the data table template are set, the extraction module 50 further extracts each field associated with each risk type number from the database, in this embodiment, one risk type number is associated with a plurality of fields, and the fields are used as judgment condition fields, so that the risk type number can finally generate different individual risk type contracts, for example, each field associated with the risk type number 1122, such as 01, 02, 03, can finally generate three different contracts, that is, 1122+01 — S01, 1122+02 — S02, 1122+03 — S03, can be generated by associating the three fields 01, 02, 03.
After extracting each field associated with each risk type number from the database, the first adding module 60 adds each field associated with each risk type number to the row of each corresponding risk type number in the data table template to obtain the data table. Specifically, referring to fig. 8, the first adding module 60 includes:
a determining unit 61, configured to determine priorities corresponding to fields associated with risk types;
and an adding unit 62, configured to sequentially add, according to the order of priority, each field associated with each risk type number to a row where each risk type number corresponding to the data table template is located, so as to obtain a data table.
That is to say, after extracting each field associated with each risk type number from the database, the determining unit 61 first determines the priority corresponding to each field associated with each risk type number, and then the adding unit 62 sequentially adds each field associated with each risk type number to the row of each corresponding risk type number in the data table template according to the order of priority, so as to obtain the data table. For example, the priority of the fields 01, 02, 03 associated with the risk seed number 1122 is: 02. 01, 03, then, the fields of risk number 1122 are added to the row of the data table template in the order of 02, 01, 03, in which the corresponding risk number is located.
For better understanding, the data table with the added seed number and associated fields is shown in the following table:
dangerous seed number Field 1 Field 2 Field 3
1122 02 01 03
1123
1124
It can be understood that the above table only fills in the associated field with the risk type number 1122, and the processing manner of the fields associated with other risk type numbers is consistent with the above manner, which is not described herein for redundancy.
Through the above processing method, a data table can be obtained, and the final storage module 70 stores the data table, so as to generate the security contract according to the stored data table.
In this embodiment, a generation manner of the data table is introduced, so that generation of the risk contract is performed according to the generated data table, and the generation of the risk contract is realized by table lookup, and the query is not nested layer by layer through the if … … else statement, but the preset field is directly captured in the data table, so that time spent on generating the risk contract is shortened, and the generation efficiency of the risk contract is improved.
Further, a third embodiment of the device 001 for generating a seed contract under risk of the present invention is proposed based on the first embodiment, and in this embodiment, referring to fig. 9, the device 001 further includes:
a second obtaining and setting module 80, configured to obtain a data table template, set an attribute of a preset column of the data table template as a risk seed number, and set attributes of the remaining columns as different field identifiers;
the determining module 10 is further configured to determine, in the database, respective field identifications associated with the respective risk types;
the processing module 30 is further configured to set a flag bit of a position where a field identifier associated with each dangerous seed number is located in the data table template to a preset value, so as to obtain a data table according to the flag bit set in the data table template by each dangerous seed number.
In this embodiment, the second obtaining and setting module 80 first obtains the data table template, and then sets the data table template, specifically: the attributes of the preset columns of the data table template are set as risk types such as 1122, 1123, 1124 and the like, and the attributes of the rest of the columns are set as different field identifications, wherein the preset columns are preferably the first columns, and the field identifications such as 011, 012, 013, 014, 015 and the like.
After setting the column attribute of the data table template, the determining module 10 determines each field identifier associated with each risk type number in the database, in this embodiment, it is possible that a plurality of risk type numbers all correspond to the same field identifier in the database, that is, the field identifier corresponding to the risk type number 1122 may be 011, 012, 013, the field identifier corresponding to the risk type number 1123 may be 013, 014, 015, and the field identifier corresponding to the risk type number 1124 may be 011, 013, 014.
After determining each field identifier associated with each dangerous type number in the database, the processing module 30 sets a flag bit of a position where the field identifier associated with each dangerous type number is located in the data table template to a preset value, for example, sets the flag bit of the position where the field identifier associated with each dangerous type number is located to 1, so as to indicate that the dangerous type number corresponds to the field identifier. For a better understanding of the present embodiment, reference may be made to the following table:
dangerous seed number 011 012 013 014 015
1122 1 1 1
1123 1 1 1
1124 1 1 1
And finally, obtaining the data table according to the flag bit set in the data table template by each dangerous seed number. It should be understood that a risk number is associated with a plurality of field identifications, and the field identifications correspond to judgment condition fields, so that the risk number can finally generate different risk contracts.
It is to be understood that, in this embodiment, although the data table includes a plurality of field identifiers, each risk type number does not correspond to a field identifier in each column, that is, some columns are empty and there is no field, and therefore, when capturing fields of the risk type number in the data table in the first embodiment, a preset field is captured as a judgment condition field to generate a risk type contract.
In this embodiment, a generation manner of the data table is introduced, so that generation of the risk contract is performed subsequently according to the generated data table, and the generation manner of the risk contract can be realized by table lookup, and the query is not performed layer by layer through the if … … else statement, but the preset field is directly captured in the data table, so that time spent on generating the risk contract is shortened, and generation efficiency of the risk contract is improved. Moreover, the generation method of the data table is different from that of the second embodiment, and only the flag bit of the position where the field identifier associated with each dangerous seed number is located in the data table template is set as a preset value, so that the generation method of the data table is more flexible.
Further, a fourth embodiment of the generation apparatus 001 of the seed risk contract of the present invention is proposed based on the first to third embodiments, and in this embodiment, referring to fig. 10, the apparatus 001 further includes a second adding module 100:
the processing module 30 is further configured to, when receiving a field increase instruction, obtain a newly added field and determine a risk type number of the field to be increased;
the second adding module 90 is configured to add the determined risk seed number to the data table, and add the newly added field to the row where the added risk seed number is located.
In this embodiment, after generating the contract of the dangerous seed corresponding to the dangerous seed according to the dangerous seed and the judgment condition field, if an instruction for increasing the field is received, the processing module 30 first obtains a newly added field and determines the dangerous seed number of the field to be increased, and then the second adding module 90 adds the determined dangerous seed number to the data table and adds the newly added field to the row of the dangerous seed number of the data table to update the data table. Since the second embodiment and the third embodiment respectively detail two different generation manners of the data table, a manner of adding the newly added field to the row of the risky seed number of the data table is consistent with the manner of the second embodiment and the third embodiment, and redundant description is not repeated here.
In this embodiment, the data table may be updated, so that the subsequently generated seed risk contract is updated correspondingly, and the data table does not need to be re-established, thereby improving the working efficiency. Meanwhile, fields in the data table can be infinitely extended, namely the fields can be extended to the field N all the time, so that the code multiplexing property is improved, and the extension is easier.
It should be noted that, in this document, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other like elements in a process, method, article, or apparatus that comprises the element.
The above-mentioned serial numbers of the embodiments of the present invention are merely for description and do not represent the merits of the embodiments.
Through the above description of the embodiments, those skilled in the art will clearly understand that the method of the above embodiments can be implemented by software plus a necessary general hardware platform, and certainly can also be implemented by hardware, but in many cases, the former is a better implementation manner. Based on such understanding, the technical solutions of the present invention may be embodied in the form of a software product, which is stored in a storage medium (such as ROM/RAM, magnetic disk, optical disk) and includes instructions for enabling a terminal device (such as a mobile phone, a computer, a server, an air conditioner, or a network device) to execute the method according to the embodiments of the present invention.
The above description is only a preferred embodiment of the present invention, and not intended to limit the scope of the present invention, and all modifications of equivalent structures and equivalent processes, which are made by using the contents of the present specification and the accompanying drawings, or directly or indirectly applied to other related technical fields, are included in the scope of the present invention.

Claims (8)

1. A method for generating a risky contract, the method comprising:
acquiring a data table template, setting the attribute of a preset column of the data table template as a dangerous seed number, and setting the attribute of the rest columns as different field numbers;
extracting each field associated with each risk seed number from the database;
adding each field associated with each dangerous seed number to the row of each corresponding dangerous seed number in the data table template to obtain a data table, and storing the data table;
when a generation instruction of a risky contract is received, determining a risky contract to be generated;
based on the determined dangerous seed number corresponding to the dangerous seed, capturing a preset field corresponding to the dangerous seed number in a pre-stored data table;
and taking the captured preset field as a judgment condition field corresponding to the dangerous seed number, and generating a dangerous seed contract corresponding to the dangerous seed according to the dangerous seed and the judgment condition field.
2. The method for generating the risky contract according to claim 1, wherein the step of adding each field associated with each risky number to the row of the corresponding risky number in the data table template to obtain the data table comprises:
determining the priority corresponding to each field associated with each dangerous seed number;
and sequentially adding fields associated with the risk types to the row of the corresponding risk types in the data table template according to the priority order to obtain the data table.
3. A method for generating a risky contract according to claim 1, wherein said method further comprises, before the step of determining a risky species of the risky contract to be generated when the generation instruction of the risky contract is received, the step of:
acquiring a data table template, setting the attribute of a preset column of the data table template as a risk seed number, and setting the attribute of the rest columns as different field identifications;
determining each field identification associated with each risk type number in the database;
and in the data table template, setting the zone bit of the position of the field mark associated with each dangerous seed number as a preset value, so as to obtain the data table according to the zone bit set in the data table template by each dangerous seed number.
4. A method for generating a contract with risky seeds according to any one of claims 1 to 3, wherein after the step of generating a contract with risky seeds corresponding to the risky seeds according to the risky seeds and the judgment condition field, the method further comprises:
when an increasing instruction of a field is received, acquiring a newly added field, and determining a dangerous seed number of the field to be increased;
adding the determined seed number to the data table, and adding the newly added field to the row where the added seed number is located.
5. An apparatus for generating a contract at risk, the apparatus comprising:
the first acquisition setting module is used for acquiring a data table template, setting the attributes of preset columns of the data table template as risk types, and setting the attributes of the rest columns as different field numbers;
the extraction module is used for extracting each field associated with each risk type number from the database;
the first adding module is used for adding each field associated with each risk type number to the row of each corresponding risk type number in the data table template to obtain a data table;
the storage module is used for storing the data table;
the determining module is used for determining the dangerous seeds of the dangerous seed contract to be generated when receiving the generating instruction of the dangerous seed contract;
the grabbing module is used for grabbing a preset field corresponding to the dangerous seed number in a pre-stored data table based on the determined dangerous seed number corresponding to the dangerous seed;
and the processing module is used for taking the captured preset field as a judgment condition field corresponding to the dangerous seed number and generating the dangerous seed contract corresponding to the dangerous seed according to the dangerous seed and the judgment condition field.
6. The apparatus for generating seed-risk contracts according to claim 5, wherein the first adding module comprises:
the determining unit is used for determining the priority corresponding to each field associated with each dangerous seed number;
and the adding unit is used for sequentially adding each field associated with each risk type number to the row of each corresponding risk type number in the data table template according to the priority order to obtain the data table.
7. An apparatus for generating a seed-risk contract according to claim 5, wherein the apparatus further comprises:
the second acquisition setting module is used for acquiring a data table template, setting the attribute of a preset column of the data table template as a risk seed number and setting the attribute of the rest columns as different field identifications;
the determining module is further configured to determine, in the database, each field identifier associated with each risk seed number;
the processing module is further configured to set a flag bit of a position where a field identifier associated with each dangerous seed number is located in the data table template to a preset value, so as to obtain a data table according to the flag bit set in the data table template by each dangerous seed number.
8. The apparatus for generating the seeding contract according to any one of claims 5-7, wherein the processing module is further configured to, upon receiving an instruction to add a field, obtain a newly added field and determine a seeding number of the field to be added;
the device further comprises:
and the second adding module is used for adding the determined risk types in the data table and adding the newly added fields in the row where the added risk types are located.
CN201710094908.7A 2017-02-20 2017-02-20 Generation method and device of dangerous contract Active CN107861963B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201710094908.7A CN107861963B (en) 2017-02-20 2017-02-20 Generation method and device of dangerous contract

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201710094908.7A CN107861963B (en) 2017-02-20 2017-02-20 Generation method and device of dangerous contract

Publications (2)

Publication Number Publication Date
CN107861963A CN107861963A (en) 2018-03-30
CN107861963B true CN107861963B (en) 2020-08-04

Family

ID=61699070

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201710094908.7A Active CN107861963B (en) 2017-02-20 2017-02-20 Generation method and device of dangerous contract

Country Status (1)

Country Link
CN (1) CN107861963B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110751561A (en) * 2019-10-24 2020-02-04 支付宝(杭州)信息技术有限公司 Credit contract creating method and device

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2005076168A1 (en) * 2004-02-03 2005-08-18 Swiss Reinsurance Company Computer-based transaction system and computer implemented method for transacting services between a service provider and a client
CN103258291A (en) * 2004-10-13 2013-08-21 日生信息技术株式会社 Data management apparatus and method thereof
CN104424269B (en) * 2013-08-30 2018-01-30 中国电信股份有限公司 data lineage analysis method and device
CN103646096B (en) * 2013-12-18 2017-01-18 用友网络科技股份有限公司 Method and device for generating sub-queries through user configuration
CN105933273B (en) * 2016-01-13 2018-01-23 平安科技(深圳)有限公司 Data verification method and server

Also Published As

Publication number Publication date
CN107861963A (en) 2018-03-30

Similar Documents

Publication Publication Date Title
US20130027406A1 (en) System And Method For Improved Font Substitution With Character Variant Replacement
CN111342992B (en) Method and system for processing equipment information change record
CN107741972A (en) A kind of searching method of picture, terminal device and storage medium
CN112669110A (en) Server label management method and related equipment
CN111460232A (en) Functional module searching method, device, terminal and computer readable storage medium
CN107861963B (en) Generation method and device of dangerous contract
CN111858617A (en) User searching method and device, computer readable storage medium and electronic equipment
CN106528505B (en) The conversion method and device of date format
CN109241042A (en) Data processing method, device and electronic equipment
CN108228355A (en) Task processing method and device, method for scheduling task and device
CN112732693A (en) Intelligent internet of things data acquisition method, device, equipment and storage medium
EP2535802B1 (en) Computer-implemented method of arranging text items in a predefined order
CN111814429A (en) Article typesetting method and device, terminal equipment and storage medium
CN109241371B (en) Map data storage method, map data loading method, map data storage device, map data loading device and computer equipment
US20110055279A1 (en) Application server, object management method, and object management program
JP6994138B2 (en) Information management device and file management method
CN108804561A (en) Method of data synchronization and device
CN103761247B (en) A kind of processing method and processing device of error file
CN109522014B (en) Algorithm processing method based on new product development, electronic device and readable storage medium
CN110517022A (en) Product Mark approaches to IM, device and server
CN111985188A (en) Data conversion method, device, terminal and storage medium
CN112818129A (en) Atlas modeling system and method
CN112182107A (en) Method and device for acquiring list data, computer equipment and storage medium
CN111190607A (en) Task plug-in processing method and device, task scheduling server and storage medium
CN110569362B (en) Ontology instantiation method and device

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