Summary of the invention
The embodiment of the present invention provides image file synchronous method and system, to realize the image different to different capitals
File reception requires to be uniformly processed, to reduce the O&M difficulty for helping and borrowing platform, improves to help and borrows platform image synchronous
The stability of function.
In a first aspect, providing a kind of image file synchronous method, comprising:
The configuration requirement for borrowing platform collection capital's reception image file is helped, and the configuration requirement is stored in database
In;
The loan application record for not uploading image file is obtained, wherein loan application record includes target capital label
With into part channel label;
Read the configuration requirement of target capital from the database according to the target capital label;
Target image file is obtained into part channel into what part channel label determined to described, wherein the target image file
It is to be determined by the configuration requirement;
The target image file is uploaded to the target capital according to the configuration requirement, wherein the target capital
It is that the target capital label determines.
More specifically, the method also includes: if described upload the target image file according to the configuration requirement
It extremely breaks down during the target capital, triggers the target image file retransmission function.
In a specific embodiment, the triggering target image file retransmission function, comprising: again to it is described into
What part channel label determined obtains target image file into part channel, wherein the target image file is by the configuration requirement
Determining;The target image file is uploaded to the target capital according to the configuration requirement.
More specifically, the method also includes: it is successfully uploaded in the target image file according to the configuration requirement
In the case where the target capital, updating the loan application recording status is to have uploaded image file state.
In a specific embodiment, target money is read according to the target capital label from the database described
After the configuration requirement of side, the method also includes: loan application record and configuration requirement combination are put into
In message queue;
It is described the target image file is uploaded to the target capital according to the configuration requirement before, from described
The loan application record and the configuration requirement are read in message queue.
Second aspect provides a kind of image file synchronization system, comprising: list is read in collector unit, acquiring unit, configuration
Member, uploading unit,
The collector unit borrows platform and collects the configuration requirement that capital receives image file for helping, and by the configuration
It is required that storage is in the database;
The acquiring unit, for obtaining the loan application record for not uploading image file, wherein the loan application is remembered
Record includes target capital label and into part channel label;
The configuration reading unit, for reading target capital's from the database according to the target capital label
The configuration requirement;
The acquiring unit is also used to obtain target image file into part channel into what part channel label determined to described,
Wherein the target image file is determined by the configuration requirement;
The uploading unit is provided for the target image file to be uploaded to the target according to the configuration requirement
Side, wherein the target capital is that the target capital label determines.
More specifically, the uploading unit is also used to, if it is described by the target image file according to the configuration requirement
It breaks down during being uploaded to the target capital, triggers the target image file retransmission function.
In a specific embodiment, the uploading unit is also used to, in the target image file according to the configuration
It is required that in the case where breaking down during being uploaded to the target capital, again to it is described into part channel label determine into
Part channel obtains target image file, wherein the target image file is determined by the configuration requirement;By the target
Image file is uploaded to the target capital according to the configuration requirement.
More specifically, the system also includes updating unit, the updating unit is specifically used for, in the target image text
In the case that part is successfully uploaded to the target capital according to the configuration requirement, updating the loan application recording status is
Upload image file state.
In a specific embodiment, the system also includes processing units, and the processing unit is specifically used for, described
After the configuration requirement for reading target capital from the database according to the target capital label, by the loan Shen
It please record and be put into message queue with configuration requirement combination;
It is described the target image file is uploaded to the target capital according to the configuration requirement before, from described
The loan application record and the configuration requirement are read in message queue.
Specific embodiment
The embodiment of the present application provides a kind of image file synchronous method and system, different to different capitals to realize
Image file, which receives, to be required to be uniformly processed, to reduce the O&M difficulty for helping and borrowing platform, is improved to help and is borrowed platform image
The stability of synchronizing function.
Below in conjunction with the attached drawing in the embodiment of the present application, technical solutions in the embodiments of the present application carries out clear, complete
Site preparation description, it is clear that described embodiments are only a part of embodiments of the present application, instead of all the embodiments.It is based on
Embodiment in the application, it is obtained by those of ordinary skill in the art without making creative efforts every other
Embodiment shall fall in the protection scope of this application.
It should be appreciated that ought use in this specification and in the appended claims, term " includes " and "comprising" instruction
Described feature, entirety, step, operation, the presence of element and/or component, but one or more of the other feature, whole is not precluded
Body, step, operation, the presence or addition of element, component and/or its set.
It should be noted that the term used in the embodiment of the present application is only merely for the mesh of description specific embodiment
, it is not intended to be limiting the application." the one of the embodiment of the present application and singular used in the attached claims
Kind ", " described " and "the" are also intended to including most forms, unless the context clearly indicates other meaning.It is also understood that this
Term "and/or" used herein refers to and includes one or more associated any or all possible group for listing project
It closes.
A kind of one embodiment of image file synchronous method of the application.Wherein, a kind of image file synchronous method, packet
It includes: helping and borrow the configuration requirement that platform collects capital's reception image file, and in the database by configuration requirement storage;It obtains
The loan application record of image file is not uploaded, wherein loan application record includes target capital label and into part channel mark
Label;Read the configuration requirement of target capital from the database according to the target capital label;To described into part canal
What road label determined obtains target image file into part channel, wherein the target image file is determined by the configuration requirement
's;The target image file is uploaded to the target capital according to the configuration requirement, wherein the target capital is institute
State what target capital's label determined.
Referring first to Fig. 1, Fig. 1 be the application one embodiment provide it is a kind of support various modes help borrow first trial side
The flow diagram of method.Wherein, as shown in Figure 1, one embodiment of the application provide it is a kind of support various modes help loan
Methods of initial evaluation of sci-tech may include:
101, the configuration requirement for borrowing platform collection capital's reception image file is helped, and the configuration requirement is stored in data
In library.
In the specific implementation of the application, helps and borrows the configuration requirement that platform collects capital's reception image file,
Wherein, the configuration information in the configuration requirement includes: capital's description, capital's secure file transportation protocol (secure file
Transfer protocol, sftp) information, capital's file upload strategy, help and borrow platform sftp information, transmitting file letter on image
Cease list, image be packaged upload file parameters, image upload capital sftp elementary path in any one or it is a variety of, then will
The capital being collected into receives the configuration requirement storage of image file in the database, and the database is to carry out group according to data structure
It knits, the warehouse of storage and management data, wherein the database can be SQL Server, Oracle, MySQL, DB2,
The databases such as Sybase, Access, SQLite any one or it is a variety of, it should be appreciated that above-mentioned configuration information and database
It is only served in citing, specific restriction should not be constituted.
102, the loan application record for not uploading image file is obtained.
In the specific implementation of the application, to help borrow platform preserve the loan application recording status information
Database in inquiry state be do not upload image file the loan application record, wherein the loan application record include
Target capital label and into part channel label.Described help borrows platform according to the acquisition target capital service of the label of the target capital
The address of device, described help borrow platform according to the source recorded into loan application described in part channel tag recognition.
Preferably, periodically (such as every 30 minutes) to help borrow platform preserve the loan application recording status information
It is the loan application record for not uploading image file that state is inquired in database.
103, the configuration requirement of target capital is read from the database according to the target capital label.
In the specific implementation of the application, mesh is read according to the target capital label from the database
The configuration requirement for marking capital, by the configuration requirement of the target capital and the corresponding loan of the target capital label
Application record is combined into a piece of news and is put into message queue, when the quantity in message queue is greater than zero, triggers practical business
The configuration requirement and the corresponding loan of the target capital label of the target capital is read in service from the message queue
Money application record, and execute corresponding service, wherein the service includes: that ordinary file uploads, packaging file uploads, updates
One or more of image file synchronous regime.When program is when operational process is abnormal, such as run the program
Server crashes, power-off still maintains program in the message queue when the server restores to operate normally again
Abnormal that time still untreated message, at this moment program only needs to continue with the message of untreated completion in message queue i.e.
It can.
If this data structure of message queue is not used to save the transaction message of same type, when program is extensive from exception
When operating normally again, it may appear that program does not know run from where.According to running from the beginning, then will appear described in repetition transmission
Target image file gives the case where target capital, however what this exception was not allowed in business processing.Therefore it is added
This message queue energy guarantee procedure of message queue continues normal fortune after abnormal conditions recovery, from the time point being abnormal
Row.
104, Xiang Suoshu obtains target image file into part channel into what part channel label determined.
In the specific implementation of the application, described help borrows platform to described into part channel transmission target image text
Part acquisition instruction, wherein described instruction includes described needing to borrow wanting for image file type that platform is sent to described help into channel
It asks.In the successful situation into the part channel response target image file acquisition instruction, described help borrows platform and receives
From the target image file sent into part channel according to the requirement.Wherein, the target image file includes: that identity card is positive and negative
Face picture, bank card front and back sides picture and one or more of the scene photograph that check-ins of providing a loan.Loan platform is helped to obtain
It takes in the successful situation of target image file, the target image file is stored to the sftp file service for helping loan platform
In device.
105, the target image file is uploaded to the target capital according to the configuration requirement.
In the specific implementation of the application, the target image file is uploaded to according to the configuration requirement
The target capital, specifically, such as the configuration requirement of capital A: identity card front and back sides picture and bank card front and back sides picture
Upload is packaged according to the compressed format of zip, photo is handled according to ordinary file upload, the upload of image file in loan formality scene
Path was constituted plus the date on the same day as suffix using capital sftp elementary path as prefix.It should be understood that above-mentioned example is only
For illustrating, specific restriction should not be constituted.
The application image file upload is illustrated with Fig. 2 below, Fig. 2 is that a kind of image file provided by the present application is same
The image file upload flow diagram of one step process.It helps first and borrows platform according to triggering of preset period image file upload clothes
Business, such as can be every triggering in 30 minutes once, after triggering image file upload service, inquired not helping to borrow in platform
The loan application record of image file is uploaded, then image file downloading request is sent into part channel, is returned into part channel
After image file, by image file upload to capital, the shape modifying the loan application and recording finally is returned the result according to capital
State.
In the specific implementation of the application, if it is described by the target image file according to the configuration requirement
It breaks down during being uploaded to the target capital, triggers the target image file retransmission function, wherein the triggering
The target image file retransmission function, comprising: obtain target shadow into part channel into what part channel label determined to described again
As file, wherein the target image file is determined by the configuration requirement;By the target image file according to described
Configuration requirement is uploaded to the target capital.It is a kind of image file synchronous method provided by the present application referring specifically to Fig. 3, Fig. 3
Image file retransmit flow diagram.
Optionally, the case where the target image file is successfully uploaded to the target capital according to the configuration requirement
Under, updating the loan application recording status is to have uploaded image file state, wherein the loan application recording status includes:
Image file state is not uploaded, has uploaded image file state.It should be understood that the example of above-mentioned loan application recording status is only used
In citing, specific restriction should not be constituted.
Based on the image file synchronous method that the above embodiments of the present application provide, helps borrow platform collection capital's reception shadow first
As the configuration requirement of file, and in the database by configuration requirement storage, the loan for not uploading image file is then obtained
Application record reads target capital's then according to the target capital label in loan application record from the database
The configuration requirement, followed by matching into described in the acquisition of part channel into what part channel label determined into loan application record
The target image file in requiring is set, the target image file is finally uploaded to the target according to the configuration requirement and is provided
Side.By implementing the synchronous embodiment of the application image file, realizes the image file different to different capitals and receive requirement
It is uniformly processed, to reduce the O&M difficulty for helping and borrowing platform, improves the stability for helping and borrowing platform image synchronous function.
The embodiment of the present application also provides a kind of image file synchronization system, referring to Fig. 4, Fig. 4 is provided by the present application one
The structural schematic diagram of kind image file synchronization system, the system comprises: collector unit 401, acquiring unit 402, configuration are read
Unit 403, uploading unit 404, updating unit 405, processing unit 406.
The collector unit 401 for helping the configuration requirement borrowed platform and collect capital's reception image file, and is matched by described in
Set requirement storage in the database.
In the specific implementation of the application, helps and borrows the configuration requirement that platform collects capital's reception image file,
Wherein, the configuration information in the configuration requirement includes: capital's description, capital sftp information, capital's file upload strategy, helps loan
Platform sftp information, image upload the file information list, image is packaged and uploads file parameters, the image upload basic road capital sftp
In diameter any one or it is a variety of, then by the capital being collected into receive image file configuration requirement storage in the database,
The database is the warehouse for coming tissue, storage and management data according to data structure, wherein the database can be SQL
Any one or a variety of, Ying Li of the databases such as Server, Oracle, MySQL, DB2, Sybase, Access, SQLite
Solution, above-mentioned configuration information and database are only served in citing, should not constitute specific restriction.
The acquiring unit 402, for obtaining the loan application record for not uploading image file, wherein the loan application
Record includes target capital label and into part channel label.
In the specific implementation of the application, to help borrow platform preserve the loan application recording status information
Database in inquiry state be do not upload image file the loan application record, wherein the loan application record include
Target capital label and into part channel label.Described help borrows platform according to the acquisition target capital service of the label of the target capital
The address of device, described help borrow platform according to the source recorded into loan application described in part channel tag recognition.
Preferably, periodically (such as every 30 minutes) to help borrow platform preserve the loan application recording status information
It is the loan application record for not uploading image file that state is inquired in database.
The configuration reading unit 403, for reading target money from the database according to the target capital label
The configuration requirement of side.
In the specific implementation of the application, the image file synchronization system further includes processing unit 406, institute
It states processing unit to be specifically used for, be wanted according to the configuration that the target capital label reads target capital from the database
It asks, the corresponding loan application record of the configuration requirement of the target capital and the target capital label is combined into one
Message is put into message queue, when the quantity in message queue is greater than zero, triggers practical business service from the message queue
The middle configuration requirement for reading the target capital and the corresponding loan application record of the target capital label, and execute phase
The service answered, wherein the service includes: that ordinary file uploads, packaging file uploads, updates in image file synchronous regime
It is one or more kinds of.When program is when operational process is abnormal, for example, run the program server crash, power-off, work as institute
It states server to restore to operate normally again, program is still maintain in the message queue, and to be abnormal that time still untreated
Message, at this moment program only needs to continue with the message of untreated completion in message queue.
If this data structure of message queue is not used to save the transaction message of same type, when program is extensive from exception
When operating normally again, it may appear that program does not know run from where.According to running from the beginning, then will appear described in repetition transmission
Target image file gives the case where target capital, however what this exception was not allowed in business processing.Therefore it is added
This message queue energy guarantee procedure of message queue continues normal fortune after abnormal conditions recovery, from the time point being abnormal
Row.
The acquiring unit 402 is also used to obtain target image text into part channel into what part channel label determined to described
Part, wherein the target image file is determined by the configuration requirement.
In the specific implementation of the application, described help borrows platform to described into part channel transmission target image text
Part acquisition instruction, wherein described instruction includes described needing to borrow wanting for image file type that platform is sent to described help into channel
It asks.In the successful situation into the part channel response target image file acquisition instruction, described help borrows platform and receives
From the target image file sent into part channel according to the requirement.Wherein, the target image file includes: that identity card is positive and negative
Face picture, bank card front and back sides picture and one or more of the scene photograph that check-ins of providing a loan.Loan platform is helped to obtain
It takes in the successful situation of target image file, the target image file is stored to the sftp file service for helping loan platform
In device.
The uploading unit 404, for the target image file to be uploaded to the target according to the configuration requirement
Capital, wherein the target capital is that the target capital label determines.
In the specific implementation of the application, the uploading unit is specifically used for, by the target image file
It is uploaded to the target capital according to the configuration requirement, specifically, such as the configuration requirement of capital A: identity card front and back sides
Picture and bank card front and back sides picture are uploaded according to the compressed format packing of zip, photo is handled according to common in loan formality scene
File uploads, the upload path of image file was constituted plus the date on the same day as suffix using capital sftp elementary path as prefix
's.It should be understood that above-mentioned be only served in citing, specific restriction should not be constituted.
In the specific implementation of the application, the uploading unit is also used to, if described by the target image
File breaks down during being uploaded to the target capital according to the configuration requirement, triggers the target image file weight
Pass function, wherein the triggering target image file retransmission function, comprising: determine again to described into part channel label
Into part channel obtain target image file, wherein the target image file is determined by the configuration requirement;It will be described
Target image file is uploaded to the target capital according to the configuration requirement.
Optionally, the image file synchronization system further includes updating unit 405, and the updating unit is specifically used for,
In the case that the target image file is successfully uploaded to the target capital according to the configuration requirement, the loan Shen is updated
Please recording status be uploaded image file state, wherein the loan application recording status includes: not upload image file shape
State has uploaded image file state.It should be understood that above-mentioned loan application recording status is only served in citing, should not constitute
It is specific to limit.
Image file synchronization system provided by the embodiments of the present application helps borrow platform collection capital's reception image file first
Configuration requirement, and in the database by configuration requirement storage, the loan application record for not uploading image file is then obtained,
Read the configuration of target capital from the database then according to the target capital label in loan application record
It is required that followed by being obtained in the configuration requirement into part channel into what part channel label determined into loan application record
Target image file, the target image file is finally uploaded to the target capital according to the configuration requirement.Pass through
Implement the synchronous embodiment of the application image file, realizes the image file reception different to different capitals and require to carry out unification
Processing improves the stability for helping and borrowing platform image synchronous function to reduce the O&M difficulty for helping and borrowing platform.
It is a kind of equipment provided in an embodiment of the present invention referring to Fig. 5, Fig. 5, which can be server, as shown in Figure 5
Equipment includes: one or more processors 501;One or more input equipments 502, one or more output equipments 503 and are deposited
Reservoir 504.Above-mentioned processor 501, input equipment 502, output equipment 503 and memory 504 are connected by bus 505.Storage
For storing instruction, processor 501 is used to execute the instruction of the storage of memory 502 to device 502.
Wherein, in the case which uses as server, processor 501 is used to collect capital and receives image file
Configuration requirement, and in the database by configuration requirement storage, the loan application record for not uploading image file is then obtained,
Read the configuration of target capital from the database then according to the target capital label in loan application record
It is required that followed by being obtained in the configuration requirement into part channel into what part channel label determined into loan application record
Target image file, the target image file is finally uploaded to the target capital according to the configuration requirement.
It should be appreciated that in embodiments of the present invention, alleged processor 501 can be central processing unit (Central
Processing Unit, CPU), which can also be other general processors, digital signal processor (Digital
Signal Processor, DSP), specific integrated circuit (Application Specific Integrated Circuit,
ASIC), ready-made programmable gate array (Field-Programmable Gate Array, FPGA) or other programmable logic
Device, discrete gate or transistor logic, discrete hardware components etc..General processor can be microprocessor or this at
Reason device is also possible to any conventional processor etc..
Input equipment 502 may include that Trackpad, fingerprint adopt sensor (for acquiring the finger print information and fingerprint of user
Directional information), microphone etc., output equipment 503 may include display (LCD etc.), loudspeaker etc..
The memory 504 may include read-only memory and random access memory, and to processor 501 provide instruction and
Data.The a part of of memory 504 can also include nonvolatile RAM.For example, memory 504 can also be deposited
Store up the information of device type.
In the specific implementation, processor 501 described in the embodiment of the present invention, input equipment 502, output equipment 503 can
Execute institute in the first embodiment and second embodiment of a kind of image file synchronous method and device provided in an embodiment of the present invention
The implementation of terminal described in the embodiment of the present invention also can be performed in the implementation of description, and details are not described herein.
A kind of computer readable storage medium, the computer-readable storage medium are provided in another embodiment of the invention
Matter is stored with computer program, and the computer program includes program instruction, and described program instructs realization when being executed by processor:
The configuration requirement that capital receives image file is collected, and in the database by configuration requirement storage, then obtains and does not upload
The loan application of image file records, and then reads the configuration requirement of target capital from the database, followed by
The target image file in the configuration requirement is obtained into part channel, finally wants the target image file according to the configuration
It asks and is uploaded to the target capital.
The computer readable storage medium can be the internal storage unit of terminal described in aforementioned any embodiment, example
Such as the hard disk or memory of terminal.The computer readable storage medium is also possible to the External memory equipment of the terminal, such as
The plug-in type hard disk being equipped in the terminal, intelligent memory card (Smart Media Card, SMC), secure digital (Secure
Digital, SD) card, flash card (Flash Card) etc..Further, the computer readable storage medium can also be wrapped both
The internal storage unit for including the terminal also includes External memory equipment.The computer readable storage medium is described for storing
Other programs and data needed for computer program and the terminal.The computer readable storage medium can be also used for temporarily
When store the data that has exported or will export.
Those of ordinary skill in the art may be aware that list described in conjunction with the examples disclosed in the embodiments of the present disclosure
Member and algorithm steps, can be realized with electronic hardware, computer software, or a combination of the two, in order to clearly demonstrate hardware
With the interchangeability of software, each exemplary composition and step are generally described according to function in the above description.This
A little functions are implemented in hardware or software actually, the specific application and design constraint depending on technical solution.Specially
Industry technical staff can use different methods to achieve the described function each specific application, but this realization is not
It is considered as beyond the scope of this invention.
It is apparent to those skilled in the art that for convenience of description and succinctly, the clothes of foregoing description
The specific work process of business device, equipment and unit, can refer to corresponding processes in the foregoing method embodiment, no longer superfluous herein
It states.
In several embodiments provided herein, it should be understood that disclosed server, device and method, it can
To realize by another way.For example, server example described above is only schematical, for example, the list
Member division, only a kind of logical function partition, there may be another division manner in actual implementation, for example, multiple units or
Component can be combined or can be integrated into another system, or some features can be ignored or not executed.In addition, shown
Or the mutual coupling, direct-coupling or communication connection discussed can be through some interfaces, device or unit it is indirect
Coupling or communication connection are also possible to electricity, mechanical or other form connections.
The unit as illustrated by the separation member may or may not be physically separated, aobvious as unit
The component shown may or may not be physical unit, it can and it is in one place, or may be distributed over multiple
In network unit.Some or all of unit therein can be selected to realize the embodiment of the present invention according to the actual needs
Purpose.
It, can also be in addition, the functional units in various embodiments of the present invention may be integrated into one processing unit
It is that each unit physically exists alone, is also possible to two or more units and is integrated in one unit.It is above-mentioned integrated
Unit both can take the form of hardware realization, can also realize in the form of software functional units.
If the integrated unit is realized in the form of SFU software functional unit and sells or use as independent product
When, it can store in a computer readable storage medium.Based on this understanding, technical solution of the present invention is substantially
The all or part of the part that contributes to existing technology or the technical solution can be in the form of software products in other words
It embodies, which is stored in a storage medium, including some instructions are used so that a computer
Equipment (can be personal computer, server or the network equipment etc.) executes the complete of each embodiment the method for the present invention
Portion or part steps.And storage medium above-mentioned includes: USB flash disk, mobile hard disk, read-only memory (ROM, Read-Only
Memory), random access memory (RAM, Random Access Memory), magnetic or disk etc. are various can store journey
The medium of sequence code.
The above description is merely a specific embodiment, but scope of protection of the present invention is not limited thereto, any
Those familiar with the art in the technical scope disclosed by the present invention, can readily occur in various equivalent modifications or replace
It changes, these modifications or substitutions should be covered by the protection scope of the present invention.Therefore, protection scope of the present invention should be with right
It is required that protection scope subject to.