CN117667456A - Message sending management method, device, equipment and storage medium - Google Patents

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

Info

Publication number
CN117667456A
CN117667456A CN202311680825.8A CN202311680825A CN117667456A CN 117667456 A CN117667456 A CN 117667456A CN 202311680825 A CN202311680825 A CN 202311680825A CN 117667456 A CN117667456 A CN 117667456A
Authority
CN
China
Prior art keywords
message
target
sending
sent
messages
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202311680825.8A
Other languages
Chinese (zh)
Inventor
曲辉
单锐杰
詹楚伟
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Guangdong Baolun Electronics Co ltd
Original Assignee
Guangdong Baolun Electronics Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Guangdong Baolun Electronics Co ltd filed Critical Guangdong Baolun Electronics Co ltd
Priority to CN202311680825.8A priority Critical patent/CN117667456A/en
Publication of CN117667456A publication Critical patent/CN117667456A/en
Pending legal-status Critical Current

Links

Classifications

    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D30/00Reducing energy consumption in communication networks
    • Y02D30/70Reducing energy consumption in communication networks in wireless communication networks

Landscapes

  • Computer And Data Communications (AREA)

Abstract

The embodiment of the invention discloses a message sending management method, a device, equipment and a storage medium, wherein the method comprises the following steps: acquiring at least one message type queue in a preset upper computer, wherein the message type queue comprises at least one message to be sent, and the message types corresponding to the messages to be sent are the same when a plurality of messages to be sent exist; and determining a target sending message according to the message acquisition sequence of each message to be sent in the target message type queue, and sending the target sending message to a preset lower computer. The technical scheme of the embodiment of the invention solves the problems that the prior upper computer does not process the received messages, but independently transmits each message, so that the upper computer transmits a plurality of repeated messages and system faults are easy to occur, can filter and screen the messages of the same type, reduces the workload of message transmission of the upper computer, and improves the message transmission efficiency.

Description

Message sending management method, device, equipment and storage medium
Technical Field
The embodiment of the invention relates to the technical field of message queues, in particular to a message sending management method, a device, equipment and a storage medium.
Background
In the development of the software of the upper computer, the lower computer is affected by performance, and the next message can be sent only after a fixed interval, so that the prior art can lock at a sending entrance and delay corresponding time after the message is sent, and thus deadlock can be caused when dealing with some concurrent messages, especially when a large number of tasks are sent simultaneously; for example, if it is required to ensure that the lower computer responds in real time, it may be necessary to send a large number of volume-adjusting messages in a short time, not only taking a large amount of time to send useless instructions, but also increasing the probability of errors.
Disclosure of Invention
The embodiment of the invention provides a message sending management method, a device, equipment and a storage medium, which can filter and screen messages of the same type, reduce the workload of message sending of an upper computer and improve the message sending efficiency.
In a first aspect, an embodiment of the present invention provides a message sending management method, where the method includes:
acquiring at least one message type queue in a preset upper computer, wherein the message type queue comprises at least one message to be sent, and the message types corresponding to the messages to be sent are the same when a plurality of messages to be sent exist;
and determining a target sending message according to the message acquisition sequence of each message to be sent in the target message type queue, and sending the target sending message to a preset lower computer.
In a second aspect, an embodiment of the present invention provides a message transmission management apparatus, including:
the message type queue acquisition module is used for acquiring at least one message type queue in a preset upper computer, wherein the message type queue comprises at least one message to be sent, and the message types corresponding to the messages to be sent are the same when the messages to be sent exist;
and the target message sending module is used for determining target sending messages according to the message acquisition sequence of each message to be sent in the target message type queue and sending the target sending messages to a preset lower computer.
In a third aspect, an embodiment of the present invention provides a computer apparatus, including:
one or more processors;
a memory for storing one or more programs;
the one or more programs, when executed by the one or more processors, cause the one or more processors to implement the messaging management method as described in any of the embodiments.
In a fourth aspect, an embodiment of the present invention provides a computer readable storage medium having stored thereon a computer program which, when executed by a processor, implements the message transmission management method according to any of the embodiments.
According to the technical scheme provided by the embodiment of the invention, at least one message type queue in the preset upper computer is obtained, wherein the message type queue comprises at least one message to be sent, and the message types corresponding to the messages to be sent are the same when the messages to be sent exist; and determining a target sending message according to the message acquisition sequence of each message to be sent in the target message type queue, and sending the target sending message to a preset lower computer. The technical scheme of the embodiment of the invention solves the problems that the prior upper computer does not process the received messages, but independently transmits each message, so that the upper computer transmits a plurality of repeated messages and system faults are easy to occur, can filter and screen the messages of the same type, reduces the workload of message transmission of the upper computer, and improves the message transmission efficiency.
Drawings
FIG. 1 is a flow chart of a message sending management method provided by an embodiment of the invention;
FIG. 2 is a flow chart of yet another message sending management method provided by an embodiment of the present invention;
FIG. 3 is a workflow diagram for message transmission management provided by an embodiment of the present invention;
fig. 4 is a schematic structural diagram of a message sending management device according to an embodiment of the present invention;
fig. 5 is a schematic structural diagram of a computer device according to an embodiment of the present invention.
Detailed Description
For the purpose of making the objects, technical solutions and advantages of the embodiments of the present invention more apparent, the technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present invention, and it is apparent that the described embodiments are some embodiments of the present invention, but not all embodiments of the present invention. All other embodiments, which can be made by those skilled in the art based on the embodiments of the invention without making any inventive effort, are intended to be within the scope of the invention.
Fig. 1 is a flowchart of a message sending management method provided by the embodiment of the present invention, where the embodiment of the present invention is applicable to a scenario in which an upper computer software sends an instruction message to a lower computer, and especially in a scenario in which the lower computer has weak message processing capability and needs a fixed duration interval to correctly process an instruction of the upper computer, the method may be performed by a message sending management device, and the device may be implemented by software and/or hardware.
As shown in fig. 1, the message transmission management method includes the steps of:
s110, acquiring at least one message type queue in a preset upper computer.
The preset upper computer can be a preset upper computer for sending the message. The preset upper computer needs to send the received message to the corresponding preset lower computer so as to complete the message sending process. Further, the message type queue may be a queue that holds messages to be sent. The message type queue comprises at least one message to be sent, and the message types corresponding to the messages to be sent are the same when a plurality of messages to be sent exist.
Optionally, when the preset upper computer obtains the message to be sent, the corresponding message type may be determined according to the message attribute information of the message to be sent; and according to the message type, moving the message to be sent to a message type queue corresponding to the message type.
Wherein the message attribute information may be related attribute information of the message to be transmitted. Specifically, the message attribute information includes information such as a name, a receiving time, and a message type identifier of a message to be transmitted. The message type of the message to be sent, such as a power-on message, a volume adjustment message, etc., can be determined by the message type identification in the message attribute information. Further, after determining the message type of the message to be sent, the message to be sent may be moved to a message type queue corresponding to the message type. Wherein a message type queue holds one type of message. By classifying the received messages to be sent into the corresponding message type queues, unnecessary messages in the messages of the same type can be conveniently screened later, only key messages are reserved, and the efficiency of message sending is improved.
Further, each message type queue in the preset upper computer can be acquired in sequence in a mode of acquiring one by one. The method comprises the steps of determining target information in one queue through a later period, sending the target information to a preset lower computer, screening information which is needed to be sent to the lower computer in another information type queue, and repeating the steps.
S120, determining a target sending message according to the message acquisition sequence of each message to be sent in the target message type queue, and sending the target sending message to a preset lower computer.
Wherein the target message type queue may be a message type pair column currently being processed. I.e. a message type queue that has been acquired. The message retrieval order may be an order in which each message to be sent in the target message type queue is retrieved. Specifically, the message in the target message type queue may be ordered based on the message receiving time of each message to be sent, so as to determine the message acquisition sequence of each message to be sent in the target message type queue.
Further, the target transmission message may be a message to be transmitted to a preset lower computer. Specifically, the target transmission message may be determined according to the message acquisition order of each message to be transmitted in the target message type queue. For example, a message with the latest message receiving time in the target message type queue may be taken as a target sending message.
For example, when the type of the message in the target message type sequence is volume adjustment information, each message to be sent is an instruction for adjusting the volume to a certain value, at this time, the message with the latest receiving time can be directly used as the target sending message, and other messages to be sent, that is, nonsensical messages, can be deleted, so that the message processing mode can reduce the sending pressure of the message and does not ignore necessary information in the queue. By determining the target transmission message according to the message acquisition sequence of each message to be transmitted in the target message type queue, the message transmission pressure of the preset upper computer can be reduced to a large extent.
According to the technical scheme provided by the embodiment of the invention, at least one message type queue in the preset upper computer is obtained, wherein the message type queue comprises at least one message to be sent, and the message types corresponding to the messages to be sent are the same when the messages to be sent exist; and determining a target sending message according to the message acquisition sequence of each message to be sent in the target message type queue, and sending the target sending message to a preset lower computer. The technical scheme of the embodiment of the invention solves the problems that the prior upper computer does not process the received messages, but independently transmits each message, so that the upper computer transmits a plurality of repeated messages and system faults are easy to occur, can filter and screen the messages of the same type, reduces the workload of message transmission of the upper computer, and improves the message transmission efficiency.
Fig. 2 is a flowchart of another message sending management method provided by the embodiment of the present invention, where the embodiment of the present invention is applicable to a scenario in which the software of an upper computer sends instruction messages to a lower computer, and especially in a scenario in which the capability of the lower computer to process messages is weak and a fixed duration interval is required to correctly process instructions of the upper computer, the embodiment further describes how to determine a target sending message according to a message acquisition sequence of each message to be sent in a target message type queue, and send the target sending message to a preset lower computer.
As shown in fig. 2, the message transmission management method includes the steps of:
s210, at least one message type queue in a preset upper computer is acquired.
The preset upper computer can be a preset upper computer for sending the message. The preset upper computer needs to send the received message to the corresponding preset lower computer so as to complete the message sending process. Further, the message type queue may be a queue that holds messages to be sent. The message type queue comprises at least one message to be sent, and the message types corresponding to the messages to be sent are the same when a plurality of messages to be sent exist.
When the preset upper computer acquires the message to be sent, the corresponding message type can be determined according to the message attribute information of the message to be sent; and according to the message type, moving the message to be sent to a message type queue corresponding to the message type.
Wherein the message attribute information may be related attribute information of the message to be transmitted. Specifically, the message attribute information includes information such as a name, a receiving time, and a message type identifier of a message to be transmitted. The message type of the message to be sent, such as a power-on message, a volume adjustment message, etc., can be determined by the message type identification in the message attribute information. Further, after determining the message type of the message to be sent, the message to be sent may be moved to a message type queue corresponding to the message type. Wherein a message type queue holds one type of message. By classifying the received messages to be sent into the corresponding message type queues, unnecessary messages in the messages of the same type can be conveniently screened later, only key messages are reserved, and the efficiency of message sending is improved.
Further, each message type queue in the preset upper computer can be acquired in sequence in a mode of acquiring one by one. The method comprises the steps of determining target information in one queue through a later period, sending the target information to a preset lower computer, screening information which is needed to be sent to the lower computer in another information type queue, and repeating the steps.
S220, according to the message receiving time of the message to be sent, all the messages to be sent in the target message type queue are arranged to obtain a message sequence to be processed.
Wherein the target message type queue may be a message type pair column currently being processed. I.e. a message type queue that has been acquired. The message pair columns to be processed may be message type pair columns in which messages have been ordered. Specifically, all messages in the target message memory queue can be arranged according to the message receiving time of the message to be sent, so as to obtain a message sequence to be processed. Specifically, all messages to be sent in the sequence of messages to be processed may be arranged according to the message receiving time in an arrangement manner from early to late or from late to early, and the specific arrangement manner is not limited herein.
S230, taking the message with the latest message receiving time in the message sequence to be processed as the target sending message, and deleting other messages to be sent except the target sending message in the target message type queue.
The target sending message may be a message to be sent to a preset lower computer. Specifically, a message with the latest message receiving time in the message sequence to be processed can be used as a target sending message. Since the message queue to be processed obtained in the above steps has been arranged for each message, the last message or the first message in the message queue to be processed can be directly used as a target to send the message. For example, when the order of the messages in the sequence of messages to be processed is from the early to the late, the last message in the sequence of messages to be processed may be targeted for sending. Accordingly, when the message arrangement order in the message sequence to be processed is from late to early, the first message in the message sequence to be processed can be used as a target to send the message.
In addition, after the target sending message is determined, other messages to be sent except the target sending message in the target message type queue can be deleted, and the message storage pressure of the upper computer can be reduced. For example, when the type of the message in the message sequence to be processed is volume adjustment information, each message to be sent is an instruction for adjusting the volume to a certain value, so that the message with the latest receiving time can be directly used as the target sending message, and other messages to be sent, namely nonsensical messages, can be deleted, and the message processing mode can reduce the sending pressure of the message and does not ignore the necessary information in the queue. By taking the message with the latest message receiving time in the message sequence to be processed as the target sending message and deleting other messages to be sent except the target sending message in the target message type queue, the message sending pressure of the preset upper computer can be reduced to a large extent.
S240, under the condition that the preset sending interval duration is not zero, determining the target sending waiting duration according to the sending occupied duration of the last sending message corresponding to the target sending message and the preset sending interval duration.
The preset sending interval duration may be a duration of an interval between sending of a message by the preset upper computer to the preset lower computer. Since the message processing capability of the preset lower computer may be weak, a period of time may be reserved for the preset lower computer by setting the preset transmission interval duration, so that the message received from the preset upper computer can be processed and executed in time. The last transmitted message may be a message transmitted to a preset lower computer in a last message type queue corresponding to the target message type queue. I.e. presetting the message sent by the upper computer before processing the target message type queue. The transmission occupied time length can be the time length occupied in the process of transmitting the last message by the preset upper computer. The target transmission waiting time period may be a time period for which the target transmission message needs to wait for transmission. The target transmission waiting time length can be obtained by subtracting a preset transmission interval time length and a transmission occupation time length.
Specifically, timing can be performed when the transmission of the last transmission message starts, and the transmission occupied time length is determined according to the time length occupied by the last transmission message from the transmission start to the transmission end; and performing difference between the preset transmission interval duration and the transmission occupied duration, and taking the obtained difference as a target transmission waiting duration.
S250, under the condition that the target sending waiting time is zero, sending the target sending message to a preset lower computer.
Under the condition that the target transmission waiting time is zero, the time length from the last preset upper computer to transmit the message is longer than the preset transmission interval time length, so that the target transmission message can be directly transmitted to the preset lower computer.
In addition, in the case where the target transmission waiting time period is not zero, the target transmission message may be transmitted to the preset lower computer after waiting for the same time as the target transmission waiting time period.
Under the condition that the waiting time of the target transmission is not zero, the time length from the last preset upper computer to send the message is smaller than the preset sending interval time length, so that the same time as the waiting time length of the target transmission needs to be waited until the waiting time length of the target transmission is zero, and the target transmission message is sent to the preset lower computer.
In the development of software on a host computer, the lower computer is affected by performance, and software may be required to send the next message after a fixed interval, so that the prior art method locks at a sending entrance and delays sending the message for a corresponding time after sending the message, which may cause deadlock when dealing with some concurrent messages, especially when a large number of tasks are sent simultaneously. In addition, if a large number of messages of the same type are sent in a short time, for example, the volume is adjusted, if the real-time response of the lower computer needs to be ensured, a large number of messages for adjusting the volume can be sent in a short time, only the last instruction is needed, and the prior art processes one by one, so that a large amount of time is occupied for sending useless instructions, and meanwhile, the probability of errors is increased.
The invention carries out unified management on the messages before sending the messages, and single-thread processing is carried out, so that the message loss or abnormality caused by untimely processing of a message lower computer during concurrency is avoided; by classifying the messages, executing a last-in-first-out strategy on each type of message, executing only one message which enters last, and discarding all other messages, so that a large number of messages of the same type are prevented from being transmitted simultaneously, and transmission resources are occupied; in addition, a transmission task timer is introduced in the part for processing the transmission interval, so that the transmission task can be managed more efficiently, unnecessary waiting is avoided, and the transmission efficiency is improved.
In an alternative embodiment, after the target sending message is sent to the preset lower computer, the method further includes: and replacing the target message type queue with a message type queue adjacent to the target message type queue, determining a target sending message in the target message type queue, and sending the target sending message to a preset lower computer.
After the target sending message is sent to the preset lower computer, the message in the target message type queue is screened, and the screened message is sent to the preset lower computer. At this time, the messages in the message type queues adjacent to the target message type queue can be processed, and the messages which need to be sent to the preset lower computer in the adjacent message type queues are determined. That is, the messages in each message type queue are continuously filtered, and the filtered messages are sent to a preset lower computer.
Fig. 3 is an exemplary workflow diagram for message transmission management according to an embodiment of the present invention. As shown in fig. 3, the workflow of message transmission management includes the steps of:
step1, initializing a message transmission queue, designating a method specifically executed by the queue (a method for specifically transmitting data), and a minimum transmission interval between two messages;
step2, initializing a dictionary of the sending task, wherein the dictionary comprises a message type and a task queue corresponding to the message type. Message type customization, for example: issuing a starting instruction, issuing a sound volume adjusting instruction and the like;
step3, adding a sending task to a task queue of a corresponding message type (under normal conditions, sending of the message is random, all message tasks are added through the entry, and the sequence of sending the message is guaranteed);
step4, sequentially taking out corresponding types of message queues from the dictionary of the sending task;
step5, judging whether the message queue is empty, if so, executing Step4, otherwise, executing Step6;
step6, sequentially taking out the messages from the message queue until the queue is empty, and recording the last message task in the queue (in order to avoid repeated transmission of a large number of identical instructions in a short time, the operation only transmits the last message task, such as a rolling slide bar for adjusting the volume, and a large number of volume adjustment instructions can be generated in the process);
step7, checking whether a minimum transmission interval between two messages is set, and if so, opening a transmission task timer;
step8, executing a transmission task;
step9, checking whether a minimum transmission interval between two messages is set, if a stop transmission task timer is set, calculating the time needed to continue waiting (needed to continue waiting time = minimum transmission interval between two messages-actual transmission time), otherwise executing Step4;
step10, if the difference value is greater than 0, waiting for a time period of the corresponding difference value, otherwise executing Step4;
step11, re-execute Step4.
According to the technical scheme provided by the embodiment of the invention, at least one message type queue in the preset upper computer is obtained; according to the message receiving time of the message to be sent, all the messages to be sent in the target message type queue are arranged to obtain a message sequence to be processed; taking the message with the latest message receiving time in the message sequence to be processed as a target sending message, and deleting other messages to be sent except the target sending message in the target message type queue; under the condition that the preset sending interval duration is not zero, determining the target sending waiting duration according to the sending occupied duration of the last sending message corresponding to the target sending message and the preset sending interval duration; and under the condition that the target sending waiting time is zero, sending the target sending message to a preset lower computer. The technical scheme of the embodiment of the invention solves the problems that the prior upper computer does not process the received messages, but independently transmits each message, so that the upper computer transmits a plurality of repeated messages and system faults are easy to occur, can filter and screen the messages of the same type, reduces the workload of message transmission of the upper computer, and improves the message transmission efficiency.
Fig. 4 is a schematic structural diagram of a message sending management device provided by the embodiment of the present invention, where the embodiment of the present invention is applicable to a scenario in which an upper computer software sends an instruction message to a lower computer, and especially in a scenario in which the lower computer has weak message processing capability and needs a fixed duration interval to correctly process an instruction of the upper computer, the device may be implemented by software and/or hardware, and is integrated in a computer device with an application development function.
As shown in fig. 4, the message transmission management apparatus includes: a message type queue acquisition module 310 and a target message sending module 320.
The message type queue obtaining module 310 is configured to obtain at least one message type queue in a preset upper computer, where the message type queue includes at least one message to be sent, and in a case that there are multiple messages to be sent, the message types corresponding to the multiple messages to be sent are the same; the target message sending module 320 is configured to determine a target sending message according to a message acquisition sequence of each message to be sent in the target message type queue, and send the target sending message to a preset lower computer.
According to the technical scheme provided by the embodiment of the invention, at least one message type queue in the preset upper computer is obtained, wherein the message type queue comprises at least one message to be sent, and the message types corresponding to the messages to be sent are the same when the messages to be sent exist; and determining a target sending message according to the message acquisition sequence of each message to be sent in the target message type queue, and sending the target sending message to a preset lower computer. The technical scheme of the embodiment of the invention solves the problems that the prior upper computer does not process the received messages, but independently transmits each message, so that the upper computer transmits a plurality of repeated messages and system faults are easy to occur, can filter and screen the messages of the same type, reduces the workload of message transmission of the upper computer, and improves the message transmission efficiency.
In an alternative embodiment, the target message sending module 320 includes: a target message determination submodule for: according to the message receiving time of the message to be sent, all the messages to be sent in the target message type queue are arranged to obtain a message sequence to be processed; and taking the message with the latest message receiving time in the message sequence to be processed as the target sending message, and deleting other messages to be sent except the target sending message in the target message type queue.
In an alternative embodiment, the target message sending module 320 includes: a message sending sub-module for: under the condition that the preset sending interval duration is not zero, determining a target sending waiting duration according to the sending occupied duration of the last sending message corresponding to the target sending message and the preset sending interval duration; and under the condition that the target sending waiting time is zero, sending the target sending message to a preset lower computer.
In an alternative embodiment, the messaging submodule includes: a transmission waiting time length determining unit configured to: timing when the transmission of the last transmission message starts, and determining the transmission occupied time length according to the time length occupied by the last transmission message from the transmission start to the transmission end; and performing difference between the preset sending interval duration and the sending occupied duration, and taking the obtained difference value as the target sending waiting duration.
In an alternative embodiment, the message transmission management apparatus further includes: message queue switching module for: after the target sending message is sent to a preset lower computer, the target message type queue is replaced by a message type queue adjacent to the target message type queue, the target sending message in the target message type queue is determined, and the target sending message is sent to the preset lower computer.
In an alternative embodiment, the message transmission management apparatus further includes: message queue switching module for: under the condition that the message to be sent is obtained, determining a corresponding message type according to the message attribute information of the message to be sent; and according to the message type, moving the message to be sent to a message type queue corresponding to the message type.
In an alternative embodiment, the messaging sub-module is further configured to: and under the condition that the target transmission waiting time is not zero, waiting for the same time as the target transmission waiting time and then transmitting the target transmission message to a preset lower computer.
The message sending management device provided by the embodiment of the invention can execute the message sending management method provided by any embodiment of the invention, and has the corresponding functional modules and beneficial effects of the execution method.
Fig. 5 is a schematic structural diagram of a computer device according to an embodiment of the present invention. Fig. 5 illustrates a block diagram of an exemplary computer device 12 suitable for use in implementing embodiments of the present invention. The computer device 12 shown in fig. 5 is merely an example and should not be construed as limiting the functionality and scope of use of embodiments of the present invention. The computer device 12 may be any terminal device with computing power and may be configured in a messaging management device.
As shown in FIG. 5, the computer device 12 is in the form of a general purpose computing device. Components of computer device 12 may include, but are not limited to: one or more processors or processing units 16, a system memory 28, a bus 18 that connects the various system components, including the system memory 28 and the processing units 16.
Bus 18 may be one or more of several types of bus structures including a memory bus or memory controller, a peripheral bus, an accelerated graphics port, a processor, or a local bus using any of a variety of bus architectures. By way of example, and not limitation, such architectures include Industry Standard Architecture (ISA) bus, micro channel architecture (MAC) bus, enhanced ISA bus, video Electronics Standards Association (VESA) local bus, and Peripheral Component Interconnect (PCI) bus.
Computer device 12 typically includes a variety of computer system readable media. Such media can be any available media that is accessible by computer device 12 and includes both volatile and nonvolatile media, removable and non-removable media.
The system memory 28 may include computer system readable media in the form of volatile memory, such as Random Access Memory (RAM) 30 and/or cache memory 32. The computer device 12 may further include other removable/non-removable, volatile/nonvolatile computer system storage media. By way of example only, storage system 34 may be used to read from or write to non-removable, nonvolatile magnetic media (not shown in FIG. 5, commonly referred to as a "hard disk drive"). Although not shown in fig. 5, a magnetic disk drive for reading from and writing to a removable non-volatile magnetic disk (e.g., a "floppy disk"), and an optical disk drive for reading from or writing to a removable non-volatile optical disk (e.g., a CD-ROM, DVD-ROM, or other optical media) may be provided. In such cases, each drive may be coupled to bus 18 through one or more data medium interfaces. The system memory 28 may include at least one program product having a set (e.g., at least one) of program modules configured to carry out the functions of the embodiments of the invention.
A program/utility 40 having a set (at least one) of program modules 42 may be stored in, for example, system memory 28, such program modules 42 including, but not limited to, an operating system, one or more application programs, other program modules, and program data, each or some combination of which may include an implementation of a network environment. Program modules 42 generally perform the functions and/or methods of the embodiments described herein.
The computer device 12 may also communicate with one or more external devices 14 (e.g., keyboard, pointing device, display 24, etc.), one or more devices that enable a user to interact with the computer device 12, and/or any devices (e.g., network card, modem, etc.) that enable the computer device 12 to communicate with one or more other computing devices. Such communication may occur through an input/output (I/O) interface 22. Moreover, computer device 12 may also communicate with one or more networks such as a Local Area Network (LAN), a Wide Area Network (WAN) and/or a public network, such as the Internet, through network adapter 20. As shown in fig. 5, the network adapter 20 communicates with other modules of the computer device 12 via the bus 18. It should be appreciated that although not shown in fig. 5, other hardware and/or software modules may be used in connection with computer device 12, including, but not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, data backup storage systems, and the like.
The processing unit 16 executes various functional applications and data processing by running a program stored in the system memory 28, for example, implementing a message transmission management method provided by the present embodiment, the method including:
acquiring at least one message type queue in a preset upper computer, wherein the message type queue comprises at least one message to be sent, and the message types corresponding to the messages to be sent are the same when a plurality of messages to be sent exist;
and determining a target sending message according to the message acquisition sequence of each message to be sent in the target message type queue, and sending the target sending message to a preset lower computer.
The present embodiment provides a computer-readable storage medium having stored thereon a computer program which, when executed by a processor, implements a message transmission management method as provided by any embodiment of the present invention, including:
acquiring at least one message type queue in a preset upper computer, wherein the message type queue comprises at least one message to be sent, and the message types corresponding to the messages to be sent are the same when a plurality of messages to be sent exist;
and determining a target sending message according to the message acquisition sequence of each message to be sent in the target message type queue, and sending the target sending message to a preset lower computer.
The computer storage media of embodiments of the invention may take the form of any combination of one or more computer-readable media. The computer readable medium may be a computer readable signal medium or a computer readable storage medium. The computer readable storage medium may 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 foregoing. More specific examples (a non-exhaustive list) of the computer-readable storage medium would include the following: an electrical connection having one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In this document, a computer readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device.
The computer readable signal medium may include a propagated data signal with computer readable program code embodied therein, either in baseband or as part of a carrier wave. Such a propagated data signal may take any of a variety of forms, including, but not limited to, electro-magnetic, optical, or any suitable combination of the foregoing. A computer readable signal medium may also be any computer readable medium that is not a computer readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device.
Program code embodied on a computer readable medium may be transmitted using any appropriate medium, including but not limited to: wireless, wire, fiber optic cable, RF, etc., or any suitable combination of the foregoing.
Computer program code for carrying out operations of the present invention may be written in one or more programming languages, including an object oriented programming language such as Java, smalltalk, C ++ and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code may execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer or entirely on the remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any kind of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or may be connected to an external computer (for example, through the Internet using an Internet service provider).
It will be appreciated by those of ordinary skill in the art that the modules or steps of the invention described above may be implemented in a general purpose computing device, they may be centralized on a single computing device, or distributed over a network of computing devices, or they may alternatively be implemented in program code executable by a computer device, such that they are stored in a memory device and executed by the computing device, or they may be separately fabricated as individual integrated circuit modules, or multiple modules or steps within them may be fabricated as a single integrated circuit module. Thus, the present invention is not limited to any specific combination of hardware and software.
Note that the above is only a preferred embodiment of the present invention and the technical principle applied. It will be understood by those skilled in the art that the present invention is not limited to the particular embodiments described herein, but is capable of various obvious changes, rearrangements and substitutions as will now become apparent to those skilled in the art without departing from the scope of the invention. Therefore, while the invention has been described in connection with the above embodiments, the invention is not limited to the embodiments, but may be embodied in many other equivalent forms without departing from the spirit or scope of the invention, which is set forth in the following claims.

Claims (10)

1. A message transmission management method, applied to an upper computer, comprising:
acquiring at least one message type queue in a preset upper computer, wherein the message type queue comprises at least one message to be sent, and the message types corresponding to the messages to be sent are the same when a plurality of messages to be sent exist;
and determining a target sending message according to the message acquisition sequence of each message to be sent in the target message type queue, and sending the target sending message to a preset lower computer.
2. The method of claim 1, wherein the determining the target message according to the message acquisition order of each message to be sent in the target message type queue comprises:
according to the message receiving time of the message to be sent, all the messages to be sent in the target message type queue are arranged to obtain a message sequence to be processed;
and taking the message with the latest message receiving time in the message sequence to be processed as the target sending message, and deleting other messages to be sent except the target sending message in the target message type queue.
3. The method of claim 2, wherein the sending the target send message to a preset lower computer comprises:
under the condition that the preset sending interval duration is not zero, determining a target sending waiting duration according to the sending occupied duration of the last sending message corresponding to the target sending message and the preset sending interval duration;
and under the condition that the target sending waiting time is zero, sending the target sending message to a preset lower computer.
4. The method of claim 3, wherein the determining the target transmission waiting time period according to the transmission occupied time period of the last transmission message corresponding to the target transmission message and the preset transmission interval time period includes:
timing when the transmission of the last transmission message starts, and determining the transmission occupied time length according to the time length occupied by the last transmission message from the transmission start to the transmission end;
and performing difference between the preset sending interval duration and the sending occupied duration, and taking the obtained difference value as the target sending waiting duration.
5. The method of claim 1, wherein after the sending the target send message to a preset lower computer, further comprising:
and replacing the target message type queue with a message type queue adjacent to the target message type queue, determining a target sending message in the target message type queue, and sending the target sending message to the preset lower computer.
6. The method according to claim 1, wherein the method further comprises:
under the condition that the message to be sent is obtained, determining a corresponding message type according to the message attribute information of the message to be sent;
and according to the message type, moving the message to be sent to a message type queue corresponding to the message type.
7. A method according to claim 3, characterized in that the method further comprises:
and under the condition that the target transmission waiting time is not zero, waiting for the same time as the target transmission waiting time and then transmitting the target transmission message to a preset lower computer.
8. A message transmission management apparatus, applied to an upper computer, comprising:
the message type queue acquisition module is used for acquiring at least one message type queue in a preset upper computer, wherein the message type queue comprises at least one message to be sent, and the message types corresponding to the messages to be sent are the same when the messages to be sent exist;
and the target message sending module is used for determining target sending messages according to the message acquisition sequence of each message to be sent in the target message type queue and sending the target sending messages to a preset lower computer.
9. A computer device, the computer device comprising:
one or more processors;
a memory for storing one or more programs;
the one or more programs, when executed by the one or more processors, cause the one or more processors to implement the messaging management method of any of claims 1-7.
10. A computer-readable storage medium, on which a computer program is stored, characterized in that the program, when executed by a processor, implements a message transmission management method according to any one of claims 1 to 7.
CN202311680825.8A 2023-12-07 2023-12-07 Message sending management method, device, equipment and storage medium Pending CN117667456A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202311680825.8A CN117667456A (en) 2023-12-07 2023-12-07 Message sending management method, device, equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202311680825.8A CN117667456A (en) 2023-12-07 2023-12-07 Message sending management method, device, equipment and storage medium

Publications (1)

Publication Number Publication Date
CN117667456A true CN117667456A (en) 2024-03-08

Family

ID=90069532

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202311680825.8A Pending CN117667456A (en) 2023-12-07 2023-12-07 Message sending management method, device, equipment and storage medium

Country Status (1)

Country Link
CN (1) CN117667456A (en)

Similar Documents

Publication Publication Date Title
CN108537543B (en) Parallel processing method, device, equipment and storage medium for blockchain data
US20130041937A1 (en) Pre-fetching data
CN103970520A (en) Resource management method and device in MapReduce framework and framework system with device
CN107341062B (en) Data pushing method, device, equipment and storage medium
CN111367687A (en) Inter-process data communication method and device
US20210311891A1 (en) Handling an input/output store instruction
CN113366433A (en) Handling input/output store instructions
CN110851276A (en) Service request processing method, device, server and storage medium
CN109284108B (en) Unmanned vehicle data storage method and device, electronic equipment and storage medium
CN112395097A (en) Message processing method, device, equipment and storage medium
CN114706820B (en) Scheduling method, system, electronic device and medium for asynchronous I/O request
US9940269B2 (en) Conditionally releasing locks in response to requests
CN112925796A (en) Write consistency control method, device, equipment and storage medium
US8707449B2 (en) Acquiring access to a token controlled system resource
CN111596864A (en) Method, device, server and storage medium for data delayed deletion
US9645637B2 (en) Managing a free list of resources to decrease control complexity and reduce power consumption
CN109032821B (en) Automatic driving subject message processing method, device, equipment and storage medium
CN117667456A (en) Message sending management method, device, equipment and storage medium
CN115878333A (en) Method, device and equipment for judging consistency between process groups
CN113760950B (en) Index data query method, device, electronic equipment and storage medium
CN116627495A (en) Information interaction method, system, device, equipment and medium
CN111405015B (en) Data processing method, device, equipment and storage medium
CN117093335A (en) Task scheduling method and device for distributed storage system
CN114036195A (en) Data request processing method, device, server and storage medium
CN112181737A (en) Message processing method and device, electronic equipment and medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination