CN110933071B - Image file transmission method and device - Google Patents
Image file transmission method and device Download PDFInfo
- Publication number
- CN110933071B CN110933071B CN201911182974.5A CN201911182974A CN110933071B CN 110933071 B CN110933071 B CN 110933071B CN 201911182974 A CN201911182974 A CN 201911182974A CN 110933071 B CN110933071 B CN 110933071B
- Authority
- CN
- China
- Prior art keywords
- file
- image
- compressed
- image file
- target
- 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
Links
Images
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L63/00—Network architectures or network communication protocols for network security
- H04L63/12—Applying verification of the received information
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L67/00—Network arrangements or protocols for supporting network services or applications
- H04L67/01—Protocols
- H04L67/06—Protocols specially adapted for file transfer, e.g. file transfer protocol [FTP]
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L69/00—Network arrangements, protocols or services independent of the application payload and not provided for in the other groups of this subclass
- H04L69/04—Protocols for data compression, e.g. ROHC
Landscapes
- Engineering & Computer Science (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Computer Security & Cryptography (AREA)
- Computer Hardware Design (AREA)
- Computing Systems (AREA)
- General Engineering & Computer Science (AREA)
- Information Transfer Between Computers (AREA)
Abstract
The invention provides an image file transmission method and device, wherein the method comprises the following steps: receiving compressed files uploaded by each partner system through a corresponding pre-established file transmission channel; carrying out compressed file validity verification on each received compressed file, and decompressing each compressed file passing the compressed file validity verification to obtain an image file corresponding to each compressed file passing the compressed file validity verification; carrying out image file validity verification on each image file, and determining the transmission sequence of each target image file passing the image validity verification; and transmitting each target image file to a pre-established image library according to the transmission sequence so as to conveniently examine and approve the target image files. By applying the method provided by the invention, the partner system can directly upload the image file to the bank approval system without repeated manual scanning and uploading, thereby saving the time overhead of the user.
Description
Technical Field
The present invention relates to the field of data transmission technologies, and in particular, to a method and an apparatus for transmitting an image file.
Background
With the rapid development of the image technology, the application field of the image is more and more extensive, and the daily life of people is facilitated. When people need to buy a house, if the fund is not enough to pay the whole house-buying cost, the people usually choose to apply for a personal house loan. When people apply for personal housing loan, a bank needs to keep a large amount of image data as loan evidence, wherein part of the data is the same as the image data kept by the client in the partner system, such as legal and effective identity documents, legal and effective housing contracts, house purchasing first payment proofs and the like.
The inventor researches and discovers that information between a bank system and a partner system is not intercommunicated at present, if image data is required to be stored, when a client and the partner sign an agreement, related personnel of the partner manually scan and upload materials, then the client personally goes to a bank network to provide loan approval materials, and the related personnel manually scan and upload the loan approval materials.
Disclosure of Invention
The technical problem to be solved by the invention is to provide an image file transmission method, so that a partner system can directly upload an image file to a bank approval system without repeated uploading, thereby accelerating the loan approval progress of a user, saving the time overhead of the user and improving the user experience.
The invention also provides an image file transmission device, which is used for ensuring the realization and the application of the method in practice.
An image file transmission method comprises the following steps:
receiving compressed files uploaded by each partner system through a corresponding pre-established file transmission channel;
carrying out compressed file validity verification on each received compressed file, and decompressing each compressed file passing the compressed file validity verification to obtain an image file corresponding to each compressed file passing the compressed file validity verification;
carrying out image file validity verification on each image file, and determining the transmission sequence of each target image file passing the image validity verification;
and transmitting each target image file to a pre-established image library according to the transmission sequence so as to conveniently examine and approve the target image files.
Optionally, the method described above includes a setting process of the file transmission channel, including:
distributing service approval nodes and file transmission type permissions for the partner system;
generating file transmission channel configuration information according to the service approval node and the file transmission type authority;
and sending the file transmission channel configuration information to the partner system so that the partner system establishes a file transmission channel according to the file transmission channel configuration information.
Optionally, the method for sequentially verifying the validity of the compressed files includes:
judging whether the file name of the compressed file meets a preset file name rule or not;
if the file name of the compressed file meets the file name rule, judging whether the compression type of the compressed file is a legal compression type;
if the compression type of the compressed file is a legal compression type, judging whether an approval record corresponding to the compressed file exists or not;
and if the approval record of the compressed file exists, determining that the compressed file passes the validity verification.
Optionally, the method for verifying the validity of the image file for each image file includes:
acquiring the file type and the target storage path of the image file; the target storage path is a path to be stored of the image file to which the target storage path belongs;
and carrying out image validity verification on the image file according to the file type and the target storage path.
Optionally, the method for determining a transmission sequence of each target image file passing the image validity verification includes:
acquiring a target storage path of each target image file passing the validity verification;
determining a thread pool to which each target image file belongs according to a target storage path of each target image file;
and for each thread pool, sequencing the target image files contained in the thread pool according to the file names of the target image files contained in the thread pool to obtain the transmission sequence of the target image files in the thread pool.
The above method, optionally, further includes:
when receiving an inquiry request sent by a target partner system, determining an inquiry service corresponding to the inquiry request, wherein the inquiry service comprises a video file transmission state or a video file auditing state;
if the query service is in an image file transmission state, judging whether an image file corresponding to the query request exists in the image library, and if so, sending an upload success message to the target partner system; if not, determining an uploading error reason of the image file corresponding to the query request in a preset uploading error record, and sending the uploading error reason to the target partner system;
and if the query service is in a video file audit state, acquiring an audit record of the video file corresponding to the query request, and sending the video file audit state contained in the audit record to the target partner system.
An image file transmission device, comprising:
the receiving unit is used for receiving compressed files uploaded by each partner system through a corresponding pre-established file transmission channel;
the first verification unit is used for verifying the validity of the received compressed files and decompressing the compressed files which pass the validity verification of the compressed files to obtain the image files corresponding to the compressed files which pass the validity verification of the compressed files;
the second verification unit is used for verifying the validity of the image files;
the determining unit is used for determining the transmission sequence of each target image file passing the image validity verification;
and the transmission unit is used for transmitting each target image file to a pre-established image library according to the transmission sequence so as to conveniently examine and approve the target image files.
The above apparatus, optionally, the first verification unit includes:
the first judging subunit is used for judging whether the file name of the compressed file meets a preset file name rule or not;
a second judging subunit, configured to judge whether the compression type of the compressed file is a legal compression type if the file name of the compressed file satisfies the file name rule;
a third judging subunit, configured to judge whether an approval record corresponding to the compressed file exists if the compression type of the compressed file is a legal compression type;
and the first determining subunit is used for determining that the compressed file passes the validity verification if an approval record of the compressed file exists.
The above apparatus, optionally, the second verification unit includes:
the first acquisition subunit is used for acquiring the file type and the target storage path of the image file; the target storage path is a path to be stored of the image file to which the target storage path belongs;
and the verification subunit is used for performing image validity verification on the image file according to the file type and the target storage path.
The above apparatus, optionally, the determining unit includes:
the second acquisition subunit is used for acquiring the target storage path of each target image file passing the validity verification;
a second determining subunit, configured to determine, according to a target storage path of each target image file, a thread pool to which each target image file belongs;
and the sequencing subunit is used for sequencing each target image file contained in the thread pool according to the file name of each target image file contained in the thread pool for each thread pool to obtain the transmission sequence of each target image file in the thread pool.
The above apparatus, optionally, further comprises:
the distribution unit is used for distributing service approval nodes and file transmission type permission to the partner system;
the generating unit is used for generating file transmission channel configuration information according to the service approval node and the file transmission type authority;
and the sending unit is used for sending the file transmission channel configuration information to the partner system so as to enable the partner system to establish a file transmission channel according to the file transmission channel configuration information.
The above apparatus, optionally, further comprises:
the processing unit is used for determining a query service corresponding to a query request when receiving the query request sent by a target partner system, wherein the query service comprises a video file transmission state or a video file auditing state;
a judging unit, configured to judge whether an image file corresponding to the query request exists in the image library if the query service is in an image file transmission state, and send an upload success message to the target partner system if the image file corresponding to the query request exists in the image library; if not, determining an uploading error reason of the image file corresponding to the query request in a preset uploading error record, and sending the uploading error reason to the target partner system;
and the execution unit is used for acquiring the audit record of the image file corresponding to the query request if the query service is in the image file audit state, and sending the image file audit state contained in the audit record to the target partner system.
Compared with the prior art, the invention has the following advantages:
the invention provides an image file transmission method, which comprises the following steps: receiving compressed files uploaded by each partner system through a corresponding pre-established file transmission channel; carrying out compressed file validity verification on each received compressed file, and decompressing each compressed file passing the compressed file validity verification to obtain an image file corresponding to each compressed file passing the compressed file validity verification; carrying out image file validity verification on each image file, and determining the transmission sequence of each target image file passing the image validity verification; and transmitting each target image file to a pre-established image library according to the transmission sequence so as to conveniently examine and approve the target image files. By applying the method provided by the invention, the partner system can directly upload the image file to the bank approval system without repeated manual scanning and uploading, so that the time overhead of a user is saved, and the user experience is improved.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, it is obvious that the drawings in the following description are only embodiments of the present invention, and for those skilled in the art, other drawings can be obtained according to the provided drawings without creative efforts.
FIG. 1 is a flowchart of a method for transmitting an image file according to the present invention;
FIG. 2 is a flowchart of another method of transmitting an image file according to the present invention;
FIG. 3 is a flowchart of another method of transmitting an image file according to the present invention;
FIG. 4 is a schematic structural diagram of a bank approval system according to the present invention;
FIG. 5 is a schematic structural diagram of an image file transmission device according to the present invention;
fig. 6 is a schematic structural diagram of an electronic device provided in the present invention.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
In this application, 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 identical elements in a process, method, article, or apparatus that comprises the element.
The invention is operational with numerous general purpose or special purpose computing device environments or configurations. For example: personal computers, server computers, hand-held or portable devices, tablet-type devices, multi-processor apparatus, distributed computing environments that include any of the above devices or equipment, and the like.
The embodiment of the invention provides an image file transmission method, which can be applied to various system platforms, wherein an execution main body of the method can be a processor of a server, the server can be a computer terminal or various mobile devices, and a flow chart of the method is shown in figure 1 and specifically comprises the following steps:
s101: receiving compressed files uploaded by each partner system through a corresponding pre-established file transmission channel;
in the method provided by the embodiment of the invention, the server can be connected with a plurality of partner systems and receives the compressed files uploaded by each partner system. Each partner system can upload the compressed file through a pre-established file transmission channel, and the file transmission channel is established by the server according to the configuration information of the file transmission channel.
Specifically, the partner system stores in advance an image file obtained by scanning a document original provided by a user by a service person, the service person of the partner system may query a resource original compression condition through a preset query interface, and when the resource original meets the compression condition, the image file is compressed to obtain a compressed file, and the compression condition may be a range of a push-allowed directory received by the partner system.
S102: carrying out compressed file validity verification on each received compressed file, and decompressing each compressed file passing the compressed file validity verification to obtain an image file corresponding to each compressed file passing the compressed file validity verification;
in the method provided by the embodiment of the invention, when each compressed file is received, file validity verification needs to be carried out on each compressed file, and the validity verification comprises verification of a compressed file name, a compressed file type or an approval record corresponding to the compressed file and the like.
In the method provided by the embodiment of the present invention, when the compressed file is subjected to validity verification, the compressed file is decompressed to obtain the image file included in the compressed file.
The compressed file at least comprises an image file, and the image file can be an image file of a legal and valid identity document obtained through scanning or an image file of a legal and valid house purchase contract and the like.
S103: carrying out image file validity verification on each image file, and determining the transmission sequence of each target image file passing the image validity verification;
in the method provided by the embodiment of the present invention, image file validity verification needs to be performed on each of the image files obtained through decompression, where the image file validity verification includes verifying a file type, a file storage path, and the like.
Optionally, a plurality of thread pools may be preset, wherein a plurality of threads are provided in the thread pools, and then each image file is uniformly distributed to the thread pools through the hash service lock for parallel processing.
In the method provided by the embodiment of the invention, if any image file passes the validity verification of the image file, the image file is determined as the target image file.
In the method provided by the embodiment of the present invention, a transmission sequence of each target image file needs to be determined, where the transmission sequence may be determined according to a file name, a file size, or a sequence of validity verification of the image file.
S104: and transmitting each target image file to a pre-established image library according to the transmission sequence so as to conveniently examine and approve the target image files.
In the method provided by the embodiment of the invention, each target image file can be transmitted to a pre-established image library through the transmission sequence, so that the image library can conveniently examine and approve the target image file. Each target image file has corresponding approval information, and the approval information can be loan related information input by related personnel when a user applies for a loan.
The method provided by the embodiment of the invention comprises the following steps: receiving compressed files uploaded by each partner system through a corresponding pre-established file transmission channel; carrying out compressed file validity verification on each received compressed file, and decompressing each compressed file passing the compressed file validity verification to obtain an image file corresponding to each compressed file passing the compressed file validity verification; carrying out image file validity verification on each image file, and determining the transmission sequence of each target image file passing the image validity verification; and transmitting each target image file to a pre-established image library according to the transmission sequence so as to conveniently examine and approve the target image files. By applying the method provided by the embodiment of the invention, the user does not need to be used as a carrier for bearing information transmission, data is transmitted between the partner system and the bank approval system, the partner system can directly upload the image file to the bank approval system, the time cost of the user is saved, the image file can be used by multiple parties after being uploaded at one time, and the user experience is improved.
In the method provided in the embodiment of the present invention, based on the implementation process, specifically, the setting process of the file transmission channel includes:
distributing service approval nodes and file transmission type permissions for the partner system;
generating file transmission channel configuration information according to the service approval node and the file transmission type authority;
and sending the file transmission channel configuration information to the partner system so that the partner system establishes a file transmission channel according to the file transmission channel configuration information.
In the method provided by the implementation of the invention, service approval nodes and file transmission type authorities need to be distributed to all partner systems. It should be noted that the same service approval node and file transmission type authority may be allocated to each partner, or different service approval nodes and file transmission type authorities may be allocated, and in order to enable each partner system to access quickly, the relevant service approval node and file transmission type authority may be dynamically adjusted as needed.
The business approval node can be a branch server to which each partner system belongs; the file transfer type rights may be mp4, flv or rmvb, etc.
Specifically, the corresponding file transmission channel configuration information may be generated according to the service approval node and the file transmission type authority, and the corresponding file transmission channel may be established according to the file transmission channel configuration information. Optionally, an image push directory range allowing uploading can be pushed for each partner system, and the image push directory range can include valid identity documents, valid house purchasing contracts, house purchasing initial payment certificates and the like. It should be noted that each partner system may also obtain the image push directory range through a preset query interface.
In the method provided by the embodiment of the invention, each partner system can upload the image file through the pre-established file transmission channel, so that the loan approval time is shortened, and the user experience is improved.
In the method provided in the embodiment of the present invention, based on the foregoing implementation process, specifically, the sequentially performing compressed file validity verification on each compressed file, as shown in fig. 2, includes:
s201: judging whether the file name of the compressed file meets a preset file name rule or not;
in the method provided by the embodiment of the present invention, it is necessary to determine whether the file name of the compressed file satisfies a preset file name rule, and the file name rule may be set according to a file name format supported by a server.
In the method provided by the embodiment of the invention, the storage tables with various standard file name formats can be stored in advance, and when the file name of the compressed file needs to be judged whether to meet the preset file name rule, the various standard file name formats in the storage tables are called for comparison.
Optionally, if the file name of the compressed file does not satisfy the file name rule, the file name of the compressed file is determined to be an illegal file name, then the compressed file is skipped, the subsequent compressed file is continuously processed, the compressed file of the illegal compression type can also be recorded, and information that the compressed file fails in the validity verification of the compressed file is fed back to the partner system.
S202: if the file name of the compressed file meets the file name rule, judging whether the compression type of the compressed file is a legal compression type;
in the method provided by the embodiment of the present invention, if the file name of the compressed file satisfies the file name rule, it is continuously determined whether the compression type of the compressed file is a legal compression type. The legal compression type may be rar, zip, cab, or the like.
Similarly, as stated in step S201, if the file name of the compressed file does not satisfy the legal compression type, the file name of the compressed file is determined to be the illegal compression type, and then the compressed file is skipped, and the subsequent compressed file is processed continuously, which is not repeated here.
S203: if the compression type of the compressed file is a legal compression type, judging whether an approval record corresponding to the compressed file exists or not;
in the method provided by the embodiment of the invention, if the compression type of the compressed file is a legal compression type, whether an approval record corresponding to the compressed file exists is continuously judged.
Similarly, as described in step S201, if there is no approval record corresponding to the compressed file, it is determined that the compressed file has no corresponding approval record, and then the compressed file is skipped over, and the subsequent compressed file is processed continuously, which is not described herein again.
S204: and if the approval record of the compressed file exists, determining that the compressed file passes the validity verification.
In the method provided by the embodiment of the invention, if the approval record corresponding to the compressed file exists, the compressed file is determined to pass the validity verification of the compressed file. Optionally, the validity verification of the compressed file may further include the memory size of the compressed file or the storage location of the compressed file.
According to the method provided by the embodiment of the invention, through the validity verification of the compressed file, the compressed file with the duplicate name, the compressed file with the unconventional compression type, the compressed file without the corresponding approval record and the like are not subjected to decompression processing, so that the system resources are saved, the overhead is reduced, and the uploading speed is increased.
In the method provided in the embodiment of the present invention, based on the foregoing implementation process, specifically, the performing the validity verification of the image file on each image file includes:
acquiring the file type and the target storage path of the image file; the target storage path is a path to be stored of the image file to which the target storage path belongs;
and carrying out image validity verification on the image file according to the file type and the target storage path.
In the method provided by the embodiment of the invention, the image file validity verification is required to be performed on each uploaded image file, and the image validity verification can be performed on the image file according to the file type and the target storage path of the acquired image file.
When the file type or the target storage path of the image file fails to pass the validity verification of the image file, the failure reason that the image file fails to pass the validity verification of the image file can be recorded, then the image file is skipped, and the validity verification of the image file is continuously performed on the remaining image files until the validity verification of other image files is finished.
Optionally, the image validity verification may include the size of the image file, the duration of the image file, and the like. For example: setting the size threshold of a single image file which is allowed to be uploaded to be 500M, when each image file uploaded by a partner system is received, acquiring the memory information of each image file, and comparing the memory information of each image file with a preset threshold respectively, thereby judging whether each image file meets the preset threshold or not.
In the method provided by the embodiment of the invention, the file type and the target storage path of the uploaded image file are judged through the validity verification of the image file so as to identify the illegal file type and the illegal target storage path, prevent someone from forging the image file and uploading the image file to a bank approval system, and increase the difficulty cost of verifying the authenticity and the validity of the image file.
In the method provided in the embodiment of the present invention, based on the foregoing implementation process, specifically, the determining a transmission sequence of each target image file that passes the image validity verification includes, as shown in fig. 3:
s301: acquiring a target storage path of each target image file passing the validity verification;
in the method provided by the embodiment of the invention, each target image file which passes the validity verification has a corresponding target storage path.
S302: determining a thread pool to which each target image file belongs according to a target storage path of each target image file;
in the method provided by the embodiment of the invention, the thread pool to which the target image file belongs can be determined according to the target storage path of the target image file. It should be noted that the thread pools to which the target video files belong may be determined to be the same thread pool or may be different thread pools.
S303: and for each thread pool, sequencing the target image files contained in the thread pool according to the file names of the target image files contained in the thread pool to obtain the transmission sequence of the target image files in the thread pool.
In the method provided by the embodiment of the present invention, the target storage path of each target image file passing the validity verification needs to be acquired to determine the thread pool to which each target file belongs.
The method provided by the embodiment of the invention can be provided with a plurality of thread pools, each target image file is logically segmented, each segmented target image file is distributed to the thread pools to be processed in parallel, and after each segmented target image file is uploaded, the image pools are spliced according to a preset splicing mode to obtain a complete target image file.
For each thread pool, the target image files contained in the thread pool can be sorted according to the file names of the target image files, so that the transmission sequence of the target image files in the thread pool is obtained. Alternatively, the ordering may be performed by the file initials of the respective target image files.
In order to more clearly describe the implementation process of the above method, the embodiment of the present invention provides a specific application scenario. Suppose that the server is provided with 3 thread pools, namely a thread pool A, a thread pool B and a thread pool C. Wherein, the thread pool A has 3 target video files with file names aB2, dA3 and cB 4; thread pool B has 4 target video files with file names bC1, cD2, aD3 and dC 4; if there are 5 target video files in the thread pool C, and the file names are aD1, cC2, bA3, eA4 and dA5, the transmission order of each target video file can be sorted according to the first letter of the file name of each target video file, the transmission order of the 3 target video files in the thread pool a is aB2, cB4 and dA3 in sequence, the transmission order of the 4 target video files in the thread pool B is aD3, bC1, cD2 and dC4 in sequence, and the transmission order of the 5 target video files in the thread pool C is aD1, bA3, cC2, dA5 and eA4 in sequence.
Optionally, when uploading the image files, a horizontal parallel and vertical serial manner may be adopted, that is, the target image files in the same transmission sequence in different directories are processed in parallel by using the thread pool, and the target image files in different transmission sequences in the same directory are uploaded sequentially after being quickly sorted by using a quick sorting algorithm.
It should be noted that, the transmission priority may also be set according to the memory size or the decompression time of each target image file, and the transmission order of each target image file is determined by the transmission priority.
In the method provided by the embodiment of the present invention, the target storage paths of the target image files passing the validity verification are obtained to determine the thread pool of each target storage path, and in each thread pool, the transmission sequence of each image file in the thread pool is obtained according to the file name of each target image file. By applying the method provided by the embodiment of the invention, the uploading speed and the success rate can be improved, and the problem of resource preemption under high concurrency is reduced.
In the method provided in the embodiment of the present invention, based on the foregoing implementation process, specifically, the receiving compressed files uploaded by each partner system through its respective corresponding pre-established file transmission channel further includes:
when receiving a query request sent by a target partner system, determining a query service corresponding to the query request;
if the query service is in an image file transmission state, judging whether an image file corresponding to the query request exists in the image library, and if so, sending an upload success message to the target partner system; and if not, determining an uploading error reason of the image file corresponding to the query request in a preset uploading error record, and sending the uploading error reason to the target partner system.
In the method provided by the embodiment of the invention, after the partner system finishes uploading each compressed file through the pre-established file transmission channel, the partner system can send a query request through the pre-set query interface so as to query the transmission state of the image file contained in each compressed file. When receiving an inquiry request sent by a target partner system, judging whether an image file corresponding to the inquiry request exists in the image library, if so, sending an uploading success message to the target partner system; and if not, determining an uploading error reason of the image file corresponding to the query request in a preset uploading error record, and feeding back the uploading error reason to the target partner system. Preferably, after each image file is transmitted, the server may also push an upload result notification to the corresponding partner system in real time, or directly and asynchronously push the upload result to the target partner system, so that service personnel of the target partner system can master the image file pushing situation in real time.
Optionally, in the process of uploading the image file, if the duration of a certain link exceeds the timeout time set by the system, the current operation is executed again, and when the execution times is limited, the reason for the failure of the current link is recorded in a preset uploading error record, so that the reason for the failure of the uploading error is fed back to the target partner system.
In the process of uploading the image file, if abnormal transmission interruption occurs, the current transmission record is recorded, and when the transmission is normal next time, the transmission can be started from the current transmission record. Alternatively, the transmission abort may be caused by a network outage or power down. When the uploading of the image file is finished, the temporary image file generated by decompression can be deleted, and the processed compressed file can be dynamically deleted according to parameter configuration, so that the memory resource can be released in time.
In the method provided by the embodiment of the invention, the service personnel of the partner system can inquire the transmission state of the image file through the inquiry interface so as to conveniently master the pushing condition of the image file in real time. The uploading error reason can be obtained in time, each image file is adjusted, time and expense are saved, and user experience is improved.
In the method provided in the embodiment of the present invention, based on the foregoing implementation process, specifically, the receiving compressed files uploaded by each partner system through its respective corresponding pre-established file transmission channel further includes:
when receiving a query request sent by a target partner system, determining a query service corresponding to the query request;
and if the query service is in a video file audit state, acquiring an audit record of the video file corresponding to the query request, and sending the video file audit state contained in the audit record to the target partner system.
In the method provided by the embodiment of the invention, after the compressed file uploaded by each partner system through the pre-established file transmission channel, the auditing state of the image file contained in the compressed file can be queried through the pre-set query interface. The audit status of the image file may include audit in progress, audit not passed, audit passed, and the like.
In the method provided by the embodiment of the invention, the service personnel of the partner system can inquire the auditing state of each uploaded target image file through the preset inquiry interface so as to determine whether the image file needs to be uploaded again. By applying the method provided by the embodiment of the invention, related business personnel can master the auditing state of each uploaded image file at any time.
The invention can be applied to various fields, in particular to a bank approval server in a bank, wherein the bank approval server can be a server or a server cluster, the server is provided with a bank approval system, the structural schematic diagram of the bank approval system is shown in fig. 4, and the bank approval system specifically comprises:
the system comprises a transmission module, a preprocessing module, an uploading module, an interactive notification module and a fault-tolerant module;
the transmission module can comprise a partner file transmission queue, a safety inspection submodule, a bank background file transmission queue, a file pool, a batch processing submodule and a data downloading platform.
The preprocessing module may include an image file packet inspection sub-module, a file distribution manager, and an image file packet decompression sub-module.
The uploading module can comprise a quick file sorting sub-module, an image file inspection sub-module and a transverse parallel longitudinal serial uploading sub-module.
The interaction notification module may include a database module, a first message processing module, a second message processing module, a message queue manager, a first gateway, a second gateway, a first asynchronous message processing module ASMH1, a second asynchronous message processing module ASMH2, a load balancing sub-module, a bank bus system, and a message forwarding sub-module.
The bank approval system can push service approval nodes and file transmission type authorities to each partner system through the transmission module, the partner system scans each resource original provided by a user according to the service approval nodes and the file transmission types to obtain corresponding image files, and then lossless compression is carried out on each image file to obtain an image file package corresponding to each image file. It should be noted that the video file package is a compressed file in the above process. And transmitting each image file packet to a branch server to which the partner system belongs through a pre-established special transmission queue, and then forwarding each image file packet to a file pool of the bank approval system by the branch server.
The bank approval system acquires each image file packet from the file pool through the preprocessing module, performs image file packet verification on each image file packet, decompresses each image file packet which passes the image file packet verification, and acquires the image files contained in each image file packet.
The image files are quickly sequenced through the uploading module, then the image files are verified, and the image files which pass the image file verification are uploaded to the image library in a transverse parallel and longitudinal serial mode so that the image library can conveniently examine and approve the image files. After the uploading of each image file is finished, the temporary image file generated by decompression can be deleted, and each processed image file packet in the file pool can be dynamically deleted through parameter configuration.
When receiving each image file packet uploaded by the partner system, the bank approval system can push the uploading result of each image file to the partner system in real time through the interactive notification module, and can also push the uploading result to the partner system asynchronously, so that business personnel of the partner system can master the image pushing condition in time.
The bank approval system is also provided with a fault-tolerant module, for the image files in the transmission process, if transmission interruption occurs, the current transmission record can be recorded, and during the next normal transmission, the transmission can be directly carried out from the current transmission record, and if the image file package or the image file verification fails or is abnormal, the current task is skipped, and the subsequent image file package or the image file is continuously processed; if the execution time length of a certain image file exceeds the overtime time length configured by the system in the uploading process, the uploading task can be executed again, and when the execution times reaches the upper limit, the uploading failure reason can be recorded, and an uploading failure notice is fed back to the partner system.
Corresponding to the method described in fig. 1, an embodiment of the present invention further provides an image file transmission apparatus, which is used for implementing the method in fig. 1 specifically, where the image file transmission apparatus provided in the embodiment of the present invention may be applied to a computer terminal or various mobile devices, and a schematic structural diagram of the image file transmission apparatus is shown in fig. 5, and specifically includes:
a receiving unit 501, configured to receive compressed files uploaded by each partner system through a corresponding pre-established file transmission channel;
a first verification unit 502, configured to perform compressed file validity verification on each received compressed file, and decompress each compressed file that passes the compressed file validity verification, to obtain an image file corresponding to each compressed file that passes the compressed file validity verification;
a second verification unit 503, configured to perform image file validity verification on each of the image files;
a determining unit 504, configured to determine a transmission sequence of each target image file that passes the image validity verification;
a transmission unit 505, configured to transmit each target image file to a pre-established image library according to the transmission sequence, so as to conveniently approve the target image file.
In the image file transmission device provided by the embodiment of the invention, when receiving compressed files uploaded by each partner system through the corresponding pre-established file transmission channel; carrying out compressed file validity verification on each received compressed file, and decompressing each compressed file passing the compressed file validity verification to obtain an image file corresponding to each compressed file passing the compressed file validity verification; carrying out image file validity verification on each image file, and determining the transmission sequence of each target image file passing the image validity verification; and transmitting each target image file to a pre-established image library according to the transmission sequence so as to conveniently examine and approve the target image files. By applying the method provided by the invention, the partner system can directly upload the image file to the bank approval system without repeated manual scanning and uploading, so that the time overhead of a user is saved, meanwhile, the risk of counterfeiting the image file can be avoided, and the user experience is improved.
In the apparatus provided in the embodiment of the present invention, the first verification unit 502 includes:
the first judging subunit is used for judging whether the file name of the compressed file meets a preset file name rule or not;
a second judging subunit, configured to judge whether the compression type of the compressed file is a legal compression type if the file name of the compressed file satisfies the file name rule;
a third judging subunit, configured to judge whether an approval record corresponding to the compressed file exists if the compression type of the compressed file is a legal compression type;
and the first determining subunit is used for determining that the compressed file passes the validity verification if an approval record of the compressed file exists.
In the apparatus provided in the embodiment of the present invention, the second verifying unit 503 includes:
the first acquisition subunit is used for acquiring the file type and the target storage path of the image file; the target storage path is a path to be stored of the image file to which the target storage path belongs;
and the verification subunit is used for performing image validity verification on the image file according to the file type and the target storage path.
In the apparatus provided in the embodiment of the present invention, the determining unit 504 includes:
the second acquisition subunit is used for acquiring the target storage path of each target image file passing the validity verification;
a second determining subunit, configured to determine, according to a target storage path of each target image file, a thread pool to which each target image file belongs;
and the sequencing subunit is used for sequencing each target image file contained in the thread pool according to the file name of each target image file contained in the thread pool for each thread pool to obtain the transmission sequence of each target image file in the thread pool.
The device provided by the embodiment of the invention further comprises:
the distribution unit is used for distributing service approval nodes and file transmission type permission to the partner system;
the generating unit is used for generating file transmission channel configuration information according to the service approval node and the file transmission type authority;
and the sending unit is used for sending the file transmission channel configuration information to the partner system so as to enable the partner system to establish a file transmission channel according to the file transmission channel configuration information.
The device provided by the embodiment of the invention further comprises:
the processing unit is used for determining a query service corresponding to a query request when receiving the query request sent by a target partner system, wherein the query service comprises a video file transmission state or a video file auditing state;
a judging unit, configured to judge whether an image file corresponding to the query request exists in the image library if the query service is in an image file transmission state, and send an upload success message to the target partner system if the image file corresponding to the query request exists in the image library; if not, determining an uploading error reason of the image file corresponding to the query request in a preset uploading error record, and sending the uploading error reason to the target partner system;
and the execution unit is used for acquiring the audit record of the image file corresponding to the query request if the query service is in the image file audit state, and sending the image file audit state contained in the audit record to the target partner system.
The implementation principle of each unit or module in the image file transmission device provided by the present invention is consistent with that of the image file transmission method provided by the present invention, and may be referred to each other, and details are not repeated herein.
The embodiment of the invention also provides a storage medium, which comprises a stored instruction, wherein when the instruction runs, the equipment where the storage medium is located is controlled to execute the image file transmission method.
An electronic device is provided in an embodiment of the present invention, and the structural diagram of the electronic device is shown in fig. 6, which specifically includes a memory 601 and one or more instructions 602, where the one or more instructions 602 are stored in the memory 601 and configured to be executed by one or more processors 603 to perform the following operations on the one or more instructions 602:
receiving compressed files uploaded by each partner system through a corresponding pre-established file transmission channel;
carrying out compressed file validity verification on each received compressed file, and decompressing each compressed file passing the compressed file validity verification to obtain an image file corresponding to each compressed file passing the compressed file validity verification;
carrying out image file validity verification on each image file, and determining the transmission sequence of each target image file passing the image validity verification;
and transmitting each target image file to a pre-established image library according to the transmission sequence so as to conveniently examine and approve the target image files.
The embodiments in the present specification are described in a progressive manner, and the same and similar parts among the embodiments are referred to each other, and each embodiment focuses on the differences from the other embodiments. In particular, the system or system embodiments are substantially similar to the method embodiments and therefore are described in a relatively simple manner, and reference may be made to some of the descriptions of the method embodiments for related points. The above-described system and system embodiments are only illustrative, wherein the units described as separate parts may or may not be physically separate, and the parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of the present embodiment. One of ordinary skill in the art can understand and implement it without inventive effort.
Those of skill would further appreciate that the various illustrative elements and algorithm steps described in connection with the embodiments disclosed herein may be implemented as electronic hardware, computer software, or combinations of both, and that the various illustrative components and steps have been described above generally in terms of their functionality in order to clearly illustrate this interchangeability of hardware and software. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the implementation. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present invention.
The previous description of the disclosed embodiments is provided to enable any person skilled in the art to make or use the present invention. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the generic principles defined herein may be applied to other embodiments without departing from the spirit or scope of the invention. Thus, the present invention is not intended to be limited to the embodiments shown herein but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.
Claims (10)
1. An image file transmission method is characterized by comprising the following steps:
receiving compressed files uploaded by each partner system through a corresponding pre-established file transmission channel;
carrying out compressed file validity verification on each received compressed file, and decompressing each compressed file passing the compressed file validity verification to obtain an image file corresponding to each compressed file passing the compressed file validity verification;
carrying out image file validity verification on each image file, and determining the transmission sequence of each target image file passing the image validity verification;
and transmitting each target image file to a pre-established image library according to the transmission sequence so as to conveniently examine and approve the target image files.
2. The method according to claim 1, wherein the setting process of the file transmission channel comprises:
distributing service approval nodes and file transmission type permissions for the partner system;
generating file transmission channel configuration information according to the service approval node and the file transmission type authority;
and sending the file transmission channel configuration information to the partner system so that the partner system establishes a file transmission channel according to the file transmission channel configuration information.
3. The method according to claim 1, wherein said performing compressed file validity verification on each received compressed file comprises:
judging whether the file name of the compressed file meets a preset file name rule or not;
if the file name of the compressed file meets the file name rule, judging whether the compression type of the compressed file is a legal compression type;
if the compression type of the compressed file is a legal compression type, judging whether an approval record corresponding to the compressed file exists or not;
and if the approval record corresponding to the compressed file exists, determining that the compressed file passes the validity verification.
4. The method of claim 1, wherein said performing image file validity verification on each of said image files comprises:
acquiring the file type and the target storage path of the image file; the target storage path is a path to be stored of the image file to which the target storage path belongs;
and carrying out image validity verification on the image file according to the file type and the target storage path.
5. The method of claim 1, wherein determining the transmission sequence of each target image file passing the image validity verification comprises:
acquiring a target storage path of each target image file passing the validity verification;
determining a thread pool to which each target image file belongs according to a target storage path of each target image file;
and for each thread pool, sequencing the target image files contained in the thread pool according to the file names of the target image files contained in the thread pool to obtain the transmission sequence of the target image files in the thread pool.
6. The method of claim 1, further comprising:
when receiving an inquiry request sent by a target partner system, determining an inquiry service corresponding to the inquiry request, wherein the inquiry service comprises a video file transmission state or a video file auditing state;
if the query service is in an image file transmission state, judging whether an image file corresponding to the query request exists in the image library, and if so, sending an upload success message to the target partner system; if not, determining an uploading error reason of the image file corresponding to the query request in a preset uploading error record, and sending the uploading error reason to the target partner system;
and if the query service is in a video file audit state, acquiring an audit record of the video file corresponding to the query request, and sending the video file audit state contained in the audit record to the target partner system.
7. An image file transmission device, comprising:
the receiving unit is used for receiving compressed files uploaded by each partner system through a corresponding pre-established file transmission channel;
the first verification unit is used for verifying the validity of the received compressed files and decompressing the compressed files which pass the validity verification of the compressed files to obtain the image files corresponding to the compressed files which pass the validity verification of the compressed files;
the second verification unit is used for verifying the validity of the image files;
the determining unit is used for determining the transmission sequence of each target image file passing the image validity verification;
and the transmission unit is used for transmitting each target image file to a pre-established image library according to the transmission sequence so as to conveniently examine and approve the target image files.
8. The apparatus of claim 7, wherein the first authentication unit comprises:
the first judging subunit is used for judging whether the file name of the compressed file meets a preset file name setting rule or not;
a second judging subunit, configured to judge whether the compression type of the compressed file is a legal compression type if the file name of the compressed file satisfies the file name rule;
a third judging subunit, configured to judge whether an approval record corresponding to the compressed file exists if the compression type of the compressed file is a legal compression type;
and the first determining subunit is used for determining that the compressed file passes the validity verification if an approval record corresponding to the compressed file exists.
9. The apparatus of claim 7, wherein the second authentication unit comprises:
the first acquisition subunit is used for acquiring the file type and the target storage path of the image file; the target storage path is a path to be stored of the image file to which the target storage path belongs;
and the verification subunit is used for performing image validity verification on the image file according to the file type and the target storage path.
10. The apparatus of claim 7, wherein the determining unit comprises:
the second acquisition subunit is used for acquiring the target storage path of each target image file passing the validity verification;
a second determining subunit, configured to determine, according to a target storage path of each target image file, a thread pool to which each target image file belongs;
and the sequencing subunit is used for sequencing each target image file contained in the thread pool according to the file name of each target image file contained in the thread pool for each thread pool to obtain the transmission sequence of each target image file in the thread pool.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201911182974.5A CN110933071B (en) | 2019-11-27 | 2019-11-27 | Image file transmission method and device |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201911182974.5A CN110933071B (en) | 2019-11-27 | 2019-11-27 | Image file transmission method and device |
Publications (2)
Publication Number | Publication Date |
---|---|
CN110933071A CN110933071A (en) | 2020-03-27 |
CN110933071B true CN110933071B (en) | 2022-01-28 |
Family
ID=69846713
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201911182974.5A Active CN110933071B (en) | 2019-11-27 | 2019-11-27 | Image file transmission method and device |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN110933071B (en) |
Families Citing this family (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN114172744B (en) * | 2022-01-12 | 2024-10-01 | 深圳市安田数据服务有限公司 | Data transmission system and data transmission method for multiple servers |
CN118573673B (en) * | 2024-07-31 | 2024-10-01 | 北京科杰科技有限公司 | Flink technology-based api synchronous acceleration method |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US6711709B1 (en) * | 1998-06-24 | 2004-03-23 | Unisys Corporation | Integrated block checking system for rapid file transfer of compressed data |
CN106572100A (en) * | 2016-10-25 | 2017-04-19 | 中国建设银行股份有限公司 | Service data transfer audit method, device and system |
CN108334797A (en) * | 2017-06-21 | 2018-07-27 | 平安科技(深圳)有限公司 | File scanning method, device and computer readable storage medium |
CN110245262A (en) * | 2019-05-20 | 2019-09-17 | 平安银行股份有限公司 | Image file treating method and apparatus |
-
2019
- 2019-11-27 CN CN201911182974.5A patent/CN110933071B/en active Active
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US6711709B1 (en) * | 1998-06-24 | 2004-03-23 | Unisys Corporation | Integrated block checking system for rapid file transfer of compressed data |
CN106572100A (en) * | 2016-10-25 | 2017-04-19 | 中国建设银行股份有限公司 | Service data transfer audit method, device and system |
CN108334797A (en) * | 2017-06-21 | 2018-07-27 | 平安科技(深圳)有限公司 | File scanning method, device and computer readable storage medium |
CN110245262A (en) * | 2019-05-20 | 2019-09-17 | 平安银行股份有限公司 | Image file treating method and apparatus |
Non-Patent Citations (1)
Title |
---|
"基于密码学技术的证件电子化应用系统设计";陆权;《科技经济市场》;20191014;全文 * |
Also Published As
Publication number | Publication date |
---|---|
CN110933071A (en) | 2020-03-27 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN110879903A (en) | Evidence storage method, evidence verification method, evidence storage device, evidence verification device, evidence storage equipment and evidence verification medium | |
CN110288445B (en) | Decentralised storage method, device and storage medium | |
CN110933071B (en) | Image file transmission method and device | |
US20200213385A1 (en) | Offline mobile data storage system and method | |
CN113535648A (en) | Distributed cloud storage method, equipment and storage medium based on IPFS | |
US9678789B2 (en) | Methods and systems for prioritizing events using time and availability | |
CN109240837B (en) | Construction method of universal cloud storage service API | |
US20140101715A1 (en) | Privacy aware authenticated map-reduce | |
CN111369236A (en) | Data management method and device applied to block chain | |
CN114049122A (en) | Service processing method and system | |
CN111260475A (en) | Data processing method, block chain node point equipment and storage medium | |
CN113721893A (en) | Micro-service bus design method and device | |
CN113517985A (en) | File data processing method and device, electronic equipment and computer readable medium | |
CN111401891B (en) | Data management method and device applied to blockchain | |
CN115396178B (en) | User distributed authentication method, device, electronic equipment and storage medium | |
US8774599B2 (en) | Method for transcoding and playing back video files based on grid technology in devices having limited computing power | |
CN116009768A (en) | Data acquisition method and device | |
CN112685199B (en) | Message queue repairing method and device, computer equipment and storage medium | |
CN112241540B (en) | Method and device for improving data interaction safety between enterprises | |
CN115361376A (en) | Government affair file uploading method and device, electronic equipment and storage medium | |
CN113485731A (en) | Intelligent contract upgrading method and system for block chain | |
CN111226242A (en) | Cloud computing network inspection technology | |
CN112332991B (en) | Data processing method, system and storage medium based on industrial internet | |
CN117201599A (en) | Unified method, device, equipment and medium for multi-element heterogeneous blockchain interactive data | |
CN118504921A (en) | Task reassignment method, device, electronic equipment and computer readable medium |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |