CN112256458A - Message enqueuing method and device, electronic equipment and computer readable medium - Google Patents

Message enqueuing method and device, electronic equipment and computer readable medium Download PDF

Info

Publication number
CN112256458A
CN112256458A CN202011242591.5A CN202011242591A CN112256458A CN 112256458 A CN112256458 A CN 112256458A CN 202011242591 A CN202011242591 A CN 202011242591A CN 112256458 A CN112256458 A CN 112256458A
Authority
CN
China
Prior art keywords
message
group
messages
packaged
determining
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.)
Pending
Application number
CN202011242591.5A
Other languages
Chinese (zh)
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.)
Beijing Jingdong Century Trading Co Ltd
Beijing Wodong Tianjun Information Technology Co Ltd
Original Assignee
Beijing Jingdong Century Trading Co Ltd
Beijing Wodong Tianjun Information Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Jingdong Century Trading Co Ltd, Beijing Wodong Tianjun Information Technology Co Ltd filed Critical Beijing Jingdong Century Trading Co Ltd
Priority to CN202011242591.5A priority Critical patent/CN112256458A/en
Publication of CN112256458A publication Critical patent/CN112256458A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/54Interprogram communication
    • G06F9/546Message passing systems or structures, e.g. queues
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F2209/00Indexing scheme relating to G06F9/00
    • G06F2209/54Indexing scheme relating to G06F9/54
    • G06F2209/547Messaging middleware
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F2209/00Indexing scheme relating to G06F9/00
    • G06F2209/54Indexing scheme relating to G06F9/54
    • G06F2209/548Queue

Abstract

The embodiment of the disclosure discloses a message enqueuing method, a message enqueuing device, electronic equipment and a computer readable medium. One embodiment of the method comprises: verifying the message issuing request; in response to the fact that the message issuing request passes the verification, determining the sending priority of a message set corresponding to the message issuing request; and adding the message set into a message queue of a corresponding message issuing channel, wherein the messages in the message queue are dequeued according to the sending priority. The implementation method solves the problem that the priority of the message is less considered, and further the message which should be sent preferentially can not be dequeued in time after the message is enqueued.

Description

Message enqueuing method and device, electronic equipment and computer readable medium
Technical Field
Embodiments of the present disclosure relate to the field of computer technologies, and in particular, to a message enqueuing method, an apparatus, an electronic device, and a computer-readable medium.
Background
Message enqueuing is a technique for adding messages produced by a producer to a message queue. Message enqueuing techniques achieve decoupling between different modules by adding messages to a message queue. The related message enqueuing method generally adds messages to a message queue in sequence according to the generation order of the messages, and dequeues messages that have entered the message queue first according to the enqueuing order of the messages when the messages are dequeued.
However, when enqueuing messages in the above manner, there are often technical problems as follows:
firstly, the priority of the message is less considered, and further, the message which should be sent preferentially cannot be dequeued in time after the message is enqueued;
secondly, the priority of the message cannot be dynamically adjusted to ensure that the message with high priority is sent preferentially, thereby causing the message sending efficiency to be low.
Disclosure of Invention
This summary is provided to introduce a selection of concepts in a simplified form that are further described below in the detailed description. This summary is not intended to identify key features or essential features of the claimed subject matter, nor is it intended to be used to limit the scope of the claimed subject matter.
Some embodiments of the present disclosure propose message enqueuing methods, apparatuses, electronic devices and computer readable media to solve one or more of the technical problems mentioned in the background section above.
In a first aspect, some embodiments of the present disclosure provide a method of message enqueuing, the method comprising: and checking the message issuing request. And determining the sending priority of the message set corresponding to the message issuing request in response to the fact that the message issuing request passes the verification. And adding the message set into a message queue of a corresponding message issuing channel, wherein the messages in the message queue are dequeued according to the sending priority.
In a second aspect, some embodiments of the present disclosure provide a message enqueuing apparatus, the apparatus comprising: and the checking unit is configured to check the message issuing request. And the determining unit is configured to determine the sending priority of the message set corresponding to the message issuing request in response to the determination that the message issuing request passes the verification. And the message enqueuing unit is configured to add the message set into a message queue of a corresponding message issuing channel, wherein the messages in the message queue are dequeued according to the sending priority.
In a third aspect, some embodiments of the present disclosure provide an electronic device, comprising: one or more processors; a storage device having one or more programs stored thereon, which when executed by one or more processors, cause the one or more processors to implement the method described in any of the implementations of the first aspect.
In a fourth aspect, some embodiments of the present disclosure provide a computer readable medium on which a computer program is stored, wherein the program, when executed by a processor, implements the method described in any of the implementations of the first aspect.
The above embodiments of the present disclosure have the following advantages: the message enqueuing method of some embodiments of the present disclosure enqueues the message, so that the message issuing efficiency is improved. Specifically, the inventors found that the reason why the message issuing efficiency is not high enough is: the priority of the message is less considered, and further, after the message is enqueued, the message which should be sent preferentially may not be dequeued in time. Based on this, the message enqueuing method of some embodiments of the present disclosure determines the sending priority by the number of messages in the message set before enqueuing the messages, so that the dequeuing sequence of the messages can be dynamically adjusted according to the sending priority when dequeuing. Just because messages can be dequeued according to sending priority, messages with higher sending priority can be preferentially sent. Therefore, the message with higher sending priority can be timely sent. And further, the message issuing efficiency is improved.
Drawings
The above and other features, advantages and aspects of various embodiments of the present disclosure will become more apparent by referring to the following detailed description when taken in conjunction with the accompanying drawings. Throughout the drawings, the same or similar reference numbers refer to the same or similar elements. It should be understood that the drawings are schematic and that elements and elements are not necessarily drawn to scale.
FIG. 1 is a schematic diagram of one application scenario of a message enqueuing method according to some embodiments of the present disclosure;
FIG. 2 is a flow diagram of some embodiments of a message enqueuing method according to the present disclosure;
FIG. 3 illustrates a flow diagram for determining interface response status in a message enqueuing method according to some embodiments of the present disclosure;
FIG. 4 is a flow diagram of further embodiments of a message enqueuing method according to the present disclosure;
FIG. 5 is a block diagram of some embodiments of a message enqueuing apparatus according to the present disclosure;
FIG. 6 is a schematic structural diagram of an electronic device suitable for use in implementing some embodiments of the present disclosure.
Detailed Description
Embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. While certain embodiments of the present disclosure are shown in the drawings, it is to be understood that the disclosure may be embodied in various forms and should not be construed as limited to the embodiments set forth herein. Rather, these embodiments are provided for a more thorough and complete understanding of the present disclosure. It should be understood that the drawings and embodiments of the disclosure are for illustration purposes only and are not intended to limit the scope of the disclosure.
It should be noted that, for convenience of description, only the portions related to the related invention are shown in the drawings. The embodiments and features of the embodiments in the present disclosure may be combined with each other without conflict.
It should be noted that the terms "first", "second", and the like in the present disclosure are only used for distinguishing different devices, modules or units, and are not used for limiting the order or interdependence relationship of the functions performed by the devices, modules or units.
It is noted that references to "a", "an", and "the" modifications in this disclosure are intended to be illustrative rather than limiting, and that those skilled in the art will recognize that "one or more" may be used unless the context clearly dictates otherwise.
The names of messages or information exchanged between devices in the embodiments of the present disclosure are for illustrative purposes only, and are not intended to limit the scope of the messages or information.
The present disclosure will be described in detail below with reference to the accompanying drawings in conjunction with embodiments.
Fig. 1 is a schematic diagram of one application scenario of a message enqueuing method according to some embodiments of the present disclosure.
In the application scenario of fig. 1, first, the computing device 101 may check the message delivery request 102. Then, the computing device 101 may determine the sending priority 104 of the message set 103 corresponding to the message issuing request 102 in response to determining that the message issuing request 102 checks. Finally, the computing device 101 may add the message set 103 to a message queue 105 of a corresponding message distribution channel, where the messages in the message queue 105 are dequeued according to the sending priority 104.
The computing device 101 may be hardware or software. When the computing device is hardware, it may be implemented as a distributed cluster composed of multiple servers or terminal devices, or may be implemented as a single server or a single terminal device. When the computing device is embodied as software, it may be installed in the hardware devices enumerated above. It may be implemented, for example, as multiple pieces of software and software modules used to provide distributed services, or as a single piece of software or software module. And is not particularly limited herein.
It should be understood that the number of computing devices in FIG. 1 is merely illustrative. There may be any number of computing devices, as implementation needs dictate.
With continued reference to fig. 2, a flow 200 of some embodiments of a message enqueuing method according to the present disclosure is shown. The message enqueuing method comprises the following steps:
step 201, the message issuing request is checked.
In some embodiments, the executing agent of the message enqueuing method (e.g., computing device 101 shown in FIG. 1) may check the message issuance request. The message issuing request may include, but is not limited to, at least one of the following: message content, mobile phone number group and message content template identification. The message content template identifier may be a unique identifier of a message content template used by the message content. The message content can meet various target application scenes. For example, the message content may be promotion information in a promotion application scenario. As another example, the message content may be login authentication code information or registration authentication code information in a security authentication application scenario. The target application scenario may be any scenario. For example, the target application scenario may be a password reset scenario. As another example, the target application scenario may be a personal information binding scenario. The mobile phone number group may include at least one mobile phone number. The mobile phone number may be a mobile phone number corresponding to a receiving terminal to which the message content is to be delivered.
In practice, the execution body may verify the message issuing request in various ways. As an example, the content of the message and the mobile phone number group included in the message issuing request may be checked separately. It can be understood that a message content template may be preset, and the message content may be verified by comparing the message content with the message content template. All the mobile phone numbers stored in the database can be marked in advance, so that the mobile phone number group can be verified by the marks of all the mobile phone numbers in the mobile phone number group. As another example, the message content template identification for each message content template may be stored in a database in advance. The verification of the message issuing request can be realized by determining whether the database stores the message content template identifier included in the message issuing request.
As an example, the message content template may be "[ left ] to remind you that your express has reached, please get it in time". The content with the mark in the message content template is the content which can be flexibly replaced. The message content can be 'express reminding you, your express is reached to a cell, and you get it in time'. Then, the content of "(×) in the message content template is not included in the message content, and it may be determined that the message content does not match the message content template. The above-mentioned flag may be 0 or 1. 0 may be used to characterize a white list cell phone number. 1 may be used to characterize a blacklisted cell phone number.
Step 202, in response to determining that the message issuing request passes the verification, determining the sending priority of the message set corresponding to the message issuing request.
In some embodiments, in response to determining that the message delivery request check passes, the execution body may determine a sending priority of a message set corresponding to the message delivery request. As an example, the message issuance request verification pass may refer to that the message content matches the message content template and/or that the tag of each mobile phone number in the mobile phone number group does not include a preset tag and/or that the message content template identifier is stored in the database. The preset mark can be '1' and is used for representing that the mobile phone number is a blacklist mobile phone number. The transmission priority may be used to determine a priority order of dequeues of messages in the message queue. The message in the message set can be generated by the message content and the mobile phone number group included in the message issuing request. In practice, as an example, each message content template may be prioritized in advance and stored in a database. The priority of the message content template characterized by the message content template identification can be obtained from the database and determined as the sending priority. In practice, as an example, the message in the message set may be composed of the message content and the mobile phone number in the message issuing request. The mobile phone number is used for identifying a receiving terminal for receiving the message content. The transmission priority may be determined by the number of mobile phone numbers included in the mobile phone number group. In practice, as an example, the number intervals may be predefined such that each number interval corresponds to a transmission priority, and the transmission priority is determined by determining the number interval in which the number of the mobile phone numbers included in the mobile phone number group is located. For another example, the number of mobile phone numbers included in the mobile phone number group may be used as the transmission priority.
Step 203, adding the message set into the message queue of the corresponding message issuing channel.
In some embodiments, the execution subject may add the message set to a message queue of the corresponding message delivery channel. The message issuing channel may be a message issuing channel randomly allocated to the message set by the execution subject. And the messages in the message queue are dequeued according to the sending priority. In practice, the message queue described above may be a message queue supporting priority, as an example. For example, a RabbitMQ (RabbitMessage Queue ). As another example, Active Message Queue (Active Message Queue) is provided. The message issuing channel may correspond to a gateway interface of a communication service party (e.g., an operator) in a fixed manner. The message issuing channel may send the received message to the gateway interface after receiving the message dequeued from the message queue. The gateway interface can send the message content in the received message to the receiving terminal corresponding to the mobile phone number in the message. For another example, the message delivery channel may directly send the message content in the received message to the receiving terminal corresponding to the mobile phone number in the message through its own delivery interface.
The above embodiments of the present disclosure have the following advantages: the message enqueuing method of some embodiments of the present disclosure enqueues the message, so that the message issuing efficiency is improved. Specifically, the inventors found that the reason why the message issuing efficiency is not high enough is: the priority of the message is less considered, and further, after the message is enqueued, the message which should be sent preferentially may not be dequeued in time. Based on this, the message enqueuing method of some embodiments of the present disclosure determines the sending priority by the number of messages in the message set before enqueuing the messages, so that the dequeuing sequence of the messages can be dynamically adjusted according to the sending priority when dequeuing. Just because messages can be dequeued according to sending priority, messages with higher sending priority can be preferentially sent. Therefore, the message with higher sending priority can be timely sent. And further, the message issuing efficiency is improved.
With further reference to fig. 3, a flow 300 of further embodiments of a message enqueuing method is illustrated. The flow 300 of the message enqueuing method includes the following steps:
step 301, the message issuing request is checked.
In some embodiments, the executing agent of the message enqueuing method (e.g., computing device 101 shown in FIG. 1) may check the message issuance request. The message issuing request may include, but is not limited to, at least one of the following: the content of the message, the mobile phone number group and the account information corresponding to the message issuing request. The account information may include, but is not limited to, at least one of the following: account name, password, IP Address (Internet Protocol Address). The IP address may be an IP address of the account corresponding to the account information when the account is last logged in. The account name and password may be used to log on to the messaging service platform. The message service platform can provide a message issuing function for the account corresponding to the account information. The account corresponding to the account information can be allocated with a fixed message issuing channel during registration. Then the message set corresponding to the message issuing request can be added into the message queue of the message issuing channel.
In some embodiments, the performing entity checks the message issuing request, which may include but is not limited to at least one of the following checking steps:
the first step, whether the message content includes at least one shielding word in a preset shielding phrase is determined. The preset mask word may be a word prohibited from appearing in the message content.
As an example, the preset masking phrase may be [ loan, reward, promotion ]. The message content may be "authentication code: 667154, effective period of 10 minutes. If not, please ignore. ". The message content "authentication code: 667154, effective period of 10 minutes. If not, please ignore. The "does not include the shielding words in the preset shielding word group. The message content may be "parent, you have given a loan amount. This point looks at http://. x. The message content "parent, you have given a gift on the credit line. This looks at http://. x. com "including the mask word" loan "in the preset mask word set described above.
And secondly, eliminating the mobile phone numbers meeting the first preset condition in the mobile phone number groups to obtain a target mobile phone number group. The first preset condition is set based on a preset mobile phone number group. The preset mobile phone number group is pre-stored in the memory cache database. The first preset condition may be that the mobile phone number is a mobile phone number in the preset mobile phone number group. The mobile phone number included in the preset mobile phone number group may be a mobile phone number on which an illegal operation is performed by an account corresponding to the mobile phone number. The above-mentioned illegal operation may be a swipe operation.
And thirdly, determining whether the account information meets a second preset condition. The second preset condition may be that an account name included in the account information matches a password and an IP address included in the account information is a valid IP address.
And step four, determining whether the message issuing request submitting frequency corresponding to the account information meets a third preset condition. The third preset condition may be that the message issuing request submission frequency is less than a preset message issuing request submission frequency.
As an example, the preset message issuance request submission frequency may be 1 time/minute. The term "1 time/minute" may mean that the total number of times of submitting the message issuing request by the account corresponding to the account information is less than 1 time within 1 minute of the termination time of the time when the execution subject receives the message issuing request. If the message issuing request submitting frequency is not less than the preset message issuing request submitting frequency, the message issuing request is not responded. Meanwhile, the prompt information of the submission frequency exceeding the limit can be sent to the account corresponding to the message issuing request.
Step 302, in response to determining that the message delivery request is verified, determining the sending priority of the message set according to the number of messages in the message set and the account priority corresponding to the message delivery request.
In some embodiments, the executing entity may determine the sending priority of the message set according to the number of messages in the message set and the account priority corresponding to the message issuing request in response to determining that the number of the target mobile phone numbers in the target mobile phone number group is not zero, the content of the message does not include any shielding word in the preset shielding word group, the account information satisfies a second preset condition, and the message issuing request submitting frequency satisfies a third preset condition. The account priority may be an account priority assigned to an account corresponding to the message issuing request during registration. The account number priority may be represented by a number, with smaller numbers indicating higher account number priority.
As an example, the account priorities may be characterized by 1, 2, 3. 1 may be used to characterize the account priority of the administrator account. 2 may be used to characterize the account priority of the primary common user account. 3 may be used to characterize account priorities for secondary common user accounts. The primary common user account may be an account having a service requirement for sending a verification code. The secondary common user account can be an account with a service requirement for sending batch promotion information. The smaller the number of messages in the message set, the more important the messages in the message set. The transmission priority may be characterized by a value of a product of the account priority and a number of messages in the set of messages. The smaller the product value, the higher the level of the transmission priority.
The above steps are taken as an invention point of the embodiment of the present disclosure, and solve the technical problem mentioned in the background art that "the priority of the message cannot be dynamically adjusted to ensure that the message with high priority is preferentially sent, thereby causing the message sending efficiency to be low". The factors that lead to the low efficiency of message delivery are often as follows: the existing message enqueuing method cannot accurately determine the sending priority according to the message issuing request before enqueuing the message. If the above factors are solved, the effect of improving the message issuing efficiency can be achieved. In order to achieve the effect, the account number priority of the account number corresponding to the message issuing request is introduced, the number of messages in the message set is comprehensively considered, and the sending priority is dynamically determined in real time before the messages are queued. The determined sending priority is related to the number of the messages and the account number priority, and the accuracy of the determined sending priority is improved. Therefore, the importance among the messages can be distinguished through the sending priority, and the messages with higher importance are preferentially dequeued according to the sending priority when the messages are dequeued. And further, the message issuing efficiency is improved.
Step 303, adding the message set into the message queue of the corresponding message issuing channel.
In some embodiments, the specific implementation of step 303 and the technical effect brought by the implementation may refer to step 203 in those embodiments corresponding to fig. 2, which are not described herein again.
Step 304, in response to receiving the message dequeue information of the message queue, obtaining the interface response state of the corresponding gateway interface from the message issuing channel.
In some embodiments, the execution agent may obtain, from the message distribution channel, an interface response status of the corresponding gateway interface in response to receiving the message dequeue information of the message queue. The interface response state may be used to characterize whether the message is successfully delivered. The message issuing channel may correspond to a gateway interface of a communication service party (e.g., an operator) in a fixed manner.
As an example, the interface response states described above may be characterized by 0 and 1. 1 may characterize the interface response state as a message delivery success state. 0 may characterize the interface response status as a message delivery unsuccessful status.
Step 305, adding the interface response state and the identifier corresponding to the message dequeuing information into an interface response queue, so as to update the state of the message corresponding to the message dequeuing information.
In some embodiments, the execution subject may add the interface response status and the identifier corresponding to the message dequeue information into an interface response queue, so as to update the status of the message corresponding to the message dequeue information. The identifier may be a unique identifier of the dequeue message.
The above embodiments of the present disclosure have the following advantages: firstly, the account priority of the account corresponding to the message issuing request and the number of messages in the message set are used for dynamically determining the sending priority in real time before the messages are enqueued. The determined sending priority is related to the number of the messages and the account number priority, and the accuracy of the determined sending priority is improved. Therefore, the importance among the messages can be distinguished through the sending priority, and the messages with higher importance are preferentially dequeued according to the sending priority when the messages are dequeued. And further, the message issuing efficiency is improved. And then, adding the message set into the message queue of the corresponding message issuing channel. Therefore, the message sets corresponding to different message issuing requests are added into the message queues corresponding to the corresponding message issuing channels, so that the message sets corresponding to different message issuing requests can be added into different message queues, the messages are shunted through a plurality of message queues and are synchronously dequeued, and the message issuing capability is improved. And finally, adding the interface response state and the identifier corresponding to the message dequeuing information into a specified interface response queue so as to acquire the interface response information from the interface response queue, and updating the interface response state corresponding to the message in an asynchronous mode. Therefore, the time for updating the response state of the output interface can be saved when the message is transmitted, and the message transmission efficiency is further improved.
With further reference to fig. 4, a flow 400 of determining interface response status in a message enqueuing method according to some embodiments of the present disclosure is illustrated. The process 400 for determining the interface response status includes the following steps:
step 401, performing packet packaging processing on the received message to generate a target message group.
In some embodiments, the executive determining the interface response status may package the received message to generate the target message group. Wherein, the target message group may include at least one message. The execution subject may be various kinds of software, may be the computing device 101, or may also be a server.
As an example, a preset number may be used as the group package number, and after receiving the preset number of messages, each message in the preset number of messages is first added as a group package message to the group package message group, and then the group package message group is used as the target message group. For another example, the preset waiting duration may be used as a group packet duration, and each message received in the preset waiting duration is first added to a group packet message group as a group packet message, and then the group packet message group is used as a target message group.
In some optional implementations of some embodiments, the performing a group package process on the received message to generate the target message group may include the following steps:
firstly, the received message is used as a group package message to be added into a group package message group.
As an example, each time a message is received, the message may be added to the group of grouped messages as a grouped message. Therefore, the problems of network resource waste and low sending efficiency caused by sending one message to the gateway interface corresponding to the message sending channel when receiving one message can be solved. The message issuing channel may correspond to a gateway interface of a communication service party (e.g., an operator) in a fixed manner.
And secondly, in response to the fact that the quantity of the packaged messages in the packaged message group is equal to the preset quantity and the time difference value between the current time and the earliest joining time of the packaged messages in the packaged message group is smaller than the preset waiting time, determining the packaged message group as a target message group. The preset group package message number is used for limiting the number of the group package messages which can be contained in the group package message group to the maximum. The preset waiting time is used for limiting the longest waiting time of the group package message group.
As an example, the preset number may be 1000. The preset waiting time may be 1 second. When the number of the packaged messages in the packaged message group is 1000 and the time difference is 0.89 seconds, the packaged message group can be determined as the target message group. At this time, the number of target messages included in the target message group is 1000. Therefore, the target message group can be sent to the gateway interface corresponding to the message sending channel in the shortest time as possible, and the sending efficiency is improved.
And thirdly, in response to the fact that the number of the packaged messages in the packaged message group is smaller than the preset number and the time difference value between the current time and the earliest joining time of the packaged messages in the packaged message group is equal to the preset waiting time, determining the packaged message group as a target message group.
As an example, the preset number of group package messages may be 1000. The preset waiting time may be 1 second. When the number of the packaged messages in the packaged message group is 1295 and the time difference is 1 second, the packaged message group may be determined as the target message group. At this time, the number of target messages included in the target message group is 1295 pieces. Therefore, the number of the packaged messages in the packaged message group can be increased as much as possible in the preset time, and the packaging efficiency is improved.
Step 402, sending the target message group to a gateway interface corresponding to the message issuing channel.
In some embodiments, the execution main body may send the target message group to a gateway interface corresponding to the message delivery channel in a wired connection manner or a wireless connection manner. It should be noted that the wireless connection means may include, but is not limited to, a 3G/4G connection, a WiFi connection, a bluetooth connection, a WiMAX connection, a Zigbee connection, a uwb (ultra wideband) connection, and other wireless connection means now known or developed in the future.
In step 403, the interface response status of the gateway interface is determined.
In some embodiments, the execution agent may determine an interface response status of the gateway interface.
As an example, the interface response status may be obtained by accessing the gateway interface described above. As another example, the interface response status may be determined by receiving the interface response status sent by the gateway interface. Therefore, the message issuing state can be conveniently updated according to the interface response state.
With further reference to fig. 5, as an implementation of the methods shown in the above figures, the present disclosure provides some embodiments of a message enqueuing apparatus, which correspond to those of the method embodiments shown in fig. 2, and which may be applied in various electronic devices.
As shown in fig. 5, the message enqueuing apparatus 500 of some embodiments includes: a checking unit 501, a determining unit 502 and a message enqueuing unit 503. The checking unit 501 is configured to check the message issuing request. The determining unit 502 is configured to determine, in response to determining that the message issuing request passes the verification, a sending priority of a message set corresponding to the message issuing request. The message enqueue unit 503 is configured to add the message set to a message queue of a corresponding message issuing channel, where the messages in the message queue are dequeued according to the sending priority.
In an optional implementation manner of some embodiments, the message issuing request includes at least one of the following: the content of the message, the mobile phone number group and the account information corresponding to the message issuing request.
In an optional implementation of some embodiments, the checking unit 501 may perform at least one of the following checking steps: and determining whether the message content comprises at least one shielding word in a preset shielding word group. And eliminating the mobile phone numbers meeting the first preset condition in the mobile phone number groups to obtain the target mobile phone number group. The first preset condition is set based on a preset mobile phone number group. And determining whether the account information meets a second preset condition. And determining whether the message issuing request submitting frequency corresponding to the account information meets a third preset condition.
In an optional implementation manner of some embodiments, the preset mobile phone number group is pre-stored in the memory cache database.
In an optional implementation of some embodiments, the determining unit 502 may be further configured to: and in response to the fact that the message issuing request is verified, determining the sending priority of the message set according to the number of the messages in the message set and the account number priority corresponding to the message issuing request.
In an optional implementation of some embodiments, the apparatus 500 may further include: an acquisition unit (not shown in the figure) and an enqueue unit (not shown in the figure). The obtaining unit may be configured to, in response to receiving the message dequeuing information of the message queue, obtain an interface response state of the corresponding gateway interface from the message issuing channel. The enqueue unit may be configured to add the interface response status and the identifier corresponding to the message dequeue information into an interface response queue, so as to update a status of a message corresponding to the message dequeue information.
In an alternative implementation of some embodiments, the interface response status is determined by: and performing packet packaging processing on the received messages to generate a target message group. And sending the target message group to a gateway interface corresponding to the message issuing channel. And determining the interface response state of the gateway interface.
In an alternative implementation of some embodiments, the group packaging the received message to generate the target message group includes: and adding the received message as a group package message into a group package message group. And in response to determining that the number of packaged messages in the packaged message group is equal to a preset number and that a time difference value between the current time and the earliest joining time of the packaged messages in the packaged message group is less than a preset waiting time, determining the packaged message group as a target message group.
In an alternative implementation of some embodiments, the group packaging the received message to generate the target message group includes: and in response to determining that the number of packaged messages in the packaged message group is less than the preset number and that the time difference between the current time and the earliest joining time of the packaged messages in the packaged message group is equal to the preset waiting time, determining the packaged message group as a target message group.
In some embodiments, message delivery efficiency is improved. Specifically, the inventors found that the reason why the message issuing efficiency is not high enough is: the priority of the message is less considered, and further, after the message is enqueued, the message which should be sent preferentially may not be dequeued in time. Based on this, the message enqueuing method of some embodiments of the present disclosure determines the sending priority by the number of messages in the message set before enqueuing the messages, so that the dequeuing sequence of the messages can be dynamically adjusted according to the sending priority when dequeuing. Just because messages can be dequeued according to sending priority, messages with higher sending priority can be preferentially sent. Therefore, the message with higher sending priority can be timely sent. And further, the message issuing efficiency is improved.
Referring now to FIG. 6, a block diagram of an electronic device (such as computing device 101 shown in FIG. 1)600 suitable for use in implementing some embodiments of the present disclosure is shown. The electronic device shown in fig. 6 is only an example, and should not bring any limitation to the functions and the scope of use of the embodiments of the present disclosure.
As shown in fig. 6, electronic device 600 may include a processing means (e.g., central processing unit, graphics processor, etc.) 601 that may perform various appropriate actions and processes in accordance with a program stored in a Read Only Memory (ROM)602 or a program loaded from a storage means 608 into a Random Access Memory (RAM) 603. In the RAM603, various programs and data necessary for the operation of the electronic apparatus 600 are also stored. The processing device 601, the ROM 602, and the RAM603 are connected to each other via a bus 604. An input/output (I/O) interface 605 is also connected to bus 604.
Generally, the following devices may be connected to the I/O interface 605: input devices 606 including, for example, a touch screen, touch pad, keyboard, mouse, camera, microphone, accelerometer, gyroscope, etc.; output devices 607 including, for example, a Liquid Crystal Display (LCD), a speaker, a vibrator, and the like; storage 608 including, for example, tape, hard disk, etc.; and a communication device 609. The communication means 609 may allow the electronic device 600 to communicate with other devices wirelessly or by wire to exchange data. While fig. 6 illustrates an electronic device 600 having various means, it is to be understood that not all illustrated means are required to be implemented or provided. More or fewer devices may alternatively be implemented or provided. Each block shown in fig. 6 may represent one device or may represent multiple devices as desired.
In particular, according to some embodiments of the present disclosure, the processes described above with reference to the flow diagrams may be implemented as computer software programs. For example, some embodiments of the present disclosure include a computer program product comprising a computer program embodied on a computer readable medium, the computer program comprising program code for performing the method illustrated in the flow chart. In some such embodiments, the computer program may be downloaded and installed from a network through the communication device 609, or installed from the storage device 608, or installed from the ROM 602. The computer program, when executed by the processing device 601, performs the above-described functions defined in the methods of some embodiments of the present disclosure.
It should be noted that the computer readable medium described in some embodiments of the present disclosure may be a computer readable signal medium or a computer readable storage medium or any combination of the two. A computer readable storage medium may be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the foregoing. More specific examples of the computer readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In some embodiments of the disclosure, a computer readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. In some embodiments of the present disclosure, however, a computer readable signal medium may include a propagated data signal with computer readable program code embodied therein, for example, in baseband or as part of a carrier wave. Such a propagated data signal may take many forms, including, but not limited to, electro-magnetic, optical, or any suitable combination thereof. A computer readable signal medium may also be any computer readable medium that is not a computer readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device. Program code embodied on a computer readable medium may be transmitted using any appropriate medium, including but not limited to: electrical wires, optical cables, RF (radio frequency), etc., or any suitable combination of the foregoing.
In some embodiments, the clients, servers may communicate using any currently known or future developed network Protocol, such as HTTP (HyperText Transfer Protocol), and may interconnect with any form or medium of digital data communication (e.g., a communications network). Examples of communication networks include a local area network ("LAN"), a wide area network ("WAN"), the Internet (e.g., the Internet), and peer-to-peer networks (e.g., ad hoc peer-to-peer networks), as well as any currently known or future developed network.
The computer readable medium may be embodied in the electronic device; or may exist separately without being assembled into the electronic device. The computer readable medium carries one or more programs which, when executed by the electronic device, cause the electronic device to: and checking the message issuing request. And determining the sending priority of the message set corresponding to the message issuing request in response to the fact that the message issuing request passes the verification. And adding the message set into a message queue of a corresponding message issuing channel, wherein the messages in the message queue are dequeued according to the sending priority.
Computer program code for carrying out operations for embodiments of the present disclosure may be written in any combination of one or more programming languages, including an object oriented programming language such as Java, Smalltalk, C + +, and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code may execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer or entirely on the remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any type of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or the connection may be made to an external computer (for example, through the Internet using an Internet service provider).
The flowchart and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present disclosure. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams and/or flowchart illustration, and combinations of blocks in the block diagrams and/or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
The units described in some embodiments of the present disclosure may be implemented by software, and may also be implemented by hardware. The described units may also be provided in a processor, and may be described as: a processor includes a checking unit, a determining unit, and a message enqueuing unit. The names of these units do not in some cases constitute a limitation on the unit itself, and for example, a verification unit may also be described as a "unit that verifies a message issuance request".
The functions described herein above may be performed, at least in part, by one or more hardware logic components. For example, without limitation, exemplary types of hardware logic components that may be used include: field Programmable Gate Arrays (FPGAs), Application Specific Integrated Circuits (ASICs), Application Specific Standard Products (ASSPs), systems on a chip (SOCs), Complex Programmable Logic Devices (CPLDs), and the like.
The foregoing description is only exemplary of the preferred embodiments of the disclosure and is illustrative of the principles of the technology employed. It will be appreciated by those skilled in the art that the scope of the invention in the embodiments of the present disclosure is not limited to the specific combination of the above-mentioned features, but also encompasses other embodiments in which any combination of the above-mentioned features or their equivalents is made without departing from the inventive concept as defined above. For example, the above features and (but not limited to) technical features with similar functions disclosed in the embodiments of the present disclosure are mutually replaced to form the technical solution.

Claims (11)

1. A method of enqueuing a message, comprising:
verifying the message issuing request;
in response to the fact that the message issuing request is confirmed to pass the verification, determining the sending priority of a message set corresponding to the message issuing request;
and adding the message set into a message queue of a corresponding message issuing channel, wherein the messages in the message queue are dequeued according to the sending priority.
2. The method of claim 1, wherein the determining the transmission priority of the message set corresponding to the message issuing request comprises:
and determining the sending priority of the message set according to the number of the messages in the message set and the account number priority corresponding to the message issuing request.
3. The method of claim 2, wherein the message issuance request includes at least one of: the message content, the mobile phone number group and the account information corresponding to the message issuing request; and
the checking the message issuing request comprises at least one of the following checking steps:
determining whether the message content comprises at least one shielding word in a preset shielding word group;
removing mobile phone numbers meeting a first preset condition from the mobile phone number groups to obtain a target mobile phone number group, wherein the first preset condition is set based on the preset mobile phone number groups;
determining whether the account information meets a second preset condition;
and determining whether the message issuing request submitting frequency corresponding to the account information meets a third preset condition.
4. The method of claim 3, wherein the set of predetermined cell phone numbers is pre-stored in an in-memory cache database.
5. The method of claim 1, wherein the method further comprises:
responding to the received message dequeuing information of the message queue, and acquiring an interface response state of the corresponding gateway interface from the message issuing channel;
and adding the interface response state and the identifier corresponding to the message dequeuing information into an interface response queue so as to update the state of the message corresponding to the message dequeuing information.
6. The method of claim 5, wherein the interface response status is determined by:
performing packet packaging processing on the received message to generate a target message group;
sending the target message group to a gateway interface corresponding to the message issuing channel;
determining an interface response status of the gateway interface.
7. The method of claim 6, wherein said packaging the received message to generate a target message group comprises:
adding the received message as a packaged message into a packaged message group;
and in response to determining that the number of packaged messages in the packaged message group is equal to a preset number and that a time difference between the current time and the earliest joining time of the packaged messages in the packaged message group is less than a preset waiting time, determining the packaged message group as a target message group.
8. The method of claim 7, wherein said packaging the received message to generate a target message group comprises:
and in response to determining that the number of packaged messages in the packaged message group is less than the preset number and that the time difference between the current time and the earliest joining time of the packaged messages in the packaged message group is equal to the preset waiting time, determining the packaged message group as a target message group.
9. A message enqueuing apparatus comprising:
the checking unit is configured to check the message issuing request;
the determining unit is configured to respond to the determination that the message issuing request passes the verification, and determine the sending priority of a message set corresponding to the message issuing request;
and the message enqueuing unit is configured to add the message set into a message queue of the corresponding message issuing channel, wherein the messages in the message queue are dequeued according to the sending priority.
10. An electronic device, comprising:
one or more processors;
a storage device having one or more programs stored thereon;
when executed by the one or more processors, cause the one or more processors to implement the method of any one of claims 1-8.
11. A computer-readable medium, on which a computer program is stored, wherein the program, when executed by a processor, implements the method of any one of claims 1-8.
CN202011242591.5A 2020-11-09 2020-11-09 Message enqueuing method and device, electronic equipment and computer readable medium Pending CN112256458A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011242591.5A CN112256458A (en) 2020-11-09 2020-11-09 Message enqueuing method and device, electronic equipment and computer readable medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011242591.5A CN112256458A (en) 2020-11-09 2020-11-09 Message enqueuing method and device, electronic equipment and computer readable medium

Publications (1)

Publication Number Publication Date
CN112256458A true CN112256458A (en) 2021-01-22

Family

ID=74266684

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011242591.5A Pending CN112256458A (en) 2020-11-09 2020-11-09 Message enqueuing method and device, electronic equipment and computer readable medium

Country Status (1)

Country Link
CN (1) CN112256458A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113138883A (en) * 2021-05-14 2021-07-20 北京字节跳动网络技术有限公司 Message processing method and device, storage medium and electronic equipment
CN113329078A (en) * 2021-05-27 2021-08-31 北京达佳互联信息技术有限公司 Data storage method and device

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113138883A (en) * 2021-05-14 2021-07-20 北京字节跳动网络技术有限公司 Message processing method and device, storage medium and electronic equipment
CN113138883B (en) * 2021-05-14 2024-02-02 北京字节跳动网络技术有限公司 Message processing method and device, storage medium and electronic equipment
CN113329078A (en) * 2021-05-27 2021-08-31 北京达佳互联信息技术有限公司 Data storage method and device
CN113329078B (en) * 2021-05-27 2023-02-21 北京达佳互联信息技术有限公司 Data storage method and device

Similar Documents

Publication Publication Date Title
CN112311841B (en) Information pushing method and device, electronic equipment and computer readable medium
CN110022259B (en) Message arrival rate determining method and device, data statistics server and storage medium
CN110781373B (en) List updating method and device, readable medium and electronic equipment
CN112256458A (en) Message enqueuing method and device, electronic equipment and computer readable medium
CN110430292B (en) Method and device for inviting login of network platform, electronic equipment and readable medium
CN110569057A (en) gray scale distribution method and device, electronic equipment and computer readable medium
CN112416632B (en) Event communication method and device, electronic equipment and computer readable medium
CN113760674A (en) Information generation method and device, electronic equipment and computer readable medium
CN112702336A (en) Security control method and device for government affair service, security gateway and storage medium
CN114154958A (en) Information processing method, device, electronic equipment and storage medium
CN108764866B (en) Method and equipment for allocating resources and drawing resources
CN107046547B (en) Abnormal operation identification method and device
EP3163795A1 (en) Charging method and device, access device, and service quality control method and device
CN116150249B (en) Table data export method, apparatus, electronic device and computer readable medium
CN116961918A (en) Token acquisition method and device
CN115022106A (en) Group information processing method, device, equipment and medium
CN113890906A (en) Call forwarding method and device, electronic equipment and computer readable storage medium
CN113761553A (en) Menu batch authorization method and device, electronic equipment and computer readable medium
CN115378878A (en) CDN scheduling method, device, equipment and storage medium
CN112184406A (en) Data processing method, system, electronic device and computer readable storage medium
CN112330366A (en) Redemption code redemption request verification method, apparatus, device and computer readable medium
CN112163176A (en) Data storage method and device, electronic equipment and computer readable medium
CN112346661A (en) Data processing method and device and electronic equipment
US20130137461A1 (en) Method and apparatus for inserting location data into messages at a communication gateway
CN115086408B (en) Data processing method, system, device, electronic equipment and storage medium

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