CN110519154B - Data transmission method, device, equipment and computer readable storage medium - Google Patents

Data transmission method, device, equipment and computer readable storage medium Download PDF

Info

Publication number
CN110519154B
CN110519154B CN201910753894.4A CN201910753894A CN110519154B CN 110519154 B CN110519154 B CN 110519154B CN 201910753894 A CN201910753894 A CN 201910753894A CN 110519154 B CN110519154 B CN 110519154B
Authority
CN
China
Prior art keywords
file
data
target data
target
mail
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201910753894.4A
Other languages
Chinese (zh)
Other versions
CN110519154A (en
Inventor
任熊
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Ping An Property and Casualty Insurance Company of China Ltd
Original Assignee
Ping An Property and Casualty Insurance Company of China Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Ping An Property and Casualty Insurance Company of China Ltd filed Critical Ping An Property and Casualty Insurance Company of China Ltd
Priority to CN201910753894.4A priority Critical patent/CN110519154B/en
Publication of CN110519154A publication Critical patent/CN110519154A/en
Application granted granted Critical
Publication of CN110519154B publication Critical patent/CN110519154B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L51/00User-to-user messaging in packet-switching networks, transmitted according to store-and-forward or real-time protocols, e.g. e-mail
    • H04L51/07User-to-user messaging in packet-switching networks, transmitted according to store-and-forward or real-time protocols, e.g. e-mail characterised by the inclusion of specific contents
    • H04L51/08Annexed information, e.g. attachments
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L51/00User-to-user messaging in packet-switching networks, transmitted according to store-and-forward or real-time protocols, e.g. e-mail
    • H04L51/42Mailbox-related aspects, e.g. synchronisation of mailboxes
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/06Protocols specially adapted for file transfer, e.g. file transfer protocol [FTP]

Abstract

The invention provides a data sending method, a data sending device, data sending equipment and a computer readable storage medium, wherein corresponding target data are extracted from a preset database according to data acquisition requirements, a target data file is generated, and whether the data volume of the target data file exceeds a preset threshold value is judged; if the target data file exceeds the preset threshold, storing the target data file into a preset file storage area, and storing the target data file and other files in an isolation manner; and generating a download link according to the address of the storage area, adding the download link and the file identifier of the target data file to the preset mail template, generating a target mail, and sending the target mail to the data requester. According to the invention, the file with large data volume is uploaded to the storage area, and the download link is generated according to the storage address, so that a data demand party can directly and correspondingly download the target data file from the storage area according to the download link, the success rate of data transmission is improved, and the user experience is improved.

Description

Data transmission method, device, equipment and computer readable storage medium
Technical Field
The present invention relates to the field of data processing, and in particular, to a data sending method, device, apparatus, and computer-readable storage medium.
Background
With the development of the internet, e-mail has become one of the most basic and common services. The system can contact with network users in any corner of the world through an e-mail system, and the e-mails can carry characters, images, sound and other various modes; meanwhile, a large amount of free news and special mails can be obtained, and easy information search is realized, which cannot be compared by any traditional mode. Just because the e-mail is easy to use, low in charge, easy to store and free from obstruction in the world, the e-mail is widely applied, and the communication of people is greatly changed. However, due to the limitation policy of the capacity of the receiving mailbox and the attachment size of some mail systems, when a user sends a mail with a large attachment, the mail with the large attachment is often rejected by a receiving mail server, and the sending fails.
Therefore, how to solve the problem that the existing attachment problem causes the failure of sending the mail is a problem which needs to be solved at present.
Disclosure of Invention
The invention mainly aims to provide a data sending method, a data sending device, data sending equipment and a computer readable storage medium, and aims to solve the technical problem that mail sending fails due to the existing attachment problem.
In order to achieve the above object, the present invention provides a data transmission method, including the steps of:
when a data acquisition demand sent by a data requester is received, extracting corresponding target data from a preset database according to the data acquisition demand, generating a target data file, and judging whether the data volume of the target data file exceeds a preset threshold value or not;
if the data volume of the target data file exceeds a preset threshold value, storing the target data file into a preset file storage area, and storing the target data file and other files in the preset file storage area in an isolation manner;
and generating a download link of the target data file according to the address of a storage area storing the target data file, acquiring a preset mail template, adding the download link and the file identifier of the target data file to the preset mail template, generating a target mail, and sending the target mail to the data requester.
Optionally, if the data amount of the target data file exceeds a preset threshold, the step of storing the target data in a preset file storage area, and storing the target data separately from other files in the preset file storage area includes:
if the data volume of the target data file exceeds a preset threshold value, acquiring a task management number in the data acquisition requirement, and establishing a sub-folder in the preset file storage area according to the task management number;
and storing the target data into a subfolder in the preset file storage area, and setting access authority for the subfolder according to the task management number so as to store other target files in an isolated manner.
Optionally, after the steps of generating a download link of the target data file according to the address of the storage area where the target data file is stored, acquiring a preset mail template, adding the download link and the file identifier of the target data file to the preset mail template, generating a target mail, and sending the target mail to the data requester, the method further includes:
when a download request triggered by a data extraction user based on the download link is detected, acquiring a file extraction code input by the data extraction user;
judging whether the file extraction code is the same as a task management number corresponding to the target data file;
and if the file extraction code is the same as the task management number, judging that the data extraction user has the downloading authority of the target data file, and sending the target data file in the subfolder to a terminal corresponding to the data extraction user, so that the data extraction user with the downloading authority can download the corresponding target data file based on the downloading link.
Optionally, when a download request triggered by the data extraction user based on the download link is detected, the step of obtaining the file extraction code input by the data extraction user includes:
when a downloading request triggered by a data extraction user based on the downloading link is detected, judging whether a file to be downloaded corresponding to the file identification exists in a downloading address corresponding to the downloading link or not;
if the file to be downloaded exists in the download address, acquiring a file extraction code input by the data extraction user;
and if the file to be downloaded does not exist in the download address, generating and displaying a reminding message that the file does not exist.
Optionally, after the steps of generating a download link of the target data file according to the address of the storage area where the target data file is stored, acquiring a preset mail template, adding the download link and the file identifier of the target data file to the preset mail template, generating a target mail, and sending the target mail to the data requester, the method further includes:
when a downloading request triggered by a data extraction user based on the downloading link is detected, acquiring authority user information of the target data file and current user information of the data extraction user;
judging whether the current user information is matched with the authority user information;
and if the current user information is matched with the authority user information, judging that the data extraction user is the authority user of the target data file, and sending the target data file in the subfolder to a terminal corresponding to the data extraction user, so that the data extraction user with the downloading authority can download the corresponding target data file based on the downloading link.
Optionally, if the data amount of the target data file exceeds a preset threshold, the step of storing the target data file in a preset file storage area, and storing the target data file and other files in the preset file storage area in an isolated manner specifically includes:
if the data volume of the target data file exceeds a preset threshold value, generating and displaying a reminding message which is too large in file data volume and cannot be sent through an email;
and storing the target data file into a preset file storage area, and storing the target data file and other files in the preset file storage area in an isolation manner.
Optionally, after the steps of extracting corresponding target data from a preset database according to a data acquisition demand when receiving the data acquisition demand sent by a data requester, generating a target data file, and determining whether a data volume of the target data file exceeds a preset threshold, the method further includes:
if the data volume of the target data file is smaller than a preset threshold value, acquiring the file type of the target data file, and determining a mail template corresponding to the target data file according to the file type;
generating a mail attachment according to the target data file, adding the mail attachment and the file identification of the target data file to the preset mail template, generating a target mail, and sending the target mail to the data request party.
In order to achieve the above object, the present invention also provides a data transmission device including:
the data extraction module is used for extracting corresponding target data from a preset database according to a data acquisition demand when the data acquisition demand sent by a data requester is received, generating a target data file, and judging whether the data volume of the target data file exceeds a preset threshold value or not;
the file storage module is used for storing the target data file into a preset file storage area and storing the target data file and other files in the preset file storage area in an isolation manner if the data volume of the target data file exceeds a preset threshold value;
and the data sending module is used for generating a download link of the target data file according to the address of a storage area for storing the target data file, acquiring a preset mail template, adding the download link and the file identifier of the target data file to the preset mail template, generating a target mail, and sending the target mail to the data requester.
Furthermore, in order to achieve the above object, the present invention also provides a data transmission device comprising a processor, a memory, and a data transmission program stored on the memory and executable by the processor, wherein the data transmission program, when executed by the processor, implements the steps of the data transmission method as described above.
In addition, to achieve the above object, the present invention also provides a computer-readable storage medium having a data transmission program stored thereon, wherein the data transmission program, when executed by a processor, implements the steps of the data transmission method as described above.
The invention provides a data transmission method, namely when receiving a data acquisition demand sent by a data requester, extracting corresponding target data from a preset database according to the data acquisition demand, generating a target data file, and judging whether the data volume of the target data file exceeds a preset threshold value or not; if the data volume of the target data file exceeds a preset threshold value, storing the target data file into a preset file storage area, and storing the target data file and other files in the preset file storage area in an isolation manner; and generating a download link of the target data file according to the address of a storage area storing the target data file, acquiring a preset mail template, adding the download link and the file identifier of the target data file to the preset mail template, generating a target mail, and sending the target mail to the data requester. Through the mode, the file with large data volume is uploaded to the storage area, the download link is generated according to the storage address, and then the download link is sent to the data demand party through the mail, so that the data demand party can directly and correspondingly download the target data file from the storage area according to the download link, the problem that the mail sending fails due to the large data volume of the mail attachment is solved, the success rate of data sending is improved, the user experience is improved, and the technical problem that the mail sending fails due to the existing attachment problem is solved.
Drawings
Fig. 1 is a schematic hardware configuration diagram of a data transmission device according to an embodiment of the present invention;
fig. 2 is a flowchart illustrating a first embodiment of a data transmission method according to the present invention;
fig. 3 is a flowchart illustrating a second embodiment of a data transmission method according to the present invention;
fig. 4 is a flowchart illustrating a third embodiment of a data transmission method according to the present invention;
fig. 5 is a functional block diagram of a data transmission device according to a first embodiment of the present invention.
The implementation, functional features and advantages of the present invention will be further described with reference to the accompanying drawings.
Detailed Description
It should be understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention.
The data transmission method according to the embodiment of the present invention is mainly applied to data transmission devices, which may be devices having display and processing functions, such as PCs, portable computers, and mobile terminals.
Referring to fig. 1, fig. 1 is a schematic diagram of a hardware structure of a data transmission device according to an embodiment of the present invention. In this embodiment of the present invention, the data transmission device may include a processor 1001 (e.g., a CPU), a communication bus 1002, a user interface 1003, a network interface 1004, and a memory 1005. The communication bus 1002 is used for realizing connection communication among the components; the user interface 1003 may include a Display screen (Display), an input unit such as a Keyboard (Keyboard); the network interface 1004 may optionally include a standard wired interface, a wireless interface (e.g., WI-FI interface); the memory 1005 may be a high-speed RAM memory, or may be a non-volatile memory (e.g., a magnetic disk memory), and optionally, the memory 1005 may be a storage device independent of the processor 1001.
Those skilled in the art will appreciate that the hardware configuration shown in fig. 1 does not constitute a limitation of the data transmission apparatus, and may include more or less components than those shown, or combine certain components, or a different arrangement of components.
With continued reference to fig. 1, the memory 1005 of fig. 1, which is one type of computer-readable storage medium, may include an operating system, a network communication module, and a data transmission program.
In fig. 1, the network communication module is mainly used for connecting to a server and performing data communication with the server; and the processor 1001 may call the data transmission program stored in the memory 1005 and execute the data transmission method provided by the embodiment of the present invention.
The embodiment of the invention provides a data transmission method.
Referring to fig. 2, fig. 2 is a flowchart illustrating a data transmission method according to a first embodiment of the present invention.
In this embodiment, the data transmission method includes the following steps:
step S10, when a data acquisition requirement sent by a data requester is received, extracting corresponding target data from a preset database according to the data acquisition requirement, generating a target data file, and judging whether the data volume of the target data file exceeds a preset threshold value or not;
in this embodiment, the existing data demander can acquire and report data according to the data demand required by the data demander, and a back-end user needs to accurately and quickly send the data demander after extracting the data corresponding to the data acquisition demand. However, in the prior art, due to the limitation policy of the capacity of an inbox and the size of an attachment by some mail systems, when a user sends a mail with a large attachment, the user is often rejected by a mail server of a receiving party, and the sending is failed. In order to solve the technical problem that the sending of the mail fails due to the existing attachment problem, the invention provides the method that the data file with large data volume is uploaded to the preset area, then the download link corresponding to the area address for storing the data file is sent to the data demand party through the mail, and the data demand party can automatically download the corresponding data file according to the download link, so that the data can be quickly and accurately transmitted. Specifically, when a data acquisition requirement sent by a data requester is received, corresponding target data is extracted from a preset database according to the data acquisition requirement, and then a corresponding target data file is generated. And acquiring the data volume of the target data file, and judging whether the data volume exceeds a preset threshold, such as 7M. When the data amount exceeds 7M, the limit threshold of the mail attachment is reached, and therefore, the target data file cannot be transmitted by the mail attachment.
Step S20, if the data volume of the target data file exceeds a preset threshold value, storing the target data file into a preset file storage area, and performing isolated storage on the target data file and other files in the preset file storage area;
in this embodiment, if the data volume of the target data file exceeds a preset threshold, that is, the target data file cannot be sent through a mail attachment, the target data file is uploaded to a preset file storage area. The preset file storage area can be a storage area used for storing files to be downloaded in the server, wherein different files to be downloaded correspond to different folders, different downloading authorities are set for the different folders, and therefore the files to be downloaded are stored in an isolated mode, and the safety of the files to be downloaded is guaranteed. In a specific embodiment, because different mailbox servers may have different limitations on the size of an attachment, and the same server may have different limitations on the size of an attachment for different users, a file size threshold that needs to be prompted needs to be obtained first. The size of the target data file may be obtained while the target data file is generated, and if a plurality of target data files are generated, the sum of the sizes of the target data files is obtained. In a specific embodiment, because the mail attachment is usually some video, audio, picture or document files stored in the system, the system stores the attributes of these files when storing these files, wherein the size of the file is used as a basic attribute of the file and is stored in the system, so that the size of the attachment can be conveniently known by reading the attributes of the file as the attachment.
Further, the step S20 specifically includes:
if the data volume of the target data file exceeds a preset threshold value, generating and displaying a reminding message which is too large in file data volume and cannot be sent through an email;
and storing the target data file into a preset file storage area, and storing the target data file and other files in the preset file storage area in an isolation manner.
In this embodiment, when it is determined that the data amount of the target data file exceeds the preset threshold, that is, it is determined that the target data file cannot be transmitted by the mail, in order to remind the user of the reason why the target data file cannot be transmitted by using the mail, a corresponding reminding message may be displayed, so that the user can know the reason why the target file is not transmitted by the mail. Specifically, it may be generated that the file data amount is too large and the reminding message cannot be displayed through the corresponding user terminal. And then uploading the target data file to a grid for storage. In a specific embodiment, when it is detected that the user adds an attachment to the email, before the user clicks the send button, the embodiment of the present invention may determine whether the sending may fail due to an oversized attachment, and if so, may prompt the user that the email cannot be sent. In this way, since the transmission has not been clicked yet, the user can find the problem in time without waiting until the transmission is clicked. Of course, if only the mail is prompted to be unable to be sent, the user may not know the reason of the unable to be sent, and only needs to search the reason by himself, which requires the user to spend some time of self-thinking and operation. Therefore, while the embodiment of the present invention prompts that the email cannot be sent, the embodiment of the present invention may also prompt the user that the reason why the email cannot be sent is that the attachment is too large, for example, the following prompts may be given: "the attachment is very big, the mail can't be sent normally" etc..
And step S30, generating a download link of the target data file according to the address of a storage area for storing the target data file, acquiring a preset mail template, adding the download link and the file identifier of the target data file to the preset mail template, generating a target mail, and sending the target mail to the data requester.
In this embodiment, a target data file is stored in the preset file storage area, then an area address where the target data file is stored is obtained, and a download link, i.e., a URL, corresponding to the target data file is downloaded is generated according to the area address. And adding the download link into the mail body according to the label attribute address carried in the preset mail template, and also adding guide information for guiding the user to retrieve the stored mail attachment into the mail body. And sending the mail text comprising the download link and the mail attachment identification to a corresponding mailbox. Specifically, the storage server system returns the downloaded URL of the mail attachment and the downloaded authorization code to the mail system; then, the mail server in the mail system sends the mail of the user and the URL and the authorization code downloaded from the mail attachment received from the storage server to the receiver of the mail.
Further, after the step S20, the method further includes:
if the data volume of the target data file is smaller than a preset threshold value, acquiring the file type of the target data file, and determining a mail template corresponding to the target data file according to the file type;
generating a mail attachment according to the target data file, adding the mail attachment and the file identification of the target data file to the preset mail template, generating a target mail, and sending the target mail to the data requester.
In this embodiment, a preset mail template corresponding to the file type of the target data file is obtained. Different mail templates can be set according to different service types, or different mail templates can be set according to departments corresponding to different data demand parties.
The embodiment provides a data transmission method, that is, when a data acquisition demand sent by a data requester is received, corresponding target data is extracted from a preset database according to the data acquisition demand, a target data file is generated, and whether the data volume of the target data file exceeds a preset threshold value is judged; if the data volume of the target data file exceeds a preset threshold value, storing the target data file into a preset file storage area, and storing the target data file and other files in the preset file storage area in an isolation manner; and generating a download link of the target data file according to the address of a storage area for storing the target data file, acquiring a preset mail template, adding the download link and the file identifier of the target data file to the preset mail template, generating a target mail, and sending the target mail to the data requester. Through the mode, the file with large data volume is uploaded to the storage area, the download link is generated according to the storage address, and then the download link is sent to the data demand party through the mail, so that the data demand party can directly and correspondingly download the target data file from the storage area according to the download link, the problem that the mail sending fails due to the large data volume of the mail attachment is solved, the success rate of data sending is improved, the user experience is improved, and the technical problem that the mail sending fails due to the existing attachment problem is solved.
Referring to fig. 3, fig. 3 is a flowchart illustrating a data transmission method according to a second embodiment of the present invention.
Based on the foregoing embodiment shown in fig. 2, in this embodiment, the step S20 includes:
step S21, if the data volume of the target data file exceeds a preset threshold value, acquiring a task management number in the data acquisition requirement, and creating a subfolder in a preset file storage area according to the task management number;
in this embodiment, when it is determined that the data size of the target data file exceeds a preset threshold, that is, the target data file cannot be sent through a mail attachment, the target data file needs to be uploaded to a preset file storage area, where the file storage area may be a server, and the server may be a mail server or another independent server specially storing the mail attachment. The mail attachments are stored through the independent file folder, so that a downloading user with corresponding attachment downloading authority can only correspondingly check and download the corresponding mail attachments, and the safety of the mail attachments is ensured. Specifically, when the size of the target data file is detected to exceed a preset threshold value, the target data file is uploaded to a server, and the server receives and stores the target data file; and the server generates a task management number in the data acquisition requirement, wherein the task management number is a unique task management number generated when the server receives a data acquisition reporting request sent by the data demander. Wherein, the receiving and saving the target data file by the server may include: the external server forwards the target data file to the internal server through an SMTP protocol; and saving the target data file to the corresponding area.
And S22, storing the target data into a subfolder in the preset file storage area, and setting access authority for the subfolder according to the task management number so as to store other target files in an isolated manner.
In this embodiment, in order to prevent the authorization code from being leaked when the authorization code is distributed, in this embodiment, the authority of the subfolder storing the target data file is set according to the unique task management number known by the data demander. For example, the task management number is used as an extraction code for extracting the target data file. In a specific embodiment, the subfolder storing the target data file may be named according to the task management number, so that the data demander can identify and download the data. In a specific embodiment, the target data can be stored separately, then a data link is generated in the storage area, the data link is fed back to the data requesting party, and the data requesting party can directly enter the corresponding storage area for viewing by clicking the link in the mail.
Referring to fig. 4, fig. 4 is a flowchart illustrating a data transmission method according to a third embodiment of the present invention.
Based on the embodiment shown in fig. 3, in this embodiment, the step S30 specifically includes:
step S31, when a download request triggered by a data extraction user based on the download link is detected, acquiring a file extraction code input by the data extraction user;
in this embodiment, after the download link is sent to the data demander by the email, the data demander may trigger a download request of the corresponding file according to the download link, and the server displays an input interface of the file extraction code when receiving the download request, so that the user can input the corresponding file extraction code.
Further, the step S31 specifically includes:
when a downloading request triggered by a data extraction user based on the downloading link is detected, judging whether a file to be downloaded corresponding to the file identification exists in a downloading address corresponding to the downloading link;
if the file to be downloaded exists in the download address, acquiring a file extraction code input by the data extraction user;
and if the file to be downloaded does not exist in the download address, generating and displaying a reminding message that the file does not exist.
In this embodiment, when the download request is received, it is determined in advance whether a corresponding file to be downloaded, that is, a target data file, exists in a download address corresponding to the download link, and if not, a user identity authentication is not required, and a notification message that the file does not exist is generated. In a specific embodiment, the file to be downloaded may be the target data file or another file stored in the download address. If the file exists, the file extraction code input by the user is obtained, and authority authentication is carried out on the user according to the file extraction code.
Step S32, judging whether the file extraction code is the same as the task management number corresponding to the target data file;
in this embodiment, the file extraction code input by the user based on the extraction code input interface is compared with the task management number corresponding to the target data file, and whether the file extraction code is the same as the task management number is determined.
And step S33, if the file extraction code is the same as the task management number, judging that the data extraction user has the downloading authority of the target data file, and sending the target data file in the subfolder to a terminal corresponding to the data extraction user, so that the data extraction user with the downloading authority can download the corresponding target data file based on the downloading link.
In this embodiment, if the file extraction code is the same as the task management number, it is determined that the data extraction user has the download permission, the corresponding subfolder can be found according to the website in the download link, the target data file in the subfolder is extracted, and finally the target data file is sent to the terminal corresponding to the data extraction user, so that the target data is transmitted. Therefore, the data extraction user with the downloading authority can download the corresponding target data file based on the downloading link.
Further, the step S30 specifically includes:
when a downloading request triggered by a data extraction user based on the downloading link is detected, authority user information of the target data file and current user information of the data extraction user are obtained;
judging whether the current user information is matched with the authority user information;
and if the current user information is matched with the authority user information, judging that the data extraction user is the authority user of the target data file, and sending the target data file in the subfolder to a terminal corresponding to the data extraction user, so that the data extraction user with the downloading authority can download the corresponding target data file based on the downloading link.
In this embodiment, if the data demander and the data extractor belong to the same system, that is, have account passwords of the same system, the download authorization may be further performed by using an account with file download permission. Specifically, when a downloading request is received, current user information of the data extraction user is acquired, and whether the data extraction user has the downloading authority of the target data file or not is judged according to the current user information. The current user information is compared with the authorized user information corresponding to the target data file, and whether authority user information is matched with the current user information is judged.
And if the target data file exists, the data extraction user passes the authority authentication of the target data file and sends the target data file in the subfolder to the terminal corresponding to the data extraction user, so that the data extraction user with the downloading authority can download the corresponding target data file based on the downloading link. And if the target data file does not exist, the data extraction user does not pass the authority authentication of the target data file.
In addition, the embodiment of the invention also provides a data sending device.
Referring to fig. 5, fig. 5 is a functional block diagram of a data transmitting apparatus according to a first embodiment of the present invention.
In this embodiment, the data transmission apparatus includes:
the data extraction module 10 is configured to, when receiving a data acquisition demand sent by a data requester, extract corresponding target data from a preset database according to the data acquisition demand, generate a target data file, and determine whether a data amount of the target data file exceeds a preset threshold;
the file storage module 20 is configured to store the target data file into a preset file storage area if the data amount of the target data file exceeds a preset threshold, and store the target data file and other files in the preset file storage area in an isolated manner;
the data sending module 30 is configured to generate a download link of the target data file according to the address of the storage area where the target data file is stored, acquire a preset mail template, add the download link and the file identifier of the target data file to the preset mail template, generate a target mail, and send the target mail to the data requester.
Further, the file storage module 20 specifically includes:
a sending failure reminding unit, configured to generate and display a reminding message that the file data volume is too large and cannot be sent by a mail if the data volume of the target data file exceeds a preset threshold;
and the file isolation storage module is used for storing the target data file to a preset file storage area and isolating and storing the target data file and other files in the preset file storage area.
Further, the data transmission apparatus further includes:
the mail template acquisition module is used for acquiring the file type of the target data file if the data volume of the target data file is smaller than a preset threshold value, and determining a mail template corresponding to the target data file according to the file type;
and the target mail sending module is used for generating a mail attachment according to the target data file, adding the mail attachment and the file identification of the target data file to the preset mail template, generating a target mail, and sending the target mail to the data requester.
Further, the file storage module 20 specifically includes:
a subfolder establishing unit, configured to, if the data size of the target data file exceeds a preset threshold, obtain a task management number in the data acquisition requirement, and establish a subfolder in the preset file storage area according to the task management number;
and the download authority setting unit is used for storing the target data into a subfolder in the preset file storage area, and setting access authority for the subfolder according to the task management number so as to store other target files in an isolated manner.
Further, the data sending module 30 specifically includes:
the extraction code acquisition unit is used for acquiring a file extraction code input by a data extraction user when a download request triggered by the data extraction user based on the download link is detected;
the authority judgment unit is used for judging whether the file extraction code is the same as the task management number corresponding to the target data file;
and the verification passing unit is used for judging that the data extraction user has the downloading authority of the target data file if the file extraction code is the same as the task management number, and sending the target data file in the subfolder to the terminal corresponding to the data extraction user so that the data extraction user with the downloading authority can download the corresponding target data file based on the downloading link.
Further, the extracted code obtaining unit is further configured to:
when a downloading request triggered by a data extraction user based on the downloading link is detected, judging whether a file to be downloaded corresponding to the file identification exists in a downloading address corresponding to the downloading link;
if the file to be downloaded exists in the download address, acquiring a file extraction code input by the data extraction user;
and if the file to be downloaded does not exist in the download address, generating and displaying a reminding message that the file does not exist.
Further, the data sending module 30 is further configured to:
when a downloading request triggered by a data extraction user based on the downloading link is detected, acquiring authority user information of the target data file and current user information of the data extraction user;
judging whether the current user information is matched with the authority user information;
and if the current user information is matched with the authority user information, judging that the data extraction user is the authority user of the target data file, and sending the target data file in the subfolder to a terminal corresponding to the data extraction user, so that the data extraction user with the downloading authority can download the corresponding target data file based on the downloading link.
Each module in the data sending apparatus corresponds to each step in the data sending method embodiment, and the functions and implementation processes thereof are not described in detail here.
In addition, the embodiment of the invention also provides a computer readable storage medium.
The computer-readable storage medium of the present invention stores thereon a data transmission program, wherein the data transmission program, when executed by a processor, implements the steps of the data transmission method as described above.
The method implemented when the data transmission program is executed may refer to each embodiment of the data transmission method of the present invention, and details are not described here.
It should be noted that, in this document, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or system 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 system. Without further limitation, an element defined by the phrases "comprising one of 8230; \8230;" 8230; "does not exclude the presence of additional like elements in a process, method, article, or system that comprises the element.
The above-mentioned serial numbers of the embodiments of the present invention are merely for description and do not represent the merits of the embodiments.
Through the description of the foregoing embodiments, it is clear to those skilled in the art that the method of the foregoing embodiments may be implemented by software plus a necessary general hardware platform, and certainly may also be implemented by hardware, but in many cases, the former is a better implementation. Based on such understanding, the technical solution of the present invention may be embodied in the form of a software product, which is stored in a storage medium (e.g., ROM/RAM, magnetic disk, optical disk) as described above and includes instructions for enabling a terminal device (e.g., a mobile phone, a computer, a server, an air conditioner, or a network device) to execute the method according to the embodiments of the present invention.
The above description is only a preferred embodiment of the present invention, and not intended to limit the scope of the present invention, and all modifications of equivalent structures and equivalent processes, which are made by using the contents of the present specification and the accompanying drawings, or directly or indirectly applied to other related technical fields, are included in the scope of the present invention.

Claims (7)

1. A data transmission method, characterized in that the data transmission method comprises the steps of:
when a data acquisition demand sent by a data requester is received, extracting corresponding target data from a preset database according to the data acquisition demand, generating a target data file, and judging whether the data volume of the target data file exceeds a preset threshold value or not;
if the data volume of the target data file is smaller than a preset threshold value, acquiring the file type of the target data file, determining a preset mail template corresponding to the target data file according to the file type, setting different mail templates according to different service types by the preset mail template, or setting different mail templates according to departments corresponding to different data demand parties;
generating a mail attachment according to the target data file, adding the mail attachment and the file identification of the target data file to the preset mail template, generating a target mail, and sending the target mail to the data requester;
if the data volume of the target data file exceeds a preset threshold value, acquiring a task management number in the data acquisition requirement, and establishing a subfolder in a preset file storage area according to the task management number;
storing the target data file into a subfolder in the preset file storage area, and setting access authority for the subfolder according to the task management number so as to store other target files in an isolated manner;
generating a download link of the target data file according to a storage area address for storing the target data file, acquiring a preset mail template, adding a label attribute address of the download link and a file identifier of the target data file to the preset mail template, generating a target mail, and sending the target mail to the data requester;
when a downloading request triggered by a data extraction user based on the downloading link is detected, acquiring authority user information of the target data file and current user information of the data extraction user;
judging whether the current user information is matched with the authority user information;
and if the current user information is matched with the authority user information, judging that the data extraction user is the authority user of the target data file, and sending the target data file in the subfolder to a terminal corresponding to the data extraction user, so that the data extraction user with the downloading authority can download the corresponding target data file based on the downloading link.
2. The data sending method according to claim 1, wherein after the steps of generating a download link of the target data file according to a storage area address where the target data file is stored, acquiring a preset mail template, adding the download link and a file identifier of the target data file to the preset mail template, generating a target mail, and sending the target mail to the data requester, the method further comprises:
when a download request triggered by a data extraction user based on the download link is detected, acquiring a file extraction code input by the data extraction user;
judging whether the file extraction code is the same as a task management number corresponding to the target data file;
and if the file extraction code is the same as the task management number, judging that the data extraction user has the downloading authority of the target data file, and sending the target data file in the subfolder to a terminal corresponding to the data extraction user, so that the data extraction user with the downloading authority can download the corresponding target data file based on the downloading link.
3. The data transmission method as claimed in claim 2, wherein the step of acquiring the file extraction code input by the data extraction user when detecting a download request triggered by the data extraction user based on the download link comprises:
when a downloading request triggered by a data extraction user based on the downloading link is detected, judging whether a file to be downloaded corresponding to the file identification exists in a downloading address corresponding to the downloading link;
if the file to be downloaded exists in the download address, acquiring a file extraction code input by the data extraction user;
and if the file to be downloaded does not exist in the download address, generating and displaying a reminding message that the file does not exist.
4. The data sending method according to claim 1, wherein the step of storing the target data file in a preset file storage area if the data amount of the target data file exceeds a preset threshold, and storing the target data file in isolation from other files in the preset file storage area specifically comprises:
if the data volume of the target data file exceeds a preset threshold value, a reminding message that the file data volume is too large and cannot be sent through a mail is generated and displayed;
and storing the target data file to a preset file storage area, and storing the target data file and other files in the preset file storage area in an isolation manner.
5. A data transmission apparatus, characterized in that the data transmission apparatus comprises:
the data extraction module is used for extracting corresponding target data from a preset database according to a data acquisition demand when the data acquisition demand sent by a data requester is received, generating a target data file, and judging whether the data volume of the target data file exceeds a preset threshold value or not;
a mail template obtaining module, configured to obtain a file type of the target data file if the data amount of the target data file is smaller than a preset threshold, and determine a preset mail template corresponding to the target data file according to the file type, where the preset mail template sets different mail templates according to different service types, or sets different mail templates according to departments corresponding to different data demand parties; generating a mail attachment according to the target data file, adding the mail attachment and the file identification of the target data file to the preset mail template, generating a target mail, and sending the target mail to the data requester;
the file storage module is used for acquiring a task management number in the data acquisition requirement if the data volume of the target data file exceeds a preset threshold value, and establishing a subfolder in a preset file storage area according to the task management number;
the file storage module is further configured to store the target data file into a subfolder in the preset file storage area, and set an access right to the subfolder according to the task management number, so as to store other target files in an isolated manner;
the data sending module is used for generating a download link of the target data file according to the address of a storage area for storing the target data file, acquiring a preset mail template, adding a label attribute address of the download link and a file identifier of the target data file to the preset mail template, generating a target mail, and sending the target mail to the data requester;
the data sending module is further configured to obtain authority user information of the target data file and current user information of the data extraction user when a download request triggered by the data extraction user based on the download link is detected; judging whether the current user information is matched with the authority user information; and if the current user information is matched with the authority user information, judging that the data extraction user is the authority user of the target data file, and sending the target data file in the subfolder to a terminal corresponding to the data extraction user, so that the data extraction user with the downloading authority can download the corresponding target data file based on the downloading link.
6. A data transmission apparatus, characterized in that the data transmission apparatus comprises a processor, a memory, and a data transmission program stored on the memory and executable by the processor, wherein the data transmission program, when executed by the processor, implements the steps of the data transmission method according to any one of claims 1 to 4.
7. A computer-readable storage medium, characterized in that a data transmission program is stored thereon, wherein the data transmission program, when executed by a processor, implements the steps of the data transmission method according to any one of claims 1 to 4.
CN201910753894.4A 2019-08-15 2019-08-15 Data transmission method, device, equipment and computer readable storage medium Active CN110519154B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910753894.4A CN110519154B (en) 2019-08-15 2019-08-15 Data transmission method, device, equipment and computer readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910753894.4A CN110519154B (en) 2019-08-15 2019-08-15 Data transmission method, device, equipment and computer readable storage medium

Publications (2)

Publication Number Publication Date
CN110519154A CN110519154A (en) 2019-11-29
CN110519154B true CN110519154B (en) 2022-11-15

Family

ID=68625216

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910753894.4A Active CN110519154B (en) 2019-08-15 2019-08-15 Data transmission method, device, equipment and computer readable storage medium

Country Status (1)

Country Link
CN (1) CN110519154B (en)

Families Citing this family (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111506551B (en) * 2020-04-02 2024-04-02 深圳创维数字技术有限公司 Conference file extraction method, system and computer equipment
CN111970236B (en) * 2020-07-08 2023-02-03 招联消费金融有限公司 Cross-network data transmission method and device
CN112199249A (en) * 2020-09-16 2021-01-08 中国建设银行股份有限公司 Monitoring data processing method, device, equipment and medium
CN112420217B (en) * 2020-11-30 2023-07-28 腾讯科技(深圳)有限公司 Message pushing method, device, equipment and storage medium
CN112561715A (en) * 2020-12-22 2021-03-26 海腾保险代理有限公司 Electronic policy management method, electronic policy management device, electronic device and storage medium

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102394839A (en) * 2011-11-17 2012-03-28 中兴通讯股份有限公司 Downloading method of email attachment and email system
CN105827512A (en) * 2016-04-29 2016-08-03 电子科技大学 E-mail communication method through SMCLOUD
CN106445889A (en) * 2015-08-07 2017-02-22 北京国双科技有限公司 Report mail generation method and apparatus
CN107241364A (en) * 2017-08-10 2017-10-10 广州杰之良软件有限公司 Document down loading method and device
CN108259553A (en) * 2017-10-09 2018-07-06 平安科技(深圳)有限公司 The sending method and terminal device of business mail

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102394839A (en) * 2011-11-17 2012-03-28 中兴通讯股份有限公司 Downloading method of email attachment and email system
CN106445889A (en) * 2015-08-07 2017-02-22 北京国双科技有限公司 Report mail generation method and apparatus
CN105827512A (en) * 2016-04-29 2016-08-03 电子科技大学 E-mail communication method through SMCLOUD
CN107241364A (en) * 2017-08-10 2017-10-10 广州杰之良软件有限公司 Document down loading method and device
CN108259553A (en) * 2017-10-09 2018-07-06 平安科技(深圳)有限公司 The sending method and terminal device of business mail

Also Published As

Publication number Publication date
CN110519154A (en) 2019-11-29

Similar Documents

Publication Publication Date Title
CN110519154B (en) Data transmission method, device, equipment and computer readable storage medium
US10063547B2 (en) Authorization authentication method and apparatus
US20170163628A1 (en) User login methods, devices, and systems
US10193844B1 (en) Secure cloud-based messaging and storage
EP3402136B1 (en) Information interaction method, client and device
GB2507592A (en) Remote storage and retrieval of messages
MX2014010229A (en) Systems and methods for sharing data among multiple end user devices.
CN104852926B (en) Account registration login method and device
CN108390818B (en) Method, device, equipment and storage medium for interaction of instant messaging and mails
JP2006101474A (en) Mail reception method, mail-receiving device and mail server
CN107438054B (en) Method and system for realizing menu information control based on public platform
CN104935500B (en) Friend recommendation method and device based on network call
CN108364171B (en) Graphic code generation method, resource sending and receiving method, device and electronic equipment
US10044735B2 (en) System and method for authentication of electronic communications
US8473556B2 (en) Apparatus, a method, a program and a system for processing an e-mail
WO2011081755A2 (en) Electronic mail server and method for automatically generating address lists
CN106453582B (en) Asynchronous message pushing method and system
CN109525588B (en) Verification code processing method, device and system
CN113946739A (en) Sensitive data query method, device, equipment and storage medium
US20160156728A1 (en) Method and apparatus for accessing ott application and pushing message by server
US20160044028A1 (en) Message authentication
US9742776B2 (en) Contact identification validation via social invitation
CN107566422A (en) A kind of verification method of third party user
CN105490988B (en) Method, device and system for improving data transmission security
KR101600864B1 (en) A selective receiving method of e-mail

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