CN112672295A - Message sending method and device, electronic equipment and storage medium - Google Patents

Message sending method and device, electronic equipment and storage medium Download PDF

Info

Publication number
CN112672295A
CN112672295A CN202011570104.8A CN202011570104A CN112672295A CN 112672295 A CN112672295 A CN 112672295A CN 202011570104 A CN202011570104 A CN 202011570104A CN 112672295 A CN112672295 A CN 112672295A
Authority
CN
China
Prior art keywords
address
short message
processing number
virtual
processing
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.)
Granted
Application number
CN202011570104.8A
Other languages
Chinese (zh)
Other versions
CN112672295B (en
Inventor
张瑞
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Agricultural Bank Of China Financial Technology Co ltd
Agricultural Bank of China
Original Assignee
Agricultural Bank of China
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Agricultural Bank of China filed Critical Agricultural Bank of China
Priority to CN202011570104.8A priority Critical patent/CN112672295B/en
Publication of CN112672295A publication Critical patent/CN112672295A/en
Application granted granted Critical
Publication of CN112672295B publication Critical patent/CN112672295B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

The application provides a message sending method, a message sending device, electronic equipment and a storage medium. The method for sending the message comprises the steps of firstly obtaining attribute information of the short message, wherein the attribute information of the short message comprises the type of the short message and the number of the short message. And then, based on the attribute information based on the short message, determining a sending channel corresponding to the short message. And acquiring the virtual processing number of all IP addresses in the sending channel. The virtual processing number is set according to the processing load of the IP address, and the larger the virtual processing number is, the larger the processing load of the current IP address is. And finally, selecting the IP address with the minimum virtual processing number to send the short message. Therefore, the method can set the corresponding virtual processing number according to the processing load of each IP address of the sending channel, and then selects the IP address with the minimum virtual processing number to send the short message when sending the short message, namely selects the IP address with the minimum processing load to send the short message.

Description

Message sending method and device, electronic equipment and storage medium
Technical Field
The present application relates to the field of communications technologies, and in particular, to a method and an apparatus for sending a message, an electronic device, and a storage medium.
Background
A message sending system is divided into an access system and a sending system, and a message middleware is generally required to be used for sending short messages in the process of sending the short messages. The message access system accesses and analyzes the short message, and sends the analyzed short message to the message middleware queue, and the message sending system obtains the short message from the message middleware queue, further processes the short message and sends the short message to a receiving party.
Since there are usually a plurality of transmission addresses, i.e., Internet Protocol (IP) addresses, in one message transmission channel, it is necessary to further select an IP address for message transmission. In the prior art, an IP address is generally randomly selected to send a short message, and the selection cannot be performed according to the processing capability of each IP address, which may cause too many short messages processed by some IP addresses, a large processing load, slow short message sending, and an impact on the efficiency of sending short messages, while some IP addresses may not have processable short messages, resulting in a waste of resources.
Disclosure of Invention
In view of this, the present application provides a method, an apparatus, an electronic device, and a storage medium for sending a message, so as to solve the problem in the prior art that a selection cannot be performed according to the processing capability of each IP address, which results in too many short messages processed by some IP addresses and a large processing load, which results in slow sending of short messages, which affects the efficiency of sending short messages, and some IP addresses may not have processable short messages, which results in waste of resources.
In order to achieve the above purpose, the present application provides the following technical solutions:
the first aspect of the present application discloses a method for sending a message, including:
acquiring attribute information of the short message; the attribute information of the short message comprises the type of the short message and the number of the short message;
determining a sending channel corresponding to the short message based on the attribute information of the short message;
acquiring virtual processing numbers of all IP addresses in the sending channel; the virtual processing number is set according to the processing load of the IP address, and the larger the virtual processing number is, the larger the processing load of the current IP address is;
and selecting the IP address with the minimum virtual processing number to send the short message.
Optionally, in the method, determining a sending channel corresponding to the short message based on the attribute information of the short message includes:
and inquiring a corresponding relation table of the attribute information of the short message and a sending channel, and determining the sending channel corresponding to the short message.
Optionally, in the foregoing method, a manner of setting the virtual processing number according to the processing load of the IP address includes:
setting an initial value of the virtual processing number for each IP address;
acquiring the actual processing number and the processing weight of each IP address; wherein, the actual processing number is the number of the short messages sent by the IP address;
comparing the actual processing number and the processing weight of each IP address;
if the actual processing number of the IP address is detected to be equal to the processing weight, adjusting the virtual processing number of the current IP address, and returning the actual processing number of the current IP address to zero.
Optionally, in the foregoing method, if it is detected that the actual processing number of the IP address is equal to the processing weight, adjusting the virtual processing number of the current IP address includes:
and if the actual processing number of the IP address is detected to be equal to the processing weight, adding a preset value to the virtual processing number of the current IP address.
Optionally, in the method, if it is detected that the actual processing number of the IP address is equal to the processing weight, after the adjusting the virtual processing number of the current IP address, the method further includes:
judging whether the virtual processing number of the current IP address is larger than a preset threshold value or not;
if the virtual processing number of the current IP address is larger than a preset threshold value, determining a sending channel corresponding to the current IP address, and resetting the virtual processing numbers of all IP addresses in the sending channel corresponding to the current IP address to the initial value.
Optionally, in the method, a manner that the virtual processing number is set according to a processing load of the IP address further includes:
detecting the states of all the IP addresses;
if a certain IP address is detected to be disconnected, increasing a reporting value for the virtual processing number of the disconnected IP address; and the reporting value is greater than the virtual processing number of any other IP address in the channel corresponding to the disconnected IP address.
A second aspect of the present application discloses a message sending apparatus, including:
the first acquisition unit is used for acquiring the attribute information of the short message; the attribute information of the short message comprises the type of the short message and the number of the short message;
the determining unit is used for determining a sending channel corresponding to the short message based on the attribute information of the short message;
a second obtaining unit, configured to obtain the virtual processing numbers of all IP addresses in the sending channel; the virtual processing number is set according to the processing load of the IP address, and the larger the virtual processing number is, the larger the processing load of the current IP address is;
and the selection unit is used for selecting the IP address with the minimum virtual processing number to send the short message.
Optionally, in the foregoing apparatus, the determining unit includes:
and the query subunit is used for querying the corresponding relation table of the attribute information of the short message and the sending channel and determining the sending channel corresponding to the short message.
Optionally, in the foregoing apparatus, the second obtaining unit includes:
a setting subunit, configured to set an initial value of the virtual processing number for each IP address;
the acquiring subunit is used for acquiring the actual processing number and the processing weight of each IP address; wherein, the actual processing number is the number of the short messages sent by the IP address;
a comparison subunit, configured to compare the actual processing number and the processing weight of each IP address;
an adjusting subunit, configured to adjust the virtual processing number of the current IP address and return the actual processing number of the current IP address to zero if it is detected that the actual processing number of the IP address is equal to the processing weight.
Optionally, in the above apparatus, the adjusting subunit includes:
a first adding subunit, configured to add a preset value to the virtual processing number of the current IP address if it is detected that the actual processing number of the IP address is equal to the processing weight.
Optionally, in the above apparatus, the adjusting subunit further includes:
a judging subunit, configured to judge whether the virtual processing number of the current IP address is greater than a preset threshold;
and the setting subunit is configured to determine the sending channel corresponding to the current IP address if it is determined that the virtual processing number of the current IP address is greater than a preset threshold, and reset the virtual processing numbers of all the IP addresses in the sending channel corresponding to the current IP address to the initial value.
Optionally, in the foregoing apparatus, the second obtaining unit further includes:
the detection subunit is used for detecting the states of all the IP addresses;
the second increasing subunit is used for increasing the virtual processing number of the disconnected IP address by one report value if the disconnection of a certain IP address is detected; and the reporting value is greater than the virtual processing number of any other IP address in the channel corresponding to the disconnected IP address.
A third aspect of the present application discloses an electronic device, comprising:
one or more processors;
a storage device having one or more programs stored thereon;
the one or more programs, when executed by the one or more processors, cause the one or more processors to implement the method of any of the first aspects of the present invention.
A fourth aspect of the present application discloses a computer storage medium having a computer program stored thereon, wherein the computer program, when executed by a processor, implements the method according to any one of the first aspect of the present invention.
According to the technical scheme, the method for sending the message comprises the steps of firstly obtaining attribute information of the short message, wherein the attribute information of the short message comprises the type of the short message and the number of the short message. And then, based on the attribute information based on the short message, determining a sending channel corresponding to the short message. And acquiring the virtual processing number of all IP addresses in the sending channel. The virtual processing number is set according to the processing load of the IP address, and the larger the virtual processing number is, the larger the processing load of the current IP address is. And finally, selecting the IP address with the minimum virtual processing number to send the short message. Therefore, the method sets the corresponding virtual processing number according to the processing load of each IP address of the sending channel, and then selects the IP address with the minimum virtual processing number to send the short message when sending the short message, namely selects the IP address with the minimum processing load. Therefore, the problem that in the prior art, selection cannot be performed according to the processing capacity of each IP address, so that short messages processed by some IP addresses are too much, the processing load is large, the short message sending is slow, the short message sending efficiency is affected, and the resource waste is caused because some IP addresses may not have processable short messages is solved.
Drawings
In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings needed to be used in the description of the embodiments or the prior art will be briefly introduced below, it is obvious that the drawings in the following description are only embodiments of the present application, and for those skilled in the art, other drawings can be obtained according to the provided drawings without creative efforts.
Fig. 1 is a flowchart of a method for sending a message according to an embodiment of the present application;
fig. 2 is a flowchart of an embodiment of a manner of setting the virtual processing number according to the processing load of the IP address in step S103 according to another embodiment disclosed in the present application;
FIG. 3 is a schematic diagram of a messaging device according to another embodiment of the present disclosure;
fig. 4 is a schematic diagram of an electronic device according to another embodiment of the disclosure.
Detailed Description
The technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are only a part of the embodiments of the present application, 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 application.
In this application, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other identical elements in a process, method, article, or apparatus that comprises the element.
Moreover, in this document, relational terms such as first and second, and the like may be used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions.
As can be seen from the background art, in the prior art, an IP address is generally randomly selected to send a short message, and the selection cannot be performed according to the processing capability of each IP address, which may cause too many short messages processed by some IP addresses, a large processing load, slow short message sending, and an impact on the efficiency of sending short messages, and some IP addresses may not have processable short messages, resulting in a waste of resources.
In view of this, the present application provides a method and an apparatus for sending a message, an electronic device, and a storage medium, so as to solve the problem in the prior art that a selection cannot be performed according to the processing capability of each IP address, which results in excessive short messages processed by some IP addresses and large processing load, which results in slow sending of short messages, which affects the efficiency of sending short messages, and some IP addresses may not have processable short messages, which results in waste of resources.
The embodiment of the present invention discloses a method for sending a message, which specifically includes, as shown in fig. 1:
s101, acquiring attribute information of the short message; the attribute information of the short message comprises the type of the short message and the number of the short message.
It should be noted that when a short message needs to be sent, the short message needing to be sent is first acquired from the message queue, and then attribute information of the short message is acquired, where the attribute information of the short message includes a type of the short message and a number of the short message.
And S102, determining a sending channel corresponding to the short message based on the attribute information of the short message.
It should be noted that after the attribute information such as the type of the short message, the number of the short message, and the like is acquired, the receiver of the short message and the transmission channel to be selected by the short message can be determined according to the attribute information of the short message.
It should be noted that a routing configuration file of a message sending process may be established in the message sending system, and the configuration file includes information such as channel information of each sending channel, all IP addresses configured in each channel, and processing weight of each IP address. Therefore, when the short message is sent, the configuration file can be read to obtain information such as channel information of each sending channel, all IP addresses configured in each channel, processing weight of each IP address and the like, and meanwhile, the sending channel corresponding to the attribute of the short message can be determined according to the information.
Optionally, in another embodiment of the present application, an implementation manner of step S102 may include:
and inquiring a corresponding relation table of the attribute information of the short message and the sending channel, and determining the sending channel corresponding to the short message.
It should be noted that, the routing configuration file in the message sending process may include a table of correspondence between the attribute information of the short message and the sending channel. When the short message is sent, after the attribute information such as the type of the short message, the number of the short message and the like is acquired, the corresponding relation table of the attribute information of the short message and the sending channel stored in the routing configuration file of the message sending process is read, so that the sending channel corresponding to the short message is determined.
S103, acquiring virtual processing numbers of all IP addresses in a sending channel; the virtual processing number is set according to the processing load of the IP address, and the larger the virtual processing number is, the larger the processing load of the current IP address is.
It should be noted that the virtual processing number corresponding to the IP address is set according to the current processing load of the IP address, and since the message processing capability of each IP address may be different, it is necessary to set the corresponding virtual processing number for each IP address according to the current actual short message processing condition of each IP address and the message processing capability of the IP address, so that the current processing load of each IP address can be visually represented. The larger the value of the virtual processing number is, the larger the processing load of the current IP address is, and the smaller the value of the virtual processing number is, the smaller the processing load of the current IP address is. Therefore, after the receiver of the short message is determined according to the attribute information of the short message and the sending channel required to be selected by the short message is determined, the virtual processing number of all the IP addresses in the current sending channel is obtained, so that the processing load condition of all the IP addresses in the current sending channel is known.
Optionally, in another embodiment of the present application, an implementation manner of the manner in which the virtual processing number is set according to the processing load of the IP address in step S103 specifically includes, as shown in fig. 2:
s201, setting an initial value of a virtual processing number for each IP address.
It should be noted that, since the virtual processing number can represent the current processing load of each IP address, when the IP address does not start processing the short message, an initial value needs to be set to indicate that the current IP address does not start processing the short message. The initial value may be set according to actual conditions, and may be generally set to 0, and when the virtual processing number of the IP address is 0, it indicates that the current IP address has not started to process the short message, and the processing load is minimum.
S202, acquiring the actual processing number and the processing weight of each IP address; the actual processing number is the number of messages sent by the IP address.
It should be noted that the processing weight of each IP address is obtained by reading the routing configuration file of the message sending process, and the condition of processing the short message of each IP is monitored in real time, so as to obtain the actual processing number of each IP address, where the actual processing number is the number of the short messages sent by the IP address.
S203, comparing the actual processing number and the processing weight of each IP address.
After acquiring the actual processing number and the processing weight of each IP address, the actual processing number and the processing weight of each IP address are compared to detect whether the actual processing number reaches the processing weight.
And S204, if the fact that the actual processing number of the IP address is equal to the processing weight is detected, adjusting the virtual processing number of the current IP address, and enabling the actual processing number of the current IP address to return to zero.
It should be noted that, if it is detected that the actual processing number of the IP address is equal to the processing weight, the virtual processing number of the current IP address is adjusted. And meanwhile, the actual processing number of the current IP address is reset to zero, and when the actual processing number of the IP address is equal to the processing weight again, the virtual processing number of the current IP address is adjusted again, so that the virtual processing number is adjusted circularly.
Optionally, in another embodiment of the present application, if it is detected in step S204 that the actual processing number of the IP address is equal to the processing weight, an implementation manner of adjusting the virtual processing number of the current IP address may include:
and if the actual processing number of the IP address is detected to be equal to the processing weight, adding a preset value to the virtual processing number of the current IP address.
It should be noted that, if it is detected that the actual processing number of the IP address is equal to the processing weight, a preset value is added to the virtual processing number of the current IP address, which indicates the processing load indication of the current IP address. For example, if it is detected that the actual number of processes for an IP address is equal to the processing weight, the virtual number of processes for the current IP address is incremented by 1.
And S104, selecting the IP address with the minimum virtual processing number to send the short message.
It should be noted that after the virtual processing numbers of all the IP addresses in the transmission channel are obtained, one IP address with the minimum virtual processing number is selected to transmit the short message. Therefore, when the short message is sent, the IP address with the minimum processing load can be selected each time to send the short message, the processing load of each IP address is adjusted, the resource allocation is balanced, and meanwhile, the processing speed of the short message is guaranteed. If the IP address with the minimum virtual processing number is more than one, one IP address is randomly selected from the IP addresses with the minimum virtual processing number to send the short message.
In the method for sending the message provided by the embodiment of the application, the attribute information of the short message is firstly acquired, wherein the attribute information of the short message comprises the type of the short message and the number of the short message. And then, based on the attribute information based on the short message, determining a sending channel corresponding to the short message. And acquiring the virtual processing number of all IP addresses in the sending channel. The virtual processing number is set according to the processing load of the IP address, and the larger the virtual processing number is, the larger the processing load of the current IP address is. And finally, selecting the IP address with the minimum virtual processing number to send the short message. Therefore, the method sets the corresponding virtual processing number according to the processing load of each IP address of the sending channel, and then selects the IP address with the minimum virtual processing number to send the short message when sending the short message, namely selects the IP address with the minimum processing load. Therefore, the problem that in the prior art, selection cannot be performed according to the processing capacity of each IP address, so that short messages processed by some IP addresses are too much, the processing load is large, the short message sending is slow, the short message sending efficiency is affected, and the resource waste is caused because some IP addresses may not have processable short messages is solved.
Optionally, in another embodiment of the present application, if it is detected in step S204 that the actual processing number of the IP address is equal to the processing weight, after adjusting the virtual processing number of the current IP address, the method may further include:
and judging whether the virtual processing number of the current IP address is greater than a preset threshold value.
And if the virtual processing number of the current IP address is larger than the preset threshold value, determining the sending channel corresponding to the current IP address, and resetting the virtual processing numbers of all the IP addresses in the sending channel corresponding to the current IP address to initial values.
It should be noted that, in order to prevent the data amount from being too large, a preset threshold may be set for each IP address, and the threshold may be set according to actual situations, for example, set to 5000000. And if the virtual processing number of the current IP address is judged to be larger than the preset threshold value, further determining the sending channel corresponding to the current IP address. And then resetting the virtual processing numbers of all the IP addresses in the sending channel corresponding to the current IP address as initial values. Therefore, the processing data of all IP addresses in the current channel is reset, and the memory of the system is released.
Optionally, in another embodiment of the present application, an implementation manner of the setting of the virtual processing number according to the processing load of the IP address in step S103 may further include:
the status of all IP addresses is detected.
If a certain IP address is detected to be disconnected, increasing a reporting value for the virtual processing number of the disconnected IP address; and the reporting value is greater than the virtual processing number of any other IP address in the channel corresponding to the disconnected IP address.
It should be noted that, the message sending system detects the states of all IP addresses in real time, and once a certain IP address is detected to be disconnected, increases the virtual processing number of the disconnected IP address by a reporting value, which can be set according to actual conditions but is greater than the virtual processing number of any other IP address in the channel corresponding to the currently disconnected IP address. Therefore, as the virtual processing number of the currently disconnected IP address is the largest, when a message is sent, the currently disconnected IP address is not selected to send the short message, thereby avoiding the condition of short message sending failure.
Another embodiment of the present application further discloses a device for sending a message, as shown in fig. 3, specifically including:
a first obtaining unit 301, configured to obtain attribute information of a short message; the attribute information of the short message comprises the type of the short message and the number of the short message.
The determining unit 302 is configured to determine a sending channel corresponding to the short message based on the attribute information of the short message.
A second obtaining unit 303, configured to obtain the virtual processing numbers of all IP addresses in the transmission channel; the virtual processing number is set according to the processing load of the IP address, and the larger the virtual processing number is, the larger the processing load of the current IP address is.
The selecting unit 304 is configured to select an IP address with the smallest virtual processing number for sending a short message.
In the method for sending a message provided by the embodiment of the present application, first, the first obtaining unit 301 obtains attribute information of a short message, where the attribute information of the short message includes a type of the short message and a number of the short message. Then, based on the attribute information based on the short message, the determining unit 302 determines a sending channel corresponding to the short message. The second acquisition unit 303 acquires the virtual process numbers of all IP addresses in the transmission channel. The virtual processing number is set according to the processing load of the IP address, and the larger the virtual processing number is, the larger the processing load of the current IP address is. Finally, the selection unit 304 selects an IP address with the minimum virtual processing number to send the short message. Therefore, the method sets the corresponding virtual processing number according to the processing load of each IP address of the sending channel, and then selects the IP address with the minimum virtual processing number to send the short message when sending the short message, namely selects the IP address with the minimum processing load. Therefore, the problem that in the prior art, selection cannot be performed according to the processing capacity of each IP address, so that short messages processed by some IP addresses are too much, the processing load is large, the short message sending is slow, the short message sending efficiency is affected, and the resource waste is caused because some IP addresses may not have processable short messages is solved.
In this embodiment, for specific implementation processes of the first obtaining unit 301, the determining unit 302, the second obtaining unit 303, and the selecting unit 304, reference may be made to the contents of the method embodiment in fig. 1, and details are not described here again.
Optionally, in another embodiment of the present application, an implementation manner of the determining unit 302 includes:
and the query subunit is used for querying the corresponding relation table of the attribute information of the short message and the sending channel and determining the sending channel corresponding to the short message.
In this embodiment, the specific execution process of the query subunit may refer to the content of the above corresponding method embodiment, which is not described herein again.
Optionally, in another embodiment of the present application, an implementation manner of the second obtaining unit 303 includes:
and the setting subunit is used for setting an initial value of the virtual processing number for each IP address.
The acquiring subunit is used for acquiring the actual processing number and the processing weight of each IP address; the actual processing number is the number of short messages sent by the IP address.
And the comparison subunit is used for comparing the actual processing number and the processing weight of each IP address.
And the adjusting subunit is used for adjusting the virtual processing number of the current IP address and zeroing the actual processing number of the current IP address if the fact that the actual processing number of the IP address is equal to the processing weight is detected.
In this embodiment, the specific execution processes of the setting subunit, the obtaining subunit, the comparing subunit and the adjusting subunit can refer to the content of the embodiment of the method corresponding to fig. 2, and are not described herein again.
Optionally, in another embodiment of the present application, an implementation manner of the foregoing adjusting subunit includes:
and the first adding subunit is used for adding a preset value to the virtual processing number of the current IP address if the fact that the actual processing number of the IP address is equal to the processing weight is detected.
In this embodiment, the specific execution process of the first adding subunit may refer to the content of the corresponding method embodiment described above, and details are not described here.
Optionally, in another embodiment of the present application, an implementation manner of the foregoing adjusting subunit further includes:
and the judging subunit is used for judging whether the virtual processing number of the current IP address is greater than a preset threshold value.
And the setting subunit is used for determining the sending channel corresponding to the current IP address and resetting the virtual processing numbers of all the IP addresses in the sending channel corresponding to the current IP address as initial values if the virtual processing number of the current IP address is judged to be larger than the preset threshold value.
In this embodiment, the specific execution processes of the determining subunit and the setting subunit can refer to the contents of the above corresponding method embodiments, which are not described herein again.
Optionally, in another embodiment of the present application, an implementation manner of the second obtaining unit further includes:
and the detection subunit is used for detecting the states of all the IP addresses.
The second increasing subunit is used for increasing the virtual processing number of the disconnected IP address by one report value if the disconnection of a certain IP address is detected; and the reporting value is greater than the virtual processing number of any other IP address in the channel corresponding to the disconnected IP address.
In this embodiment, the specific execution processes of the detecting subunit and the second adding subunit can refer to the contents of the above corresponding method embodiments, and are not described herein again.
Another embodiment of the present application further provides an electronic device, as shown in fig. 4, specifically including:
one or more processors 401.
A storage device 402 having one or more programs stored thereon.
The one or more programs, when executed by the one or more processors 401, cause the one or more processors 401 to implement the method as in any one of the embodiments described above.
Another embodiment of the present application further provides a computer storage medium having a computer program stored thereon, wherein the computer program, when executed by a processor, implements the method according to any one of the above embodiments.
The embodiments in the present specification are described in a progressive manner, and the same and similar parts among the embodiments are referred to each other, and each embodiment focuses on the differences from the other embodiments. In particular, the system or system embodiments are substantially similar to the method embodiments and therefore are described in a relatively simple manner, and reference may be made to some of the descriptions of the method embodiments for related points. The above-described system and system embodiments are only illustrative, wherein the units described as separate parts may or may not be physically separate, and the parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of the present embodiment. One of ordinary skill in the art can understand and implement it without inventive effort.
Those of skill would further appreciate that the various illustrative elements and algorithm steps described in connection with the embodiments disclosed herein may be implemented as electronic hardware, computer software, or combinations of both, and that the various illustrative components and steps have been described above generally in terms of their functionality in order to clearly illustrate this interchangeability of hardware and software. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the implementation. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present invention.
The previous description of the disclosed embodiments is provided to enable any person skilled in the art to make or use the present invention. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the generic principles defined herein may be applied to other embodiments without departing from the spirit or scope of the application. Thus, the present application is not intended to be limited to the embodiments shown herein but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.

Claims (10)

1. A method of messaging, comprising:
acquiring attribute information of the short message; the attribute information of the short message comprises the type of the short message and the number of the short message;
determining a sending channel corresponding to the short message based on the attribute information of the short message;
acquiring virtual processing numbers of all IP addresses in the sending channel; the virtual processing number is set according to the processing load of the IP address, and the larger the virtual processing number is, the larger the processing load of the current IP address is;
and selecting the IP address with the minimum virtual processing number to send the short message.
2. The method of claim 1, wherein the determining a sending channel corresponding to the short message based on the attribute information of the short message comprises:
and inquiring a corresponding relation table of the attribute information of the short message and a sending channel, and determining the sending channel corresponding to the short message.
3. The method according to claim 1, wherein the setting of the virtual processing number according to the processing load of the IP address comprises:
setting an initial value of the virtual processing number for each IP address;
acquiring the actual processing number and the processing weight of each IP address; wherein, the actual processing number is the number of the short messages sent by the IP address;
comparing the actual processing number and the processing weight of each IP address;
if the actual processing number of the IP address is detected to be equal to the processing weight, adjusting the virtual processing number of the current IP address, and returning the actual processing number of the current IP address to zero.
4. The method of claim 3, wherein the adjusting the virtual process count of the current IP address if it is detected that the actual process count of the IP address is equal to the process weight comprises:
and if the actual processing number of the IP address is detected to be equal to the processing weight, adding a preset value to the virtual processing number of the current IP address.
5. The method of claim 3, wherein if it is detected that the actual number of processes of the IP address is equal to the processing weight, after adjusting the virtual number of processes of the current IP address, further comprising:
judging whether the virtual processing number of the current IP address is larger than a preset threshold value or not;
if the virtual processing number of the current IP address is larger than a preset threshold value, determining a sending channel corresponding to the current IP address, and resetting the virtual processing numbers of all IP addresses in the sending channel corresponding to the current IP address to the initial value.
6. The method according to claim 3, wherein the virtual processing number is set according to a processing load of the IP address, and further comprising:
detecting the states of all the IP addresses;
if a certain IP address is detected to be disconnected, increasing a reporting value for the virtual processing number of the disconnected IP address; and the reporting value is greater than the virtual processing number of any other IP address in the channel corresponding to the disconnected IP address.
7. An apparatus for messaging, comprising:
the first acquisition unit is used for acquiring the attribute information of the short message; the attribute information of the short message comprises the type of the short message and the number of the short message;
the determining unit is used for determining a sending channel corresponding to the short message based on the attribute information of the short message;
a second obtaining unit, configured to obtain the virtual processing numbers of all IP addresses in the sending channel; the virtual processing number is set according to the processing load of the IP address, and the larger the virtual processing number is, the larger the processing load of the current IP address is;
and the selection unit is used for selecting the IP address with the minimum virtual processing number to send the short message.
8. The apparatus of claim 7, wherein the setting of the virtual processing number according to the processing load of the IP address comprises:
a setting subunit, configured to set an initial value of the virtual processing number for each IP address;
the acquiring subunit is used for acquiring the actual processing number and the processing weight of each IP address; wherein, the actual processing number is the number of the short messages sent by the IP address;
a comparison subunit, configured to compare the actual processing number and the processing weight of each IP address;
an adjusting subunit, configured to adjust the virtual processing number of the current IP address and return the actual processing number of the current IP address to zero if it is detected that the actual processing number of the IP address is equal to the processing weight.
9. An electronic device, comprising:
one or more processors;
a storage device having one or more programs stored thereon;
the one or more programs, when executed by the one or more processors, cause the one or more processors to implement the method of any of claims 1-6.
10. A computer storage medium, having a computer program stored thereon, wherein the computer program, when executed by a processor, implements the method of any one of claims 1 to 6.
CN202011570104.8A 2020-12-26 2020-12-26 Message sending method and device, electronic equipment and storage medium Active CN112672295B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011570104.8A CN112672295B (en) 2020-12-26 2020-12-26 Message sending method and device, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011570104.8A CN112672295B (en) 2020-12-26 2020-12-26 Message sending method and device, electronic equipment and storage medium

Publications (2)

Publication Number Publication Date
CN112672295A true CN112672295A (en) 2021-04-16
CN112672295B CN112672295B (en) 2021-10-26

Family

ID=75409758

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011570104.8A Active CN112672295B (en) 2020-12-26 2020-12-26 Message sending method and device, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN112672295B (en)

Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2010091407A1 (en) * 2009-02-09 2010-08-12 Nortel Networks Limited Method and apparatus for sms termination overload protection
CN206650849U (en) * 2017-04-20 2017-11-17 中卓信(北京)科技有限公司 A kind of data transmission set and system based on numeric messaging
CN108769936A (en) * 2018-06-27 2018-11-06 平安科技(深圳)有限公司 Short message shunt method, device, computer equipment and storage medium
CN110601965A (en) * 2019-09-24 2019-12-20 Oppo广东移动通信有限公司 Message distribution method, device and system and message gateway
CN111093162A (en) * 2019-12-18 2020-05-01 上海良鑫网络科技有限公司 Method for intelligently selecting short message sending channel
CN111246406A (en) * 2020-01-08 2020-06-05 深圳壹账通智能科技有限公司 Short message sending method, system, storage medium and terminal equipment
CN111866769A (en) * 2020-06-29 2020-10-30 湖南省梦网科技发展有限公司 Message sending method, device, server and medium
CN111885516A (en) * 2020-07-09 2020-11-03 深圳市富之富信息技术有限公司 Multi-channel access short message configuration method and device, computer equipment and storage medium
CN111918225A (en) * 2020-09-15 2020-11-10 北京值得买科技股份有限公司 Method for sending short message based on multiple operators

Patent Citations (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2010091407A1 (en) * 2009-02-09 2010-08-12 Nortel Networks Limited Method and apparatus for sms termination overload protection
US20110292808A1 (en) * 2009-02-09 2011-12-01 Gary Boyd Stephens Method and apparatus for sms termination overload protection
CN206650849U (en) * 2017-04-20 2017-11-17 中卓信(北京)科技有限公司 A kind of data transmission set and system based on numeric messaging
CN108769936A (en) * 2018-06-27 2018-11-06 平安科技(深圳)有限公司 Short message shunt method, device, computer equipment and storage medium
WO2020000664A1 (en) * 2018-06-27 2020-01-02 平安科技(深圳)有限公司 Short message shunting method and apparatus, computer device, and storage medium
CN110601965A (en) * 2019-09-24 2019-12-20 Oppo广东移动通信有限公司 Message distribution method, device and system and message gateway
CN111093162A (en) * 2019-12-18 2020-05-01 上海良鑫网络科技有限公司 Method for intelligently selecting short message sending channel
CN111246406A (en) * 2020-01-08 2020-06-05 深圳壹账通智能科技有限公司 Short message sending method, system, storage medium and terminal equipment
CN111866769A (en) * 2020-06-29 2020-10-30 湖南省梦网科技发展有限公司 Message sending method, device, server and medium
CN111885516A (en) * 2020-07-09 2020-11-03 深圳市富之富信息技术有限公司 Multi-channel access short message configuration method and device, computer equipment and storage medium
CN111918225A (en) * 2020-09-15 2020-11-10 北京值得买科技股份有限公司 Method for sending short message based on multiple operators

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
杨斌等: "动态信息发布平台的设计和实现", 《计算机工程》 *
王睿等: "基于Dubbo框架的短信平台的开发与设计", 《电子设计工程》 *

Also Published As

Publication number Publication date
CN112672295B (en) 2021-10-26

Similar Documents

Publication Publication Date Title
CN110858843B (en) Service request processing method and device and computer readable storage medium
CN108616429B (en) reconnection method and device for push service
WO2018171208A1 (en) Server load adjustment method and device, server, live broadcast system and computer readable storage medium
CN107172064B (en) Data access control method and device and server
CN107395783B (en) IP address processing method, system, device and electronic equipment
CN110162270B (en) Data storage method, storage node and medium based on distributed storage system
CN109921925B (en) Dial testing method and device
CN110933136A (en) Service node selection method, device, equipment and readable storage medium
CN109495530B (en) Real-time traffic data transmission method, transmission device and transmission system
CN108390856B (en) DDoS attack detection method and device and electronic equipment
WO2021237433A1 (en) Message pushing method and apparatus, and electronic device and computer-readable medium
CN111093159A (en) Message pushing method and device, server and computer readable storage medium
CN111562884B (en) Data storage method and device and electronic equipment
CN111538572A (en) Task processing method, device, scheduling server and medium
CN111064802A (en) Network request processing method and device, electronic equipment and storage medium
CN109474623B (en) Network security protection and parameter determination method, device, equipment and medium thereof
CN112672295B (en) Message sending method and device, electronic equipment and storage medium
CN110955581A (en) Online software abnormity warning method and device, electronic equipment and storage medium
CN110808967B (en) Detection method for challenging black hole attack and related device
CN112732560A (en) Method and device for detecting file descriptor leakage risk
CN112866062A (en) Distributed pressure test system, method, device, equipment and storage medium
CN117032987A (en) Distributed task scheduling method, system, equipment and computer readable medium
CN114338794B (en) Service message pushing method and device, electronic equipment and storage medium
CN108390770B (en) Information generation method and device and server
CN110677683A (en) Video storage and video access method and distributed storage and video access 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
TR01 Transfer of patent right
TR01 Transfer of patent right

Effective date of registration: 20221104

Address after: 100005 No. 69, inner main street, Dongcheng District, Beijing, Jianguomen

Patentee after: AGRICULTURAL BANK OF CHINA

Patentee after: Agricultural Bank of China Financial Technology Co.,Ltd.

Address before: 100005 No. 69, inner main street, Dongcheng District, Beijing, Jianguomen

Patentee before: AGRICULTURAL BANK OF CHINA