WO2022068488A1 - Procédé et appareil de commande d'envoi de message, ainsi que dispositif électronique et support de stockage lisible par ordinateur - Google Patents

Procédé et appareil de commande d'envoi de message, ainsi que dispositif électronique et support de stockage lisible par ordinateur Download PDF

Info

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
Application number
PCT/CN2021/115015
Other languages
English (en)
Chinese (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 北京字节跳动网络技术有限公司
Publication of WO2022068488A1 publication Critical patent/WO2022068488A1/fr

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/54Interprogram communication
    • G06F9/546Message passing systems or structures, e.g. queues
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/48Program initiating; Program switching, e.g. by interrupt
    • G06F9/4806Task transfer initiation or dispatching
    • G06F9/4843Task transfer initiation or dispatching by program, e.g. task dispatcher, supervisor, operating system
    • G06F9/4881Scheduling 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

L'invention porte sur un procédé et sur un appareil de commande d'envoi de message, ainsi que sur un dispositif électronique et sur un support de stockage lisible par ordinateur. Le procédé consiste : à acquérir un message à envoyer ; à déterminer la priorité dudit message ; à déterminer un premier nombre, le premier nombre étant le nombre de messages de priorité qui ont été envoyés avant que ledit message ne soit envoyé ; et lorsque le premier nombre est supérieur ou égal à une valeur de seuil de nombre correspondant à la priorité, à mettre au rebut ledit message.
PCT/CN2021/115015 2020-09-30 2021-08-27 Procédé et appareil de commande d'envoi de message, ainsi que dispositif électronique et support de stockage lisible par ordinateur WO2022068488A1 (fr)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202011060102.4A CN112199174A (zh) 2020-09-30 2020-09-30 消息发送的控制方法、装置、电子设备及计算机可读存储介质
CN202011060102.4 2020-09-30

Publications (1)

Publication Number Publication Date
WO2022068488A1 true WO2022068488A1 (fr) 2022-04-07

Family

ID=74012520

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2021/115015 WO2022068488A1 (fr) 2020-09-30 2021-08-27 Procédé et appareil de commande d'envoi de message, ainsi que dispositif électronique et support de stockage lisible par ordinateur

Country Status (2)

Country Link
CN (1) CN112199174A (fr)
WO (1) WO2022068488A1 (fr)

Families Citing this family (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR101856857B1 (ko) * 2016-09-09 2018-05-11 현대오트론 주식회사 메시지 통신 부하 제어 장치 및 방법
CN112199174A (zh) * 2020-09-30 2021-01-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 荣耀终端有限公司 数据通信的方法及电子设备

Citations (6)

* Cited by examiner, † Cited by third party
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 (8)

* Cited by examiner, † Cited by third party
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 深圳壹账通智能科技有限公司 一种消息发送方法、计算机可读存储介质及终端设备
CN110231972B (zh) * 2019-05-27 2022-10-25 维沃移动通信有限公司 一种消息显示方法及终端设备
CN110417879A (zh) * 2019-07-18 2019-11-05 北京蜜莱坞网络科技有限公司 一种消息处理方法、装置、设备及存储介质
CN111124573B (zh) * 2019-12-16 2022-04-22 维沃移动通信有限公司 消息通知方法及电子设备

Patent Citations (6)

* Cited by examiner, † Cited by third party
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 北京字节跳动网络技术有限公司 消息发送的控制方法、装置、电子设备及计算机可读存储介质

Also Published As

Publication number Publication date
CN112199174A (zh) 2021-01-08

Similar Documents

Publication Publication Date Title
WO2022068488A1 (fr) Procédé et appareil de commande d'envoi de message, ainsi que dispositif électronique et support de stockage lisible par ordinateur
CN112135169B (zh) 一种媒体内容加载方法、装置、设备和介质
WO2022237744A1 (fr) Procédé et appareil de présentation d'une vidéo, et dispositif et support
CN111432001B (zh) 用于跳转场景的方法、装置、电子设备和计算机可读介质
WO2021139383A1 (fr) Procédé et appareil de mise à jour de ressources de cadeaux de salle de radiodiffusion en direct, ainsi que support et dispositif électronique
CN110636367A (zh) 一种视频加载方法、装置、终端设备及介质
CN112015816A (zh) 数据同步方法、装置、介质及电子设备
CN111163336B (zh) 视频资源推送方法、装置、电子设备及计算机可读介质
CN113542856B (zh) 在线录像的倒放方法、装置、设备和计算机可读介质
CN111225255B (zh) 目标视频推送播放方法、装置、电子设备及存储介质
WO2022057581A1 (fr) Procédé et appareil d'affichage de contenu, dispositif électronique et support de stockage lisible par ordinateur
CN112040328B (zh) 数据交互方法、装置和电子设备
CN112203103B (zh) 消息处理方法、装置、电子设备及计算机可读存储介质
CN112163176A (zh) 数据存储方法、装置、电子设备和计算机可读介质
WO2022206474A1 (fr) Procédé et appareil d'acquisition de données, dispositif électronique et support de stockage lisible par ordinateur
WO2022218103A1 (fr) Procédé et appareil d'envoi de message, et dispositif et support de stockage
CN115225586B (zh) 数据包发送方法、装置、设备及计算机可读存储介质
CN112685455B (zh) 实时数据分类显示方法、装置、电子设备和可读介质
CN114979757B (zh) 视频发布方法、装置、设备及存储介质
CN112653691B (zh) 一种数据处理方法、装置、设备及存储介质
CN113364672B (zh) 媒体网关信息确定方法、装置、设备和计算机可读介质
CN112804768B (zh) 处理通信连接的方法及装置、终端和非暂时性存储介质
CN111698132B (zh) 用于控制集群中心跳事件的方法、装置、设备和介质
EP4270187A1 (fr) Procédé et appareil d'affichage de travail, ainsi que dispositif électronique et support de stockage
CN117527648A (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