Summary of the invention
The main purpose of the present invention is to provide a kind of data entry method, device, terminal and computer-readable storage mediumsMatter, it is intended to solve the high technical problem of the corresponding data processing code maintenance cost of banking scene.
To achieve the above object, the present invention proposes that a kind of data entry method, the data entry method include:
Reported data instruction is received, the reported data instruction includes that business scenario identifies;
Corresponding with business scenario mark segment table is inquired according to default segment table information table to identify, and with the segment tableIdentify corresponding default storing process and field identification;
Obtain initial data corresponding with business scenario mark and the field identification;
The initial data is passed in the default storing process;
The default storing process is executed, reported data table corresponding with segment table mark is generated.
Preferably, the step that the primary data information (pdi) is passed in the default storing process includes:
The field type of the field identification is inquired according to default segment table information table;
Judge whether the field type is dynamic value;
If the field type is the dynamic value, the initial data is entered into ginseng by the default storing processIt is passed in the default storing process;
If the field type is not the dynamic value, the initial data is write direct into the default storing processIn.
Preferably, it inquires segment table corresponding with business scenario mark according to default segment table information table to identify, Yi JiyuThe segment table identifies the step of corresponding default storing process and field identification and includes:
Corresponding with business scenario mark segment table is inquired according to default segment table information table to identify, and with the segment tableIdentify corresponding SQL-ID sequence table;
By rank function and the SQL-ID sequence table calling SQL statement composition default storing process, and according toThe SQL-ID sequence table identifies the corresponding field identification to the segment table and is ranked up.
Preferably, described the step of executing the default storing process, generating reported data table, includes:
The default storing process is executed with the identification name of the default storing process according to executing instruction;
The sequence that the corresponding field identification is identified according to the segment table sequentially generates corresponding with the field identificationField forms the reported data table.
Preferably, described to execute the default storing process, it generates and identifies corresponding reported data table with the segment tableAfter step, further includes:
The sequence that the corresponding segment table mark is identified according to the business scenario, arranges corresponding with segment table markThe reported data table, formation report summary table;
Summary table is reported to be sent to audit terminal by described.
Preferably, the data entry method further include:
It receives new field to instruct, the new field instruction includes segment table mark, new field mark and increases newlyField data;
The segment table, which is inquired, according to predetermined word segment table identifies corresponding default storing process;
The new field data are added in the default storing process, and the new field is identified into write-in instituteIt states in default segment table information table.
Preferably, the data entry method further include:
It receives and deletes field instruction, the deletion field instruction includes the field identification to be deleted;
The corresponding default storing process of the field identification to be deleted is inquired according to predetermined word segment table;
Delete part corresponding with the field identification to be deleted in the default storing process.
In addition, the present invention also provides a kind of data entry unit, the data entry unit includes:
Receiving module, for the receiving module for receiving reported data instruction, the reported data instruction includes business fieldScape mark;
First enquiry module, first enquiry module are used for according to default segment table information table inquiry and the business scenarioIdentify corresponding segment table mark, and default storing process corresponding with segment table mark and field identification;
Module is obtained, the acquisition module is for obtaining original corresponding with business scenario mark and the field identificationBeginning data;
Recording module, the recording module are passed in the default storing process for the initial data;
Generation module, the generation module generate corresponding with segment table mark for executing the default storing processReported data table.
The present invention also provides a kind of terminal, including processor, memory and be stored on the memory can be by instituteState the data inputting program of processor execution, wherein when the data inputting program is executed by the processor, realize institute as aboveThe step of data entry method stated.
The present invention also provides a kind of computer readable storage medium, data are stored on the computer readable storage mediumRecording program, wherein when the data inputting program is executed by processor, realize the step of data entry method as described aboveSuddenly.
In technical solution of the present invention, by presetting default storing process, to save for different business scene weightIdentical SQL is write again, and each business scenario calls default storing process corresponding with the segment table according to required segment tableComplete data inputting.When a certain field needs to modify, a certain segment table needs to increase field or deletes field, directly modifies and be somebody's turn to doThe corresponding default storing process of segment table does not need to modify for the default storing process of each business scenario, thusReduce the workload of operation maintenance personnel, reduce the probability of maintenance error.
Specific embodiment
It should be appreciated that the specific embodiments described herein are merely illustrative of the present invention, it is not intended to limit the present invention.
The present embodiments relate to data entry method be mainly used in terminal, the terminal can be with display and placeThe equipment for managing function.
Referring to Fig.1, Fig. 1 is terminal structure schematic diagram involved in the embodiment of the present invention.In the embodiment of the present invention, eventuallyEnd may include processor 1001 (such as CPU), communication bus 1002, user interface 1003, network interface 1004, memory1005.Wherein, communication bus 1002 is for realizing the connection communication between these components;User interface 1003 may include displayShield (Display), input unit such as keyboard (Keyboard);Network interface 1004 optionally may include that the wired of standard connectsMouth, wireless interface (such as WI-FI interface);Memory 1005 can be high speed RAM memory, be also possible to stable memory(non-volatile memory), such as magnetic disk storage, memory 1005 optionally can also be independently of aforementioned processor1001 storage device.
It will be understood by those skilled in the art that hardware configuration shown in Fig. 1 does not constitute the restriction to equipment, can wrapIt includes than illustrating more or fewer components, perhaps combines certain components or different component layouts.
With continued reference to Fig. 1, the memory 1005 in Fig. 1 as a kind of computer readable storage medium may include operation systemSystem, network communication module and data inputting program.
In Fig. 1, network communication module is mainly used for connecting other terminals or server, to carry out data communication;And locateReason device 1001 can call the data inputting program stored in memory 1005, and the step of executing data entry method.
Based on the hardware configuration of above-mentioned terminal, each embodiment of data entry method of the present invention is proposed.
The present invention provides a kind of data entry method.
Referring to Fig. 2, in the first embodiment of the invention, data entry method the following steps are included:
Step S100, receives reported data instruction, and the reported data instruction includes that business scenario identifies;
Specifically, user makes operational motion by mouse, keyboard etc., to generate reported data instruction.Business scenario canTo include make loans scene, recovery scene, compensatory scene, refund capital scene and premium scene etc., different business scenarios and goldThe financial business for melting institutions conduct is corresponding.Different business scenarios is provided with business scenario mark to distinguish, business fieldScape is identified as number, the character etc. for distinguishing each business scenario.For different business scenarios, need the data of typing different,The data packet for being uploaded in regulatory agency's server generated after typing is not also identical.
Step S200 inquires segment table corresponding with business scenario mark according to default segment table information table and identifies, andDefault storing process corresponding with segment table mark and field identification;
Default segment table information table is that those skilled in the art are pre-set, wherein being stored at least one business scenario markKnow with each business scenario identify corresponding segment table identify, default storing process corresponding with each segment table mark and extremelyA few field identification.Specifically, business scenario identifies corresponding at least one segment table mark, a segment table mark corresponding at least oneA field identification.Database is made of multiple segment tables, and segment table is identified as the title of each segment table, identifier in energy distinguishes data libraryDeng.Segment table is made of at least one field, and field identification is that can distinguish the title of each field, identifier etc. in same segment table.
Default storing process is the storing process that those skilled in the art need to edit in advance according to segment table, storing process(Stored Procedure) is in large-scale database system, and one group, in order to complete the SQL statement collection of specific function, can pass throughThe name of specified pre-stored process simultaneously provides parameter to execute it.It include logic control sentence and data manipulation language in storing processSentence, it can receive parameter, output parameter, return to single or multiple result sets and return value.Since storing process is creatingWhen carried out on database server compile and store in the database, so storing process operation than single SQLStatement block is fast.Simultaneously because only need to be with storing process title and necessary parameter information be provided, so as to subtract when callingFew network flow reduces network burden.
Step S300 obtains initial data corresponding with business scenario mark and the field identification;
Need to upload one or more different segment tables for a business scenario, each business scenario needs the section uploadedTable can be the same or different.For different business scenarios, even if the segment table for needing to upload is identical, what is specifically used is originalData or calculation method may also be different.It is therefore desirable to be identified according to the business scenario corresponding with field identification acquisitionInitial data.
The initial data is passed in the default storing process by step S400;
Initial data can directly be passed to default storing process, or pass through and be passed to storing process into ginseng.
Step S500 executes the default storing process, generates reported data table corresponding with segment table mark.
Such as: bank needs that the data of related service scene are sent to People's Bank of China's clothes by reference reporting systemBusiness device, the segment table that existing segment table is identified as B, D, F, H, I, J, K, L and M need to upload, and scene of making loans needs to report B, D, F and H;Refund capital scene reports B and H;Refund capital and premium scene report B, H, L and M;Compensatory scene reports B, H, I and J;RecoveryScene reports B, I and K, i.e., each business scenario is required to upload B.By taking refund scene as an example, segment table B includes that field identification isThe field of B1, B2, B3 call default storing process corresponding with segment table B, will be corresponding with field identification B1, B2 and B3 originalData are incoming, execute default storing process, generate the segment table B being made of field B1, B2 and B3, i.e. reported data table.It will storageThe segment table B and H that process generates are made into data packet corresponding with scene of making loans, and data packet is reported by the completion of reference reporting systemTask.
In the present invention, by presetting default storing process, to save for different business scene Palingraphia phaseSame SQL, each business scenario call default storing process that data inputting can be completed.When a certain field need modify, it is a certainWhen segment table needs to increase field or deletes field, default storing process corresponding with the segment table is directly modified, needle is not neededSQL is modified to each business scenario, thus the probability for reducing the workload of operation maintenance personnel, reducing maintenance error.
Further, referring to figure 3., Fig. 3 is the flow diagram of data entry method second embodiment of the present invention, is based onFirst embodiment, step S400 include:
Step S410 inquires the field type of the field identification according to default segment table information table;
Specifically, field type has dynamic value and two kinds of fixed value in the present invention, and whether field type can root with fieldIt changes according to different business scenarios and is judged for standard.If business scenario is different, the field contents of same field markIt is constant, then it is assumed that the field type of the field is fixed value;If business scenario is different, the field contents of same field mark changeBecome, then it is assumed that the field type of the field is dynamic value.Such as: have in segment table B following field B1, B2, B3, B4, B5, B6 andB7..., field B4, B5 and B6 are not changed as business scenario is different, so B4, B5 and B6 are fixed value;Field B1, B2,B3 and B7 is different with the different content of business scenario, so field B1, B2, B3 and B7 are dynamic value.
Step S420 judges whether the field type is dynamic value;
The initial data is passed through the default storage if the field type is the dynamic value by step S430The ginseng that enters of process is passed in the default storing process;
Those skilled in the art are when being arranged default storing process, for the field type setting input ginseng to dynamic valueNumber, so that default storing process is the storing process for having into ginseng and going out ginseng.
Step S440 writes direct the initial data described pre- if the field type is not the dynamic valueIf in storing process.
Such as: default storing process is pro_b (p_b_info), and it is that Object type is that wherein p_b_info, which is into ginseng,RECORD customization type.Field B4, B5 and B6 are fixed value, then initial data corresponding with field B4, B5 and B6 can be withIt writes direct;Those values changed according to different scenes, such as field B1, B2, B3 and B7 are dynamic value, then pass through p_b_infoIn the incoming default storing process pro_b of parameter, default storing process pro_b is called, by output field B4, B5, B6 and field B1,B2, B3, B7, and collectively constitute segment table B.
Further, referring to figure 4., Fig. 4 is the flow diagram of data entry method 3rd embodiment of the present invention, is based onSecond embodiment, step S200 include:
Step S210 inquires segment table corresponding with business scenario mark according to default segment table information table and identifies, andSQL-ID sequence table corresponding with segment table mark;
SQL-ID is the unique identification for representing SQL statement, and system finds corresponding SQL statement according to SQL-ID.SQL-It include multiple SQL-ID arranged in order, the corresponding SQL statement of each SQL-ID in ID sequence table.The order is this fieldTechnical staff's SQL statement according to needed for generating different segment tables, field is edited in advance, to be pressed by different SQL statementsSequential arrangement in SQL-ID sequence table is obtained according to the corresponding segment table of different scenes.SQL-ID can specifically be automatically generated,It can be modified according to actual needs.
Step S220 calls SQL statement to form described default stored by rank function and the SQL-ID sequence tableJourney, and the corresponding field identification is identified to the segment table according to the SQL-ID sequence table and is ranked up.
By call rank function, according to the SQL-ID order in the SQL-ID sequence table, successively obtain SQL languageSentence forms default storing process, presets the segment table needed for storing process generates further according to this.By the way that SQL-ID sequence table is arranged,To realize identical multiple SQL statements, according to different arrangement orders, generates and meet the segment table that each scene needs.ExampleSuch as: loan scene needs to upload segment table B, and segment table B is made of field B1, B2 and B3, corresponding by loan scene at this timeSQL-ID sequence table obtains the corresponding SQL-ID of field B1, B2 and B3, and obtains the corresponding SQL statement of each SQL-ID, generatesDefault storing process, regenerates the segment table B being successively made of field B1, B2 and B3;If borrowing refund scene needs to upload segment table B,And segment table B is made of field B2, B1 and B3, wherein field B1, which is generated, to need to carry out in the result for generating field B2 output.ThisWhen the corresponding SQL-ID of field B2, B1 and B3 obtained by the corresponding SQL-ID sequence table of refund scene, and obtain each SQL-The corresponding SQL statement of ID generates default storing process, regenerates the segment table B being successively made of field B2, B1 and B3.
Further, referring to figure 5., Fig. 5 is the flow diagram of data entry method 3rd embodiment of the present invention, is based on3rd embodiment, step S500 include:
Step S510 executes the default storing process with the identification name of the default storing process according to executing instruction;
It executes instruction to execute the execution sentence instruction of default storing process.It executes instruction as EXEC and sp_ExecuteSQL, those skilled in the art can select any in EXEC and sp_executeSQL according to actual needs.ExampleSuch as: selection EXEC runs default storing process, then can input " begin "+default storing process identification name+end and be run;" call "+default storing process identification name can also be inputted to be run;
Step S520 identifies the sequence of the corresponding field identification according to the segment table, sequentially generates and the fieldCorresponding field is identified, the reported data table is formed.
Field identification corresponding with segment table mark orderly arranges in the present embodiment, presets the word that storing process generatesSection is corresponding with the order of the field identification.
Further, Fig. 6 is please referred to, Fig. 6 is the flow diagram of data entry method fourth embodiment of the present invention, is based onFirst embodiment, step S500 include: later
Step S610 identifies the sequence of the corresponding segment table mark, arrangement and the segment table according to the business scenarioThe corresponding reported data table is identified, formation reports summary table;
Step S620 reports summary table to be sent to audit terminal for described.
Specifically, the present embodiment is applied to Oracle Database, naturally it is also possible to according to actual needs record notebook dataEnter method applied in other databases.
In the present embodiment, audit terminal is the server where the credit investigation system of the People's Bank.Certainly in other implementationsIn example, which can also be the terminal for business monitoring of user's self-setting.Pass through step S610 and stepS620, for different business scenarios, by segment table needed for business scenario be integrated into it is satisfactory report summary table, usuallyIn the case of report summary table to exist in the form of data packet.
Further, Fig. 7 is please referred to, Fig. 7 is the flow diagram of the 5th embodiment of data entry method of the present invention, is based onFirst embodiment, the data entry method further include:
Step S710, receives new field instruction, and the new field instruction includes segment table mark, added word segment markKnow and new field data;
When segment table needs to increase new field, those skilled in the art can voluntarily draft new field Identification and writeNew field data corresponding with new field mark.
Step S720 inquires the segment table according to predetermined word segment table and identifies corresponding default storing process;
The new field data are added in the default storing process by step S730, and by the new fieldMark is written in the default segment table information table.
New field data are added in default storing process, so that can obtain after executing default storing process comprising newIncrease the segment table of field.Due to the corresponding storing process of each segment table, so that when segment table needs to be modified, it is new by generatingThe new field data for increasing field are added in the storing process, and maintenance can be realized, and do not need for each business scenarioThe code of segment table is modified.
Further, the data entry method further include:
Step S810, receives modification field instruction, the modification field instruction include the field identification to be modified andModify field data;
Step S820 inquires the corresponding default storing process of the field identification to be modified according to predetermined word segment table;
Step S830 deletes part corresponding with the field identification to be modified in the default storing process, and willThe modification field data is added in the default storing process.
Modification field data is the code that the practical field of satisfaction that those skilled in the art voluntarily write needs, so that executingAfter default storing process, obtained field suits the requirements.The corresponding original code of field in default storing process is deleted, andModification field data is added, that is, realizes maintenance, does not need to be modified for the code of the segment table of each business scenario.
Further, Fig. 8 is please referred to, Fig. 8 is the flow diagram of the 7th embodiment of data entry method of the present invention, is based onFirst embodiment, the data entry method further include:
Step S910 is received and is deleted field instruction, and the deletion field instruction includes the field identification to be deleted;
Step S920 inquires the corresponding default storing process of the field identification to be deleted according to predetermined word segment table;
Step S930 deletes part corresponding with the field identification to be deleted in the default storing process.
It is similar to embodiment five and embodiment six, the corresponding storing process of each segment table so that segment table need intoWhen row change, the new field data for generating new field are added in the storing process, maintenance can be realized, do not need to be directed toThe code of the segment table of each business scenario is modified.
Such as: the corresponding default storing process of segment table B is pro_b (p_b_info), and wherein p_b_info is into ginseng.Segment tableIt include field B4, B5 and B6 in B is fixed value and field B1, B2, B3 and B7 are dynamic value.
If B4 needs to modify, it is only necessary to change in storing process pro_b that part corresponding with B4 can;If segment tableIt needs to have increased field B21 newly in B, also only needs to change the SQL of the insert sentence in storing process pro_b, in customized p_b_Field B21 is added in info;If segment table B needs to delete B7, part corresponding with B7 in storing process pro_b is deleted justIt can be with.Code seems succinct, easy to maintain in this way.
In addition, the present invention also provides a kind of data entry unit, the data entry unit includes:
Receiving module 10, for the receiving module 10 for receiving reported data instruction, the reported data instruction includes industryBusiness scene identity;
First enquiry module 20, first enquiry module 20 are used for according to default segment table information table inquiry and the businessThe corresponding segment table mark of scene identity, and default storing process corresponding with segment table mark and field identification;
Module 30 is obtained, the acquisition module 30 is corresponding with business scenario mark and the field identification for obtainingInitial data;
Recording module 40, the recording module 40 are passed in the default storing process for the initial data;
Generation module 50, the generation module 50 are generated and are identified with the segment table for executing the default storing processCorresponding reported data table.
Further, the recording module 40 includes:
Second enquiry module, second enquiry module are used to inquire the field identification according to default segment table information tableField type;
Judgment module, the judgment module is for judging whether the field type is dynamic value;
First writing module will be described if first writing module is the dynamic value for the field typeInitial data is passed in the default storing process by the ginseng that enters of the default storing process;
Second writing module, if second writing module is not the dynamic value for the field type, by instituteInitial data is stated to write direct in the default storing process.
Further, the acquisition module 30 is used for according to default segment table information table inquiry and business scenario mark pairThe segment table mark answered, and SQL-ID sequence table corresponding with segment table mark;
By rank function and the SQL-ID sequence table calling SQL statement composition default storing process, and according toThe SQL-ID sequence table identifies the corresponding field identification to the segment table and is ranked up.
Further, the generation module 50 includes:
Execution module, the execution module identify corresponding for executing the default storing process according to the segment tableThe sequence of field identification sequentially generates field corresponding with the field identification, forms the reported data table.
Further, the generation module 50 is also used to identify the corresponding segment table mark according to the business scenarioSequentially, the reported data table corresponding with segment table mark is arranged, formation reports summary table;
The data entry unit includes:
Sending module 60, the sending module 60 are used to report summary table to be sent to audit terminal for described.
Further, the receiving module 10 is also used to receive new field instruction, and the new field instruction includes instituteState segment table mark, new field mark and new field data;
First enquiry module 20, which is also used to inquire the segment table according to predetermined word segment table, identifies corresponding default storageProcess;
The data entry unit includes:
Modified module 70, the modified module 70 are used to the new field data being added to the default storing processIn, and new field mark is written in the default segment table information table.
Further, the receiving module 10 is also used to receive modification field instruction, the modification field instruct include toThe field identification and modification field data of modification;
First enquiry module 20 is also used to inquire the field identification to be modified according to predetermined word segment table correspondingDefault storing process;
The modified module 70 is also used to delete corresponding with the field identification to be modified in the default storing processPart, and the modification field data is added in the default storing process.
Further, the receiving module 10, which is also used to receive, deletes field instruction, the deletions field instruct include toThe field identification deleted;
First enquiry module 20 is also used to inquire the field identification to be deleted according to predetermined word segment table correspondingDefault storing process;
The modified module 70 is also used to delete corresponding with the field identification in the default storing process to be deletedPart.
In addition, being stored with number on computer readable storage medium the present invention also provides a kind of computer readable storage mediumAccording to recording program, wherein when data inputting program is executed by processor, realize as above-mentioned interface update method the step of.
Wherein data inputting program, which is performed realized method, can refer to each reality of data entry method of the present inventionExample is applied, details are not described herein again.
It should be noted that, in this document, the terms "include", "comprise" or its any other variant are intended to non-rowHis property includes, so that the process, method, article or the system that include a series of elements not only include those elements, andAnd further include other elements that are not explicitly listed, or further include for this process, method, article or system institute it is intrinsicElement.In the absence of more restrictions, the element limited by sentence "including a ...", it is not excluded that including being somebody's turn to doThere is also other identical elements in the process, method of element, article or system.
The serial number of the above embodiments of the invention is only for description, does not represent the advantages or disadvantages of the embodiments.
Through the above description of the embodiments, those skilled in the art can be understood that above-described embodiment sideMethod can be realized by means of software and necessary general hardware platform, naturally it is also possible to by hardware, but in many casesThe former is more preferably embodiment.Based on this understanding, technical solution of the present invention substantially in other words does the prior artThe part contributed out can be embodied in the form of software products, which is stored in one as described aboveIn storage medium (such as ROM/RAM, magnetic disk, CD), including some instructions are used so that terminal device (it can be mobile phone,Computer, server, air conditioner or network equipment etc.) execute method described in each embodiment of the present invention.
The above is only a preferred embodiment of the present invention, is not intended to limit the scope of the invention, all to utilize this hairEquivalent structure or equivalent flow shift made by bright specification and accompanying drawing content is applied directly or indirectly in other relevant skillsArt field, is included within the scope of the present invention.