WO2011120465A2 - 消息处理方法和系统 - Google Patents

消息处理方法和系统 Download PDF

Info

Publication number
WO2011120465A2
WO2011120465A2 PCT/CN2011/073773 CN2011073773W WO2011120465A2 WO 2011120465 A2 WO2011120465 A2 WO 2011120465A2 CN 2011073773 W CN2011073773 W CN 2011073773W WO 2011120465 A2 WO2011120465 A2 WO 2011120465A2
Authority
WO
WIPO (PCT)
Prior art keywords
message
priority
flow control
read
current
Prior art date
Application number
PCT/CN2011/073773
Other languages
English (en)
French (fr)
Other versions
WO2011120465A3 (zh
Inventor
李昕杰
Original Assignee
华为技术有限公司
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 华为技术有限公司 filed Critical 华为技术有限公司
Priority to CN2011800006182A priority Critical patent/CN102217336A/zh
Priority to PCT/CN2011/073773 priority patent/WO2011120465A2/zh
Publication of WO2011120465A2 publication Critical patent/WO2011120465A2/zh
Publication of WO2011120465A3 publication Critical patent/WO2011120465A3/zh

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L47/00Traffic control in data switching networks
    • H04L47/10Flow control; Congestion control
    • H04L47/24Traffic characterised by specific attributes, e.g. priority or QoS
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L51/00User-to-user messaging in packet-switching networks, transmitted according to store-and-forward or real-time protocols, e.g. e-mail
    • H04L51/21Monitoring or handling of messages
    • H04L51/226Delivery according to priorities

Definitions

  • the present invention relates to the field of communications technologies, and in particular, to a message processing method and system. Background technique
  • SMS services There are a variety of short message services in the communication system, and each service corresponds to a content provider (Server Provider, hereinafter referred to as SP).
  • SP Content provider
  • the role and status of SMS services provided by different SPs are also different. Some SMS services are more important, such as SMS services provided by banks or securities firms. Some SMS services are not very important, such as providing weather forecast SMS services.
  • the processing performance of the short message processing system in the communication system is hardware-dependent. That is, under a certain hardware and software condition, the maximum amount of traffic that can be processed by a short message processing system, that is, the number of short messages processed per second is certain. Under the premise that the maximum amount of traffic that can be supported by the SMS processing system is certain, the operator hopes to preferentially guarantee the SMS traffic for the SMS service provided by the important SP.
  • the short message processing system in the prior art reserves certain traffic to the important SP when the short message service provided by the important SP needs to be preferentially processed, and the traffic resource cannot be occupied by the ordinary SP, for example, the processing of the short message processing system.
  • the important SP submitted short messages of less than 30 / sec, for example only 10 / sec.
  • the important SP still occupies the reserved traffic, that is, 30/sec.
  • the traffic occupied by the normal SP is 70/sec.
  • the traffic volume of the short message processing is 80/sec, which is lower than the maximum processing traffic of 100. Strips/second, which is a waste of resources for the communication system. Summary of the invention
  • the present invention provides a message processing method and system for ensuring that the resources of the system can be fully utilized while ensuring the traffic of the SMS service of the important SP.
  • An embodiment of the present invention provides a message processing method, including:
  • Another embodiment of the present invention provides a message processing system, including:
  • a receiving module configured to receive a message submitted by the sender during the current flow control period
  • a cache module configured to cache a message received by the receiving module
  • the reading module is configured to read, according to the priority of the message, the message buffered by the cache module in the first-level control period according to the priority of the message, and respectively according to the flow control quantity corresponding to each priority level during reading
  • the amount of read messages is controlled; in the control process, whenever the amount of read messages reaches the current priority flow control amount, the message is switched to read the next priority message; if the read message volume cannot be If the flow control quantity of the current priority is reached, the remaining flow control quantity of the current priority is allocated to the next priority level, and the sum of the flow control quantity allocated and the flow control quantity allocated in advance for the next priority level The amount of flow control as the next priority;
  • a processing module configured to process a message read by the reading module.
  • the system can determine the number of messages of various priorities submitted by the upper-level control period, thereby processing the message according to the priority level, and determining the priority. After the resources occupied by the higher-level messages are used, resources that can be used by other priority messages are determined, thereby making full use of the processing performance of the message processing system and improving resource utilization.
  • FIG. 1 is a flowchart of a message processing method according to a first embodiment of the present invention
  • FIG. 2 is a schematic diagram of a message processing system for processing a message according to a first embodiment of the present invention
  • FIG. 3 is a schematic structural diagram of a message processing system according to a second embodiment of the present invention. detailed description
  • the present embodiment provides a message processing method, which can process the message service provided by the common SP at the same time as the message service of the important SP is preferentially processed.
  • the message service in the present embodiment includes but is not limited to the short message service and the multimedia message. Business and other types of business.
  • the priority of the message of each SP is preset according to the importance degree of each SP. For example, the priority of the message setting the most important SP is the highest, and the priority of the message of the secondary important SP. higher.
  • the message processing system can ensure that a certain amount of traffic is reserved for the message service of the important SP. For example, when the processing performance of the message processing system is 100/sec, the important SP can preferentially occupy 30 pieces/second of traffic; This ensures the traffic of important SPs in the message processing system, so that messages with higher priority can preferentially occupy the reserved traffic, so that the message processing system can prioritize messages with high priority at any time.
  • the message processing when processing a message, may be started from a message with a lower priority according to the order of priority, and the message with a lower priority does not reach the preset flow control.
  • the remaining flow control quantity of the low priority message can be allocated to the high priority message usage, so that the flow control quantity that the high priority message can use is higher than the preset flow control quantity, and the high priority is increased. The number of messages sent.
  • FIG. 1 is a flowchart of a message processing method according to a first embodiment of the present invention, including: Step 1: Receive a message submitted by a sender in a current flow control period.
  • the sender can be SP and / or ordinary users of different importance.
  • Step 12. Cache the received message.
  • the message is processed by using a delay flow control method, that is, the message processing system uses the flow control period as the time interval for processing the message, and processes the message of the first-level control period cache in the current flow control period. .
  • the message is first cached and processed in the next-stage control cycle, so that the message processing system can know how many messages are submitted in each priority period in the first-class control cycle. Therefore, the message is processed according to the priority of each submitted message, and the message with higher priority can be preferentially processed.
  • Step 13 In the current flow control period, read the message of the first-level control period cache according to the priority of the message, and control the amount of the read message according to the flow control quantity of each priority in the reading; In the control process, when the amount of read messages reaches the current priority flow control amount, the message is switched to read the next priority message; if the read message quantity cannot reach the current priority flow control quantity, Then, the remaining flow control quantity of the current priority is allocated to the next priority, and the sum of the flow control quantity and the flow control quantity allocated in advance for the next priority is used as the flow control quantity of the next priority.
  • the message cached by the first-class control period may be read in descending order of the priority of the message, or according to the priority of the message from low to The high order reads the messages on the top-level control cycle cache.
  • the processing performance of a message processing system is 100 per flow control period, and the message with the highest priority can occupy 30 traffic in each flow control period.
  • the control message that is, 30 messages, can read 70 messages of other priorities.
  • the highest priority message that is, 25, allocates the remaining flow control amount of the highest priority message to the message with the second highest priority, so that the message processing system can read 75 other priority messages.
  • the message processing system can process up to 100 messages in a first-class control cycle.
  • the default flow control volume of the message with the highest priority is 30, and the preset flow control volume of the message with the second highest priority is 20.
  • the priority flow of the priority message is 50.
  • 40 messages with the highest priority are submitted in the first-class control cycle, and 30 messages with the second highest priority, because the number of messages with the highest priority submitted exceeds the preset flow control, therefore, the highest priority
  • the flow control quantity is the preset flow control quantity, that is, 50 pieces.
  • the message with the highest priority can be used.
  • Read, that is, 25, and the remaining flow control that is not used by the highest priority message can be allocated to the message with the second highest priority, that is, the flow control of the message with the second highest priority is equal to the remaining of the message with the highest priority.
  • the message processing system always processes 100 messages in each flow control cycle, and is always at the maximum processing performance, thereby fully utilizing the resources of the message processing system.
  • Step 14 Process the read message.
  • the processing of the read message may be different according to the difference of the message and/or the difference of the message processing system. For example, when the message is a short message, the process may be to send the short message.
  • the above method uses the flow control period as the time interval for processing the message, so that the system can determine the number of messages of various priorities submitted by the upper-level control period, so that the message can be processed according to the priority level, and the priority is determined. After the resources occupied by the higher messages are used, resources that can be used by other priority messages are determined, thereby making full use of the processing performance of the message processing system and improving resource utilization.
  • the buffer area may be used to store the message that is submitted in the upper-level control period, needs to be processed in the current flow control period, and needs to be processed in the current first-level control period in the current flow control period. Message.
  • two buffer areas can be set in advance for each priority, and the two buffer areas are respectively set to the buffer status and the read status, and each buffer area is switched at the end of each flow control period.
  • the buffering the received message according to the flow control period specifically includes: identifying a priority of the received message, determining, in the current flow control period, from two buffer areas set for the priority of the received message
  • the buffer in the cached state caches the received message into the cached cache.
  • FIG. 2 is a schematic diagram of a process for processing a message by a message processing system according to an embodiment of the present invention.
  • a message with the highest priority is preset.
  • the first buffer area and the second buffer area; the third buffer area and the fourth buffer area are preset for the second highest priority message.
  • the first buffer area The message with the highest priority to be processed in the current flow control period is stored, that is, the message with the highest priority submitted by the upper-level control cycle, and the state of the first buffer area is the read state; the second buffer area stores the current state.
  • the highest priority message submitted during the flow control period that is, the highest priority message that needs to be processed in the next best control cycle, at which time the state of the second buffer is the cache state.
  • the third buffer area stores the message with the second highest priority to be processed in the current flow control period, that is, the message with the second highest priority submitted by the upper-level control period, and the state of the third buffer area is the read state;
  • the cache area stores the message with the second highest priority submitted in the current flow control period, that is, the message with the second highest priority to be processed in the next-stage control period, and the state of the fourth buffer area is the cache state.
  • the message submitted by the sender received in the current flow control period is stored in the buffer area in the buffer state, and correspondingly, the message that needs to be processed in the current flow control period is read, that is, the first-level control is read.
  • the message is buffered periodically, the message corresponding to each priority is read from the buffer in the current flow control period; wherein, in the buffer in which the current flow control period is in the read state, it is on the arrival.
  • the end point of the first-class control cycle switch to the buffer of the read state.
  • the state of the first buffer area is switched to the buffer state, and the state of the second buffer area is switched to the read state; for the message with the second highest priority, The state of the third buffer area is switched to the buffer state, and the state of the fourth buffer area is switched to the read state.
  • the messages of the second buffer area and the fourth buffer area are read for processing, thereby implementing loop processing of the message.
  • the system can determine the number of types of messages submitted by the upper-level control period, thereby processing the message according to the priority level, and determining the priority. After the resources occupied by the higher messages are used, resources that can be used by other priority messages are determined, thereby making full use of the processing performance of the message processing system and improving resource utilization.
  • a second embodiment of the present invention provides a message processing system, as shown in FIG. 3, including: The receiving module 31 is configured to receive a message submitted by the sender during the current flow control period;
  • the cache module 32 is configured to cache the message received by the receiving module 31.
  • the reading module 33 is configured to read, according to the priority of the message, the message buffered by the cache module 32 in the upper-level control period according to the priority of the message during the current flow control period, and respectively read according to the flow control quantity corresponding to each priority level during reading.
  • the amount of message is controlled; in the control process, whenever the amount of read messages reaches the current priority flow control amount, the message is switched to read the next priority message; if the read message volume cannot reach the current priority Level flow control quantity, then the remaining flow control quantity of the current priority is allocated to the next priority level, and the sum of the remaining flow control quantity of the allocation and the flow control quantity allocated in advance for the next priority is used as the next Priority flow control;
  • the processing module 34 is configured to process the message read by the reading module 33.
  • the cache module 32 is specifically configured to set two buffer areas for each priority in advance, and the two buffer areas are respectively set to a buffer state and a read state, and perform state switching at an end point of each flow control period;
  • the priority of the received message is determined from the two buffer areas set for the priority of the received message, the buffer area that is in the cache state in the current flow control period, and the message received by the receiving module 31 is cached. Go to the determined cache in the cache state.
  • the read module 33 is specifically configured to read a message corresponding to each priority from a buffer that is in a read state in a current flow control period; specifically, the buffer in a read state in a current flow control cycle. To reach the end point of the upper-level control cycle, switch to the buffer of the read state.
  • the reading module 33 can also be used to read the cached message of the cache module 32 in the upper control cycle in descending order of the priority of the message.
  • the system can determine the number of types of messages submitted by the upper-level control period, thereby processing the message according to the priority level, and determining the priority. After the resources occupied by the higher messages, the resources that other priority messages can be used are determined, thereby making full use of the processing performance of the message processing system and improving Resource utilization.
  • modules in the apparatus in the embodiments may be distributed in the apparatus of the embodiment according to the embodiment, or may be correspondingly changed in one or more apparatuses different from the embodiment.
  • the modules of the above embodiments may be combined into one module, or may be further split into a plurality of sub-modules.
  • the foregoing storage medium includes: a read-only memory (ROM: Read-Only Memory), a random access memory (RAM: random access memory), a magnetic disk or an optical disk, and the like.
  • ROM Read-Only Memory
  • RAM random access memory
  • magnetic disk or an optical disk and the like.
  • the medium of the program code includes: a read-only memory (ROM: Read-Only Memory), a random access memory (RAM: random access memory), a magnetic disk or an optical disk, and the like.

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

本发明公开了一种消息处理方法和系统,方法包括:在当前流控周期内接收发送方提交的消息(11),对接收到的消息进行缓存(12);在所述当前流控周期内,按照消息的优先级读取上一流控周期缓存的消息,在读取时分别根据各优先级对应的流控量对读取的消息量进行控制;在所述控制过程中,每当读取的消息量到达当前优先级的流控量时,切换为读取下一优先级的消息;若读取的消息量无法达到当前优先级的流控量,则将所述当前优先级的剩余流控量调配给下一优先级,以调配的流控量以及预先为所述下一优先级分配的流控量之和作为所述下一优先级的流控量(13);对读取出的消息进行处理(14)。本发明能够充分利用消息处理系统的处理性能,提高资源利用率。

Description

消息处理方法和系统 技术领域
本发明涉及通信技术领域, 特别涉及一种消息处理方法和系统。 背景技术
通信系统中的短消息业务有多种, 每种业务都对应一个内容提供商 ( Server Provider, 以下简称 SP ) 。 不同 SP提供的短信业务的作用和地位也 不同。 有些 SP提供的短信业务比较重要, 如银行或证券商提供的短信业务, 有些 SP提供的短信业务不太重要, 如提供天气预报短信业务。
通信系统中的短信处理系统的处理性能是和硬件相关的, 即在一定的硬 件和软件条件下, 一套短信处理系统所能处理的最大流量即每秒处理的短信 条数是一定的。 短信处理系统在能够支持的最大流量一定的前提下, 运营商 希望对于重要的 SP提供的短信业务, 能够优先保证其短信流量。
因此,现有技术中的短信处理系统,在需要优先处理重要 SP提供的短信 业务时, 会预留一定的流量给该重要 SP, 而该流量资源普通 SP不能占用, 比如, 短信处理系统的处理性能是 100条 /秒, 对于重要 SP, 要求保证其流量 为 30条 /秒, 这样普通 SP可以使用的流量为 100 - 30 = 70条 /秒。
但是在某些时候, 重要 SP提交的短消息达不到 30条 /秒, 例如只有 10 条 /秒。 而此时该重要 SP仍占用预留的流量即 30条 /秒, 普通 SP占用的流量 为 70条 /秒, 此时短消息处理的业务量为 80条 /秒, 低于其最大处理流量 100 条 /秒, 这对通信系统来说是一种资源的浪费。 发明内容
本发明提供了一种消息处理的方法和系统,用以在确保重要 SP的短信业 务的流量的同时, 确保系统的资源能够得到充分利用。 本发明一个实施例提供了一种消息处理方法, 包括:
在当前流控周期内接收发送方提交的消息, 对接收到的消息进行緩存; 在所述当前流控周期内, 按照消息的优先级读取上一流控周期緩存的消 息, 在读取时分别根据各优先级对应的流控量对读取的消息量进行控制; 在 所述控制过程中, 每当读取的消息量到达当前优先级的流控量时, 切换为读 取下一优先级的消息; 若读取的消息量无法达到当前优先级的流控量, 则将 所述当前优先级的剩余流控量调配给下一优先级, 以调配的流控量以及预先 为所述下一优先级分配的流控量之和作为所述下一优先级的流控量;
对读取出的消息进行处理。
本发明另一个实施例提供了一种消息处理系统, 包括:
接收模块, 用于在当前流控周期内接收发送方提交的消息;
緩存模块, 用于对所述接收模块接收到的消息进行緩存;
读耳 ^莫块, 用于在当前流控周期内, 按照消息的优先级读取所述緩存模 块在上一流控周期緩存的消息, 在读取时分别根据各优先级对应的流控量对 读取的消息量进行控制; 在所述控制过程中, 每当读取的消息量到达当前优 先级的流控量时, 切换为读取下一优先级的消息; 若读取的消息量无法达到 当前优先级的流控量,则将所述当前优先级的剩余流控量调配给下一优先级, 以调配的流控量以及预先为所述下一优先级分配的流控量之和作为所述下一 优先级的流控量;
处理模块, 用于对所述读取模块读取出的消息进行处理。
本实施例通过以流控周期作为处理消息的时间间隔, 使得系统能够确定 上一流控周期提交的各种优先级的消息数量, 由此可以按照优先级的高低对 消息进行处理, 在确定了优先级较高的消息占用的资源后, 再确定其他优先 级的消息能够使用的资源, 由此能够充分利用消息处理系统的处理性能, 提 高资源利用率。 附图说明
图 1为本发明第一实施例提供的消息处理方法流程图;
图 2为本发明第一实施例提供的消息处理系统处理消息的场景示意图; 图 3为本发明第二实施例提供的消息处理系统的结构示意图。 具体实施方式
为使本发明实施例的目的、 技术方案和优点更加清楚, 下面将结合本发 明实施例中的附图, 对本发明实施例中的技术方案进行清楚、 完整地描述, 显然, 所描述的实施例是本发明一部分实施例, 而不是全部的实施例。 基于 本发明中的实施例, 本领域普通技术人员在没有作出创造性劳动前提下所获 得的所有其它实施例, 都属于本发明保护的范围。
鉴于现有技术中采用预留流量资源的方式以保证重要 SP 的短消息业务 能够优先得到处理, 该方式可能会造成资源的浪费。 本实施例提供了一种消 息处理方法,在优先处理重要 SP的消息业务的同时,也能够最大限度的处理 普通 SP提供的消息业务,本实施中的消息业务包括但不限于短消息业务及彩 信业务等类型的业务。
在本发明实施例中, 按照各 SP的重要程度, 对各个 SP的消息的优先级 进行预先设定, 例如, 设定最重要 SP的消息的优先级最高, 次重要 SP的消 息的优先级次高等。 在处理消息时, 可以按照优先级的高低顺序, 从优先级 高的消息开始进行消息处理。由此使得消息处理系统能够保证对重要 SP的消 息业务保留一定的流量, 如在消息处理系统的处理性能为 100条 /秒时, 可以 保证重要的 SP能优先占用 30条 /秒的流量; 由此能够确保消息处理系统中重 要的的 SP的流量,使得优先级高的消息能够优先占用预留的流量,使得任何 时候消息处理系统对优先级高的消息能够优先处理。
本发明另一实施例在处理消息时, 可以按照优先级的高低顺序, 从优先 级低的消息开始进行消息处理, 在低优先级的消息没有达到预先设置的流控 量时, 可以将低优先级的消息剩余的流控量调配给高优先级的消息使用, 从 而使高优先级的消息能够使用的流控量比预先设置的流控量高, 增加高优先 级的消息的发送数量。
参见图 1所示为本发明第一实施例提供的消息处理方法流程图, 包括: 步骤 1 1、 在当前流控周期内接收发送方提交的消息。
其中, 发送方可以是不同重要程度的 SP和 /或普通用户。
步骤 12、 对接收到的消息进行緩存。
在本实施例的消息处理系统中, 采用延迟流控的方式对消息进行处理, 即消息处理系统以流控周期作为处理消息的时间间隔, 在当前流控周期内处 理上一流控周期緩存的消息。 同时对于在当前流控周期内发送方提交的消息 都先进行緩存, 并在下一流控周期集中进行处理, 由此消息处理系统能够知 道在上一流控周期内各个优先级的消息分别提交了多少条, 从而根据提交的 各消息的优先级对消息进行处理, 可以优先处理优先级高的消息。
步骤 13、 在当前流控周期内, 按照消息的优先级读取上一流控周期緩存 的消息,在读取时分别根据各优先^十应的流控量对读取的消息量进行控制; 在所述控制过程中, 每当读取的消息量到达当前优先级的流控量时, 切换为 读取下一优先级的消息; 若读取的消息量无法达到当前优先级的流控量, 则 将当前优先级的剩余流控量调配给下一优先级, 以调配的流控量以及预先为 下一优先级分配的流控量之和作为下一优先级的流控量。
其中, 在按照消息的优先级读取上一流控周期緩存的消息时, 可以按照 消息的优先级从高到低的顺序读取上一流控周期緩存的消息, 或按照消息的 优先级从低到高的顺序读取上一流控周期緩存的消息。
例如, 在优先级最高的消息的数量达到对应的预设流控量时, 则只读取 该预设流控量的消息;在优先级最高的消息量没有达到对应的预设流控量时, 则可以将优先级最高的消息没有使用的剩余流控量调配给优先级次高的消息 使用, 从而使优先级次高的消息可以使用的流控量为该剩余流控量与为优先 级次高的消息预设的流控量之和, 由此充分的利用了消息处理系统的资源。 例如, 某消息处理系统的处理性能为每个流控周期 100条, 其中优先级 最高的消息在每个流控周期可以占用 30条的流量。假设在上一流控周期提交 了 40条优先级最高的消息, 则在当前流控周期进行消息读取时, 判断出优先 级最高的消息数量达到预设流控量, 则只读取预设流控量的消息, 即 30条, 而可以读取 70条其他优先级的消息。 假设在上一流控周期只提交了 25条优 先级最高的消息, 则在当前流控周期进行消息读取时, 判断出优先级最高的 消息数量未到达预设流控量,则可以读取全部的优先级最高的消息,即 25条, 并将优先级最高的消息的剩余流控量调配给优先级次高的消息使用, 由此消 息处理系统可以读取 75条其他优先级的消息。
例如, 消息处理系统在一流控周期最多能处理 100条消息, 其中, 优先 级最高的消息的预设流控量为 30条, 优先级次高的消息的预设流控量为 20 条, 其他优先级的消息的预设流控量为 50 条。 假设在上一流控周期提交了 40条优先级最高的消息, 30条优先级次高的消息, 由于提交的优先级最高的 消息的数量超过了预设流控量, 因此, 在对优先级最高的消息进行读取时只 读取预设流控量的消息, 即读取 30条; 同理, 在对优先级次高的消息进行读 取时只读取 20条, 其他优先级的消息的流控量为预设流控量, 即 50条。 假 设在上一流控周期提交了 25条优先级最高的消息, 25条优先级次高的消息, 由于优先级最高的消息的数量没有达到预设流控量, 因此优先级最高的消息 可以被全部读取, 即 25条, 并且优先级最高的消息没有使用的剩余流控量可 以调配给优先级次高的消息使用, 即优先级次高的消息的流控量等于优先级 最高的消息的剩余流控量与优先级次高的消息的预设流控量之和, 即 5+20=25 条, 因此优先级次高的消息也可以被全部读取, 其他优先级的消息 占用 50条。 此外, 若上一周期提交的优先级次高的消息的数量较小, 假设只 有 10条, 由于系统能够读取 25条优先级次高的消息, 因此可以读取全部的 优先级次高的消息, 并将优先级次高的消息没有使用的剩余流控量调配给下 一优先级的消息使用, 从而可以读取 65条其他优先级的消息。
由此可知, 消息处理系统在每个流控周期处理的消息始终为 100条, 始 终处于最大处理性能, 由此充分利用了消息处理系统的资源。
步骤 14、 对读取出的消息进行处理。
其中, 对读取出的消息进行的处理根据消息的不同和 /或消息处理系统的 不同会有不同, 例如在消息为短消息时, 该处理就可以是对短消息进行下发。
可以理解的是, 本实施例中, 步骤 1 1、 12描述的接收、 緩存的过程与步 骤 13、 14描述的读取、 处理过程是可以并行执行的。
上述方法以流控周期作为处理消息的时间间隔, 使得系统能够确定上一 流控周期提交的各种优先级的消息的数量, 由此可以按照优先级的高低对消 息进行处理, 在确定了优先级较高的消息占用的资源后, 再确定其他优先级 的消息能够使用的资源, 由此能够充分利用消息处理系统的处理性能, 提高 资源利用率。
此外, 本实施例的另一种实现方式中, 可以使用緩存区存储在上一流控 周期提交的, 需要在当前流控周期处理的消息, 以及在当前流控周期提交的 需要在下一流控周期处理的消息。 在此方式中, 可以预先为每个优先级设置 两个緩存区, 并将两个緩存区分别设置为緩存状态和读取状态, 且各个緩存 区在每个流控周期结束点进行状态切换。
相应的, 按照流控周期对接收到的消息进行緩存具体包括: 识别接收到 的消息的优先级, 从为该接收到的消息的优先级设置的两个緩存区中, 确定 在当前流控周期中处于緩存状态的緩存区, 将接收到的消息緩存到处于緩存 状态的緩存区中。
采用循环切换緩存区的方式对短消息进行处理的方法如下, 图 2为本发 明一个实施例中消息处理系统处理消息的场景示意图,在该消息处理系统中, 为优先级最高的消息预先设置了第一緩存区和第二緩存区; 为优先级次高的 消息预先设置了第三緩存区和第四緩存区。 在当前流控周期内, 第一緩存区 存储的是当前流控周期待处理的优先级最高的消息, 即上一流控周期提交的 优先级最高的消息, 此时第一緩存区的状态为读取状态; 第二緩存区存储的 是当前流控周期内提交的优先级最高的消息, 即在下一流控周期需要处理的 优先级最高的消息, 此时第二緩存区的状态为緩存状态。
第三緩存区存储的是当前流控周期待处理的优先级次高的消息, 即上一 流控周期提交的优先级次高的消息, 此时第三緩存区的状态为读取状态; 第 四緩存区存储的是当前流控周期内提交的优先级次高的消息, 即在下一流控 周期需要处理的优先级次高的消息, 此时第四緩存区的状态为緩存状态。
在本实施例中, 当前流控周期内接收的发送方提交的消息都存储在处于 緩存状态的緩存区中, 相应的, 在读取当前流控周期需要处理的消息, 即读 取上一流控周期緩存的消息时, 具体是从在当前流控周期中处于读取状态的 緩存区读取各优先级对应的消息; 其中, 在当前流控周期处于读取状态的緩 存区, 是在到达上一流控周期的结束点时, 切换到读取状态的緩存区。
在此基础上, 接收、 緩存、 读取和下发短消息的处理方法都与图 1描述 的方法相同, 在此不再赘述。
在到达当前流控周期结束点时, 对于优先级最高的消息, 将第一緩存区 的状态切换为緩存状态, 将第二緩存区的状态切换为读取状态; 对于优先级 次高的消息, 将第三緩存区的状态切换为緩存状态, 将第四緩存区的状态切 换为读取状态。 在下一流控周期中, 读取第二緩存区和第四緩存区的消息进 行处理, 由此实现对消息的循环处理。
本实施例通过以流控周期作为处理消息的时间间隔, 使得系统能够确定 上一流控周期提交的各种类型的消息数量, 由此可以按照优先级的高低对消 息进行处理, 在确定了优先级较高的消息占用的资源后, 再确定其他优先级 的消息能够使用的资源, 由此能够充分利用消息处理系统的处理性能, 提高 资源利用率。
本发明第二实施例提供了一种消息处理系统, 参见图 3所示, 包括: 接收模块 31 , 用于在当前流控周期内接收发送方提交的消息;
緩存模块 32, 用于对接收模块 31接收到的消息进行緩存;
读取模块 33 , 用于在当前流控周期内, 按照消息的优先级读取緩存模块 32在上一流控周期緩存的消息, 在读取时分别根据各优先级对应的流控量对 读取的消息量进行控制; 在该控制过程中, 每当读取的消息量到达当前优先 级的流控量时, 切换为读取下一优先级的消息; 若读取的消息量无法达到当 前优先级的流控量, 则将当前优先级的剩余流控量调配给下一优先级, 以该 调配的剩余流控量以及预先为下一优先级分配的流控量之和作为所述下一优 先级的流控量;
处理模块 34, 用于对读取模块 33读取出的消息进行处理。
其中, 緩存模块 32具体用于预先为每个优先级设置两个緩存区, 两个緩 存区分别设置为緩存状态和读取状态, 并在每个流控周期结束点进行状态切 换; 识别接收模块 31接收到的消息的优先级, 从为该接收到的消息的优先级 设置的两个緩存区中, 确定在当前流控周期中处于緩存状态的緩存区, 将接 收模块 31接收到的消息緩存到确定的处于緩存状态的緩存区中。
其中, 读耳 莫块 33 , 具体用于从在当前流控周期中处于读取状态的緩存 区读取各优先级对应的消息; 具体地, 该在当前流控周期处于读取状态的緩 存区为到达上一流控周期的结束点时, 切换到读取状态的緩存区。
进一步, 读取模块 33还可以用于按照消息的优先从高到低的顺序读取緩 存模块 32在上一流控周期緩存的消息。
本实施例中各模块的功能和交互方式可参见图 1对应实施例的记载, 在 此不再赘述。
本实施例通过以流控周期作为处理消息的时间间隔, 使得系统能够确定 上一流控周期提交的各种类型的消息数量, 由此可以按照优先级的高低对消 息进行处理, 在确定了优先级较高的消息占用的资源后, 再确定其他优先级 的消息能够使用的资源, 由此能够充分利用消息处理系统的处理性能, 提高 资源利用率。
本领域普通技术人员可以理解: 附图只是一个实施例的示意图, 附图中 的模块或流程并不一定是实施本发明所必须的。
本领域普通技术人员可以理解: 实施例中的装置中的模块可以按照实施 例描述分布于实施例的装置中, 也可以进行相应变化位于不同于本实施例的 一个或多个装置中。 上述实施例的模块可以合并为一个模块, 也可以进一步 拆分成多个子模块。
上述本发明实施例序号仅仅为了描述, 不代表实施例的优劣。
本领域普通技术人员可以理解: 实现上述方法实施例的全部或部分步骤 可以通过程序指令相关的硬件来完成, 前述的程序可以存储于一计算机可读 取存储介质中, 该程序在执行时, 执行包括上述方法实施例的步骤; 而前述 的存储介质包括: 只读存储记忆体(ROM: Read-Only Memory ) , 随机存储 记忆体(RAM: Random Access Memory ) 、 磁碟或者光盘等各种可以存储程 序代码的介质。
最后应说明的是: 以上实施例仅用以说明本发明的技术方案, 而非对其 限制; 尽管参照前述实施例对本发明进行了详细的说明, 本领域的普通技术 人员应当理解: 其依然可以对前述实施例所记载的技术方案进行修改, 或者 对其中部分技术特征进行等同替换; 而这些修改或者替换, 并不使相应技术 方案的本质脱离本发明实施例技术方案的精神和范围。

Claims

权 利 要 求 书
1、 一种消息处理方法, 其特征在于, 包括:
在当前流控周期内接收发送方提交的消息, 对接收到的消息进行緩存; 在所述当前流控周期内, 按照消息的优先级读取上一流控周期緩存的消 息, 在读取时分别根据各优先级对应的流控量对读取的消息量进行控制; 在 所述控制过程中, 每当读取的消息量到达当前优先级的流控量时, 切换为读 取下一优先级的消息; 若读取的消息量无法达到当前优先级的流控量, 则将 所述当前优先级的剩余流控量调配给下一优先级, 以调配的流控量以及预先 为所述下一优先级分配的流控量之和作为所述下一优先级的流控量;
对读取出的消息进行处理。
2、根据权利要求 1所述的消息处理方法,其特征在于,所述方法还包括: 预先为每个优先级设置两个緩存区, 所述两个緩存区分别设置为緩存状态和 读取状态, 且各个緩存区在每个流控周期结束点进行状态切换;
所述按照流控周期对接收到的消息进行緩存具体包括:
识别接收到的消息的优先级, 从为该优先级设置的两个緩存区中确定在 当前流控周期中处于緩存状态的緩存区, 将所述消息緩存到所述处于緩存状 态的緩存区中。
3、 根据权利要求 2所述的消息处理方法, 其特征在于, 所述读取上一流 控周期緩存的消息具体为, 从在当前流控周期中处于读取状态的緩存区读取 各优先级对应的消息。
4、 根据权利要求 1至 3任一所述的消息处理方法, 其特征在于, 所述按 照消息的优先级读取上一流控周期緩存的消息具体为: 按照消息的优先级从 高到低的顺序读取所述上一流控周期緩存的消息。
5、 一种消息处理系统, 其特征在于, 包括:
接收模块, 用于在当前流控周期内接收发送方提交的消息;
緩存模块, 用于对所述接收模块接收到的消息进行緩存; 读耳 莫块, 用于在当前流控周期内, 按照消息的优先级读取所述緩存模 块在上一流控周期緩存的消息, 在读取时分别根据各优先级对应的流控量对 读取的消息量进行控制; 在所述控制过程中, 每当读取的消息量到达当前优 先级的流控量时, 切换为读取下一优先级的消息; 若读取的消息量无法达到 当前优先级的流控量,则将所述当前优先级的剩余流控量调配给下一优先级, 以调配的流控量以及预先为所述下一优先级分配的流控量之和作为所述下一 优先级的流控量;
处理模块, 用于对所述读取模块读取出的消息进行处理。
6、 根据权利要求 5所述的消息处理系统, 其特征在于, 所述緩存模块具 体用于预先为每个优先级设置两个緩存区, 两个緩存区分别设置为緩存状态 和读取状态, 在每个流控周期结束点进行状态切换; 识别所述接收模块接收 到的消息的优先级, 从为该优先级设置的两个緩存区中确定在当前流控周期 中处于緩存状态的緩存区,将所述消息緩存到所述处于緩存状态的緩存区中。
7、 根据权利要求 6所述的消息处理系统, 其特征在于,
所述读耳 莫块, 具体用于从在当前流控周期中处于读取状态的緩存区读 取各优先级对应的消息。
8、 根据权利要求 5至 7任一所述的消息处理系统, 其特征在于, 所述读 取模块, 具体用于按照消息的优先从高到低的顺序读取所述緩存模块在所述 上一流控周期緩存的消息。
PCT/CN2011/073773 2011-05-06 2011-05-06 消息处理方法和系统 WO2011120465A2 (zh)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN2011800006182A CN102217336A (zh) 2011-05-06 2011-05-06 消息处理方法和系统
PCT/CN2011/073773 WO2011120465A2 (zh) 2011-05-06 2011-05-06 消息处理方法和系统

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/CN2011/073773 WO2011120465A2 (zh) 2011-05-06 2011-05-06 消息处理方法和系统

Publications (2)

Publication Number Publication Date
WO2011120465A2 true WO2011120465A2 (zh) 2011-10-06
WO2011120465A3 WO2011120465A3 (zh) 2012-04-12

Family

ID=44712676

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2011/073773 WO2011120465A2 (zh) 2011-05-06 2011-05-06 消息处理方法和系统

Country Status (2)

Country Link
CN (1) CN102217336A (zh)
WO (1) WO2011120465A2 (zh)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115987905A (zh) * 2022-12-21 2023-04-18 杭州诚智天扬科技有限公司 一种多通道流控方法、系统、设备及存储介质

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104092619B (zh) 2014-07-25 2017-07-21 华为技术有限公司 流量控制方法及装置
CN114039925B (zh) * 2021-10-28 2023-11-28 北京思特奇信息技术股份有限公司 短信网关系统中基于优先级的动态流量控制方法

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2004254132A (ja) * 2003-02-20 2004-09-09 Telecommunication Advancement Organization Of Japan パケット伝送方法及びパケット伝送装置
CN101246437A (zh) * 2008-01-28 2008-08-20 中兴通讯股份有限公司 一种嵌入式实时系统进程均衡调度方法
CN101340633A (zh) * 2008-08-12 2009-01-07 中兴通讯股份有限公司 一种增值服务消息过负荷控制装置及方法

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN100450081C (zh) * 2005-06-10 2009-01-07 华为技术有限公司 进行流量控制的方法和系统
CN101938396B (zh) * 2009-06-30 2013-04-17 华为技术有限公司 数据流控制方法及装置

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2004254132A (ja) * 2003-02-20 2004-09-09 Telecommunication Advancement Organization Of Japan パケット伝送方法及びパケット伝送装置
CN101246437A (zh) * 2008-01-28 2008-08-20 中兴通讯股份有限公司 一种嵌入式实时系统进程均衡调度方法
CN101340633A (zh) * 2008-08-12 2009-01-07 中兴通讯股份有限公司 一种增值服务消息过负荷控制装置及方法

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115987905A (zh) * 2022-12-21 2023-04-18 杭州诚智天扬科技有限公司 一种多通道流控方法、系统、设备及存储介质
CN115987905B (zh) * 2022-12-21 2024-05-14 杭州诚智天扬科技有限公司 一种多通道流控方法、系统、设备及存储介质

Also Published As

Publication number Publication date
CN102217336A (zh) 2011-10-12
WO2011120465A3 (zh) 2012-04-12

Similar Documents

Publication Publication Date Title
EP2822236A1 (en) Network bandwidth distribution method and terminal
CN110417676B (zh) 一种调度方法、装置和调度网络
CN102447610B (zh) 实现报文缓存资源共享的方法和装置
EP3621342B1 (en) Method and device for acquiring network resource, and scheduling server
CN108616458A (zh) 客户端设备上调度分组传输的系统和方法
US10263906B2 (en) Flow scheduling device and method
CN109327403B (zh) 一种流控方法、装置、网络设备及存储介质
CN103503550A (zh) 在基站中用于向用户设备分配通信资源的方法、基站、计算机程序和计算机程序产品
CN101635678A (zh) 一种p2p终端流量控制的方法及系统
CN110087324B (zh) 资源分配方法、装置、接入网设备和存储介质
CN103024699A (zh) 一种短信发送方法和一种信息资源站实体
CN101651615A (zh) 报文调度方法和装置
JP2019522408A (ja) エアインタフェースリソース割り当て方法およびネットワークデバイス
JP2021501536A (ja) アップリンクデータパケットリソース割り当て方法およびユーザ端末
WO2014173366A2 (zh) 一种实现电信能力群发的方法、装置及系统
WO2011120465A2 (zh) 消息处理方法和系统
CN102223311A (zh) 一种队列调度方法及装置
CN108023938B (zh) 一种消息发送方法及服务器
CN104349465B (zh) 无线网络休眠定时器的设定方法与装置
JP2000069548A (ja) 通信帯域割当方法
CN106604404B (zh) 一种业务调度方法及装置
CN111385223A (zh) 流控方法、设备、系统及存储介质
CN109257227B (zh) 数据传输中的偶联管理方法、装置及系统
CN110247808B (zh) 信息发送方法、装置、设备及可读存储介质
CN101431802B (zh) 数据传输方法、网络节点及网络系统

Legal Events

Date Code Title Description
WWE Wipo information: entry into national phase

Ref document number: 201180000618.2

Country of ref document: CN

121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 11762039

Country of ref document: EP

Kind code of ref document: A2

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 11762039

Country of ref document: EP

Kind code of ref document: A2