Detailed Description
The principles and spirit of the present application will be described below with reference to several exemplary embodiments. It should be understood that these embodiments are provided so that this disclosure will be thorough and complete. The exemplary embodiments provided herein are merely some, but not all embodiments of the application. All other embodiments obtained by those skilled in the art without any inventive effort are within the scope of the present application.
Embodiments of the present application relate to a terminal device and/or a server. Embodiments of the application may be implemented as a system, terminal, device, method, computer-readable storage medium or computer program product, which may be embodied in hardware, software, or a combination of hardware and software. Fig. 1 shows a schematic system architecture of an embodiment of the present application, including a terminal device 102 and a server 104. The terminal device 102 may include at least one of a smart phone, a tablet, a notebook, a desktop, a smart television, various wearable devices, an augmented reality AR device, a virtual reality VR device, and the like. The terminal device 102 may be provided with a client, for example, an application app that performs a specific function, an applet, a client logged in through a browser, etc., and a user may input an instruction through the client, and the terminal device 102 may send request information including the instruction to the server 104, and after receiving the request information, the server 104 performs corresponding processing, and returns processing result information to the terminal device 102. The server 104 may be a local server or a cloud server, may be a single server or a server cluster, etc.
The terms first, second, third and the like in this document are used solely for distinguishing one entity (or operation) from another entity (or operation) and do not require or imply a sequential order between such entities (or operations).
Fig. 2 shows a flow chart of a message pushing method based on the smtp protocol according to an embodiment of the present application. The method is applied to terminal equipment, wherein an smtp protocol service tool is installed in the terminal equipment, and the message pushing method comprises the following steps:
S101, terminal equipment acquires mail information sent by a mail server based on an smtp protocol, wherein the mail information at least comprises recipient information and text information, and the recipient information at least comprises a user ID and/or a mobile phone number of a message receiver on a third party message platform;
S102, the terminal equipment acquires user ID and/or mobile phone number and text information by analyzing an smtp protocol;
s103, the terminal equipment determines a third party message platform where a message receiver is positioned according to the user ID and/or the mobile phone number format so as to call the push SDK of the third party message platform;
and S104, the terminal equipment sends the text information meeting the requirements and the user ID and/or the mobile phone number to a third-party message platform server through the push SDK, so that the third-party message platform server pushes the received text information to a message receiver according to the user ID and/or the mobile phone number.
SMTP (SIMPLE MAIL TRANSFER Protocol, simple mail transfer Protocol, SMTP for short) is a standard Protocol for email transfer, which is a set of rules for transferring mail from a source address to a destination address, which controls the way letters are transferred. In the embodiment of the application, the SMTP protocol service tool (namely, the SMTP protocol service program) supports SMTP and can receive mail information pushed by a mail server (SMTP server) according to the specification of the SMTP protocol. In addition, the SMTP protocol service tool can parse mail formats and have encoding processing capability in addition to supporting SMTP protocols, and for mail format parsing capability, for example, the SMTP protocol service tool can parse common mail formats, such as RFC 822 format, which includes understanding the structure and syntax of a mail header (including information of a sender, a recipient, a subject, etc.) and a mail body (text content). In addition, specialized mail parsing libraries, such as the email library in Python, may be used that provide rich functionality to process and parse mail content. For the coding processing capability, the smtp protocol service tool supports multiple character coding analysis, and for different coding modes used by the mail text, such as UTF-8, GBK and the like, the smtp protocol service tool can automatically identify and correctly decode the mail content so as to acquire accurate text information.
By adopting the message pushing method provided by the embodiment of the application, the message can be sent to the message receiver of the third-party message platform in a mailbox mode. Specifically, the message sender may input mailbox text information and recipient information at the mail editing interface. In the embodiment of the application, the recipient information comprises the user ID of the message receiver on the third-party message platform, so that the smtp protocol service tool can determine the name of the third-party message platform on which the message receiver is positioned according to the format of the user ID, thereby accurately transmitting the packaged user ID and text information to the push SDK corresponding to the third-party message platform. In addition, after the server of the third party message platform receives the text information and the user ID, the server can push the message to a message receiver according to the user ID. In some embodiments of the present application, optionally, the third party message platform may be an instant messaging platform for WeChat, enterprise WeChat, nail, flyer, SMS, and the like.
In the present application, the format of the recipient information is different from the common mailbox recipient format, for example, in the company, the mailbox recipient is generally composed of name pinyin and company domain name, in the present application, the recipient information is generally composed of user ID and company domain name, and the user ID is generally composed of number or number and letter, after the mail server obtains the recipient information, the mail server can compare with the template (composed of name pinyin and company domain name), so if the mail server receives the recipient information composed of the user ID and company domain name, the mail server will default to send the received information to the sms p protocol service tool.
The push SDK of the third message platform may be an official push SDK obtained through an open platform of the third message platform, where the push SDK has an interface for pushing messages to the third party message platform, and is capable of handling network communications with a third party message platform server. The push SDK can also construct a push message structure meeting the requirements of the third party message platform according to the captured mail text information and the user ID of the recipient on the third party message disk platform. After the smtp protocol service tool sends the user ID and the text information to the push SDK, the push SDK encapsulates the user ID and the text information into a push message structure conforming to the requirements of the third-party message platform, then the encapsulated message is sent to the third-party message platform server by using a push interface provided by the SDK, and the third-party message platform server sends the text information to a message receiver according to the user ID. In some embodiments of the present application, optionally, when an error occurs in the message pushing process, the pushing SDK can accurately analyze the error code and the error information returned by the third party message platform server, and provide corresponding feedback to the developer, so that the developer can perform investigation and processing.
By adopting the embodiment of the application, the message can be sent to the third party message platform in a mail sending way, and when the message needs to be sent in batches, the message can be sent to message receivers positioned on different third party message platforms through the mail boxes by filling the addressee addresses containing the user ID and/or the mobile phone number of the addressee in the third party message platform in batches in a column of the mailbox sender, so that the message sending efficiency is improved.
In some embodiments of the present application, the recipient information is optionally entered by the mail sender via the mail client based on a preset format consisting of a user ID and/or a cell phone number @ company domain name.
In the application, the recipient information is composed of a preset format including a user ID and a company domain name, for example, the user ID of the recipient on the third party message platform is wxy12345, the company domain name is a.com, and then in the mail writing page, the address of the recipient column is wxy12345@A.com. If the recipient's handset number at the third party messaging platform is 123456789 and the company domain name is a.com, then in the mail writing page, the address of the recipient column is 123456789@A.com.
In some embodiments of the present application, optionally, before sending the user ID and/or the mobile phone number and the text information to the push SDK, the method further comprises:
filtering the safety information and the violation information of the text information to obtain filtered text information;
transmitting text information meeting the requirements and user ID and/or mobile phone number to a third party message platform server by pushing the SDK, and further comprising:
And sending the text information and the user ID and/or the mobile phone number which meet the requirements and are filtered to a third party message platform server by pushing the SDK.
In the embodiment of the application, the illegal information in the text information, such as sensitive words and words threatening the information security, can be filtered in a keyword matching mode. Specifically, the large data can be used for collecting the violations in the communication field, then a violating word database is established, and when the violating information is filtered, the violating information in the text information is determined by comparing the text information with the violating word database. After the information is determined to contain the illegal information, the user can be informed to intercept the illegal information by sending the prompt information, so that the real-time interception of the illegal information can be realized, and the information safety is ensured.
In some embodiments of the present application, optionally, storing the grabbed user ID and/or the phone number and text information is further included.
In the application, the text information captured by the smtp protocol service tool and the user ID and/or the mobile phone number can also be stored in a storage medium, so that the message is backed up in real time to be convenient for supervision and examination, and if the information exchange between the message receiver and the message sender needs to be acquired in the later period, the information can also be directly acquired from the smtp protocol service tool.
In some embodiments of the present application, optionally, the mail server is an internal mail server of a company, and the mail message sender and the message receiver are employees of the company.
Corporate employees act as mail senders, write mail content through corporate internal mail clients, and then send mail to the SMTP protocol service tool according to SMTP protocols through corporate internal mail servers. Thus, since the mail server is an internal server of the company, mail transmission among employees is performed in an internal network environment of the company, and compared with the external public mail server, the mail transmission method has the advantages of lower network delay, higher transmission speed and higher information security. In addition, the time cost of transmitting the information by staff on different platforms can be reduced, and the working efficiency is improved.
The foregoing describes implementations and advantages of embodiments of the application in terms of a number of embodiments. The following describes in detail the specific processing procedure of the embodiment of the present application in conjunction with specific examples.
Fig. 3 is a schematic diagram of a processing procedure of a message pushing method based on the smtp protocol according to an embodiment of the present application. Referring to fig. 3, the message pushing method based on the smtp protocol of the present application includes the following processing steps:
The first step, the addressee information and text information input by the user through the mail client are sent to a mail server;
The mail server sends the addressee information and the text information to a SMTP protocol service tool based on the SMTP protocol, and the SMTP protocol service tool supports the SMTP protocol;
thirdly, the smtp protocol service tool stores the extracted user ID and/or mobile phone number and text information;
filtering the text information to remove the information security violation keywords;
pushing the user ID or the mobile phone number to a third party message platform server by utilizing a pushed SDK pushed by the third party message platform to be sent;
and fifthly, the third party message platform server sends the text information to the message receiver according to the user ID or the telephone number.
Further, the following describes the processing procedure of the message pushing method based on the smtp protocol according to the present application in combination with an application scenario:
Assuming a large enterprise, the staff under the flag is numerous and distributed in different departments and areas. And a plurality of message receiving tools are used for communication and collaboration in the enterprise, including short messages, enterprise WeChat, nails, flybooks and the like. The enterprise employee gadget Li Xuyao sends an important activity notification to customer a, customer B, and customer C, assuming xiao Li only that customer a flies, customer B WeChats, and customer C nails. Xiao Li opens the common mail client, and fills in the address of the addressee (the domain name of the user ID@ xiao Li company of the client A on the flyer, the domain name of the user ID@ xiao Li company of the client B on the WeChat, the domain name of the user ID@ xiao Li company of the client C on the nail), the important activity notification of the main part of the mail, and the text content of the mail in batches on the mail editing interface.
After the small Li Dianji 'send' button, the mail is sent to the internal mailbox server of the company through the mailbox client, and after the mail server receives the mail, the mail server confirms that the address of the mail is a non-mailbox address, so that the mail server delivers the mail to an application program supporting SMTP protocol, namely an SMTP protocol service tool. This procedure follows the standard flow of SMTP protocol, ensuring that mail can be transferred to the SMTP protocol service tool without errors.
After receiving the mail, the smtp protocol service tool analyzes the mail and extracts key information such as mail text, recipient address and the like. These messages are then converted to a format suitable for storage and the converted messages are recorded to a storage medium (e.g., a database server within the enterprise). In the process, the smtp protocol service tool converts the data in the mail format into a format which can be stored and managed by the database through a protocol conversion mechanism, so that the integrity and traceability of the message are ensured.
After the smtp protocol service tool obtains the text information, a message filtering module is called to filter the violation information of the text information. The message filtering module is pre-configured with a series of forbidden word libraries, which cover the words forbidden by laws and regulations, sensitive words regulated in enterprises, and the like. The filtering module adopts an advanced natural language processing technology, so that not only can single forbidden words be matched, but also the semantics and the context relation of the words in sentences can be understood, and the accurate recognition and interception of the illegal information can be ensured. For example, if the message body contains illicit words such as "illegal activity", "fraud", etc., the message filtering module will determine that the message is an illegal message and process the message accordingly. For offending messages, the system will record detailed log information, including message content, time of transmission, sender, etc., for subsequent auditing and regulatory scrutiny.
And selecting a corresponding third party message platform for pushing by the smtp protocol service tool according to the user ID format through the filtered compliance message. For example, if the recipient is a micro-credit user, the smtp protocol service tool will choose to push the message through the webhook interface of the micro-credit, and if the recipient is a mobile phone number, choose to push through the short message API.
The smtp protocol service tool calls the push SDK of the corresponding platform to push the message to the recipient. Taking a short message API as an example, the smtp protocol service tool transmits parameters such as a message text, a mobile phone number of a receiver and the like to a short message API interface, and after receiving the information, the short message platform sends the short message to the mobile phone of the receiver. For the WeChat push, the smtp protocol service tool sends the message to WeChat webhook, the WeChat webhook encapsulates the message content into a specific request format, sends it to the enterprise WeChat server, and finally pushes it to the recipient.
Through the series of operations described above, client a, client B, and client C will receive xiao Li the sent activity notifications on their respective message receiving tools. If the information content has illegal information, the information content is intercepted by the system and cannot be pushed to the addressee, so that the safety of the information in the enterprise is ensured. Meanwhile, all the information sending records are stored in a storage medium of an enterprise, so that supervision and examination and subsequent data analysis are convenient.
In summary, the embodiment of the application shows the complete application process of the SMTP protocol-based message pushing method in the actual enterprise scene. By integrating various message receiving tools, the cross-platform message pushing is realized, the information safety is ensured by a message filtering mechanism, and the requirements of enterprise supervision and examination are met by message storage and backup. The whole process improves the efficiency and accuracy of message pushing, reduces the operation cost of enterprises, and solves the pain point problem in the prior art.
Correspondingly, the application also provides message pushing based on the smtp protocol, and referring to fig. 4, the message pushing method comprises the following steps:
an obtaining module 110, configured to obtain mail information sent by a mail server based on an smtp protocol, where the mail information includes at least recipient information and text information, and the recipient information includes at least a user ID and/or a mobile phone number of a message recipient on a third party message platform;
The parsing module 120 is configured to obtain a user ID and/or a mobile phone number and text information by parsing the smtp protocol;
a determining module 130, configured to determine a third party message platform where the message receiver is located according to the user ID and/or the mobile phone number format;
and the sending module 140 is configured to send the text information and the user ID and/or the mobile phone number meeting the requirements to a third party message platform server through the push SDK, so that the third party message platform server pushes the received text information to a message receiver according to the user ID and/or the mobile phone number.
In some embodiments of the present application, optionally, the message pushing device further includes a filtering module, configured to filter the security information and the violation information of the text information, so as to obtain filtered text information;
The sending module is also used for sending the text information and the user ID and/or the mobile phone number which meet the requirements and are filtered to a third party message platform server through the push SDK.
Based on at least one embodiment, the application further provides an intelligent terminal device, particularly an intelligent automobile, which comprises a processor and a memory storing computer program instructions, wherein the intelligent automobile realizes the method corresponding to the embodiment of the application when the processor executes the computer program instructions.
Based on at least one embodiment, the electronic device in the embodiment of the present application may be a user terminal device, a server, other computing devices, or a cloud server. Fig. 5 shows a schematic diagram of a hardware structure of an electronic device according to an embodiment of the present application, where the electronic device may include a processor 601 and a memory 602 storing computer program instructions, where the processor 601 implements the flow or functions of any of the methods of the embodiments described above by reading and executing the computer program instructions stored in the memory 602.
In particular, processor 601 may include a Central Processing Unit (CPU), or an Application SPECIFIC INTEGRATED Circuit (ASIC), or may be configured as one or more integrated circuits that implement embodiments of the present application. Memory 602 may include mass storage for data or instructions. For example, the memory 602 may be at least one of a hard disk drive (HARD DISK DRIVE, HDD), read-only memory (ROM), random Access Memory (RAM), floppy disk drive, flash memory, optical disk, magneto-optical disk, magnetic tape, universal serial bus (Universal Serial Bus, USB) drive, or other physical/tangible memory storage device. As another example, the memory 602 may include removable or non-removable (or fixed) media. For another example, memory 602 may be internal or external to the integrated gateway disaster recovery device. The memory 602 may be a non-volatile solid state memory. In other words, generally the memory 602 includes a tangible (non-transitory) computer-readable storage medium (e.g., a memory device) encoded with computer-executable instructions and when the software is executed (e.g., by one or more processors) may perform the operations described by the methods of embodiments of the application.
As one example, the electronic device shown in FIG. 5 may also include a communication interface 603 and a bus 610. The processor 601, the memory 602, and the communication interface 603 are connected to each other through a bus 610 and perform communication with each other. Bus 610 includes hardware, software, or both, and may couple components of the online data flow billing device to each other. The buses may include at least one of an Accelerated Graphics Port (AGP) or other graphics bus, an Enhanced Industry Standard Architecture (EISA) bus, a Front Side Bus (FSB), a HyperTransport (HT) interconnect, an Industry Standard Architecture (ISA) bus, an InfiniBand interconnect, a Low Pin Count (LPC) bus, a memory bus, a Micro Channel Architecture (MCA) bus, a Peripheral Component Interconnect (PCI) bus, a PCI-Express (PCI-X) bus, a Serial Advanced Technology Attachment (SATA) bus, a video electronics standards Association local (VLB) bus, or other suitable bus. Bus 610 may include one or more buses. Although embodiments of the application describe or illustrate a particular bus, embodiments of the application contemplate any suitable bus or interconnection.
In connection with the methods of the above embodiments, embodiments of the present application also provide a computer-readable storage medium having stored thereon computer program instructions that, when executed by a processor, implement the flow or function of any of the methods of the above embodiments.
Embodiments of the present application also provide a computer program product having stored thereon computer program instructions which, when executed by a processor, implement the flow or functions of any of the methods of the above embodiments.
The foregoing exemplarily describes the flow diagrams and/or block diagrams of methods, terminals, systems, and computer program products according to embodiments of the present application, and describes various aspects related thereto. It will be understood that each block of the flowchart illustrations and/or block diagrams, or combinations of blocks in the flowchart illustrations and/or block diagrams, can be implemented by computer program instructions, special purpose hardware which perform the specified functions or acts, and combinations of special purpose hardware and computer instructions. For example, these computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the present application, enable the implementation of the functions/acts specified in the flowchart and/or block diagram block or blocks. Such a processor may be a general purpose processor, a special purpose processor, an application specific processor, or a field programmable logic circuit.
Functional blocks shown in the block diagrams of the embodiments of the present application can be implemented in hardware, software, firmware, or a combination thereof. When implemented in hardware, it may be, for example, an electronic circuit, an Application Specific Integrated Circuit (ASIC), suitable firmware, plug-in, function card, etc., or a program or code segment when implemented in software, that is used to perform the required tasks. The program or code segments can be stored in a memory or transmitted over transmission media or communication links through data signals carried in carrier waves. The code segments may be downloaded via computer networks such as the internet, intranets, etc.
It should be noted that the present application is not limited to the specific configurations and processes described above or shown in the drawings. The foregoing is merely specific embodiments of the present application, and it will be clearly understood by those skilled in the art that, for convenience and brevity of description, specific working processes of the described system, apparatus, terminal, module or unit may refer to corresponding processes in the method embodiments, and need not be repeated. It should be understood that the scope of the present application is not limited thereto, and any person skilled in the art may conceive various equivalent modifications or substitutions within the technical scope of the present application, which are intended to be covered by the scope of the present patent application.