WO2022068488A1 - 消息发送的控制方法、装置、电子设备及计算机可读存储介质 - Google Patents
消息发送的控制方法、装置、电子设备及计算机可读存储介质 Download PDFInfo
- Publication number
- WO2022068488A1 WO2022068488A1 PCT/CN2021/115015 CN2021115015W WO2022068488A1 WO 2022068488 A1 WO2022068488 A1 WO 2022068488A1 CN 2021115015 W CN2021115015 W CN 2021115015W WO 2022068488 A1 WO2022068488 A1 WO 2022068488A1
- Authority
- WO
- WIPO (PCT)
- Prior art keywords
- sent
- priority
- message
- messages
- 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.)
- Ceased
Links
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements 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/46—Multiprogramming arrangements
- G06F9/54—Interprogram communication
- G06F9/546—Message passing systems or structures, e.g. queues
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements 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/46—Multiprogramming arrangements
- G06F9/48—Program initiating; Program switching, e.g. by interrupt
- G06F9/4806—Task transfer initiation or dispatching
- G06F9/4843—Task transfer initiation or dispatching by program, e.g. task dispatcher, supervisor, operating system
- G06F9/4881—Scheduling strategies for dispatcher, e.g. round robin, multi-level priority queues
Definitions
- the present disclosure relates to the field of message processing, and in particular, to a control method, apparatus, electronic device, and computer-readable storage medium for message sending.
- an embodiment of the present disclosure provides a method for controlling message sending, including: acquiring a message to be sent; determining a priority of the message to be sent; Send the number of messages of the priority that have been sent before the message is sent; when the first number is greater than or equal to a number threshold corresponding to the priority, discard the to-be-sent messages.
- an embodiment of the present disclosure provides a control device for sending a message, including:
- a to-be-sent message acquisition module used to acquire the to-be-sent message
- a priority determining module configured to determine the priority of the message to be sent
- a first quantity determination module configured to determine a first quantity, wherein the first quantity is the quantity of the messages of the priority that have been sent before the messages to be sent are sent;
- a control module configured to discard the to-be-sent message when the first quantity is greater than or equal to a quantity threshold corresponding to the priority.
- embodiments of the present disclosure provide an electronic device, including: at least one processor; and,
- the device is capable of performing the method of any one of the preceding first aspects.
- embodiments of the present disclosure provide a non-transitory computer-readable storage medium, wherein the non-transitory computer-readable storage medium stores computer instructions, and the computer instructions are used to cause a computer to execute any of the foregoing first aspects. a described method.
- the embodiments of the present disclosure disclose a control method, apparatus, electronic device, and computer-readable storage medium for sending a message.
- the control method for sending the message includes: acquiring the message to be sent; determining the priority of the message to be sent; determining a first quantity, where the first quantity is the priority that has been sent before the message to be sent is sent The number of messages of the priority level; when the first number is greater than or equal to the number threshold corresponding to the priority level, the to-be-sent messages are discarded.
- the above method determines whether to send the message according to the quantity threshold corresponding to the priority of the message, which solves the technical problem of the backlog of messages caused by the slow processing speed of the terminal.
- FIG. 1 is a schematic flowchart of a method for controlling message sending according to an embodiment of the present disclosure
- FIG. 2 is a schematic flowchart of determining the priority of a message to be sent in a method for controlling message sending according to an embodiment of the present disclosure
- FIG. 3 is an exemplary schematic diagram of determining the first quantity in the control method for message sending provided by the embodiment of the present disclosure
- FIG. 4 is a schematic flow chart of starting a counter in a method for controlling message sending provided by an embodiment of the disclosure
- FIG. 5 is a schematic diagram of a usage mode of a counter in a method for controlling message sending provided by an embodiment of the present disclosure
- FIG. 6 is a schematic diagram of an application scenario of a method for controlling message sending provided by an embodiment of the present disclosure.
- FIG. 7 is a schematic structural diagram of an embodiment of an apparatus for controlling message sending provided by an embodiment of the present disclosure.
- FIG. 8 is a schematic structural diagram of an electronic device provided according to an embodiment of the present disclosure.
- the term “including” and variations thereof are open-ended inclusions, ie, "including but not limited to”.
- the term “based on” is “based at least in part on.”
- the term “one embodiment” means “at least one embodiment”; the term “another embodiment” means “at least one additional embodiment”; the term “some embodiments” means “at least some embodiments”. Relevant definitions of other terms will be given in the description below.
- FIG. 1 is a flowchart of an embodiment of a method for controlling message sending provided by an embodiment of the present disclosure.
- the method for controlling message sending provided in this embodiment may be executed by a control device for message sending, and the device for controlling message sending may implement As software, or implemented as a combination of software and hardware, the message sending control device can be integrated into a device in a message sending control system, such as a message sending control server or a message sending control terminal device.
- the method includes the following steps:
- Step S101 acquiring a message to be sent
- the message to be sent is a message generated by a message sending apparatus or a message to be forwarded received by the server from the terminal device.
- a message sending apparatus or a message to be forwarded received by the server from the terminal device.
- multiple terminal devices located in the same live broadcast room will send a message to the server that provides the live broadcast service, and then the multiple terminals periodically pull all the data from the previous period from the server.
- the server after receiving the pull instruction, the server sends the message cached in the previous period to the terminal corresponding to the pull instruction.
- the message to be sent is cached in the server, the terminal device sends a pull request for the message per unit time, and after receiving the pull request, the server takes out the cached data of the previous unit time from the cache one by one. news.
- Each of the buffered messages is the message to be sent in this step.
- the to-be-sent message is buffered in a queue, and the acquiring the to-be-sent message further includes: when acquiring the to-be-sent message, fetching a to-be-sent message from the top of the queue each time.
- the to-be-sent message is buffered in a queue, and when the server acquires the to-be-sent message, each time a to-be-sent message is fetched from the top of the queue.
- the to-be-sent messages are chat messages, gift messages, and the like obtained from all terminals that join the live broadcast room.
- Step S102 determining the priority of the message to be sent
- all messages have a corresponding priority
- the priority is a preset identifier indicating the importance of the message.
- the step S102 includes:
- Step S201 determining the type of the message to be sent
- Step S202 determining the priority of the message to be sent according to the type.
- messages are divided into multiple types, for example, the messages are divided into A-type messages and B-type messages, and each type of message is preset with a priority, such as the priority of A-type messages.
- each type of message can be further subdivided into sub-types, such as B-type messages can be further divided into B1-type messages and B2-type messages, In the sub-type, there may be further sub-priorities.
- the sub-priority of the B1-type message is higher than the sub-priority of the B2-type message.
- the messages in the live broadcast can generally be divided into chat messages and gift messages.
- the priority of chat messages is 1, and the priority of gift messages is 2; and gifts can be divided into gifts due to different types. 1 and gift 2, where gift 1 has priority 2.1 and gift 2 has priority 2.2. In this way, in step S202, the priority of the message can be determined by the type of the message.
- the method before the determining the priority of the message to be sent, the method further includes:
- the setting priority for each type of message includes:
- the priority of each type of message is automatically set based on the number of historical messages.
- the method further includes: setting a priority for each type of message.
- the priority setting instruction can be received through the man-machine interface to set the priority for each type of message; for example, the priority of each type of message can also be automatically set according to the number of historical messages, such as statistics of each type of message in the historical time period. For the number of messages of each type, the priority is automatically set according to the number. Exemplarily, the greater the number of messages, the lower the corresponding priority, and the less the number of messages, the higher the corresponding priority. As in the above live broadcast scenario, the priority of the chat message can be set lower than the priority of the gift message, and then in the gift message, the priority of gift 1 is lower than the priority of gift 2 and so on.
- the method before the above step S101 or step S102, the method further includes:
- the quantity threshold of high-priority messages is not less than the quantity threshold of low-priority messages. That is, higher priority messages can be sent more than lower priority messages.
- Step S103 determining the first quantity
- the first number is the number of messages of the priority that have been sent before the message to be sent is sent.
- the first number of messages of the priority that have been sent is obtained.
- the priority of the message to be sent is the first priority, and then the number of messages of the first priority that have been sent before the message to be sent is sent is acquired.
- the number of messages of different priority levels that have been sent is recorded by setting counters for messages of different priority levels. Like the counter of the first priority, whenever a message of the first priority is sent, the counter of the first priority is incremented by 1. When the first quantity needs to be acquired, the value of the counter can be read.
- the step S103 includes:
- Step S301 obtaining the timestamp of the message to be sent
- Step S302 Determine, according to the timestamp, the first number of messages of the priority that have been sent within a unit time.
- each message to be sent carries a time stamp T.
- the time stamp is expressed in seconds, that is, it is obtained through step S301 in which second the message to be sent is to be sent. It is understandable that because there are many messages in one second, the second-level timestamps of many messages are the same. At this time, messages of the same type can be distinguished according to the ID or sequence number of the message or a lower-level timestamp. It is not repeated here.
- the time stamp corresponds to the unit time
- the first numbers corresponding to messages of different priorities are recorded by a counter. At this time, after the step S101, it also includes:
- Step S401 obtaining the first timestamp of the message to be sent
- Step S402 if the first time stamp is different from the second time stamp of the last message to be sent, start a counter corresponding to the first time stamp, wherein the counter is used to record that the time stamp is the first time stamp Timestamp of the number of messages sent.
- the timestamp of the message corresponds to the unit time, that is, when the timestamp changes, it indicates that the message is pulled into the next time period. Therefore, in the following S401, the first time stamp of the message to be sent is obtained, and in step S402, it is compared whether the first time stamp is the same as the second time stamp of the last message to be sent.
- the messages are in different pull periods, and at this time, a counter is started for the first time stamp to record the number of sent messages with the time stamp of the first time stamp.
- the server corresponds to multiple terminals, and each terminal has different processing capabilities, the first number of messages sent under each priority level is independently recorded for different terminals. For example, for each terminal in the live room, the number of sent messages is independently calculated for each priority.
- Step S104 in the case that the first quantity is greater than or equal to the quantity threshold corresponding to the priority, discard the to-be-sent message
- the thresholds for the number of messages with different priorities are related to the priorities of the messages.
- the threshold for the number of high-priority messages is not less than the threshold for the number of low-priority messages. That is, the higher the priority of the message, the more quantity it can send.
- this step it is judged whether the first number is greater than or equal to a preset number threshold, and if it is greater than or equal to, discard the to-be-sent message, because the message already sent at this time has exceeded the processing capability of the corresponding terminal, even if The data to be sent is sent to the terminal, but the terminal cannot process it either.
- the number thresholds are independently set for messages of different priorities, which can effectively control the problems caused by too many messages that the terminal cannot process or the client that processes the messages on the terminal crashes.
- the number thresholds are independently set for different priorities, it can be ensured that important messages are preferentially processed, which can not only control the flow of messages, but also ensure that important messages are not lost.
- step S104 after the step S104, it further includes:
- the first number is accumulated.
- the step S302 includes:
- the first sub-priority is a high-level sub-priority under the first priority.
- the sent number of messages of the first sub-priority is recorded in a counter used for the next time period.
- the gift message includes gift 1 and gift 2, wherein the sub-priority of gift 2 is higher; and since gift 1 and gift 2 share the counter of gift messages, it is possible that gift 1 may appear. If the quantity is too large, the quantity threshold of the first priority is exhausted, and the more important gift 2 cannot be sent. Therefore, in this optional embodiment, the messages of the first sub-priority are counted using the counter used for the unit time determined by the next timestamp. If the timestamp of the to-be-sent message is T, the first priority counter with the T+1 timestamp is used to count the messages of the first sub-priority that have been sent.
- the step S302 includes:
- the priority of the message to be sent being the second sub-priority of the first priority
- the first priority is read from the counter corresponding to the unit time where the timestamp is located.
- the first number of messages of priority It should be noted that, except for the counter corresponding to the first timestamp, the counters of the messages of the first priority corresponding to other timestamps all contain the first priority sent in the last unit time.
- the number of messages of a subpriority That is, the number of messages of the second sub-priority sent in the previous period, the number of messages of the second sub-priority sent in the previous period is included in the number of sent messages of the first priority in the current period.
- FIG. 5 is an example of the above message counting manner.
- the system includes two kinds of messages, message A and message B, where message B can be further divided into message B1 and message B2, wherein the priority of message A is lower than that of message B, and the priority of message B1 is lower than that of message B.
- message B2 at time T1, all messages A that have been sent are counted by countA_T1, all messages B1 that have been sent are counted by countB_T1, and all messages B2 that have been sent are counted by countB_T2, and so on. In this way, since the counter of the next period used by the message B2 is counted, it can be guaranteed that the message B2 is sent out, and thus the messages with high priority can be guaranteed to be sent out.
- control method for message sending further includes:
- the first number is less than the number threshold corresponding to the priority, determining whether the number of all sent messages is greater than or equal to the total number threshold;
- the to-be-sent messages are sent, and the first number is accumulated.
- a total number threshold value needs to be set, and the total number threshold value can be the maximum capacity of the terminal device to process messages; in this optional embodiment, the total number threshold value is less than the number threshold value of messages of each priority and.
- the terminal device can process the to-be-sent messages, and it is necessary to further confirm whether the number of all sent messages is greater than or equal to the total number threshold, if all If the sent messages are greater than or equal to the total number threshold, the to-be-sent messages are discarded. Otherwise, the to-be-sent message is sent, and the first number of sent messages of the priority is accumulated.
- the message includes a message A, a message B, and a message C, wherein the number threshold of message A is 20, the number threshold of message B is 30, the number threshold of message C is 50, and the total number threshold is 80.
- the number of messages A is 10, the number of messages B sent is 20, and the number of messages C sent is 50, then since the total number of messages sent is already 80, even if the number of messages A and B sent is It is also discarded if the number threshold has not been reached.
- FIG. 6 is a schematic diagram of an application scenario of an embodiment of the present disclosure.
- multiple terminal devices 601-603 and a server 604 are included, wherein the multiple terminal devices and the server perform data interaction through wired or wireless links.
- FIG. 6 it is a message sending process in a live broadcast scenario.
- terminal devices 601-603 send messages to other terminals in the live broadcast room. These messages are cached on the server 604, and then After receiving the pull instruction from the terminal device, the server sends the cached message to the corresponding terminal device.
- the server can configure the upper limit of the messages that each terminal device or each type of terminal device can process in a unit time (such as 1 second), such as 100 messages per second, That is, the total number threshold described above, using the technical solutions in the embodiments of the present disclosure, the number threshold per unit time can also be set for each different type of message, such as 50 chat messages and 50 gift messages, so that when 1 If more than 50 chat messages or more than 50 gift messages have been sent within seconds, the corresponding type of messages will be discarded; The higher the priority, the higher the priority. As mentioned above, in order to enable the gift B message to be sent out, the count of the gift B is recorded with the counter of the next period, which can ensure that the gift B is sent out.
- a unit time such as 1 second
- 100 messages per second That is, the total number threshold described above, using the technical solutions in the embodiments of the present disclosure, the number threshold per unit time can also be set for each different type of message, such as 50 chat messages and 50 gift messages, so that when 1 If more than 50 chat messages or
- the embodiments of the present disclosure disclose a control method, apparatus, electronic device, and computer-readable storage medium for sending a message.
- the control method for sending the message includes: acquiring the message to be sent; determining the priority of the message to be sent; determining a first quantity, where the first quantity is the priority that has been sent before the message to be sent is sent The number of messages of the priority level; when the first number is greater than or equal to the number threshold corresponding to the priority level, the to-be-sent messages are discarded.
- the above method determines whether to send the message through a quantity threshold corresponding to the priority of the message, which solves the technical problem of the backlog of messages caused by the slow processing speed of the terminal.
- FIG. 7 is a schematic structural diagram of an embodiment of an apparatus for controlling message sending according to an embodiment of the present disclosure.
- the apparatus 700 includes: a to-be-sent message acquisition module 701 , a priority determination module 702 , a first quantity determination module 703 and a control module 704 . in,
- a priority determining module 702 configured to determine the priority of the message to be sent
- a first quantity determination module 703, configured to determine a first quantity, wherein the first quantity is the quantity of the messages of the priority that have been sent before the messages to be sent are sent;
- the control module 704 is configured to discard the to-be-sent message when the first quantity is greater than or equal to a quantity threshold corresponding to the priority.
- control module 704 is further configured to:
- the message to be sent is sent; and the first quantity is accumulated.
- the first quantity determining module 703 is further configured to:
- a first number of messages of the priority that have been sent within a unit time is determined according to the timestamp.
- the first quantity determining module 703 is further configured to:
- the first quantity determining module 703 is further configured to:
- the priority of the message to be sent being the second sub-priority of the first priority
- control module 704 is also used to:
- the first number is less than the number threshold corresponding to the priority, determining whether the number of all sent messages is greater than or equal to the total number threshold;
- the to-be-sent messages are sent, and the first number is accumulated.
- the priority determining module 702 is further configured to:
- the priority of the message to be sent is determined according to the type.
- the apparatus 700 further includes:
- the quantity threshold setting module is used to set quantity thresholds for messages of different priorities, wherein the quantity thresholds of high-priority messages are not less than the quantity thresholds of low-priority messages.
- the apparatus 700 further includes:
- a counter starting module configured to obtain the first timestamp of the message to be sent; if the first timestamp is different from the second timestamp of the last message to be sent, start a counter corresponding to the first timestamp , wherein the counter is used to record the number of sent messages whose timestamp is the first timestamp.
- the to-be-sent message is cached in a queue
- the to-be-sent message acquisition module 701 is further configured to: when acquiring the to-be-sent message, take out a to-be-sent message from the top of the queue each time Send a message.
- the apparatus 700 further includes:
- a settings module for setting priorities for each type of message.
- the setting module is configured to: receive a priority setting instruction through a human-machine interface, and set a priority for each type of message according to the priority setting instruction; or
- the priority of each type of message is automatically set based on the number of historical messages.
- the setting module is further configured to: set a quantity threshold for messages of different priorities, wherein the quantity threshold of high-priority messages is not less than the quantity threshold of low-priority messages
- the apparatus shown in FIG. 7 may execute the method of the embodiment shown in FIG. 1 to FIG. 5 .
- the apparatus shown in FIG. 7 may execute the method of the embodiment shown in FIG. 1 to FIG. 5 .
- Terminal devices in the embodiments of the present disclosure may include, but are not limited to, such as mobile phones, notebook computers, digital broadcast receivers, PDAs (personal digital assistants), PADs (tablets), PMPs (portable multimedia players), vehicle-mounted terminals (eg, mobile terminals such as in-vehicle navigation terminals), etc., and stationary terminals such as digital TVs, desktop computers, and the like.
- the electronic device shown in FIG. 8 is only an example, and should not impose any limitation on the function and scope of use of the embodiments of the present disclosure.
- an electronic device 800 may include a processing device (eg, a central processing unit, a graphics processor, etc.) 801 that may be loaded into random access according to a program stored in a read only memory (ROM) 802 or from a storage device 808 Various appropriate actions and processes are executed by the programs in the memory (RAM) 803 . In the RAM 803, various programs and data required for the operation of the electronic device 800 are also stored.
- the processing device 801, the ROM 802, and the RAM 803 are connected to each other through a bus 804.
- An input/output (I/O) interface 805 is also connected to bus 804 .
- I/O interface 805 input devices 806 including, for example, a touch screen, touchpad, keyboard, mouse, camera, microphone, accelerometer, gyroscope, etc.; including, for example, a liquid crystal display (LCD), speakers, vibration An output device 807 of a computer, etc.; a storage device 808 including, for example, a magnetic tape, a hard disk, etc.; and a communication device 809.
- Communication means 809 may allow electronic device 800 to communicate wirelessly or by wire with other devices to exchange data. While Figure 8 shows electronic device 800 having various means, it should be understood that not all of the illustrated means are required to be implemented or provided. More or fewer devices may alternatively be implemented or provided.
- embodiments of the present disclosure include a computer program product comprising a computer program carried on a non-transitory computer readable medium, the computer program containing program code for performing the method illustrated in the flowchart.
- the computer program may be downloaded and installed from the network via the communication device 809, or from the storage device 808, or from the ROM 802.
- the processing device 801 the above-mentioned functions defined in the methods of the embodiments of the present disclosure are executed.
- the computer-readable medium mentioned above in the present disclosure may be a computer-readable signal medium or a computer-readable storage medium, or any combination of the above two.
- the computer-readable storage medium can be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus or device, or a combination of any of the above. More specific examples of computer readable storage media may include, but are not limited to, electrical connections with one or more wires, portable computer disks, hard disks, random access memory (RAM), read only memory (ROM), erasable Programmable read only memory (EPROM or flash memory), fiber optics, portable compact disk read only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination of the foregoing.
- a computer-readable storage medium may be any tangible medium that contains or stores a program that can be used by or in conjunction with an instruction execution system, apparatus, or device.
- a computer-readable signal medium may include a data signal propagated in baseband or as part of a carrier wave with computer-readable program code embodied thereon. Such propagated data signals may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the foregoing.
- a computer-readable signal medium can also be any computer-readable medium other than a computer-readable storage medium that can transmit, propagate, or transport the program for use by or in connection with the instruction execution system, apparatus, or device .
- Program code embodied on a computer readable medium may be transmitted using any suitable medium including, but not limited to, electrical wire, optical fiber cable, RF (radio frequency), etc., or any suitable combination of the foregoing.
- clients and servers can communicate using any currently known or future developed network protocols such as HTTP (HyperText Transfer Protocol), and can communicate with digital data in any form or medium.
- Communication eg, a communication network
- Examples of communication networks include local area networks (“LAN”), wide area networks (“WAN”), the Internet (eg, the Internet), and peer-to-peer networks (eg, ad hoc peer-to-peer networks), as well as any currently known or future development network of.
- the above-mentioned computer-readable medium may be included in the above-mentioned electronic device; or may exist alone without being assembled into the electronic device.
- the above-mentioned computer-readable medium carries one or more programs, and when the above-mentioned one or more programs are executed by the electronic device, the electronic device: acquires the input image and the first text; extracts the features of the input image to obtain the input image the feature vector of the first text; encode the first text to obtain the feature vector of the first text; obtain the joint feature vector according to the feature vector of the input image and the feature vector of the first text; decode the joint feature vector Generate second text.
- Computer program code for performing operations of the present disclosure may be written in one or more programming languages, including but not limited to object-oriented programming languages—such as Java, Smalltalk, C++, and This includes conventional procedural programming languages - such as the "C" 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.
- the remote computer may be connected to the user's computer through any kind of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (eg, using an Internet service provider through Internet connection).
- LAN local area network
- WAN wide area network
- each block in the flowchart or block diagrams may represent a module, segment, or portion of code that contains one or more logical functions for implementing the specified functions executable instructions.
- the functions noted in the blocks 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.
- each block of the block diagrams and/or flowchart illustrations, and combinations of blocks in the block diagrams and/or flowchart illustrations can be implemented in dedicated hardware-based systems that perform the specified functions or operations , or can be implemented in a combination of dedicated hardware and computer instructions.
- the units involved in the embodiments of the present disclosure may be implemented in a software manner, and may also be implemented in a hardware manner. Among them, the name of the unit does not constitute a limitation of the unit itself under certain circumstances.
- exemplary types of hardware logic components include: Field Programmable Gate Arrays (FPGAs), Application Specific Integrated Circuits (ASICs), Application Specific Standard Products (ASSPs), Systems on Chips (SOCs), Complex Programmable Logical Devices (CPLDs) and more.
- FPGAs Field Programmable Gate Arrays
- ASICs Application Specific Integrated Circuits
- ASSPs Application Specific Standard Products
- SOCs Systems on Chips
- CPLDs Complex Programmable Logical Devices
- a machine-readable medium may be a tangible medium that may contain or store a program for use by or in connection with the instruction execution system, apparatus or device.
- the machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium.
- Machine-readable media may include, but are not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, devices, or devices, or any suitable combination of the foregoing.
- machine-readable storage media would include one or more wire-based electrical connections, portable computer disks, hard disks, random access memory (RAM), read only memory (ROM), erasable programmable read only memory (EPROM or flash memory), fiber optics, compact disk read only memory (CD-ROM), optical storage, magnetic storage, or any suitable combination of the foregoing.
- RAM random access memory
- ROM read only memory
- EPROM or flash memory erasable programmable read only memory
- CD-ROM compact disk read only memory
- magnetic storage or any suitable combination of the foregoing.
- a method for controlling message sending including:
- the first number is the number of messages of the priority that have been sent before the messages to be sent are sent;
- the to-be-sent message is discarded.
- the method further includes:
- the first number is accumulated.
- the determining the first quantity includes:
- a first number of messages of the priority that have been sent within a unit time is determined according to the timestamp.
- the determining, according to the timestamp, the first number of messages of the priority that have been sent within a unit time includes:
- the determining, according to the timestamp, the first number of messages of the priority that have been sent within a unit time includes:
- the priority of the message to be sent being the second sub-priority of the first priority
- the method further includes:
- the first number is less than the number threshold corresponding to the priority, determining whether the number of all sent messages is greater than or equal to the total number threshold;
- the to-be-sent messages are sent, and the first number is accumulated.
- the determining the priority of the message to be sent includes:
- the priority of the message to be sent is determined according to the type.
- the method before the acquiring the message to be sent, the method further includes:
- Quantity thresholds are set for messages of different priorities, wherein the quantity threshold of high-priority messages is not less than the quantity threshold of low-priority messages.
- the method further includes:
- the first time stamp is different from the second time stamp of the last message to be sent, start a counter corresponding to the first time stamp, wherein the counter is used to record that the time stamp is the first time stamp The number of messages sent.
- the to-be-sent message is buffered in a queue, and the acquiring the to-be-sent message further includes:
- one message to be sent is taken from the top of the queue each time.
- the method before the determining the priority of the message to be sent, the method further includes:
- the setting priority for each type of message includes:
- the priority of each type of message is automatically set based on the number of historical messages.
- the method further includes:
- Quantity thresholds are set for messages of different priorities, wherein the quantity threshold of high-priority messages is not less than the quantity threshold of low-priority messages.
- a control device for sending a message including:
- a to-be-sent message acquisition module used to acquire the to-be-sent message
- a priority determining module configured to determine the priority of the message to be sent
- a first quantity determination module configured to determine a first quantity, wherein the first quantity is the quantity of the messages of the priority that have been sent before the messages to be sent are sent;
- a control module configured to discard the to-be-sent message when the first quantity is greater than or equal to a quantity threshold corresponding to the priority.
- control module is further configured to:
- the message to be sent is sent; and the first quantity is accumulated.
- the first quantity determining module is further configured to:
- a first number of messages of the priority that have been sent within a unit time is determined according to the timestamp.
- the first quantity determining module is further configured to:
- the first quantity determining module is further configured to:
- the priority of the message to be sent being the second sub-priority of the first priority
- control module is also used for, also used for:
- the first number is less than the number threshold corresponding to the priority, determining whether the number of all sent messages is greater than or equal to the total number threshold;
- the to-be-sent messages are sent, and the first number is accumulated.
- the priority determining module is further configured to:
- the priority of the message to be sent is determined according to the type.
- the apparatus further includes:
- the quantity threshold setting module is used to set quantity thresholds for messages of different priorities, wherein the quantity thresholds of high-priority messages are not less than the quantity thresholds of low-priority messages.
- the apparatus further includes:
- a counter starting module configured to obtain the first timestamp of the message to be sent; if the first timestamp is different from the second timestamp of the last message to be sent, start a counter corresponding to the first timestamp , wherein the counter is used to record the number of sent messages whose timestamp is the first timestamp.
- the to-be-sent message is cached in a queue
- the to-be-sent message acquisition module 701 is further configured to: when acquiring the to-be-sent message, take out a to-be-sent message from the top of the queue each time Send a message.
- the apparatus 700 further includes:
- a settings module for setting priorities for each type of message.
- the setting module is configured to: receive a priority setting instruction through a human-machine interface, and set a priority for each type of message according to the priority setting instruction; or
- the priority of each type of message is automatically set based on the number of historical messages.
- the setting module is further configured to: set a quantity threshold for messages of different priorities, wherein the quantity threshold of high-priority messages is not less than the quantity threshold of low-priority messages
- an electronic device comprising: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores data that can be accessed by the at least one processor Instructions executed by at least one processor, the instructions being executed by the at least one processor to enable the at least one processor to perform any one of the control methods for message transmission in the first aspect.
- non-transitory computer-readable storage medium stores computer instructions for causing a computer to execute the aforementioned first A method for controlling message sending according to any one of the aspects.
Landscapes
- Engineering & Computer Science (AREA)
- Software Systems (AREA)
- Theoretical Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Information Transfer Between Computers (AREA)
Abstract
本公开实施例公开了一种消息发送的控制方法、装置、电子设备和计算机可读存储介质。该方法包括:获取待发送消息;确定待发送消息的优先级;确定第一数量,其中第一数量为在待发送消息发送之前已经发送的优先级的消息的数量;在第一数量大于或等于与优先级所对应的数量阈值的情况下,丢弃待发送消息。
Description
本申请要求于2020年09月30日提交的,申请名称为“消息发送的控制方法、装置、电子设备及计算机可读存储介质”的、中国专利申请号为“202011060102.4”的优先权,该中国专利申请的全部内容通过引用结合在本申请中。
本公开涉及消息处理领域,尤其涉及一种消息发送的控制方法、装置、电子设备及计算机可读存储介质。
随着信息科技的快速发展,移动互联网技术也突飞猛进。无论是智能设备的出现,还是5G时代的到来,亦或是大数据、AI智能和算法等技术的应用,都给电子移动设备插上了腾飞的翅膀。在现实生活中,得益于这些技术而使社会交往变的丰富多彩,尤其是智能手机的出现,它打破了人类日常交往的时空限制,是一款真正集海量信息、网络视听和休闲娱乐等为一体的综合型掌上移动设备,满足了人们的日常信息需求和社会交往。
目前很多平台提供直播服务,一个直播间的人数可能会从几人到几十万人不等,观众的互动的频率非常高,每秒可能会产生几百条互动消息,而客户端的处理能力有限,如果消息下发过快,而客户端处理速度太慢,就会导致消息积压,有可能会导致客户端的崩溃。
发明内容
提供该发明内容部分以便以简要的形式介绍构思,这些构思将在后面的具体实施方式部分被详细描述。该发明内容部分并不旨在标识要求保护的技术方案的关键特征或必要特征,也不旨在用于限制所要求的保护的技术方案的范围。
为了解决上述技术问题,本公开实施例提出如下技术方案。
第一方面,本公开实施例提供一种消息发送的控制方法,包括:获取待发送消息;确定所述待发送消息的优先级;确定第一数量,其中所述第一数量为在所述待发送消息发送之前已经发送的所述优先级的消息的数量;在所述第一数量大于或等于与所述优先级所对应的数量阈值的情况下,丢弃所述待发送消息。
第二方面,本公开实施例提供一种消息发送的控制装置,包括:
待发送消息获取模块,用于获取待发送消息;
优先级确定模块,用于确定所述待发送消息的优先级;
第一数量确定模块,用于确定第一数量,其中所述第一数量为在所述待发送消息发送之前已经发送的所述优先级的消息的数量;
控制模块,用于在所述第一数量大于或等于与所述优先级所对应的数量阈值的情况下,丢弃所述待发送消息。
第三方面,本公开实施例提供一种电子设备,包括:至少一个处理器;以及,
与所述至少一个处理器通信连接的存储器;其中,所述存储器存储有能被所述至少 一个处理器执行的指令,所述指令被所述至少一个处理器执行,以使所述至少一个处理器能够执行前述第一方面中的任一所述的方法。
第四方面,本公开实施例提供一种非暂态计算机可读存储介质,其中,该非暂态计算机可读存储介质存储计算机指令,该计算机指令用于使计算机执行前述第一方面中的任一所述的方法。
本公开实施例公开了一种消息发送的控制方法、装置、电子设备和计算机可读存储介质。其中该消息发送的控制方法包括:获取待发送消息;确定所述待发送消息的优先级;确定第一数量,其中所述第一数量为在所述待发送消息发送之前已经发送的所述优先级的消息的数量;在所述第一数量大于或等于与所述优先级所对应的数量阈值的情况下,丢弃所述待发送消息。上述方法通过与消息的优先级对应的数量阈值确定是否发送所述消息,解决了终端处理速度慢所导致的消息积压的技术问题。
上述说明仅是本公开技术方案的概述,为了能更清楚了解本公开的技术手段,而可依照说明书的内容予以实施,并且为让本公开的上述和其他目的、特征和优点能够更明显易懂,以下特举较佳实施例,并配合附图,详细说明如下。
结合附图并参考以下具体实施方式,本公开各实施例的上述和其他特征、优点及方面将变得更加明显。贯穿附图中,相同或相似的附图标记表示相同或相似的元素。应当理解附图是示意性的,原件和元素不一定按照比例绘制。
图1为本公开实施例提供的消息发送的控制方法的流程示意图;
图2为本公开实施例提供的消息发送的控制方法中确定待发送消息优先级的流程示意图;
图3为本公开实施例提供的消息发送的控制方法中确定第一数量的一个示例示意图;
图4为公开本公开实施例提供的消息发送的控制方法中启动计数器的流程示意图;
图5为本公开实施例提供的消息发送的控制方法中计数器的使用方式的示意图;
图6位本公开实施例提供的消息发送的控制方法的应用场景示意图。
图7为本公开实施例提供的消息发送的控制装置的实施例的结构示意图;
图8为根据本公开实施例提供的电子设备的结构示意图。
下面将参照附图更详细地描述本公开的实施例。虽然附图中显示了本公开的某些实施例,然而应当理解的是,本公开可以通过各种形式来实现,而且不应该被解释为限于这里阐述的实施例,相反提供这些实施例是为了更加透彻和完整地理解本公开。应当理解的是,本公开的附图及实施例仅用于示例性作用,并非用于限制本公开的保护范围。
应当理解,本公开的方法实施方式中记载的各个步骤可以按照不同的顺序执行,和/或并行执行。此外,方法实施方式可以包括附加的步骤和/或省略执行示出的步骤。本公开的范围在此方面不受限制。
本文使用的术语“包括”及其变形是开放性包括,即“包括但不限于”。术语“基于”是“至少部分地基于”。术语“一个实施例”表示“至少一个实施例”;术语“另一实施例”表示“至少一个另外的实施例”;术语“一些实施例”表示“至少一些实施例”。其他术语的相关定义将在下文描述中给出。
需要注意,本公开中提及的“第一”、“第二”等概念仅用于对不同的装置、模块或单元进行区分,并非用于限定这些装置、模块或单元所执行的功能的顺序或者相互依存关系。
需要注意,本公开中提及的“一个”、“多个”的修饰是示意性而非限制性的,本领域技术人员应当理解,除非在上下文另有明确指出,否则应该理解为“一个或多个”。
本公开实施方式中的多个装置之间所交互的消息或者信息的名称仅用于说明性的目的,而并不是用于对这些消息或信息的范围进行限制。
图1为本公开实施例提供的消息发送的控制方法实施例的流程图,本实施例提供的该消息发送的控制方法可以由一消息发送的控制装置来执行,该消息发送的控制装置可以实现为软件,或者实现为软件和硬件的组合,该消息发送的控制装置可以集成设置在消息发送的控制系统中的某设备中,比如消息发送的控制服务器或者消息发送的控制终端设备中。如图1所示,该方法包括如下步骤:
步骤S101,获取待发送消息;
在一些实施例中,所述待发送消息为消息的发送装置所产生的消息或者服务器从终端设备所接收到的待转发的消息。示例性的,在直播场景中,位于同一个直播间的多个终端设备会将消息发送至提供直播服务的服务器上,之后所述多个终端定时从所述服务器上拉取上一时段的所有消息,服务器在接收到拉取指令之后,将其上一时段所缓存的消息发送至拉取指令所对应的终端中。
示例性的,所述待发送消息被缓存在服务器中,终端设备每单位时间发送一次消息的拉取请求,服务器在接收到所述拉取请求之后,从缓存中挨个取出上一单位时间所缓存的消息。其中每个所述所缓存的消息即为该步骤中的待发送消息。
在一些实施例中所述待发送消息被缓存在队列中,所述获取待发送消息,还包括:在获取所述待发送消息时,每次均从所述队列的顶部取出一条待发送消息。
示例性的,所述待发送消息被缓存在队列中,所述服务器在获取所述待发送消息时,每次均从队列的顶部取出一条待发送消息。
示例性的,在所述直播场景下,所述待发送消息为从加入直播间的所有的终端所获取到的聊天消息、礼物消息等等。
步骤S102,确定所述待发送消息的优先级;
在本公开实施例中,所有的消息都有对应的优先级,所述优先级为预先设置的表示消息的重要程度的标识。
在一些实施例中,所述步骤S102包括:
步骤S201,确定所述待发送消息的类型;
步骤S202,根据所述类型确定所述待发送消息的优先级。
在一些实施例中,在一个消息系统中,消息被分为多种,示例性的,消息分为A型消息和B型消息,每个类型的消息预先设置优先级,如A型消息的优先级为第一优先级,B型消息的优先级为第二优先级;例如,每个类型的消息还可以进一步细分成子类型,如B型消息又可以分为B1型消息和B2型消息,在子类型中,还可以进一步有子优先级,在第二优先级的情况下,B1型的消息的子优先级高于B2型消息的子优先级。以上述直播场景为例,直播中的消息一般可以分为聊天消息和礼物消息,聊天消息的优先级为1,礼物消息的优先级为2;而礼物由于有不同的类型,又可以分为礼物1和礼物2,其中礼物1的优先级为2.1,礼物2的优先级为2.2。这样在步骤S202中,通过消息的类型即可确定消息的优先级。
在一些实施例中,在所述确定所述待发送消息的优先级之前,还包括:
给每个类型的消息设置优先级。
在一些实施例中,所述给每个类型的消息设置优先级,包括:
通过人机接口接收优先级设置指令,根据所述优先级设置指令给每个类型的消息设置优先级;或者
根据历史消息的数量自动设置每个类型的消息的优先级。
示例性的,在上述步骤S101或者步骤S102之前,还包括:给每个类型的消息设置优先级。例如,可以通过人机接口接收优先级设置指令给每个类型的消息设置优先级;例如,还可以根据历史消息的数量自动设置每个类型的消息的优先级,如统计出历史时间段中每个类型的消息的数量,按照数量的多少自动设置优先级的高低,示例性的,消息的数量越多,其对应的优先级越低,消息的数量越少,其对应的优先级越高。如在上述直播场景中,可以设置聊天消息的优先级低于礼物消息的优先级,然后在礼物消息中,礼物1的优先级低于礼物2的优先级等等。
在一些实施例中,在上述步骤S101或步骤S102之前,还包括:
给不同优先级的消息设置数量阈值。其中,高优先级的消息的数量阈值不小于低优先级的消息的数量阈值。即,高优先级的消息比低优先级的消息可以发送的更多。
步骤S103,确定第一数量;
其中,所述第一数量为在所述待发送消息发送之前已经发送的所述优先级的消息的数量。在该步骤中,在确定出待发送消息的优先级之后,获取已经发送的所述优先级的消息的第一数量。示例性的,所述待发送消息的优先级为第一优先级,则获取在所述待发送消息发送之前已经发送的第一优先级的消息的数量。
在一些实施例中,通过给不同优先级的消息设置计数器来记录不同优先级的消息已经发送的数量。如第一优先级的计数器,每当有一个第一优先级的消息被发送出去,则所述第一优先级的计数器累加1。当需要获取所述第一数量时,读取所述计数器的值即可。
在一些实施例中,所述步骤S103包括:
步骤S301,获取所述待发送消息的时间戳;
步骤S302,根据所述时间戳确定在单位时间内已经发送的所述优先级的消息的第一数 量。
在该可选实施例中,每个待发送消息都带有一个时间戳T,示例性的,所述时间戳以秒表示,即通过步骤S301得到所述待发送消息为哪一秒的待发送消息,可以理解的,由于一秒内的消息很多,因此很多消息的秒级时间戳是一样的,此时可以根据消息的ID或者序列号或者更低级别的时间戳来区分同类型的消息,在此不再赘述。
在一些实施例中,在步骤S302中,所述时间戳与所述单位时间对应,如所述单位时间为终端从服务器拉取消息的周期,如1秒一次,而时间戳的精度也是1秒,则可以直接将时间戳和单位时间对应起来,如T=1,则直接计算时间戳为T=1的已经发送的所述优先级的消息的数量即为所述第一数量。
在一些实施例中,如上所述,通过计数器来记录不同的优先级的消息所对应的第一数量。此时,在所述步骤S101之后,还包括:
步骤S401,获取所述待发送消息的第一时间戳;
步骤S402,如果所述第一时间戳与上一待发送消息的第二时间戳不同,则启动与所述第一时间戳对应的计数器,其中所述计数器用于记录时间戳为所述第一时间戳的已发送的消息的数量。
在该可选实施例中,消息的时间戳与单位时间对应,即当时间戳发生变化,表示进入下一个时段的消息拉取。因此在后S401中,获取所述待发送消息的第一时间戳,在步骤S402中,比较所述第一时间戳与上一个待发送消息的第二时间戳是否相同,如果不同,则两个消息位于不同的拉取时段,此时针对第一时间戳启动一个计数器,用来记录时间戳为第一时间戳的已发送的消息的数量。
在一些实施例中,由于服务器对应多个终端,每个终端的处理能力不同,因此针对不同的终端都独立记录各个优先权等级下已发送的消息的第一数量。如针对每个在直播间中的终端,对每个优先级都独立计算起已经发送的消息的数量。
步骤S104,在所述第一数量大于或等于与所述优先级所对应的数量阈值的情况下,则丢弃所述待发送消息;
其中,不同优先级的消息的数量阈值与该消息的优先级相关。示例性的,高优先级的消息的数量阈值不小于低有优先级的消息的数量阈值。即消息的优先级越大,其所能发送的数量就越多。
在该步骤中,判断所述第一数量是否大于或等于预设的数量阈值,如果大于或等于,则丢弃所述待发送消息,因为这个时候已发送的消息已经超出对应终端的处理能力,即使将所述待发送数据发送至所述终端,所述终端也无法处理。
由上述技术方案,对不同优先级的消息独立设置数量阈值,可以有效控制消息过多所导致的终端无法处理或者终端上处理消息的客户端崩溃等问题。并且由于对不同优先级独立设置数量阈值,可以保证重要消息被优先处理,这样既能对消息的流量进行控制,也能保证不丢失重要消息。
在一些实施例中,在所述步骤S104之后,还包括:
在所述第一数量小于与所述优先级所对应的数量阈值的情况下,发送所述待发送消息;
累加所述第一数量。
即,如果没超过预设的数量阈值,则发送消息,并累加所述消息的优先级所对应的已发送消息的数量。
在上述技术方案的基础上,在一些实施例中,所述步骤S302,包括:
响应于所述待发送消息的优先级为第一优先级的第一子优先级,根据所述时间戳确定单位时间内已经发送的所述第一优先级的消息的第一数量;其中所述第一数量被记录在下一时间戳所确定的单位时间内。
其中,所述第一子优先级为所述第一优先级下的高级别子优先级。在该可选实施例中,所述第一子优先级的消息的已发送数量被记录在下一时段所使用的计数器中。示例性的,在直播场景中,礼物消息包括礼物1和礼物2,其中礼物2的子优先级更高;而由于礼物1和礼物2共同使用礼物消息的计数器,因此有可能会出现礼物1的数量过多,将第一优先级的数量阈值消耗完,而更重要的礼物2却无法发送的情况。因此,在该可选实施例中,使用下一时间戳所确定的单位时间所使用的计数器来对所述第一子优先级的消息进行计数。如所述待发送消息的时间戳为T,则使用T+1时间戳的第一优先级的计数器来对已发送的第一子优先级的消息进行计数。
在一些实施例中,所述步骤S302,包括:
响应于所述待发送消息的优先级为第一优先级的第二子优先级,根据所述时间戳确定所述时间戳所在的单位时间内已经发送的所述第一优先级的消息的第一数量;其中,所述已经发送的所述第一优先级的消息的数量包括在上一单位时间内发送的第一优先级的第一子优先级的消息的数量。
在该可选实施例中,如果所述待发送消息的优先级为第一优先级的第二子优先级,则从所述时间戳所在的单位时间所对应的计数器中读取所述第一优先级的消息的第一数量。需要注意的是,除了第一个时间戳所对应的计数器之外,其他时间戳所对应的第一优先级的消息的计数器中都包含有在上一单位时间内发送的第一优先级的第一子优先级的消息的数量。即上一时段发送的第二子优先级的消息的数量,在当前时段的第一优先级的已发送消息的数量中包括了上一时段所发送的第二子优先级的消息的数量。
图5为上述消息计数方式的一个示例。如图5所示,系统中包括两种消息,消息A和消息B,其中消息B又可以分为消息B1和消息B2,其中消息A的优先级低于消息B,消息B1的优先级低于消息B2,在T1时刻,所有已经发送出去的消息A通过计数器countA_T1进行计数,所有已经发送出去的消息B1通过countB_T1计数,而所有已经发送出去的消息B2通过countB_T2计数,依次类推。这样,由于消息B2使用的下一时段的计数器进行计数,因此能够保证消息B2被发送出去,这样优先级高的消息就能够保证被发出去。
在一些实施例中,上述消息发送的控制方法还包括:
在所述第一数量小于与所述优先级所对应的数量阈值的情况下,确定所有已发送消息的数量是否大于或等于总数阈值;
如果所有已发送消息的数量大于或等于所述总数阈值,则丢弃所述待发送消息;
如果所有已发送消息的数量小于所述总数阈值,则发送所述待发送消息,并累加所述第一数量。
在上述可选实施例中,还需要设置一个总数阈值,该总数阈值可以为终端设备处理消息的最大能力;在该可选实施例中,所述总数阈值小于各个优先级的消息的数量阈值的和。此时,当已发送所述优先级的消息的数量小于数量阈值时,并不能保证终端设备可以处理所述待发送消息,需要进一步确认所有已发送消息的数量是否大于或等于总数阈值,如果所有已发送消息大于或等于所述总数阈值,则丢弃所述待发送消息。否则,发送所述待发送消息,并累加所述已发送所述优先级的消息的第一数量。示例性的,消息包括消息A、消息B和消息C,其中消息A的数量阈值为20,消息B的数量阈值为30,消息C的数量阈值为50,总数阈值为80,则如果已发送的消息A的数量为10,已发送的消息B的数量为20,已发送的消息C的数量为50,则由于已发送的消息的总数已经为80,则即使消息A和消息B的已发送数量还未达到数量阈值,其也会被丢弃。
图6为本公开实施例的一个应用场景示意图。如图6所示,在该应用场景中,包括多个终端设备601-603和服务器604,其中所述多个终端设备与服务器通过有线或无线链接进行数据交互。如图6所示,为一个直播场景下消息发送的过程,在某一个时间段中,终端设备601-603发送消息给直播间中的其他终端,这些消息被缓存在所述服务器604上,之后当服务器接收到终端设备的拉取指令之后,将缓存的消息发送给对应的终端设备。由于每个终端设备的处理能力可能不同,因此在服务器上可以配置每个终端设备或者每个类型的终端设备单位时间内(如1秒)能够处理的消息的上限,如每秒100条消息,即上文中所述的总数阈值,使用本公开实施例中的技术方案,还可以针对每种不同类型的消息设置单位时间内的数量阈值,如聊天消息50条,礼物消息50条,这样当1秒内已经发送的聊天消息超过50条或者礼物消息超过50条,则对应类型的消息即被丢弃;在一些实施例中,礼物消息可以分为礼物A消息和礼物B消息,其中礼物B由于价值更高,所以优先级更高一些,如上文所述为了使得礼物B消息能够被发送出去,礼物B的计数又下一个时段的计数器来记录,这样能够保证礼物B被发送出去。假设在T时段内,聊天消息、礼物A和礼物B均产生了50条,由于礼物B使用了T+1时段的计数器,因此是礼物能够保证被发送出去。而到了T+1时段,由于礼物消息的计数器已经被计满50,因此T+1时段中礼物A全部被丢弃,而礼物B可以使用T+1时段的计数器保证被发送出去。在通常情况下,由于礼物B的价值较高,因此礼物B的消息不会一直按照上述速度产生,因此可以保证一般情况下T+1时段之后的消息总数不大于100,以保持服务器的发送速度与终端设备的处理速度的平衡。
本公开实施例公开了一种消息发送的控制方法、装置、电子设备和计算机可读存储介质。其中该消息发送的控制方法包括:获取待发送消息;确定所述待发送消息的优先级;确定第一数量,其中所述第一数量为在所述待发送消息发送之前已经发送的所述优先级的消息的数量;在所述第一数量大于或等于与所述优先级所对应的数量阈值的情况下,丢弃所述待发送消息。上述方法通过与消息的优先级对应的数量阈值确定是否发送所述消息,解决了终端处 理速度慢所导致的消息积压的技术问题。
在上文中,虽然按照上述的顺序描述了上述方法实施例中的各个步骤,本领域技术人员应清楚,本公开实施例中的步骤并不必然按照上述顺序执行,其也可以倒序、并行、交叉等其他顺序执行,而且,在上述步骤的基础上,本领域技术人员也可以再加入其他步骤,这些明显变型或等同替换的方式也应包含在本公开的保护范围之内,在此不再赘述。
图7为本公开实施例提供的消息发送的控制装置实施例的结构示意图。如图7所示,该装置700包括:待发送消息获取模块701、优先级确定模块702、第一数量确定模块703和控制模块704。其中,
待发送消息获取模块701,用于获取待发送消息;
优先级确定模块702,用于确定所述待发送消息的优先级;
第一数量确定模块703,用于确定第一数量,其中所述第一数量为在所述待发送消息发送之前已经发送的所述优先级的消息的数量;
控制模块704,用于在所述第一数量大于或等于与所述优先级所对应的数量阈值的情况下,丢弃所述待发送消息。
在一些实施例中,所述控制模块704,还用于:
在所述第一数量小于与所述优先级所对应的数量阈值的情况下,发送所述待发送消息;累加所述第一数量。
在一些实施例中,所述第一数量确定模块703,还用于:
获取所述待发送消息的时间戳;
根据所述时间戳确定在单位时间内已经发送的所述优先级的消息的第一数量。
在一些实施例中,所述第一数量确定模块703,还用于:
响应于所述待发送消息的优先级为第一优先级的第一子优先级,根据所述时间戳确定单位时间内已经发送的所述第一优先级的消息的第一数量;其中所述第一数量被记录在由下一时间戳所确定的单位时间内。
在一些实施例中,所述第一数量确定模块703,还用于:
响应于所述待发送消息的优先级为第一优先级的第二子优先级,根据所述时间戳确定所述时间戳所在的单位时间内已经发送的所述第一优先级的消息的第一数量;其中,所述已经发送的所述第一优先级的消息的第一数量包括在上一单位时间内发送的第一优先级的第一子优先级的消息的数量。
在一些实施例中,所述控制模块704,还用于,还用于:
在所述第一数量小于与所述优先级所对应的数量阈值的情况下,确定所有已发送消息的数量是否大于或等于总数阈值;
如果所有已发送消息的数量大于或等于所述总数阈值,则丢弃所述待发送消息;
如果所有已发送消息的数量小于所述总数阈值,则发送所述待发送消息,并累加所述第一数量。
在一些实施例中,所述优先级确定模块702,还用于:
确定所述待发送消息的类型;
根据所述类型确定所述待发送消息的优先级。
在一些实施例中,所述装置700,还包括:
数量阈值设置模块,用于给不同优先级的消息设置数量阈值,其中高优先级的消息的数量阈值不小于低优先级的消息的数量阈值。
在一些实施例中,所述装置700,还包括:
计数器启动模块,用于获取所述待发送消息的第一时间戳;如果所述第一时间戳与上一待发送消息的第二时间戳不同,则启动与所述第一时间戳对应的计数器,其中所述计数器用于记录时间戳为所述第一时间戳的已发送的消息的数量。
在一些实施例中,所述待发送消息被缓存在队列中,所述待发送消息获取模块701还用于:在获取所述待发送消息时,每次均从所述队列的顶部取出一条待发送消息。
在一些实施例中,所述装置700,还包括:
设置模块,用于给每个类型的消息设置优先级。
在一些实施例中,所述设置模块,用于:通过人机接口接收优先级设置指令,根据所述优先级设置指令给每个类型的消息设置优先级;或者
根据历史消息的数量自动设置每个类型的消息的优先级。
在一些实施例中,所述设置模块,还用于:给不同优先级的消息设置数量阈值,其中高优先级的消息的数量阈值不小于低优先级的消息的数量阈值
图7所示装置可以执行图1-图5所示实施例的方法,本实施例未详细描述的部分,可参考对图1-图5所示实施例的相关说明。该技术方案的执行过程和技术效果参见图1-图5所示实施例中的描述,在此不再赘述。
下面参考图8,其示出了适于用来实现本公开实施例的电子设备800的结构示意图。本公开实施例中的终端设备可以包括但不限于诸如移动电话、笔记本电脑、数字广播接收器、PDA(个人数字助理)、PAD(平板电脑)、PMP(便携式多媒体播放器)、车载终端(例如车载导航终端)等等的移动终端以及诸如数字TV、台式计算机等等的固定终端。图8示出的电子设备仅仅是一个示例,不应对本公开实施例的功能和使用范围带来任何限制。
如图8所示,电子设备800可以包括处理装置(例如中央处理器、图形处理器等)801,其可以根据存储在只读存储器(ROM)802中的程序或者从存储装置808加载到随机访问存储器(RAM)803中的程序而执行各种适当的动作和处理。在RAM 803中,还存储有电子设备800操作所需的各种程序和数据。处理装置801、ROM 802以及RAM 803通过总线804彼此相连。输入/输出(I/O)接口805也连接至总线804。
通常,以下装置可以连接至I/O接口805:包括例如触摸屏、触摸板、键盘、鼠标、摄像头、麦克风、加速度计、陀螺仪等的输入装置806;包括例如液晶显示器(LCD)、扬声器、振动器等的输出装置807;包括例如磁带、硬盘等的存储装置808;以及通信装置809。通信装置809可以允许电子设备800与其他设备进行无线或有线通信以交换数据。虽然图8示出了具有各种装置的电子设备800,但是应理解的是,并不要求实施或具备所有示出的装 置。可以替代地实施或具备更多或更少的装置。
特别地,根据本公开的实施例,上文参考流程图描述的过程可以被实现为计算机软件程序。例如,本公开的实施例包括一种计算机程序产品,其包括承载在非暂态计算机可读介质上的计算机程序,该计算机程序包含用于执行流程图所示的方法的程序代码。在这样的实施例中,该计算机程序可以通过通信装置809从网络上被下载和安装,或者从存储装置808被安装,或者从ROM 802被安装。在该计算机程序被处理装置801执行时,执行本公开实施例的方法中限定的上述功能。
需要说明的是,本公开上述的计算机可读介质可以是计算机可读信号介质或者计算机可读存储介质或者是上述两者的任意组合。计算机可读存储介质例如可以是——但不限于——电、磁、光、电磁、红外线、或半导体的系统、装置或器件,或者任意以上的组合。计算机可读存储介质的更具体的例子可以包括但不限于:具有一个或多个导线的电连接、便携式计算机磁盘、硬盘、随机访问存储器(RAM)、只读存储器(ROM)、可擦式可编程只读存储器(EPROM或闪存)、光纤、便携式紧凑磁盘只读存储器(CD-ROM)、光存储器件、磁存储器件、或者上述的任意合适的组合。在本公开中,计算机可读存储介质可以是任何包含或存储程序的有形介质,该程序可以被指令执行系统、装置或者器件使用或者与其结合使用。而在本公开中,计算机可读信号介质可以包括在基带中或者作为载波一部分传播的数据信号,其中承载了计算机可读的程序代码。这种传播的数据信号可以采用多种形式,包括但不限于电磁信号、光信号或上述的任意合适的组合。计算机可读信号介质还可以是计算机可读存储介质以外的任何计算机可读介质,该计算机可读信号介质可以发送、传播或者传输用于由指令执行系统、装置或者器件使用或者与其结合使用的程序。计算机可读介质上包含的程序代码可以用任何适当的介质传输,包括但不限于:电线、光缆、RF(射频)等等,或者上述的任意合适的组合。
在一些实施方式中,客户端、服务器可以利用诸如HTTP(HyperText Transfer Protocol,超文本传输协议)之类的任何当前已知或未来研发的网络协议进行通信,并且可以与任意形式或介质的数字数据通信(例如,通信网络)互连。通信网络的示例包括局域网(“LAN”),广域网(“WAN”),网际网(例如,互联网)以及端对端网络(例如,ad hoc端对端网络),以及任何当前已知或未来研发的网络。
上述计算机可读介质可以是上述电子设备中所包含的;也可以是单独存在,而未装配入该电子设备中。
上述计算机可读介质承载有一个或者多个程序,当上述一个或者多个程序被该电子设备执行时,使得该电子设备:获取输入图像以及第一文本;抽取所述输入图像的特征得到输入图像的特征向量;对所述第一文本进行编码得到第一文本的特征向量;根据所述输入图像的特征向量和所述第一文本的特征向量得到联合特征向量;将所述联合特征向量进行解码生成第二文本。
可以以一种或多种程序设计语言或其组合来编写用于执行本公开的操作的计算机程序代码,上述程序设计语言包括但不限于面向对象的程序设计语言—诸如Java、Smalltalk、C++, 还包括常规的过程式程序设计语言—诸如“C”语言或类似的程序设计语言。程序代码可以完全地在用户计算机上执行、部分地在用户计算机上执行、作为一个独立的软件包执行、部分在用户计算机上部分在远程计算机上执行、或者完全在远程计算机或服务器上执行。在涉及远程计算机的情形中,远程计算机可以通过任意种类的网络——包括局域网(LAN)或广域网(WAN)—连接到用户计算机,或者,可以连接到外部计算机(例如利用因特网服务提供商来通过因特网连接)。
附图中的流程图和框图,图示了按照本公开各种实施例的系统、方法和计算机程序产品的可能实现的体系架构、功能和操作。在这点上,流程图或框图中的每个方框可以代表一个模块、程序段、或代码的一部分,该模块、程序段、或代码的一部分包含一个或多个用于实现规定的逻辑功能的可执行指令。也应当注意,在有些作为替换的实现中,方框中所标注的功能也可以以不同于附图中所标注的顺序发生。例如,两个接连地表示的方框实际上可以基本并行地执行,它们有时也可以按相反的顺序执行,这依所涉及的功能而定。也要注意的是,框图和/或流程图中的每个方框、以及框图和/或流程图中的方框的组合,可以用执行规定的功能或操作的专用的基于硬件的系统来实现,或者可以用专用硬件与计算机指令的组合来实现。
描述于本公开实施例中所涉及到的单元可以通过软件的方式实现,也可以通过硬件的方式来实现。其中,单元的名称在某种情况下并不构成对该单元本身的限定。
本文中以上描述的功能可以至少部分地由一个或多个硬件逻辑部件来执行。例如,非限制性地,可以使用的示范类型的硬件逻辑部件包括:现场可编程门阵列(FPGA)、专用集成电路(ASIC)、专用标准产品(ASSP)、片上系统(SOC)、复杂可编程逻辑设备(CPLD)等等。
在本公开的上下文中,机器可读介质可以是有形的介质,其可以包含或存储以供指令执行系统、装置或设备使用或与指令执行系统、装置或设备结合地使用的程序。机器可读介质可以是机器可读信号介质或机器可读储存介质。机器可读介质可以包括但不限于电子的、磁性的、光学的、电磁的、红外的、或半导体系统、装置或设备,或者上述内容的任何合适组合。机器可读存储介质的更具体示例会包括基于一个或多个线的电气连接、便携式计算机盘、硬盘、随机存取存储器(RAM)、只读存储器(ROM)、可擦除可编程只读存储器(EPROM或快闪存储器)、光纤、便捷式紧凑盘只读存储器(CD-ROM)、光学储存设备、磁储存设备、或上述内容的任何合适组合。
根据本公开的一个或多个实施例,提供了一种消息发送的控制方法,包括:
获取待发送消息;
确定所述待发送消息的优先级;
确定第一数量,其中所述第一数量为在所述待发送消息发送之前已经发送的所述优先级的消息的数量;
在所述第一数量大于或等于与所述优先级所对应的数量阈值的情况下,丢弃所述待发送消息。
在一些实施例中,所述方法还包括:
在所述第一数量小于与所述优先级所对应的数量阈值的情况下,发送所述待发送消息;
累加所述第一数量。
在一些实施例中,所述确定第一数量,包括:
获取所述待发送消息的时间戳;
根据所述时间戳确定在单位时间内已经发送的所述优先级的消息的第一数量。
在一些实施例中,所述根据所述时间戳确定在单位时间内已经发送的所述优先级的消息的第一数量,包括:
响应于所述待发送消息的优先级为第一优先级的第一子优先级,根据所述时间戳确定单位时间内已经发送的所述第一优先级的消息的第一数量;其中所述第一数量被记录在由下一时间戳所确定的单位时间内。
在一些实施例中,所述根据所述时间戳确定在单位时间内已经发送的所述优先级的消息的第一数量,包括:
响应于所述待发送消息的优先级为第一优先级的第二子优先级,根据所述时间戳确定所述时间戳所在的单位时间内已经发送的所述第一优先级的消息的第一数量;其中,所述已经发送的所述第一优先级的消息的第一数量包括在上一单位时间内发送的第一优先级的第一子优先级的消息的数量。
在一些实施例中,所述方法还包括:
在所述第一数量小于与所述优先级所对应的数量阈值的情况下,确定所有已发送消息的数量是否大于或等于总数阈值;
如果所有已发送消息的数量大于或等于所述总数阈值,则丢弃所述待发送消息;
如果所有已发送消息的数量小于所述总数阈值,则发送所述待发送消息,并累加所述第一数量。
在一些实施例中,所述确定所述待发送消息的优先级,包括:
确定所述待发送消息的类型;
根据所述类型确定所述待发送消息的优先级。
在一些实施例中,在所述获取待发送消息之前,还包括:
给不同优先级的消息设置数量阈值,其中高优先级的消息的数量阈值不小于低优先级的消息的数量阈值。
在一些实施例中,在所述获取待发送消息之后,还包括:
获取所述待发送消息的第一时间戳;
如果所述第一时间戳与上一待发送消息的第二时间戳不同,则启动与所述第一时间戳对应的计数器,其中所述计数器用于记录时间戳为所述第一时间戳的已发送消息的数量。
在一些实施例中,所述待发送消息被缓存在队列中,所述获取待发送消息,还包括:
在获取所述待发送消息时,每次均从所述队列的顶部取出一条待发送消息。
在一些实施例中,在所述确定所述待发送消息的优先级之前,还包括:
给每个类型的消息设置优先级。
在一些实施例中,所述给每个类型的消息设置优先级,包括:
通过人机接口接收优先级设置指令,根据所述优先级设置指令给每个类型的消息设置优先级;或者
根据历史消息的数量自动设置每个类型的消息的优先级。
在一些实施例中,所述方法还包括:
给不同优先级的消息设置数量阈值,其中高优先级的消息的数量阈值不小于低优先级的消息的数量阈值。
根据本公开的一个或多个实施例,提供了一种消息发送的控制装置,包括:
待发送消息获取模块,用于获取待发送消息;
优先级确定模块,用于确定所述待发送消息的优先级;
第一数量确定模块,用于确定第一数量,其中所述第一数量为在所述待发送消息发送之前已经发送的所述优先级的消息的数量;
控制模块,用于在所述第一数量大于或等于与所述优先级所对应的数量阈值的情况下,丢弃所述待发送消息。
在一些实施例中,所述控制模块,还用于:
在所述第一数量小于与所述优先级所对应的数量阈值的情况下,发送所述待发送消息;累加所述第一数量。
在一些实施例中,所述第一数量确定模块,还用于:
获取所述待发送消息的时间戳;
根据所述时间戳确定在单位时间内已经发送的所述优先级的消息的第一数量。
在一些实施例中,所述第一数量确定模块,还用于:
响应于所述待发送消息的优先级为第一优先级的第一子优先级,根据所述时间戳确定单位时间内已经发送的所述第一优先级的消息的第一数量;其中所述第一数量被记录在由下一时间戳所确定的单位时间内。
在一些实施例中,所述第一数量确定模块,还用于:
响应于所述待发送消息的优先级为第一优先级的第二子优先级,根据所述时间戳确定所述时间戳所在的单位时间内已经发送的所述第一优先级的消息的第一数量;其中,所述已经发送的所述第一优先级的消息的第一数量包括在上一单位时间内发送的第一优先级的第一子优先级的消息的数量。
在一些实施例中,所述控制模块,还用于,还用于:
在所述第一数量小于与所述优先级所对应的数量阈值的情况下,确定所有已发送消息的数量是否大于或等于总数阈值;
如果所有已发送消息的数量大于或等于所述总数阈值,则丢弃所述待发送消息;
如果所有已发送消息的数量小于所述总数阈值,则发送所述待发送消息,并累加所述第一数量。
在一些实施例中,所述优先级确定模块,还用于:
确定所述待发送消息的类型;
根据所述类型确定所述待发送消息的优先级。
在一些实施例中,所述装置,还包括:
数量阈值设置模块,用于给不同优先级的消息设置数量阈值,其中高优先级的消息的数量阈值不小于低优先级的消息的数量阈值。
在一些实施例中,所述装置,还包括:
计数器启动模块,用于获取所述待发送消息的第一时间戳;如果所述第一时间戳与上一待发送消息的第二时间戳不同,则启动与所述第一时间戳对应的计数器,其中所述计数器用于记录时间戳为所述第一时间戳的已发送的消息的数量。
在一些实施例中,所述待发送消息被缓存在队列中,所述待发送消息获取模块701还用于:在获取所述待发送消息时,每次均从所述队列的顶部取出一条待发送消息。
在一些实施例中,所述装置700,还包括:
设置模块,用于给每个类型的消息设置优先级。
在一些实施例中,所述设置模块,用于:通过人机接口接收优先级设置指令,根据所述优先级设置指令给每个类型的消息设置优先级;或者
根据历史消息的数量自动设置每个类型的消息的优先级。
在一些实施例中,所述设置模块,还用于:给不同优先级的消息设置数量阈值,其中高优先级的消息的数量阈值不小于低优先级的消息的数量阈值
根据本公开的一个或多个实施例,提供了一种电子设备,包括:至少一个处理器;以及,与所述至少一个处理器通信连接的存储器;其中,所述存储器存储有能被所述至少一个处理器执行的指令,所述指令被所述至少一个处理器执行,以使所述至少一个处理器能够执行前述第一方面中的任一所述消息发送的控制方法。
根据本公开的一个或多个实施例,提供了一种非暂态计算机可读存储介质,其中,该非暂态计算机可读存储介质存储计算机指令,该计算机指令用于使计算机执行前述第一方面中的任一所述消息发送的控制方法。
以上描述仅为本公开的较佳实施例以及对所运用技术原理的说明。本领域技术人员应当理解,本公开中所涉及的公开范围,并不限于上述技术特征的特定组合而成的技术方案,同时也应涵盖在不脱离上述公开构思的情况下,由上述技术特征或其等同特征进行任意组合而形成的其它技术方案。例如上述特征与本公开中公开的(但不限于)具有类似功能的技术特征进行互相替换而形成的技术方案。
Claims (16)
- 一种消息发送的控制方法,其中包括:获取待发送消息;确定所述待发送消息的优先级;确定第一数量,其中所述第一数量为在所述待发送消息发送之前已经发送的所述优先级的消息的数量;在所述第一数量大于或等于与所述优先级所对应的数量阈值的情况下,丢弃所述待发送消息。
- 如权利要求1所述的消息发送的控制方法,其中,所述方法还包括:在所述第一数量小于与所述优先级所对应的数量阈值的情况下,发送所述待发送消息;累加所述第一数量。
- 如权利要求1所述的消息发送的控制方法,其中,所述确定第一数量,包括:获取所述待发送消息的时间戳;根据所述时间戳确定在单位时间内已经发送的所述优先级的消息的第一数量。
- 如权利要求3所述的消息发送的控制方法,其中,所述根据所述时间戳确定在单位时间内已经发送的所述优先级的消息的第一数量,包括:响应于所述待发送消息的优先级为第一优先级的第一子优先级,根据所述时间戳确定单位时间内已经发送的所述第一优先级的消息的第一数量;其中所述第一数量被记录在由下一时间戳所确定的单位时间内。
- 如权利要求3所述的消息发送的控制方法,其中,所述根据所述时间戳确定在单位时间内已经发送的所述优先级的消息的第一数量,包括:响应于所述待发送消息的优先级为第一优先级的第二子优先级,根据所述时间戳确定所述时间戳所在的单位时间内已经发送的所述第一优先级的消息的第一数量;其中,所述已经发送的所述第一优先级的消息的第一数量包括在上一单位时间内发送的第一优先级的第一子优先级的消息的数量。
- 如权利要求1所述的消息发送的控制方法,其中,所述方法还包括:在所述第一数量小于与所述优先级所对应的数量阈值的情况下,确定所有已发送消息的数量是否大于或等于总数阈值;如果所有已发送消息的数量大于或等于所述总数阈值,则丢弃所述待发送消息;如果所有已发送消息的数量小于所述总数阈值,则发送所述待发送消息,并累加所述第一数量。
- 如权利要求1所述的消息发送的控制方法,其中,所述确定所述待发送消息的优先级,包括:确定所述待发送消息的类型;根据所述类型确定所述待发送消息的优先级。
- 如权利要求1所述的消息发送的控制方法,其中,在所述获取待发送消息之前,还包括:给不同优先级的消息设置数量阈值,其中高优先级的消息的数量阈值不小于低优先级的消息的数量阈值。
- 如权利要求1所述的消息发送的控制方法,其中,在所述获取待发送消息之后,还包括:获取所述待发送消息的第一时间戳;如果所述第一时间戳与上一待发送消息的第二时间戳不同,则启动与所述第一时间戳对应的计数器,其中所述计数器用于记录时间戳为所述第一时间戳的已发送消息的数量。
- 如权利要求1所述的消息发送的控制方法,其中,所述待发送消息被缓存在队列中,所述获取待发送消息,还包括:在获取所述待发送消息时,每次均从所述队列的顶部取出一条待发送消息。
- 如权利要求1所述的消息发送的控制方法,其中,在所述确定所述待发送消息的优先级之前,还包括:给每个类型的消息设置优先级。
- 如权利要求11所述的消息发送的控制方法,其中,所述给每个类型的消息设置优先级,包括:通过人机接口接收优先级设置指令,根据所述优先级设置指令给每个类型的消息设置优先级;或者根据历史消息的数量自动设置每个类型的消息的优先级。
- 如权利要求11所述的消息发送的控制方法,其中,所述方法还包括:给不同优先级的消息设置数量阈值,其中高优先级的消息的数量阈值不小于低优先级的消息的数量阈值。
- 一种消息发送的控制装置,其特征在于其,包括:待发送消息获取模块,用于获取待发送消息;优先级确定模块,用于确定所述待发送消息的优先级;第一数量确定模块,用于确定第一数量,其中所述第一数量为在所述待发送消息发送之前已经发送的所述优先级的消息的数量;控制模块,用于在所述第一数量大于或等于与所述优先级所对应的数量阈值的情况下,丢弃所述待发送消息。
- 一种电子设备,其包括:存储器,用于存储计算机可读指令;以及处理器,用于运行所述计算机可读指令,使得所述处理器运行时实现根据权利要求1-13中任意一项所述的方法。
- 一种非暂态计算机可读存储介质,用于存储计算机可读指令,当所述计算机可 读指令由计算机执行时,使得所述计算机执行权利要求1-13中任意一项所述的方法。
Applications Claiming Priority (2)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN202011060102.4 | 2020-09-30 | ||
| CN202011060102.4A CN112199174B (zh) | 2020-09-30 | 2020-09-30 | 消息发送的控制方法、装置、电子设备及计算机可读存储介质 |
Publications (1)
| Publication Number | Publication Date |
|---|---|
| WO2022068488A1 true WO2022068488A1 (zh) | 2022-04-07 |
Family
ID=74012520
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| PCT/CN2021/115015 Ceased WO2022068488A1 (zh) | 2020-09-30 | 2021-08-27 | 消息发送的控制方法、装置、电子设备及计算机可读存储介质 |
Country Status (2)
| Country | Link |
|---|---|
| CN (1) | CN112199174B (zh) |
| WO (1) | WO2022068488A1 (zh) |
Cited By (1)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN116302593A (zh) * | 2023-01-30 | 2023-06-23 | 中国建设银行股份有限公司 | 一种系统消息限流方法、装置及设备 |
Families Citing this family (6)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| KR101856857B1 (ko) * | 2016-09-09 | 2018-05-11 | 현대오트론 주식회사 | 메시지 통신 부하 제어 장치 및 방법 |
| CN112199174B (zh) * | 2020-09-30 | 2025-07-08 | 北京字节跳动网络技术有限公司 | 消息发送的控制方法、装置、电子设备及计算机可读存储介质 |
| CN112994934B (zh) * | 2021-02-07 | 2023-02-10 | 杭州迪普科技股份有限公司 | 数据交互方法、装置及系统 |
| CN115209166A (zh) * | 2021-04-12 | 2022-10-18 | 北京字节跳动网络技术有限公司 | 一种消息发送方法、装置、设备和存储介质 |
| CN116701009B (zh) * | 2022-11-21 | 2024-05-17 | 荣耀终端有限公司 | 数据通信的方法及电子设备 |
| CN116886765A (zh) * | 2023-07-20 | 2023-10-13 | 北京达佳互联信息技术有限公司 | 消息推送方法、装置、设备、介质及程序产品 |
Citations (6)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US20070002736A1 (en) * | 2005-06-16 | 2007-01-04 | Cisco Technology, Inc. | System and method for improving network resource utilization |
| CN108174305A (zh) * | 2016-12-07 | 2018-06-15 | 北京云中融信网络科技有限公司 | 直播聊天室的消息处理方法及装置 |
| CN110191348A (zh) * | 2018-02-23 | 2019-08-30 | 武汉斗鱼网络科技有限公司 | 视频直播中互动消息的处理方法及装置 |
| CN110662085A (zh) * | 2019-10-16 | 2020-01-07 | 北京字节跳动网络技术有限公司 | 消息发送方法、装置、可读介质及电子设备 |
| CN111416765A (zh) * | 2020-03-20 | 2020-07-14 | 北京字节跳动网络技术有限公司 | 一种互动消息处理的方法及装置 |
| CN112199174A (zh) * | 2020-09-30 | 2021-01-08 | 北京字节跳动网络技术有限公司 | 消息发送的控制方法、装置、电子设备及计算机可读存储介质 |
Family Cites Families (10)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN103561394B (zh) * | 2013-11-08 | 2018-08-21 | 惠州Tcl移动通信有限公司 | 一种发送消息的方法及系统 |
| CN106257958B (zh) * | 2015-06-30 | 2019-10-15 | 北京智谷睿拓技术服务有限公司 | 消息发送方法、消息接收方法及其装置 |
| CN108093123A (zh) * | 2017-10-30 | 2018-05-29 | 努比亚技术有限公司 | 一种消息通知处理方法、终端及计算机可读存储介质 |
| US10747596B2 (en) * | 2018-07-31 | 2020-08-18 | International Business Machines Corporation | Determining when to send message to a computing node to process items using a machine learning module |
| CN109245867B (zh) * | 2018-08-14 | 2022-09-27 | 深圳壹账通智能科技有限公司 | 一种消息发送方法、计算机可读存储介质及终端设备 |
| CN110297711B (zh) * | 2019-05-16 | 2024-01-19 | 平安科技(深圳)有限公司 | 批量数据处理方法、装置、计算机设备及存储介质 |
| CN110231972B (zh) * | 2019-05-27 | 2022-10-25 | 维沃移动通信有限公司 | 一种消息显示方法及终端设备 |
| CN110417879A (zh) * | 2019-07-18 | 2019-11-05 | 北京蜜莱坞网络科技有限公司 | 一种消息处理方法、装置、设备及存储介质 |
| CN111078430A (zh) * | 2019-12-09 | 2020-04-28 | 苏州浪潮智能科技有限公司 | 一种消息通知处理方法、设备以及存储介质 |
| CN111124573B (zh) * | 2019-12-16 | 2022-04-22 | 维沃移动通信有限公司 | 消息通知方法及电子设备 |
-
2020
- 2020-09-30 CN CN202011060102.4A patent/CN112199174B/zh active Active
-
2021
- 2021-08-27 WO PCT/CN2021/115015 patent/WO2022068488A1/zh not_active Ceased
Patent Citations (6)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US20070002736A1 (en) * | 2005-06-16 | 2007-01-04 | Cisco Technology, Inc. | System and method for improving network resource utilization |
| CN108174305A (zh) * | 2016-12-07 | 2018-06-15 | 北京云中融信网络科技有限公司 | 直播聊天室的消息处理方法及装置 |
| CN110191348A (zh) * | 2018-02-23 | 2019-08-30 | 武汉斗鱼网络科技有限公司 | 视频直播中互动消息的处理方法及装置 |
| CN110662085A (zh) * | 2019-10-16 | 2020-01-07 | 北京字节跳动网络技术有限公司 | 消息发送方法、装置、可读介质及电子设备 |
| CN111416765A (zh) * | 2020-03-20 | 2020-07-14 | 北京字节跳动网络技术有限公司 | 一种互动消息处理的方法及装置 |
| CN112199174A (zh) * | 2020-09-30 | 2021-01-08 | 北京字节跳动网络技术有限公司 | 消息发送的控制方法、装置、电子设备及计算机可读存储介质 |
Cited By (1)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN116302593A (zh) * | 2023-01-30 | 2023-06-23 | 中国建设银行股份有限公司 | 一种系统消息限流方法、装置及设备 |
Also Published As
| Publication number | Publication date |
|---|---|
| CN112199174A (zh) | 2021-01-08 |
| CN112199174B (zh) | 2025-07-08 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| WO2022068488A1 (zh) | 消息发送的控制方法、装置、电子设备及计算机可读存储介质 | |
| CN110662085A (zh) | 消息发送方法、装置、可读介质及电子设备 | |
| CN113259744B (zh) | 视频的展示方法、装置、设备及介质 | |
| JP2025508422A (ja) | ビデオ再生方法、装置、電子機器、記憶媒体及びプログラム製品 | |
| CN111163336B (zh) | 视频资源推送方法、装置、电子设备及计算机可读介质 | |
| CN110795446A (zh) | 榜单更新方法、装置、可读介质和电子设备 | |
| CN111432001B (zh) | 用于跳转场景的方法、装置、电子设备和计算机可读介质 | |
| CN114721829A (zh) | 一种协程栈资源配置方法、装置、设备和存储介质 | |
| CN112015816A (zh) | 数据同步方法、装置、介质及电子设备 | |
| WO2021139383A1 (zh) | 直播间礼物资源更新方法、装置、介质及电子设备 | |
| WO2022057581A1 (zh) | 内容显示方法、装置、电子设备及计算机可读存储介质 | |
| CN110636367A (zh) | 一种视频加载方法、装置、终端设备及介质 | |
| CN111225255B (zh) | 目标视频推送播放方法、装置、电子设备及存储介质 | |
| CN115225586B (zh) | 数据包发送方法、装置、设备及计算机可读存储介质 | |
| CN114979712B (zh) | 视频起播方法、装置、设备及存储介质 | |
| CN117997727A (zh) | 用于cdn的日志落盘方法、装置、介质和电子设备 | |
| WO2022206474A1 (zh) | 数据获取方法, 装置, 电子设备及计算机可读存储介质 | |
| WO2022218103A1 (zh) | 一种消息发送方法、装置、设备和存储介质 | |
| CN113163154B (zh) | 信息处理方法、装置和电子设备 | |
| CN112632434B (zh) | 信息发送方法、装置、电子设备和计算机可读介质 | |
| CN119783684A (zh) | 一种信息更新方法、装置、设备及存储介质 | |
| CN116185665A (zh) | 一种消息处理方法、装置、设备及介质 | |
| CN111444457B (zh) | 数据发布方法、装置、存储介质及电子设备 | |
| CN118138803A (zh) | 一种用于直播的网络测速方法、装置、设备及存储介质 | |
| CN112040328A (zh) | 数据交互方法、装置和电子设备 |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| 121 | Ep: the epo has been informed by wipo that ep was designated in this application |
Ref document number: 21874149 Country of ref document: EP Kind code of ref document: A1 |
|
| NENP | Non-entry into the national phase |
Ref country code: DE |
|
| 32PN | Ep: public notification in the ep bulletin as address of the adressee cannot be established |
Free format text: NOTING OF LOSS OF RIGHTS PURSUANT TO RULE 112(1) EPC (EPO FORM 1205A DATED 060723) |
|
| 122 | Ep: pct application non-entry in european phase |
Ref document number: 21874149 Country of ref document: EP Kind code of ref document: A1 |