CN108650167B - Message sending method and device, electronic equipment and readable storage medium - Google Patents
Message sending method and device, electronic equipment and readable storage medium Download PDFInfo
- Publication number
- CN108650167B CN108650167B CN201810284280.1A CN201810284280A CN108650167B CN 108650167 B CN108650167 B CN 108650167B CN 201810284280 A CN201810284280 A CN 201810284280A CN 108650167 B CN108650167 B CN 108650167B
- Authority
- CN
- China
- Prior art keywords
- message
- time interval
- sending
- client
- sent
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Active
Links
Images
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- 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/21—Monitoring or handling of messages
- H04L51/212—Monitoring or handling of messages using filtering or selective blocking
-
- 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/07—User-to-user messaging in packet-switching networks, transmitted according to store-and-forward or real-time protocols, e.g. e-mail characterised by the inclusion of specific contents
- H04L51/18—Commands or executable codes
Landscapes
- Engineering & Computer Science (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Information Transfer Between Computers (AREA)
Abstract
The embodiment of the invention provides a message sending method, a message sending device, electronic equipment and a readable storage medium, wherein a message sending instruction sent by a client is received, a time interval of sending time of a last message sent by the client is determined, whether a message corresponding to the message sending instruction is sent or not is determined according to the time interval and a counter value, wherein the counter value is used for indicating the number of times that the sending time interval of two messages continuously sent by the client is smaller than a preset time interval, namely whether the message is sent or not is limited by the time interval of the sending time of the last message and the number of times that the sending time interval of the two messages continuously sent by the client is smaller than the preset time interval, so that the sending times of junk messages are reduced, and user experience is improved.
Description
Technical Field
Embodiments of the present invention relate to communications technologies, and in particular, to a method and an apparatus for sending a message, an electronic device, and a readable storage medium.
Background
With the rapid development of internet technology, the Application of electronic devices is more and more widespread, and users install various Application program (APP) clients (such as WeChat, QQ or nailing) on the electronic devices, and because the cost for sending or receiving messages through the instant messaging function provided by the APP is low, users often receive spam messages such as advertisement messages or harassment messages, and the user experience is low.
In the prior art, after receiving a message sending instruction sent by a client, a server judges a time interval between sending two continuous messages, and if the time interval is smaller than a preset threshold, the server controls the client to display a prompt window to prompt a user that the message sending frequency is too fast, and after the prompt window is displayed for a period of time, the prompt window disappears to allow the user to continue sending messages.
However, the method in the prior art has poor control effect on spam messages and poor user experience.
Disclosure of Invention
The embodiment of the invention provides a message sending method, a message sending device, electronic equipment and a readable storage medium, which are used for reducing the sending times of junk messages, so that the user experience is improved.
In a first aspect, an embodiment of the present invention provides a method for sending a message, including:
receiving a message sending instruction sent by a client, and determining a time interval between the sending time of the message and the sending time of the last message sent by the client;
and determining whether to send the message corresponding to the message sending instruction according to the time interval and a counter value, wherein the counter value is used for indicating the number of times that the sending time interval of two messages continuously sent by the client is smaller than a preset time interval.
Optionally, the determining whether to send the message corresponding to the message sending instruction according to the time interval and the counter value includes:
if the time interval is smaller than the preset time interval, updating the counter value and increasing one counting unit;
if the updated counter value is larger than a preset threshold value, controlling the client to pop up a verification code prompt window so as to prompt a user to input a verification code;
and if the verification code input by the user is correct, determining to send the message corresponding to the message sending instruction.
Optionally, the method further comprises:
and if the verification code input by the user is wrong, determining to refuse to send the message corresponding to the message sending instruction.
Optionally, the method further comprises:
and if the updated counter value is smaller than or equal to a preset threshold value, determining to send the message corresponding to the message sending instruction.
Optionally, the method further comprises:
and if the time interval is greater than or equal to a preset time interval, determining to send the message corresponding to the message sending instruction.
Optionally, after sending the message corresponding to the message sending instruction, the method further includes:
and updating the counter value to an initial value.
Optionally, the determining a time interval with a sending time of a last message sent by the client includes:
acquiring a receiver of the message corresponding to the message sending instruction;
and determining the time interval with the sending time of the last message sent by the client to the receiver.
In a second aspect, an embodiment of the present invention provides an apparatus for sending a message, including:
the receiving module is used for receiving a message sending instruction sent by a client and determining a time interval between the sending time of the message and the sending time of the last message sent by the client;
and the processing module is used for determining whether to send the message corresponding to the message sending instruction according to the time interval and a counter value, wherein the counter value is used for indicating the times that the sending time interval of two messages continuously sent by the client is smaller than a preset time interval.
In a third aspect, an embodiment of the present invention provides an electronic device, including:
a memory for storing program instructions;
a processor for invoking and executing program instructions in said memory to implement the method of message sending as described in the first aspect.
In a fourth aspect, an embodiment of the present invention provides a readable storage medium, in which a computer program is stored, and when the computer program is executed by at least one processor of a processing device of a message sending device, the message sending device executes the message sending method according to the first aspect.
According to the message sending method, the message sending device, the electronic device and the readable storage medium provided by the embodiment of the invention, by receiving a message sending instruction sent by a client, a time interval of sending time of a last message sent by the client is determined, and whether a message corresponding to the message sending instruction is sent or not is determined according to the time interval and a counter value, wherein the counter value is used for indicating that the sending time interval of two messages continuously sent by the client is less than the number of times of a preset time interval, namely whether the message is sent or not is limited by the time interval of the sending time of the last message and the number of times that the sending time interval of the two messages continuously sent by the client is less than the preset time interval, so that the sending times of junk messages are reduced, and the user experience is improved.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, and it is obvious that the drawings in the following description are only some embodiments of the present invention, and for those skilled in the art, other drawings can be obtained according to these drawings without creative efforts.
Fig. 1 is a flowchart illustrating a method for sending a message according to an embodiment of the present invention;
fig. 2 is a flowchart illustrating another message sending method according to an embodiment of the present invention;
fig. 3 is a flowchart illustrating a further method for sending a message according to an embodiment of the present invention;
fig. 4 is a flowchart illustrating a further method for sending a message according to an embodiment of the present invention;
fig. 5 is a flowchart illustrating a further method for sending a message according to an embodiment of the present invention;
fig. 6 is a flowchart illustrating a further method for sending a message according to an embodiment of the present invention;
fig. 7 is a schematic structural diagram of a message sending apparatus according to an embodiment of the present invention;
fig. 8 is a schematic structural diagram of another message sending apparatus 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 only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
The terms "first," "second," "third," "fourth," and the like in the description and in the claims, as well as in the drawings, if any, are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used is interchangeable under appropriate circumstances such that the embodiments of the invention described herein are, for example, capable of operation in sequences other than those illustrated or otherwise described herein. Furthermore, the terms "comprises," "comprising," and "having," and any variations thereof, are intended to cover a non-exclusive inclusion, such that a process, method, system, article, or apparatus that comprises a list of steps or elements is not necessarily limited to those steps or elements expressly listed, but may include other steps or elements not expressly listed or inherent to such process, method, article, or apparatus.
Fig. 1 is a flowchart illustrating a method for sending a message according to an embodiment of the present invention, where the method is executed by a server, and as shown in fig. 1, the method of the embodiment is as follows:
s101: and receiving a message sending instruction sent by the client, and determining a time interval with the sending time of the last message sent by the client.
After the user finishes editing the message on the message sending interface provided by the client, the user may trigger to send a message sending instruction to the server by clicking the sending control, or trigger to send a message sending instruction to the server by using a shortcut key, or trigger to send a message sending instruction to the server by using voice, which is not limited in the embodiment of the present invention.
The message sending instruction is used for requesting the server to send a message by the client, and the content of the message requested to be sent can be contained in the message sending instruction.
After receiving the message sending instruction sent by the client, the server determines the time interval with the sending time of the last message sent by the client, specifically, the server may record the sending time of each message sent by the client, and may determine the time interval with the sending time of the last message sent by the client according to the recorded sending time of each message sent by the client.
S102: and determining whether to send the message corresponding to the message sending instruction or not according to the time interval and the counter value.
The counter value is used for indicating the number of times that the sending time interval of two messages continuously sent by the client is smaller than the preset time interval.
The length of the preset time interval may be set according to practical application, and the present invention is not limited thereto.
In this embodiment, by receiving a message sending instruction sent by a client, determining a time interval between the sending time of a previous message sent by the client and the sending time of the previous message sent by the client, and determining whether to send a message corresponding to the message sending instruction according to the time interval and a counter value, where the counter value is used to indicate that the sending time interval between two messages continuously sent by the client is less than the number of times of a preset time interval, that is, whether to send a message is limited by the time interval between the sending time of the previous message and the number of times that the sending time interval between two messages continuously sent by the client is less than the preset time interval, thereby reducing the sending times of spam messages and improving user experience.
Fig. 2 is a schematic flow diagram of another message sending method according to an embodiment of the present invention, where the embodiment is executed by a server, and fig. 2 is a description of one possible implementation manner of S102 on the basis of the embodiment shown in fig. 1, as shown in fig. 2:
s101: and receiving a message sending instruction sent by the client, and determining a time interval with the sending time of the last message sent by the client.
The detailed description of S101 refers to the detailed description in the embodiment shown in fig. 1, and is not repeated here.
S102 a: if the time interval is less than the preset time interval, the updated counter value is increased by one counting unit.
In this embodiment of the present invention, the counter value is incremented by one count unit when the sending time interval of two messages sent by the client continuously is smaller than the preset time interval.
S102 b: and if the updated counter value is larger than the preset threshold value, controlling the client to pop up a verification code prompt window to prompt a user to input a verification code.
If the updated counter values are larger than the preset threshold value, which indicates that the frequency of sending messages by the user is higher, the client is controlled to pop up a verification code prompt window to prompt the user to input the verification code, wherein the verification modes in the verification code prompt window can be various, for example: the questions can be displayed in a verification code prompt window, and the user inputs correct answers to the questions to pass the verification; alternatively, characters, letters, numbers, or the like may be displayed in the verification code prompt window, and the user repeatedly inputs the characters, letters, numbers, or the like to pass the verification; or, the embodiment of the present invention is not limited to the verification method of the verification code prompt window.
S102 c: and if the verification code input by the user is correct, determining to send a message corresponding to the message sending instruction.
The verification code input by the user can be compared with the preset verification code to determine whether the verification code input by the user is correct, and when the comparison result is that the verification code input by the user is correct, the message corresponding to the message sending instruction is determined to be sent.
Optionally, after determining to send the message corresponding to the message sending instruction, updating the counter value to an initial value, for example: the initial value may be 0, and the embodiment of the present invention is not limited thereto.
In this embodiment, when the counter value is greater than the preset threshold, that is, when the number of times that the sending time interval of two messages continuously sent by the client is smaller than the preset time interval is greater than the preset threshold, the client is controlled to pop up the verification code prompting window to prompt the user to input verification, and when the verification code input by the user is correct, the message corresponding to the message sending instruction is determined to be sent, so that the sending times of spam messages are reduced, and the user experience is improved.
Fig. 3 is a schematic flowchart of another message sending method according to an embodiment of the present invention, where the embodiment is executed by a server, and fig. 3 is based on the embodiment shown in fig. 2, and further includes: s102 c', as shown in fig. 3:
s101: and receiving a message sending instruction sent by the client, and determining a time interval with the sending time of the last message sent by the client.
S102 a: and if the time interval is smaller than the preset time interval, updating the counter value and increasing by one counting unit.
S102 b: and if the updated counter value is larger than the preset threshold value, controlling the client to pop up a verification code prompt window to prompt a user to input a verification code.
S102 c: and if the verification code input by the user is correct, determining to send a message corresponding to the message sending instruction.
S102 c': and if the verification code input by the user is wrong, determining to refuse to send the message corresponding to the message sending instruction.
For the detailed description of S101, S102a, S102b, and S102c, reference is made to the detailed description of corresponding steps in the embodiment shown in fig. 2, which is not repeated herein.
And when the verification code input by the user is wrong, refusing to send the message corresponding to the message sending instruction. Optionally, the client may be controlled to display a prompt message indicating that the verification fails, or the client may be controlled to display a prompt message indicating that the transmission fails, so as to prompt the user of the message transmission failure.
In this embodiment, when the counter value is greater than the preset threshold, that is, when the number of times that the sending time interval of two messages continuously sent by the client is smaller than the preset time interval is greater than the preset threshold, the client is controlled to pop up the verification code prompt window to prompt the user to input verification, when the verification code input by the user is correct, the message corresponding to the message sending instruction is determined to be sent, and when the verification code input by the user is incorrect, the message corresponding to the message sending instruction is determined to be refused to be sent, so that the sending number of spam messages is reduced, and the user experience is improved.
Fig. 4 is a schematic flowchart of another message sending method according to an embodiment of the present invention, where the embodiment is executed by a server, and fig. 4 is based on the embodiment shown in fig. 3, and further includes: s102 b', as shown in fig. 4:
s101: and receiving a message sending instruction sent by the client, and determining a time interval with the sending time of the last message sent by the client.
S102 a: and if the time interval is smaller than the preset time interval, updating the counter value and increasing by one counting unit.
S102 b': and if the updated counter value is less than or equal to the preset threshold value, determining to send a message corresponding to the message sending instruction.
S102 b: and if the updated counter value is larger than the preset threshold value, controlling the client to pop up a verification code prompt window to prompt a user to input a verification code.
S102 c: and if the verification code input by the user is correct, determining to send a message corresponding to the message sending instruction.
S102 c': and if the verification code input by the user is wrong, determining to refuse to send the message corresponding to the message sending instruction.
For the detailed description of S101, S102a, S102b, S102c, and S102 c', reference is made to the detailed description of corresponding steps in the embodiment shown in fig. 3, which is not repeated herein.
In this embodiment, when the updated counter value is less than or equal to the preset threshold, it is determined to send a message corresponding to the message sending instruction, when the counter value is greater than the preset threshold, that is, when the sending time interval between two messages continuously sent by the client is less than the preset time interval, the number of times is greater than the preset threshold, the client is controlled to pop up the verification code prompting window to prompt the user to input verification, when the verification code input by the user is correct, it is determined to send a message corresponding to the message sending instruction, and when the verification code input by the user is incorrect, it is determined to refuse to send a message corresponding to the message sending instruction, thereby reducing the sending times of spam messages and improving user experience.
Fig. 5 is a schematic flowchart of another message sending method according to an embodiment of the present invention, where the embodiment is executed by a server, and fig. 5 is based on the embodiment shown in fig. 4, and further includes: s102 a', as shown in fig. 5:
s101: and receiving a message sending instruction sent by the client, and determining a time interval with the sending time of the last message sent by the client.
S102 a': and if the time interval is greater than or equal to the preset time interval, determining to send the message corresponding to the message sending instruction.
If the time interval is greater than or equal to the preset time interval, it indicates that the time interval is longer than the time interval of the sending time of the last message sent by the client, so that the message corresponding to the message sending instruction can be determined to be sent.
S102 a: and if the time interval is smaller than the preset time interval, updating the counter value and increasing by one counting unit.
S102 b': and if the updated counter value is less than or equal to the preset threshold value, determining to send a message corresponding to the message sending instruction.
S102 b: if the updated counter value is larger than the preset threshold value, controlling the client to pop up a verification code prompting window to prompt a user to input a verification code;
s102 c': and if the verification code input by the user is correct, determining to send a message corresponding to the message sending instruction.
S102 c: and if the verification code input by the user is wrong, determining to refuse to send the message corresponding to the message sending instruction.
For the detailed description of S101, S102a, S102b ', S102b, S102c, and S102 c', reference is made to the detailed description of corresponding steps in the embodiment shown in fig. 4, which is not repeated herein.
In this embodiment, after receiving a message sending instruction sent by a client, if it is determined that a time interval between the sending time of a previous message sent by the client and the sending time of the previous message sent by the client is greater than or equal to a preset time interval, a message corresponding to the message sending instruction is determined to be sent, if it is determined that the time interval between the sending time of the previous message sent by the client and the sending time of the previous message sent by the client is smaller than the preset time interval, a counter value is updated, if the updated counter value is smaller than or equal to a preset threshold, a message corresponding to the message sending instruction is determined to be sent, if the counter value is greater than the preset threshold, that is, if the number of times that the sending time interval between two messages continuously sent by the client is smaller than the preset time interval is greater than the preset threshold, the client is controlled to pop up a verification code prompt window to prompt a user to input verification, and if a verification, and when the verification code input by the user is wrong, determining to refuse to send the message corresponding to the message sending instruction, so that the sending times of the junk message are reduced, and the user experience is improved.
Fig. 6 is a flowchart illustrating a further message sending method according to an embodiment of the present invention, where the method is executed by a server, and the method of the embodiment is applied to a scenario in which the number of times of sending spam messages to the same receiver is reduced, as shown in fig. 6:
s101 a: and receiving a message sending instruction sent by the client.
S101 b: and acquiring a receiver of the message corresponding to the message sending instruction.
The receiver can be determined by the destination IP address, destination MAC address, destination host name, etc. of the message corresponding to the message sending instruction.
S101 c: and determining the time interval with the sending time of the last message sent by the client to the receiver.
S102: and determining whether to send the message corresponding to the message sending instruction or not according to the time interval and the counter value.
The counter value is used for indicating the number of times that the sending time interval of two messages continuously sent by the client is smaller than a preset time interval.
The detailed description of S102 refers to the detailed description of the corresponding steps in the embodiment shown in fig. 1, and is not repeated here.
In this embodiment, a message sending instruction sent by a client is received, a receiver of a message corresponding to the message sending instruction is obtained, a time interval between the time interval and the sending time of the last message sent by the client to the receiver is determined, and whether the message corresponding to the message sending instruction is sent or not is determined according to the time interval and a counter value, so that the number of times of sending spam messages to the same receiver is reduced, and user experience is improved.
Fig. 7 is a schematic structural diagram of a message sending apparatus according to an embodiment of the present invention, as shown in fig. 7, the apparatus of this embodiment is deployed in a server, and the apparatus of this embodiment includes a receiving module 701 and a processing module 702, where the receiving module 701 is configured to receive a message sending instruction sent by a client and determine a time interval between the sending time of a previous message sent by the client and the sending time of the previous message sent by the client; the processing module 702 is configured to determine whether to send a message corresponding to the message sending instruction according to the time interval and a counter value, where the counter value is used to indicate a number of times that a sending time interval of two messages continuously sent by the client is smaller than a preset time interval.
The apparatus of this embodiment may be used to implement the technical solution of the embodiment of the method shown in fig. 1, and the implementation principle is similar, which is not described herein again.
In this embodiment, a receiving module receives a message sending instruction sent by a client, determines a time interval of sending time of a previous message sent by the client, and a processing module determines whether to send a message corresponding to the message sending instruction according to the time interval and a counter value, where the counter value is used to indicate that the sending time interval of two messages continuously sent by the client is less than the number of times of a preset time interval, that is, whether to send the message is limited by the time interval of the sending time of the previous message and the number of times that the sending time interval of two messages continuously sent by the client is less than the preset time interval, so that the sending times of spam messages are reduced, and user experience is improved.
As shown in fig. 7, the apparatus of this embodiment includes a receiving module 701 and a processing module 702, where the receiving module 701 is configured to receive a message sending instruction sent by a client, and determine a time interval between the sending time of a previous message sent by the client and the sending time of the previous message sent by the client; the processing module 702 is configured to update the counter value and increase the counter value by one count unit if the time interval is smaller than the preset time interval; if the updated counter value is larger than a preset threshold value, controlling the client to pop up a verification code prompt window so as to prompt a user to input a verification code; and if the verification code input by the user is correct, determining to send the message corresponding to the message sending instruction, wherein the counter value is used for indicating the number of times that the sending time interval of two messages continuously sent by the client is smaller than a preset time interval.
Optionally, the processing module 702 is further configured to update the counter value to the initial value.
The apparatus of this embodiment may be used to implement the technical solution of the method embodiment shown in fig. 2, and the implementation principle is similar, which is not described herein again.
In this embodiment, when the counter value is greater than the preset threshold, that is, when the number of times that the sending time interval of two messages continuously sent by the client is smaller than the preset time interval is greater than the preset threshold, the processing module controls the client to pop up the verification code prompting window to prompt the user to input verification, and when the verification code input by the user is correct, the message corresponding to the message sending instruction is determined to be sent, so that the sending times of spam messages are reduced, and the user experience is improved.
As shown in fig. 7, the apparatus of this embodiment includes a receiving module 701 and a processing module 702, where the receiving module 701 is configured to receive a message sending instruction sent by a client, and determine a time interval between the sending time of a previous message sent by the client and the sending time of the previous message sent by the client; the processing module 702 is configured to update the counter value and increase the counter value by one count unit if the time interval is smaller than the preset time interval; if the updated counter value is larger than a preset threshold value, controlling the client to pop up a verification code prompt window so as to prompt a user to input a verification code; and if the verification code input by the user is correct, determining to send the message corresponding to the message sending instruction, and if the verification code input by the user is wrong, determining to refuse to send the message corresponding to the message sending instruction. The counter value is used for indicating the number of times that the sending time interval of two messages continuously sent by the client is smaller than a preset time interval.
The apparatus of this embodiment may be used to implement the technical solution of the method embodiment shown in fig. 3, and the implementation principle is similar, which is not described herein again.
In this embodiment, when the counter value is greater than the preset threshold, that is, when the number of times that the sending time interval of two messages continuously sent by the client is smaller than the preset time interval is greater than the preset threshold, the processing module controls the client to pop up the verification code prompting window to prompt the user to input verification, when the verification code input by the user is correct, the message corresponding to the message sending instruction is determined to be sent, and when the verification code input by the user is incorrect, the message corresponding to the message sending instruction is determined to be refused to be sent, so that the sending number of spam messages is reduced, and the user experience is improved.
As shown in fig. 7, the apparatus of this embodiment includes a receiving module 701 and a processing module 702, where the receiving module 701 is configured to receive a message sending instruction sent by a client, and determine a time interval between the sending time of a previous message sent by the client and the sending time of the previous message sent by the client; the processing module 702 is configured to update the counter value and increase the counter value by one count unit if the time interval is smaller than the preset time interval; and if the updated counter value is smaller than or equal to a preset threshold value, determining to send the message corresponding to the message sending instruction. If the updated counter value is larger than a preset threshold value, controlling the client to pop up a verification code prompt window so as to prompt a user to input a verification code; and if the verification code input by the user is correct, determining to send the message corresponding to the message sending instruction, and if the verification code input by the user is wrong, determining to refuse to send the message corresponding to the message sending instruction. The counter value is used for indicating the number of times that the sending time interval of two messages continuously sent by the client is smaller than a preset time interval.
The apparatus of this embodiment may be used to implement the technical solution of the method embodiment shown in fig. 4, and the implementation principle is similar, which is not described herein again.
In this embodiment, when the updated counter value is less than or equal to the preset threshold, the processing module determines to send a message corresponding to the message sending instruction, when the counter value is greater than the preset threshold, that is, when the sending time interval between two messages continuously sent by the client is less than the preset time interval, the processing module controls the client to pop up the verification code prompting window to prompt the user to input verification, when the verification code input by the user is correct, the processing module determines to send the message corresponding to the message sending instruction, and when the verification code input by the user is incorrect, the processing module determines to reject to send the message corresponding to the message sending instruction, thereby reducing the sending times of spam messages and improving user experience.
As shown in fig. 7, the apparatus of this embodiment includes a receiving module 701 and a processing module 702, where the receiving module 701 is configured to receive a message sending instruction sent by a client, and determine a time interval between the sending time of a previous message sent by the client and the sending time of the previous message sent by the client; the processing module 702 is configured to determine to send a message corresponding to the message sending instruction if the time interval is greater than or equal to a preset time interval, and update the counter value to increase by one count unit if the time interval is less than the preset time interval; and if the updated counter value is smaller than or equal to a preset threshold value, determining to send the message corresponding to the message sending instruction. If the updated counter value is larger than a preset threshold value, controlling the client to pop up a verification code prompt window so as to prompt a user to input a verification code; and if the verification code input by the user is correct, determining to send the message corresponding to the message sending instruction, and if the verification code input by the user is wrong, determining to refuse to send the message corresponding to the message sending instruction. The counter value is used for indicating the number of times that the sending time interval of two messages continuously sent by the client is smaller than a preset time interval.
The apparatus of this embodiment may be used to implement the technical solution of the method embodiment shown in fig. 5, and the implementation principle is similar, which is not described herein again.
In this embodiment, after receiving a message sending instruction sent by a client through a receiving module, if it is determined that a time interval between the sending time of a previous message sent by the client and the sending time of the previous message sent by the client is greater than or equal to a preset time interval, a processing module determines to send the message corresponding to the message sending instruction, if it is determined that the time interval between the sending time of the previous message sent by the client and the sending time of the previous message sent by the client is smaller than the preset time interval, a counter value is updated, if the updated counter value is smaller than or equal to a preset threshold, a message corresponding to the message sending instruction is determined, if the counter value is greater than the preset threshold, that is, if the number of times that the sending time interval between two messages continuously sent by the client is smaller than the preset time interval is greater than the preset threshold, the client is controlled to pop up a verification code prompt window to prompt a user, and determining to send the message corresponding to the message sending instruction, and determining to refuse to send the message corresponding to the message sending instruction when the verification code input by the user is wrong, so that the sending times of the junk messages are reduced, and the user experience is improved.
As shown in fig. 7, the apparatus of this embodiment includes a receiving module 701 and a processing module 702, where the receiving module 701 is configured to obtain a receiver of a message corresponding to the message sending instruction; determining a time interval with the sending time of the last message sent by the client to the receiver; the processing module 702 is configured to determine whether to send a message corresponding to the message sending instruction according to the time interval and a counter value, where the counter value is used to indicate a number of times that a sending time interval of two messages continuously sent by the client is smaller than a preset time interval.
The apparatus of this embodiment may be used to implement the technical solution of the method embodiment shown in fig. 6, and the implementation principle is similar, which is not described herein again.
In this embodiment, the receiving module receives a message sending instruction sent by the client, obtains a receiver of a message corresponding to the message sending instruction, and determines a time interval between the time interval and the sending time of the last message sent by the client to the receiver, and the processing module determines whether to send the message corresponding to the message sending instruction according to the time interval and the counter value, so that the frequency of sending spam messages to the same receiver is reduced, and the user experience is improved.
In the embodiments of the apparatus according to the present invention, the apparatus for sending a message according to the above-mentioned method may divide the functional modules, for example, each functional module may be divided according to each function, or two or more functions may be integrated into one processing module. The integrated module can be realized in a hardware mode, and can also be realized in a software functional module mode. It should be noted that the division of the modules in the embodiments of the present invention is schematic, and is only a logical function division, and there may be another division manner in actual implementation.
Fig. 8 is a schematic structural diagram of another message sending apparatus according to an embodiment of the present invention, including: a memory 81 and a processor 82, wherein the memory 81 is used for storing program instructions, and the memory may be a flash (flash memory). A processor 82 for invoking and executing program instructions in the memory to implement the steps of the method of message sending shown in any of fig. 1-6. Reference may be made in particular to the description relating to the preceding method embodiment.
Alternatively, the memory 81 may be separate, or the memory 81 may be integrated with the processor 82.
An embodiment of the present invention further provides an electronic device, where the electronic device is configured to execute each step in the message sending method shown in any one of fig. 1 to 6.
The present invention also provides a readable storage medium having stored therein a computer program which, when executed by at least one processor of a messaging device, causes the messaging device to perform the method of any of fig. 1-6.
The present invention also provides a program product comprising a computer program, the computer program being stored in a readable storage medium. The computer program can be read from a readable storage medium by at least one processor of a messaging device, and execution of the computer program by the at least one processor causes the messaging device to perform the method described in any of fig. 1-6.
Those of ordinary skill in the art will understand that: all or a portion of the steps of implementing the above-described method embodiments may be performed by hardware associated with program instructions. The program may be stored in a computer-readable storage medium. When executed, the program performs steps comprising the method embodiments described above; and the aforementioned storage medium includes: various media that can store program codes, such as ROM, RAM, magnetic or optical disks.
Finally, it should be noted that: the above embodiments are only used to illustrate the technical solution of the present invention, and not to limit the same; while the invention has been described in detail and with reference to the foregoing embodiments, it will be understood by those skilled in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some or all of the technical features may be equivalently replaced; and the modifications or the substitutions do not make the essence of the corresponding technical solutions depart from the scope of the technical solutions of the embodiments of the present invention.
Claims (9)
1. A method of messaging, comprising:
receiving a message sending instruction sent by a client, and determining a time interval between the sending time of the message and the sending time of the last message sent by the client;
determining whether to send a message corresponding to the message sending instruction according to the time interval and a counter value, wherein the counter value is used for indicating the number of times that the sending time interval of two messages continuously sent by the client is smaller than a preset time interval;
determining whether to send the message corresponding to the message sending instruction according to the time interval and the counter value includes:
if the time interval is smaller than the preset time interval, updating the counter value and increasing one counting unit;
if the updated counter value is larger than a preset threshold value, controlling the client to pop up a verification code prompt window so as to prompt a user to input a verification code;
and if the verification code input by the user is correct, determining to send the message corresponding to the message sending instruction.
2. The method of claim 1, further comprising:
and if the verification code input by the user is wrong, determining to refuse to send the message corresponding to the message sending instruction.
3. The method of claim 2, further comprising:
and if the updated counter value is smaller than or equal to a preset threshold value, determining to send the message corresponding to the message sending instruction.
4. The method of claim 3, further comprising:
and if the time interval is greater than or equal to a preset time interval, determining to send the message corresponding to the message sending instruction.
5. The method according to claim 1, wherein after sending the message corresponding to the message sending instruction, further comprising:
and updating the counter value to an initial value.
6. The method according to any one of claims 1 to 5,
the determining the time interval with the sending time of the last message sent by the client comprises:
acquiring a receiver of the message corresponding to the message sending instruction;
and determining the time interval with the sending time of the last message sent by the client to the receiver.
7. An apparatus for messaging, comprising:
the receiving module is used for receiving a message sending instruction sent by a client and determining a time interval between the sending time of the message and the sending time of the last message sent by the client;
the processing module is used for determining whether to send the message corresponding to the message sending instruction according to the time interval and a counter value, wherein the counter value is used for indicating the times that the sending time interval of two messages continuously sent by the client is smaller than a preset time interval;
the processing module is specifically configured to update the counter value and increase by one count unit if the time interval is smaller than the preset time interval; if the updated counter value is larger than a preset threshold value, controlling the client to pop up a verification code prompt window so as to prompt a user to input a verification code; and if the verification code input by the user is correct, determining to send the message corresponding to the message sending instruction.
8. An electronic device, comprising:
a memory for storing program instructions;
a processor for invoking and executing program instructions in the memory to implement the method of messaging of any of claims 1-6.
9. A readable storage medium, in which a computer program is stored, which, when executed by at least one processor of a processing device of a message sending device, causes the message sending device to perform the method of message sending according to any one of claims 1 to 6.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201810284280.1A CN108650167B (en) | 2018-04-02 | 2018-04-02 | Message sending method and device, electronic equipment and readable storage medium |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201810284280.1A CN108650167B (en) | 2018-04-02 | 2018-04-02 | Message sending method and device, electronic equipment and readable storage medium |
Publications (2)
Publication Number | Publication Date |
---|---|
CN108650167A CN108650167A (en) | 2018-10-12 |
CN108650167B true CN108650167B (en) | 2021-06-01 |
Family
ID=63745290
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201810284280.1A Active CN108650167B (en) | 2018-04-02 | 2018-04-02 | Message sending method and device, electronic equipment and readable storage medium |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN108650167B (en) |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101325561A (en) * | 2007-06-12 | 2008-12-17 | 阿里巴巴集团控股有限公司 | Method, apparatus and system for processing electronic mail |
CN102231888A (en) * | 2011-06-24 | 2011-11-02 | 中兴通讯股份有限公司 | Monitoring method and device |
CN102315955A (en) * | 2010-06-30 | 2012-01-11 | 上海薄荷信息科技有限公司 | Control method for setting obstruction for junk information and corresponding control device |
CN102572746A (en) * | 2010-12-28 | 2012-07-11 | 上海粱江通信系统股份有限公司 | Method for identifying spam message source based on frequency and user sending behavior characteristics |
Family Cites Families (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US8180835B1 (en) * | 2006-10-14 | 2012-05-15 | Engate Technology Corporation | System and method for protecting mail servers from mail flood attacks |
US10165530B2 (en) * | 2016-03-22 | 2018-12-25 | Christoph RULAND | Verification of time information transmitted by time signals or time telegrams |
-
2018
- 2018-04-02 CN CN201810284280.1A patent/CN108650167B/en active Active
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101325561A (en) * | 2007-06-12 | 2008-12-17 | 阿里巴巴集团控股有限公司 | Method, apparatus and system for processing electronic mail |
CN102315955A (en) * | 2010-06-30 | 2012-01-11 | 上海薄荷信息科技有限公司 | Control method for setting obstruction for junk information and corresponding control device |
CN102572746A (en) * | 2010-12-28 | 2012-07-11 | 上海粱江通信系统股份有限公司 | Method for identifying spam message source based on frequency and user sending behavior characteristics |
CN102231888A (en) * | 2011-06-24 | 2011-11-02 | 中兴通讯股份有限公司 | Monitoring method and device |
Also Published As
Publication number | Publication date |
---|---|
CN108650167A (en) | 2018-10-12 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US9729573B2 (en) | Phishing campaign ranker | |
CN103888619B (en) | A message processing method and system thereof | |
CN103546363A (en) | A method, device and system for pushing instant messaging messages | |
CN111683114A (en) | Method and device for upgrading equipment program, terminal equipment and storage medium | |
US9749359B2 (en) | Phishing campaign ranker | |
CN111782229B (en) | Method and device for starting small program and electronic equipment | |
US11088974B2 (en) | Cross-platform messaging system | |
US10205813B2 (en) | Method and system for detecting abnormal contact information and server | |
CN107623664B (en) | Password input method and device | |
CN108650167B (en) | Message sending method and device, electronic equipment and readable storage medium | |
CN112667255B (en) | Updating method, updating device, electronic equipment and storage medium | |
EP3264851A1 (en) | Data transmission method and device for data service | |
CN113691628A (en) | Task switching method and device, system, electronic equipment and computer medium | |
CN113590017B (en) | Method, electronic device and computer program product for processing data | |
CN106971296A (en) | A kind of method, electronic equipment and the storage medium of processing information object | |
CN108156071B (en) | Method for adding members to community, terminal device and computer readable storage medium | |
CN107608722B (en) | Application program downloading method and device | |
CN114285799B (en) | Method, device, terminal and storage medium for processing service | |
EP3293924B1 (en) | Message processing method and device | |
CN105119801B (en) | A kind of social message management method, system, user terminal and server | |
CN110430118B (en) | Bill mail managing method, apparatus, computer device and computer readable storage medium | |
CN107864127B (en) | Application program identification method and device | |
CN113703826A (en) | Method, apparatus, device and storage medium for responding to data processing request | |
CN112619156A (en) | Game account binding method, device and equipment | |
CN111259369A (en) | Man-machine identity verification method and system |
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 |