CN109002424B - File format conversion method and device, computer equipment and storage medium - Google Patents
File format conversion method and device, computer equipment and storage medium Download PDFInfo
- Publication number
- CN109002424B CN109002424B CN201810613992.3A CN201810613992A CN109002424B CN 109002424 B CN109002424 B CN 109002424B CN 201810613992 A CN201810613992 A CN 201810613992A CN 109002424 B CN109002424 B CN 109002424B
- Authority
- CN
- China
- Prior art keywords
- format
- target
- attachment file
- attachment
- 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
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F40/00—Handling natural language data
- G06F40/10—Text processing
- G06F40/12—Use of codes for handling textual entities
- G06F40/151—Transformation
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L51/00—User-to-user messaging in packet-switching networks, transmitted according to store-and-forward or real-time protocols, e.g. e-mail
- H04L51/06—Message adaptation to terminal or network requirements
- H04L51/066—Format adaptation, e.g. format conversion or compression
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Audiology, Speech & Language Pathology (AREA)
- Health & Medical Sciences (AREA)
- Computational Linguistics (AREA)
- General Health & Medical Sciences (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Artificial Intelligence (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Information Transfer Between Computers (AREA)
Abstract
The embodiment of the invention discloses a file format conversion method, a file format conversion device, computer equipment and a readable storage medium, wherein the method comprises the following steps: if a mail sending request is received, determining corresponding mail transmission parameters according to the mail sending request, wherein the mail transmission parameters comprise the initial format of an attachment file; determining the target format of the attachment file according to the access record in the target database; judging whether the initial format of the attachment file is the same as the target format or not; if the initial format of the attachment file is different from the target format, converting the attachment file from the initial format to the target format to obtain a target attachment; and sending the target attachment as a mail attachment. The invention can not only improve the working efficiency of mail transmission, but also improve the use experience of users.
Description
Technical Field
The present invention relates to the field of computer technologies, and in particular, to a file format conversion method and apparatus, a computer device, and a computer-readable storage medium.
Background
At present, the process and manner of file format conversion in the industry are complex, for example, when a Word document is converted into a PDF document, the Word document is downloaded and opened and then stored as a PDF document, or special format conversion software is installed, that is, the Word document is imported and then converted into the PDF document. The first method requires manual conversion, which is time-consuming, and the second method cannot realize downloading and installation of format conversion software even when some terminals do not have software installation rights, let alone perform format conversion. Moreover, the current format conversion schemes cannot realize intelligent customization, and particularly, in the mail transmission process, the format of the mail attachment cannot be selected and correspondingly converted according to the requirements of the user, so that great inconvenience is brought to the user.
Disclosure of Invention
Embodiments of the present invention provide a file format conversion method, an apparatus, a computer device, and a computer-readable storage medium, which can effectively perform corresponding file format conversion according to user requirements, and improve work efficiency and user experience of a user.
In one aspect, an embodiment of the present invention provides a file format conversion method, where the method includes:
if a mail sending request is received, determining corresponding mail transmission parameters according to the mail sending request, wherein the mail transmission parameters comprise the initial format of an attachment file;
determining a target format of the attachment file according to an access record in a target database, wherein data in the target database is used for describing a corresponding relation between the attachment file and the target format;
judging whether the initial format of the attachment file is the same as the target format or not;
if the initial format of the attachment file is different from the target format, converting the attachment file from the initial format to the target format to obtain a target attachment;
and sending the target attachment as a mail attachment.
On the other hand, an embodiment of the present invention further provides a file format conversion apparatus, where the apparatus includes:
a parameter determining unit, configured to determine, if a mail sending request is received, a corresponding mail delivery parameter according to the mail sending request, where the mail delivery parameter includes an initial format of an attachment file;
the format determining unit is used for determining the target format of the attachment file according to the access record in a target database, and the data in the target database is used for describing the corresponding relationship between the attachment file and the target format;
the format judging unit is used for judging whether the initial format of the attachment file is the same as the target format or not;
the conversion unit is used for converting the attachment file from the initial format to the target format to obtain a target attachment if the initial format of the attachment file is different from the target format;
and the sending unit is used for sending the target attachment as a mail attachment.
In another aspect, an embodiment of the present invention further provides a computer device, including:
a memory for storing a program for implementing file format conversion; and
and the processor is used for operating the program for realizing the file format conversion stored in the memory so as to execute the method.
In yet another aspect, the present invention provides a computer-readable storage medium, where one or more programs are stored, and the one or more programs are executable by one or more processors to implement the method described above.
By implementing the embodiment of the invention, the corresponding conversion can be effectively carried out according to the requirements of the user, the format conversion efficiency and the use experience degree of the attachment file are improved, namely, the format type expected by the receiver is determined by analyzing the opening format when the receiver checks the historical attachment file, so that the format of the attachment file in the mail is converted into the format type expected by the receiver, the working efficiency is improved, and the receiver can conveniently receive the attachment file with the expected format type.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings needed to be used in the description of the embodiments are briefly introduced below, and it is obvious that the drawings in the following description are some embodiments of the present invention, and it is obvious for those skilled in the art to obtain other drawings based on these drawings without creative efforts.
FIG. 1 is a schematic flow chart of a file format conversion method according to an embodiment of the present invention;
FIG. 2 is a diagram illustrating a scenario of a file format conversion method according to an embodiment of the present invention;
FIG. 3 is another schematic flow chart of a file format conversion method according to an embodiment of the present invention;
FIG. 4 is another schematic flow chart of a file format conversion method according to an embodiment of the present invention;
FIG. 5 is a schematic flow chart diagram of a file format conversion method according to another embodiment of the present invention;
fig. 6 is a schematic block diagram of a file format conversion device according to an embodiment of the present invention;
fig. 7 is another schematic block diagram of a file format conversion apparatus according to an embodiment of the present invention;
fig. 8 is another schematic block diagram of a file format conversion apparatus according to an embodiment of the present invention;
fig. 9 is a schematic block diagram of a file format conversion apparatus according to another embodiment of the present invention;
fig. 10 is a schematic structural diagram of a computer device according to an embodiment of 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 some, not all, embodiments of the present invention. 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.
It will be understood that the terms "comprises" and/or "comprising," when used in this specification and this embodiment, specify the presence of stated features, integers, steps, operations, elements, and/or components, but do not preclude the presence or addition of one or more other features, integers, steps, operations, elements, components, and/or groups thereof.
It is also to be understood that the terminology used in the description of the invention herein is for the purpose of describing particular embodiments only and is not intended to be limiting of the invention. As used in the specification and this embodiment of the invention, the singular forms "a", "an" and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise.
Referring to fig. 1 and fig. 2, fig. 1 is a schematic flow chart of a file format conversion method according to an embodiment of the present invention. Fig. 2 is a schematic view of a usage scenario of the file format conversion method in the embodiment of the present invention. The file format conversion method is applied to a mail server, and the mail server can analyze the historical data of the format types of the existing attached files opened by a receiver, so that the formats of the attached files expected to be received by the receiver are converted, corresponding conversion can be effectively carried out according to the requirements of users, and the format conversion efficiency and the use experience degree of the attached files are improved. As shown in fig. 1, the steps of the method include steps S101 to S105.
S101, if a mail sending request is received, determining corresponding mail transmission parameters according to the mail sending request, wherein the mail transmission parameters comprise the initial format of an attachment file.
In this embodiment, if the mail server receives a mail sending request, that is, during the sending process of the mail, and the mail has not yet reached the mailbox of the recipient, the mail delivery parameter corresponding to the mail being sent may be obtained. The mail delivery parameters may include the user name of the recipient and the initial format of the attached file included in the mail, i.e. the initial format type of the attached file, and the attached file in the mail is generally associated with the user name of the recipient. The user name of the receiver can be the mailbox address of the receiver or other names of the receiver.
Further, as shown in fig. 3, the step S101 includes steps S201 to S203.
S201, if a mail sending request is received, determining a user name of a receiver and mail content associated with the user name according to the mail sending request.
In this embodiment, if the mail server receives the mail transmission request, it indicates that the sender has submitted the mail transmission request at this time to transmit the mail content designated by the sender. The mail content is correspondingly associated with the user name of the recipient, and in general, the mail content may include a mail body or an attachment file uploaded by the sender.
S202, judging whether the mail content comprises an attachment file.
In this embodiment, the mail server is required to determine whether the mail content includes an attachment file, and if the mail content does not include the attachment file, the mail server may receive the mail sending request again to perform the determination, and simultaneously, correspondingly transmit the current mail to the recipient.
S203, if the mail content comprises the attachment file, acquiring the attribute information of the attachment file to determine the initial format of the attachment file.
In this embodiment, if the mail server determines that the mail content includes an attachment file, the initial format of the attachment file may be determined according to the attribute information of the attachment file. For example, when the attachment file is in a Word format, the initial format can be determined to be in the Word format according to the attribute information of the attachment file.
S102, determining the target format of the attachment file according to the access record in the target database, wherein the data in the target database is used for describing the corresponding relation between the attachment file and the target format.
In this embodiment, the target database may include several pre-stored access records, and each access record may include a user name of the visitor, a format type of the accessed attachment file, and a corresponding access time. When a receiver is taken as an accessor, and each time the existing attached file associated with the receiver is accessed and opened, the user name of the accessor, the format type of the accessed attached file and the accessed time corresponding to the accessed attached file are taken as an access record to be stored in a target database, so that a mail server can analyze the format type with the most accessed times, the format type with the most accessed times is the target format of the attached file, and the attached file is the attached file associated with the user name of the receiver.
Further, as shown in fig. 4, the step S102 includes steps S301 to S304.
S301, obtaining an access record corresponding to the user name of the visitor, which is the same as the user name of the recipient, from a target database as a first data set, wherein data in the target database is used for describing the corresponding relationship between the attachment file and the target format.
In this embodiment, the target database includes a plurality of access records, each access record includes a username of an accessor, and according to the username of the accessor, the mail server may screen out an accessor username that is the same as the username of a recipient, so as to correspondingly determine the access record corresponding to the accessor username, and in order to determine the format type of an accessed attachment file associated with the same username, it is necessary to count all the determined access records and use the counted access records as the first data set.
S302, obtaining an access record with the access time within a preset time range from the first data set as a second data set.
In this embodiment, in order to more accurately determine the expected format type of the attached file received by the recipient, the mail server may select, as the second data set, an access record whose access time is within a preset time range, so as to avoid that the access record with too long time interval affects the determination of the expected format type of the recipient.
S303, counting the format types of the attachment files corresponding to the access records in the second data set to determine the format type with the maximum number of the access records.
In this embodiment, the access records in the second data set are access records of the recipient within a preset time range, and at this time, the mail server may count all format types of the accessed attachment files opened by the visitor with the same user name as the user name of the recipient, and determine the format type with the largest number of access records of the recipient.
S304, the determined format type is used as the target format of the attachment file.
In this embodiment, the determined format type is the format type with the largest number of accesses by the recipient within the preset time range, so the mail server may determine that the format type is the format type expected by the recipient, and needs to use the format as the target format of the attachment file included in the sent mail.
As an optional embodiment, before the step S304, the method may further include:
s304a, determining whether the number of access records corresponding to the determined format type is greater than a preset threshold.
In this embodiment, in order to improve the accuracy of predicting the expected attachment type of the recipient, the mail server may further determine the number of access records corresponding to the determined format type.
If the number of access records corresponding to the determined format type is greater than the preset threshold, step S304 is executed, that is, the determined format type is used as the target format of the attachment file.
For example, the same recipient accesses the attachment file in the existing email 20 times within a week, wherein the access to the attachment file in the Word format is 10 times, the access to the attachment file in the PDF format is 7 times, and the access to the file in the DWG format is 3 times, and in addition, if the preset threshold value at this time is 11 times, the format of the attachment file desired by the user cannot be determined, and the format of the attachment file in the email to be sent is kept unchanged at this time; if the preset threshold value at this time is 9 times, the Word format at this time is the format of the attachment file expected by the recipient, that is, the Word format is determined as the target format of the attachment file associated with the user name of the recipient.
As a further optional step, the step S102 further includes:
step S305, if the number of access records corresponding to the determined format type is not greater than the preset threshold, taking the initial format of the attachment file as the target format.
In this embodiment, if the number of access records corresponding to the determined format type is not greater than the preset threshold, it indicates that the determined format type is not the attachment type expected by the recipient, and at this time, the mail server does not convert the format type of the attachment file, that is, keeps the initial format of the attachment file unchanged, and takes the initial format as the target format of the attachment file.
S103, judging whether the initial format of the attachment file is the same as the target format.
In this embodiment, the mail server needs to determine whether the initial format of the attachment file included in the mail being sent is the same as the target format, and at this time, it may determine whether the initial format of the attachment file is the format expected by the recipient. If the attachment file is identical, the original format of the attachment file does not need to be converted, and the sent mail can be made to complete the entire sending.
S104, if the initial format of the attachment file is different from the target format, converting the attachment file from the initial format to the target format to obtain the target attachment.
In this embodiment, if the initial format of the attachment file is different from the target format, it indicates that the format type of the attachment file at this time is not the format type expected by the recipient, and the mail server is required to convert the format type of the attachment file from the initial format to the target format, so as to obtain the finally required target attachment.
And S105, sending the target attachment as a mail attachment.
In this embodiment, after the format of the attachment file is converted, the target attachment can be obtained, and the target attachment is sent as an attachment in the mail, where the format of the attachment file in the mail received by the recipient is the target format, that is, the format type expected by the recipient.
In summary, the embodiment can not only improve the work efficiency of mail transmission, but also improve the use experience of the user, that is, the format type expected by the recipient is determined by analyzing the opening format when the recipient views the historical attachment file, so that the format of the attachment file in the mail is converted into the format type expected by the recipient, and not only is the work efficiency improved, but also the recipient can conveniently receive the attachment file of the expected format type.
Referring to fig. 5, fig. 5 is a schematic flowchart of a file format conversion method according to another embodiment of the present invention. The method can be operated in terminals such as smart phones (such as Android phones, IOS phones and the like), tablet computers, notebook computers, smart devices and the like. As shown in fig. 5, the steps of the method include S401 a-S405.
S401a, if it is detected that the existing attachment file is accessed, storing the access record of the accessed attachment file in a target database, wherein the access record comprises the user name of the visitor, the current format of the accessed attachment file and the corresponding accessed time.
In this embodiment, generally, the recipient can access the existing attached file associated under the user name of the recipient, and in order to complete the target database, it is necessary for the mail server to store the access record of the accessed attached file in the target database when receiving the request of the recipient to access the existing attached file, that is, the target database can be updated in time, so that the desired format type of the recipient can be analyzed more accurately.
S401, if a mail sending request is received, determining corresponding mail transmission parameters according to the mail sending request, wherein the mail transmission parameters comprise the initial format of an attachment file.
S402, determining the target format of the attachment file according to the access record in the target database, wherein the data in the target database is used for describing the corresponding relation between the attachment file and the target format.
S403, judging whether the initial format of the attachment file is the same as the target format.
S404, if the initial format of the attachment file is different from the target format, converting the attachment file from the initial format to the target format to obtain the target attachment.
S405, the target attachment is sent as a mail attachment.
It will be understood by those skilled in the art that all or part of the processes of the methods of the embodiments described above can be implemented by a computer program, which can be stored in a computer-readable storage medium, and when executed, can include the processes of the embodiments of the methods described above. The storage medium may be a magnetic disk, an optical disk, a Read-Only Memory (ROM), or the like.
Referring to fig. 6, in response to the above-mentioned file format conversion method, an embodiment of the present invention further provides a file format conversion apparatus, where the apparatus 100 includes: parameter determination unit 101, format determination unit 102, format judgment unit 103, conversion unit 104, and transmission unit 105.
The parameter determining unit 101 is configured to determine, if a mail sending request is received, a corresponding mail delivery parameter according to the mail sending request, where the mail delivery parameter includes an initial format of an attachment file.
In this embodiment, if the mail server receives a mail sending request, that is, during the sending process of the mail, and the mail has not yet reached the mailbox of the recipient, the mail delivery parameter corresponding to the mail being sent may be obtained. The mail delivery parameters may include the user name of the recipient and the initial format of the attached file included in the mail, i.e. the initial format type of the attached file, and the attached file in the mail is generally associated with the user name of the recipient. The user name of the receiver can be the mailbox address of the receiver or other names of the receiver.
Further, as shown in fig. 7, the parameter determination unit 101 includes: a first determination unit 201, a first judgment unit 202, and a format acquisition unit 203.
The first determining unit 201 is configured to determine, if a mail sending request is received, a user name of a recipient and mail content associated with the user name according to the mail sending request.
In this embodiment, if the mail server receives the mail transmission request, it indicates that the sender has submitted the mail transmission request at this time to transmit the mail content designated by the sender. The mail content is correspondingly associated with the user name of the recipient, and in general, the mail content may include a mail body or an attachment file uploaded by the sender.
The first judging unit 202 is configured to judge whether the mail content includes an attachment file.
In this embodiment, the mail server is required to determine whether the mail content includes an attachment file, and if the mail content does not include the attachment file, the mail server may receive the mail sending request again to perform the determination, and simultaneously, correspondingly transmit the current mail to the recipient.
The format obtaining unit 203 is configured to, if the mail content includes an attachment file, obtain attribute information of the attachment file to determine an initial format of the attachment file.
In this embodiment, if the mail server determines that the mail content includes an attachment file, the initial format of the attachment file may be determined according to the attribute information of the attachment file. For example, when the attachment file is in a Word format, the initial format can be determined to be in the Word format according to the attribute information of the attachment file.
The format determining unit 102 is configured to determine a target format of the attachment file according to an access record in a target database, where data in the target database is used to describe a corresponding relationship between the attachment file and the target format.
In this embodiment, the target database may include several pre-stored access records, and each access record may include a user name of the visitor, a format type of the accessed attachment file, and a corresponding access time. When a receiver is taken as an accessor, and each time the existing attached file associated with the receiver is accessed and opened, the user name of the accessor, the format type of the accessed attached file and the accessed time corresponding to the accessed attached file are taken as an access record to be stored in a target database, so that a mail server can analyze the format type with the most accessed times, the format type with the most accessed times is the target format of the attached file, and the attached file is the attached file associated with the user name of the receiver.
Further, as shown in fig. 8, the format determining unit 102 includes: a first collection unit 301, a second collection unit 302, a statistics unit 303, and a second determination unit 304.
The first collecting unit 301 is configured to obtain, as a first data set, an access record corresponding to a username of a visitor that is the same as the username of the recipient from a target database, where data in the target database is used to describe a correspondence between the attachment file and the target format.
In this embodiment, the target database includes a plurality of access records, each access record includes a username of an accessor, and according to the username of the accessor, the mail server may screen out an accessor username that is the same as the username of a recipient, so as to correspondingly determine the access record corresponding to the accessor username, and in order to determine the format type of an accessed attachment file associated with the same username, it is necessary to count all the determined access records and use the counted access records as the first data set.
The second collecting unit 302 is configured to obtain, from the first data set, an access record with an access time within a preset time range as a second data set.
In this embodiment, in order to more accurately determine the expected format type of the attached file received by the recipient, the mail server may select, as the second data set, an access record whose access time is within a preset time range, so as to avoid that the access record with too long time interval affects the determination of the expected format type of the recipient.
The counting unit 303 is configured to count format types of the attachment files corresponding to the access records in the second data set to determine a format type with the largest number of access records.
In this embodiment, the access records in the second data set are access records of the recipient within a preset time range, and at this time, the mail server may count all format types of the accessed attachment files opened by the visitor with the same user name as the user name of the recipient, and determine the format type with the largest number of access records of the recipient.
The second determining unit 304 is configured to use the determined format type as a target format of the attachment file.
In this embodiment, the determined format type is the format type with the largest number of accesses by the recipient within the preset time range, so the mail server may determine that the format type is the format type expected by the recipient, and needs to use the format as the target format of the attachment file included in the sent mail.
As an optional embodiment, the second determining unit 304 may further include:
the second judging unit 304a is configured to judge whether the number of access records corresponding to the determined format type is greater than a preset threshold.
In this embodiment, in order to improve the accuracy of predicting the expected attachment type of the recipient, the mail server may further determine the number of access records corresponding to the determined format type.
The second determining unit 304 is further configured to, if the number of access records corresponding to the determined format type is greater than a preset threshold, use the determined format type as the target format of the attachment file.
For example, the same recipient accesses the attachment file in the existing email 20 times within a week, wherein the access to the attachment file in the Word format is 10 times, the access to the attachment file in the PDF format is 7 times, and the access to the file in the DWG format is 3 times, and in addition, if the preset threshold value at this time is 11 times, the format of the attachment file desired by the user cannot be determined, and the format of the attachment file in the email to be sent is kept unchanged at this time; if the preset threshold value at this time is 9 times, the Word format at this time is the format of the attachment file expected by the recipient, that is, the Word format is determined as the target format of the attachment file associated with the user name of the recipient.
As a further optional option, the format determining unit 102 further includes:
a first adjusting unit 305, configured to take the initial format of the attachment file as a target format if the number of access records corresponding to the determined format type is not greater than a preset threshold.
In this embodiment, if the number of access records corresponding to the determined format type is not greater than the preset threshold, it indicates that the determined format type is not the attachment type expected by the recipient, and at this time, the mail server does not convert the format type of the attachment file, that is, keeps the initial format of the attachment file unchanged, and takes the initial format as the target format of the attachment file.
The format determining unit 103 is configured to determine whether the initial format of the attachment file is the same as the target format.
In this embodiment, the mail server needs to determine whether the initial format of the attachment file included in the mail being sent is the same as the target format, and at this time, it may determine whether the initial format of the attachment file is the format expected by the recipient. If the attachment file is identical, the original format of the attachment file does not need to be converted, and the sent mail can be made to complete the entire sending.
The converting unit 104 is configured to convert the attachment file from the initial format to the target format to obtain the target attachment if the initial format of the attachment file is different from the target format.
In this embodiment, if the initial format of the attachment file is different from the target format, it indicates that the format type of the attachment file at this time is not the format type expected by the recipient, and the mail server is required to convert the format type of the attachment file from the initial format to the target format, so as to obtain the finally required target attachment.
A sending unit 105, configured to send the target attachment as a mail attachment.
In this embodiment, after the format of the attachment file is converted, the target attachment can be obtained, and the target attachment is sent as an attachment in the mail, where the format of the attachment file in the mail received by the recipient is the target format, that is, the format type expected by the recipient.
In summary, the embodiment can not only improve the work efficiency of mail transmission, but also improve the use experience of the user, that is, the format type expected by the recipient is determined by analyzing the opening format when the recipient views the historical attachment file, so that the format of the attachment file in the mail is converted into the format type expected by the recipient, and not only is the work efficiency improved, but also the recipient can conveniently receive the attachment file of the expected format type.
Referring to fig. 9, in response to the above-mentioned file format conversion method, another embodiment of the present invention further provides a file format conversion apparatus, where the apparatus 400 may include: a storage unit 401a, a parameter determination unit 401, a format determination unit 402, a format judgment unit 403, a conversion unit 404, and a transmission unit 405.
The storage unit 401a is configured to, if it is detected that an existing attachment file is accessed, store an access record of the accessed attachment file in a target database, where the access record includes a user name of an accessor, a current format of the accessed attachment file, and a corresponding access time.
In this embodiment, generally, the recipient can access the existing attached file associated under the user name of the recipient, and in order to complete the target database, it is necessary for the mail server to store the access record of the accessed attached file in the target database when receiving the request of the recipient to access the existing attached file, that is, the target database can be updated in time, so that the desired format type of the recipient can be analyzed more accurately.
The parameter determining unit 401 is configured to determine, if a mail sending request is received, a corresponding mail delivery parameter according to the mail sending request, where the mail delivery parameter includes an initial format of an attachment file.
The format determining unit 402 is configured to determine a target format of the attachment file according to an access record in a target database, where data in the target database is used to describe a corresponding relationship between the attachment file and the target format.
The format determining unit 403 is configured to determine whether the initial format of the attachment file is the same as the target format.
The converting unit 404 is configured to convert the attachment file from the initial format to the target format to obtain the target attachment if the initial format of the attachment file is different from the target format.
The sending unit 405 sends the target attachment as a mail attachment.
As can be seen from the above, in terms of hardware implementation, the above parameter determining unit 101, format determining unit 102, format judging unit 103, converting unit 104, sending unit 105, and the like may be embedded in a hardware form or may be independent of a device for converting a file format, and may also be stored in a software form in a memory of the file format converting device, so that the processor calls to execute operations corresponding to the above units. The processor can be a Central Processing Unit (CPU), a microprocessor, a singlechip and the like.
The above-described file format conversion apparatus may be implemented in the form of a computer program that can be run on a computer device as shown in fig. 10.
FIG. 10 is a schematic diagram of a computer device according to the present invention. The device may be a server, for example a server that implements file format conversion. The server may be an independent server or a server cluster composed of a plurality of servers. Referring to fig. 10, the computer apparatus 500 includes a processor 502, a nonvolatile storage medium 503, an internal memory 504, and a network interface 505, which are connected by a system bus 501. The non-volatile storage medium 503 of the computer device 500 may store an operating system 5031 and a computer program 5032, which when executed causes the processor 502 to perform a file format conversion method, the computer program 5032. The processor 502 of the computer device 500 is used to provide computing and control capabilities that support the overall operation of the computer device 500. The internal memory 504 provides an environment for running a computer program in a non-volatile storage medium, which when executed by the processor, causes the processor 502 to perform a file format conversion method. The network interface 505 of the computer device 500 is used for network communication such as sending assigned tasks and the like. Those skilled in the art will appreciate that the architecture shown in fig. 10 is merely a block diagram of some of the structures associated with the disclosed aspects and is not intended to limit the computing devices to which the disclosed aspects apply, as particular computing devices may include more or less components than those shown, or may combine certain components, or have a different arrangement of components.
Wherein the processor 502 performs the following operations: if a mail sending request is received, determining corresponding mail transmission parameters according to the mail sending request, wherein the mail transmission parameters comprise the initial format of an attachment file; determining a target format of the attachment file according to an access record in a target database, wherein data in the target database is used for describing a corresponding relation between the attachment file and the target format; judging whether the initial format of the attachment file is the same as the target format or not; if the initial format of the attachment file is different from the target format, converting the attachment file from the initial format to the target format to obtain a target attachment; and sending the target attachment as a mail attachment.
The processor 502 also performs the following operations: and if the existing attachment file is detected to be accessed, storing an access record of the accessed attachment file in a target database, wherein the access record comprises the user name of the visitor, the current format of the accessed attachment file and the corresponding accessed time.
The processor 502 executes the following operations, if receiving the mail sending request, to determine the corresponding mail delivery parameter according to the mail sending request: if a mail sending request is received, determining a user name of a receiver and mail content associated with the user name according to the mail sending request; judging whether the mail content comprises an attachment file or not; and if the mail content comprises the attachment file, acquiring the attribute information of the attachment file to determine the initial format of the attachment file.
The processor 502 executes the determining of the target format of the attachment file according to the access record in the target database, specifically executing the following operations: taking an access record corresponding to the user name of the visitor, which is acquired from a target database and is the same as the user name of the receiver, as a first data set; taking the access record of which the accessed time is within a preset time range and acquired from the first data set as a second data set; counting format types of the attachment files corresponding to the access records in the second data set to determine the format type with the maximum number of the access records; and taking the determined format type as the target format of the attachment file.
The processor 502 determines the target format of the attachment file according to the access record in the target database, and specifically performs the following operations: judging whether the number of the access records corresponding to the determined format type is greater than a preset threshold value or not; and if the number of the access records corresponding to the determined format type is larger than a preset threshold value, taking the determined format type as the target format of the attachment file.
The processor 502 also performs the following operations: and if the number of the access records corresponding to the determined format type is not larger than a preset threshold value, taking the initial format of the attachment file as a target format.
Those skilled in the art will appreciate that the embodiment of a computer device illustrated in fig. 10 does not constitute a limitation on the specific construction of the computer device, and that in other embodiments a computer device may include more or fewer components than those illustrated, or some components may be combined, or a different arrangement of components. For example, in some embodiments, the computer device may only include a memory and a processor, and in such embodiments, the structures and functions of the memory and the processor are consistent with those of the embodiment shown in fig. 10, and are not described herein again.
The present invention provides a computer readable storage medium storing one or more programs, the one or more programs being executable by one or more processors to perform the steps of: if a mail sending request is received, determining corresponding mail transmission parameters according to the mail sending request, wherein the mail transmission parameters comprise the initial format of an attachment file; determining a target format of the attachment file according to an access record in a target database, wherein data in the target database is used for describing a corresponding relation between the attachment file and the target format; judging whether the initial format of the attachment file is the same as the target format or not; if the initial format of the attachment file is different from the target format, converting the attachment file from the initial format to the target format to obtain a target attachment; and sending the target attachment as a mail attachment.
The processor further implements the steps of: and if the existing attachment file is detected to be accessed, storing an access record of the accessed attachment file in a target database, wherein the access record comprises the user name of the visitor, the current format of the accessed attachment file and the corresponding accessed time.
The processor determines corresponding mail transmission parameters according to the mail sending request if the mail sending request is received, and specifically realizes the following steps: if a mail sending request is received, determining a user name of a receiver and mail content associated with the user name according to the mail sending request; judging whether the mail content comprises an attachment file or not; and if the mail content comprises the attachment file, acquiring the attribute information of the attachment file to determine the initial format of the attachment file.
The processor determines the target format of the attachment file according to the access record in the target database, and specifically comprises the following steps: taking an access record corresponding to the user name of the visitor, which is acquired from a target database and is the same as the user name of the receiver, as a first data set; taking the access record of which the accessed time is within a preset time range and acquired from the first data set as a second data set; counting format types of the attachment files corresponding to the access records in the second data set to determine the format type with the maximum number of the access records; and taking the determined format type as the target format of the attachment file.
The processor determines the target format of the attachment file according to the access record in the target database, and specifically comprises the following steps: judging whether the number of the access records corresponding to the determined format type is greater than a preset threshold value or not; and if the number of the access records corresponding to the determined format type is larger than a preset threshold value, taking the determined format type as the target format of the attachment file.
The processor further implements the following operations: and if the number of the access records corresponding to the determined format type is not larger than a preset threshold value, taking the initial format of the attachment file as a target format.
The foregoing storage medium of the present invention includes: various media that can store program codes, such as a magnetic disk, an optical disk, and a Read-Only Memory (ROM).
The elements of all embodiments of the present invention may be implemented by a general purpose Integrated Circuit, such as a CPU (Central Processing Unit), or by an ASIC (Application Specific Integrated Circuit).
The steps in the file format conversion method of the embodiment of the invention can be sequentially adjusted, combined and deleted according to actual needs.
The units in the file format conversion device of the embodiment of the invention can be merged, divided and deleted according to actual needs.
While the invention has been described with reference to specific embodiments, the invention is not limited thereto, and various equivalent modifications and substitutions can be easily made by those skilled in the art within the technical scope of the invention. Therefore, the protection scope of the present invention shall be subject to the protection scope of the claims.
Claims (9)
1. A method for converting a file format, the method comprising:
if a mail sending request is received, determining corresponding mail transmission parameters according to the mail sending request, wherein the mail transmission parameters comprise the initial format of an attachment file;
determining a target format of the attachment file according to access records in a target database, wherein the data in the target database is used for describing the corresponding relation between the attachment file and the target format, the target database comprises a plurality of pre-stored access records, and the access records comprise a user name of an accessor, a format type of the accessed attachment file and accessed time of the accessed attachment file;
judging whether the initial format of the attachment file is the same as the target format or not;
if the initial format of the attachment file is different from the target format, converting the attachment file from the initial format to the target format to obtain a target attachment;
sending the target attachment as a mail attachment;
wherein the determining the target format of the attachment file according to the access record in the target database comprises:
acquiring an access record corresponding to a user name of a visitor, which is the same as the user name of a receiver, from a target database as a first data set, wherein data in the target database is used for describing the corresponding relation between the attachment file and the target format;
acquiring an access record with the access time within a preset time range from the first data set as a second data set;
counting format types of the attachment files corresponding to the access records in the second data set to determine the format type with the maximum number of the access records;
and taking the determined format type as the target format of the attachment file.
2. The method of claim 1, wherein determining the corresponding mail delivery parameters based on the mail sending request if the mail sending request is received comprises:
and if the existing attachment file is detected to be accessed, storing an access record of the accessed attachment file in a target database, wherein the access record comprises the user name of the visitor, the current format of the accessed attachment file and the corresponding accessed time.
3. The method of claim 1, wherein determining the corresponding mail delivery parameters according to the mail sending request if the mail sending request is received comprises:
if a mail sending request is received, determining a user name of a receiver and mail content associated with the user name according to the mail sending request;
judging whether the mail content comprises an attachment file or not;
and if the mail content comprises the attachment file, acquiring the attribute information of the attachment file to determine the initial format of the attachment file.
4. The method of claim 1, wherein said targeting the determined format type as the target format for the attachment file further comprises:
judging whether the number of the access records corresponding to the determined format type is greater than a preset threshold value or not;
and if the number of the access records corresponding to the determined format type is larger than a preset threshold value, taking the determined format type as the target format of the attachment file.
5. The method of claim 4, wherein the method further comprises:
and if the number of the access records corresponding to the determined format type is not larger than a preset threshold value, taking the initial format of the attachment file as a target format.
6. An apparatus for converting a file format, the apparatus comprising:
a parameter determining unit, configured to determine, if a mail sending request is received, a corresponding mail delivery parameter according to the mail sending request, where the mail delivery parameter includes an initial format of an attachment file;
the format determining unit is used for determining a target format of the attachment file according to access records in a target database, wherein the data in the target database is used for describing the corresponding relationship between the attachment file and the target format, the target database comprises a plurality of pre-stored access records, and the access records comprise a user name of an accessor, a format type of the accessed attachment file and the accessed time of the accessed attachment file;
the format judging unit is used for judging whether the initial format of the attachment file is the same as the target format or not;
the conversion unit is used for converting the attachment file from the initial format to the target format to obtain a target attachment if the initial format of the attachment file is different from the target format;
a sending unit, configured to send the target attachment as a mail attachment;
wherein the format determination unit includes:
the first collection unit is used for acquiring an access record corresponding to a user name of a visitor, which is the same as the user name of a recipient, from a target database as a first data set, wherein data in the target database is used for describing a corresponding relation between the attachment file and the target format;
the second collection unit is used for acquiring an access record with the access time within a preset time range from the first data set as a second data set;
the statistical unit is used for performing statistics on the format types of the attachment files corresponding to the access records in the second data set to determine the format type with the largest number of the access records;
a second determining unit, configured to use the determined format type as a target format of the attachment file.
7. The apparatus of claim 6, wherein the parameter determination unit comprises:
the first determining unit is used for determining a user name of a receiver and mail content associated with the user name according to a mail sending request if the mail sending request is received;
a first judgment unit configured to judge whether the mail content includes an attachment file;
and the format acquisition unit is used for acquiring the attribute information of the attachment file to determine the initial format of the attachment file if the mail content comprises the attachment file.
8. A computer device, comprising:
a memory for storing a program for implementing file format conversion; and
a processor for executing a program stored in the memory for implementing file format conversion to perform the method of any one of claims 1-5.
9. A computer-readable storage medium, wherein the computer-readable storage medium stores one or more programs, the one or more programs being executable by one or more processors to implement the method of any one of claims 1-5.
Priority Applications (2)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201810613992.3A CN109002424B (en) | 2018-06-14 | 2018-06-14 | File format conversion method and device, computer equipment and storage medium |
PCT/CN2018/109417 WO2019237591A1 (en) | 2018-06-14 | 2018-10-09 | File format conversion method and apparatus, computer device, and storage medium |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201810613992.3A CN109002424B (en) | 2018-06-14 | 2018-06-14 | File format conversion method and device, computer equipment and storage medium |
Publications (2)
Publication Number | Publication Date |
---|---|
CN109002424A CN109002424A (en) | 2018-12-14 |
CN109002424B true CN109002424B (en) | 2021-05-14 |
Family
ID=64601114
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201810613992.3A Active CN109002424B (en) | 2018-06-14 | 2018-06-14 | File format conversion method and device, computer equipment and storage medium |
Country Status (2)
Country | Link |
---|---|
CN (1) | CN109002424B (en) |
WO (1) | WO2019237591A1 (en) |
Families Citing this family (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN111091339A (en) * | 2018-10-24 | 2020-05-01 | 北京数聚鑫云信息技术有限公司 | Device and method for automatically analyzing information in e-mail |
CN110278143B (en) * | 2019-05-06 | 2022-08-19 | 平安科技(深圳)有限公司 | E-mail data processing method and device, computer equipment and storage medium |
CN110543509B (en) * | 2019-09-04 | 2022-06-03 | 北京奇艺世纪科技有限公司 | Monitoring system, method and device for user access data and electronic equipment |
CN111723363B (en) * | 2020-06-18 | 2023-04-07 | 西安万像电子科技有限公司 | Data export method and device |
CN112733190B (en) * | 2021-01-20 | 2024-03-08 | 北京联创信安科技股份有限公司 | Data processing method, device, electronic equipment, system and storage medium |
CN117010323A (en) * | 2023-08-17 | 2023-11-07 | 上海倍通医药科技咨询有限公司 | Data formatting method and system for files in E-mail |
Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101146059A (en) * | 2007-11-06 | 2008-03-19 | 中国电信股份有限公司 | A mail system, method and terminal for supporting attachment format conversion |
CN101938717A (en) * | 2010-09-07 | 2011-01-05 | 深圳市彩讯科技有限公司 | Mail attachment conversion system and method |
CN102355487A (en) * | 2011-08-12 | 2012-02-15 | 莫雅静 | Browse handling method and device of email attachment |
CN103188128A (en) * | 2011-12-29 | 2013-07-03 | 盈世信息科技(北京)有限公司 | Preview method of mail attachment and mail system |
CN104378283A (en) * | 2014-11-21 | 2015-02-25 | 国家电网公司 | Sensitive email filtering system and method based on client/server mode |
Family Cites Families (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
DE10337488A1 (en) * | 2003-08-14 | 2005-03-10 | Inventec Appliances Corp Wu Ku | Email processing method for use with an email server that services all manner of terminals, whereby the server has a conversion module for converting file formats so that they can be interpreted by the receiving terminal |
KR100619879B1 (en) * | 2004-07-01 | 2006-09-19 | 엘지전자 주식회사 | How to check e-mail attachments using mobile terminal |
US7689655B2 (en) * | 2004-12-06 | 2010-03-30 | Aol Inc. | Managing and collaborating with digital content using a dynamic user interface |
CN1979539A (en) * | 2005-12-08 | 2007-06-13 | 上海晨兴电子科技有限公司 | Electronic mail filtering method and apparatus |
CN102651744A (en) * | 2012-05-04 | 2012-08-29 | 华为技术有限公司 | E-mail security management method and E-mail server |
CN103546449A (en) * | 2012-12-24 | 2014-01-29 | 哈尔滨安天科技股份有限公司 | E-mail virus detection method and device based on attachment formats |
-
2018
- 2018-06-14 CN CN201810613992.3A patent/CN109002424B/en active Active
- 2018-10-09 WO PCT/CN2018/109417 patent/WO2019237591A1/en active Application Filing
Patent Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101146059A (en) * | 2007-11-06 | 2008-03-19 | 中国电信股份有限公司 | A mail system, method and terminal for supporting attachment format conversion |
CN101938717A (en) * | 2010-09-07 | 2011-01-05 | 深圳市彩讯科技有限公司 | Mail attachment conversion system and method |
CN102355487A (en) * | 2011-08-12 | 2012-02-15 | 莫雅静 | Browse handling method and device of email attachment |
CN103188128A (en) * | 2011-12-29 | 2013-07-03 | 盈世信息科技(北京)有限公司 | Preview method of mail attachment and mail system |
CN104378283A (en) * | 2014-11-21 | 2015-02-25 | 国家电网公司 | Sensitive email filtering system and method based on client/server mode |
Also Published As
Publication number | Publication date |
---|---|
WO2019237591A1 (en) | 2019-12-19 |
CN109002424A (en) | 2018-12-14 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN109002424B (en) | File format conversion method and device, computer equipment and storage medium | |
CN108776934B (en) | Distributed data calculation method and device, computer equipment and readable storage medium | |
CN108829560B (en) | Data monitoring method and device, computer equipment and storage medium | |
KR102201919B1 (en) | Random forest model training method, electronic device and storage medium | |
CN110209348B (en) | Data storage method and device, electronic equipment and storage medium | |
KR20120102664A (en) | Allocating storage memory based on future use estimates | |
CN109597798B (en) | Network file deleting method and device, computer equipment and storage medium | |
CN111240688A (en) | excel file analysis method and device, computer equipment and storage medium | |
CN110147470B (en) | Cross-machine-room data comparison system and method | |
CN112631879A (en) | Data acquisition method and device, computer readable medium and electronic equipment | |
CN110347546B (en) | Dynamic adjustment method, device, medium and electronic equipment for monitoring task | |
CN115796844A (en) | Dynamic updating method of alarm threshold, terminal equipment and system | |
CN107566480B (en) | User activity information acquisition method and device for mobile terminal application and storage medium | |
CN111181979B (en) | Access control method, apparatus, computer device, and computer-readable storage medium | |
CN114546590B (en) | Java virtual machine heap memory set object monitoring method and memory overflow analysis method | |
CN112051771A (en) | Multi-cloud data acquisition method and device, computer equipment and storage medium | |
CN113992348B (en) | Monitoring method and system of all-in-one machine | |
CN104331330A (en) | Resource pool generation method and device | |
CN110602207A (en) | Method, device, server and storage medium for predicting push information based on off-network | |
CN111062634A (en) | Approval task allocation method and device, computer equipment and storage medium | |
CN114924937A (en) | Batch task processing method and device, electronic equipment and computer readable medium | |
CN113852610A (en) | Message processing method and device, computer equipment and storage medium | |
CN106817383B (en) | Access cycle management method and device based on data statistics reporting | |
CN110162982B (en) | Method and device for detecting illegal rights, storage medium and electronic equipment | |
US20170223136A1 (en) | Any Web Page Reporting and Capture |
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 |