Communication scheduling method and device, computer equipment, computer readable storage medium and computer program product
By dynamically adjusting the scheduling weight of the communication channel and configuring the priority scheduling identifier in the communication network, the problem of low communication scheduling reliability under the polling algorithm is solved, and more efficient and reliable communication scheduling is achieved.
Patent Information
- Application Number
- CN202411721686.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-28
- Publication Date
- 2025-02-25
- Estimated Expiration
- 2044-11-28
AI Technical Summary
In the existing communication scheduling methods, the polling algorithm causes the load difference and dynamic changes of the communication channel to be not effectively considered, resulting in low reliability of communication scheduling.
By dynamically adjusting the scheduling weight of each communication channel in multiple communication channels of the communication network, and configuring a priority scheduling identity according to the scheduling weight, the target communication channel is determined in the multiple candidate communication channels for scheduling.
By dynamically adjusting the scheduling weights and configuring the priority scheduling identifiers, fully considering the load differences and changes of the communication channel, the reliability of communication scheduling is improved, and the probability of congestion and packet loss of communication messages is reduced.
Smart Images

Figure CN119520435A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of communication technology, and in particular to a communication scheduling method, apparatus, computer equipment, computer-readable storage medium, and computer program product. Background Art
[0002] Communication scheduling refers to the process of determining the order in which communication messages are sent in a communication network in order to improve the performance and communication efficiency of the communication network.
[0003] In the related art, a polling algorithm is usually used for scheduling. However, in the polling algorithm, all communication channels are treated fairly, but the loads of different communication channels are different and the loads are in dynamic change, which leads to low reliability of communication scheduling. Summary of the invention
[0004] Based on this, it is necessary to provide a communication scheduling method, apparatus, computer equipment, computer-readable storage medium and computer program product that can improve the reliability of communication scheduling in order to address the technical problem of low reliability of the above-mentioned communication scheduling.
[0005] In a first aspect, the present application provides a communication scheduling method, comprising:
[0006] Determining a communication channel to be scheduled among multiple communication channels of a communication network;
[0007] In the case where there are multiple communication channels to be scheduled, a candidate communication channel configured with a priority scheduling identifier is determined among the multiple communication channels to be scheduled; the priority scheduling identifier is configured according to the scheduling weight of each communication channel, and the scheduling weight of each communication channel is dynamically adjusted according to the communication message in the communication channel and the scheduling situation of the communication channel;
[0008] A target communication channel is determined from each candidate communication channel, the target communication channel is scheduled, and a priority scheduling flag of the target communication channel is reset.
[0009] In one of the embodiments, determining a communication channel to be scheduled among multiple communication channels of a communication network includes:
[0010] Among the multiple communication channels, a communication channel in which a communication message to be sent exists and the communication message to be sent carries sideband information is determined as the communication channel to be scheduled.
[0011] In one embodiment, the method further comprises:
[0012] For each communication channel, when the communication channel receives a communication message, determining the existence of a start data packet and an end data packet in the communication message;
[0013] In the case that the start data packet or the end data packet does not exist, it is determined that the communication message is abnormal and the communication message is discarded.
[0014] In one embodiment, the method further comprises:
[0015] For each communication channel, when a communication message is received by the communication channel, determining a message length of the communication message;
[0016] When the message length is less than a preset message length threshold, it is determined that the communication message is abnormal and the communication message is discarded.
[0017] In one of the embodiments, the priority dispatch indicator is configured in the following manner:
[0018] For each communication channel, determining a scheduling weight of the communication channel;
[0019] When the scheduling weight of the communication channel is greater than or equal to a first preset weight threshold and the communication channel is not configured with a priority scheduling identifier, configuring the priority scheduling identifier for the communication channel;
[0020] When the scheduling weight of the communication channel is less than or equal to the second preset weight threshold and the communication channel is configured with a priority scheduling flag, resetting the priority scheduling flag of the communication channel;
[0021] Among them, the first preset weight threshold is greater than the second preset weight threshold.
[0022] In one embodiment, the scheduling weight of each communication channel is dynamically adjusted in the following manner:
[0023] For each communication channel, when the communication channel receives a communication message, increase the scheduling weight of the communication channel;
[0024] In the case where the communication channel is scheduled, reducing the scheduling weight of the communication channel.
[0025] In a second aspect, the present application also provides a communication scheduling device, including:
[0026] A first channel determination module, used to determine a communication channel to be scheduled among multiple communication channels of the communication network;
[0027] A second channel determination module is used to determine, when there are multiple communication channels to be scheduled, a candidate communication channel configured with a priority scheduling identifier among the multiple communication channels to be scheduled; the priority scheduling identifier is configured according to the scheduling weight of each communication channel, and the scheduling weight of each communication channel is dynamically adjusted according to the communication message in the communication channel and the scheduling situation of the communication channel;
[0028] The communication channel scheduling module is used to determine a target communication channel from each candidate communication channel, schedule the target communication channel, and reset the priority scheduling flag of the target communication channel.
[0029] In a third aspect, the present application further provides a computer device, including a memory and a processor, wherein the memory stores a computer program, and when the processor executes the computer program, the following steps are implemented:
[0030] Determining a communication channel to be scheduled among multiple communication channels of a communication network;
[0031] In the case where there are multiple communication channels to be scheduled, a candidate communication channel configured with a priority scheduling identifier is determined among the multiple communication channels to be scheduled; the priority scheduling identifier is configured according to the scheduling weight of each communication channel, and the scheduling weight of each communication channel is dynamically adjusted according to the communication message in the communication channel and the scheduling situation of the communication channel;
[0032] A target communication channel is determined from each candidate communication channel, the target communication channel is scheduled, and a priority scheduling flag of the target communication channel is reset.
[0033] In a fourth aspect, the present application further provides a computer-readable storage medium having a computer program stored thereon, wherein when the computer program is executed by a processor, the following steps are implemented:
[0034] Determining a communication channel to be scheduled among multiple communication channels of a communication network;
[0035] In the case where there are multiple communication channels to be scheduled, a candidate communication channel configured with a priority scheduling identifier is determined among the multiple communication channels to be scheduled; the priority scheduling identifier is configured according to the scheduling weight of each communication channel, and the scheduling weight of each communication channel is dynamically adjusted according to the communication message in the communication channel and the scheduling situation of the communication channel;
[0036] A target communication channel is determined from each candidate communication channel, the target communication channel is scheduled, and a priority scheduling flag of the target communication channel is reset.
[0037] In a fifth aspect, the present application further provides a computer program product, including a computer program, which implements the following steps when executed by a processor:
[0038] Determining a communication channel to be scheduled among multiple communication channels of a communication network;
[0039] In the case where there are multiple communication channels to be scheduled, a candidate communication channel configured with a priority scheduling identifier is determined among the multiple communication channels to be scheduled; the priority scheduling identifier is configured according to the scheduling weight of each communication channel, and the scheduling weight of each communication channel is dynamically adjusted according to the communication message in the communication channel and the scheduling situation of the communication channel;
[0040] A target communication channel is determined from each candidate communication channel, the target communication channel is scheduled, and a priority scheduling flag of the target communication channel is reset.
[0041] The above communication scheduling method, device, computer equipment, computer-readable storage medium and computer program product first determine a communication channel to be scheduled among multiple communication channels of a communication network; then, in the case that there are multiple communication channels to be scheduled, determine a candidate communication channel configured with a priority scheduling identifier among the multiple communication channels to be scheduled; the priority scheduling identifier is configured according to the scheduling weight of each communication channel, and the scheduling weight of each communication channel is dynamically adjusted according to the communication message in the communication channel and the scheduling situation of the communication channel; then, determine the target communication channel from each candidate communication channel, schedule the target communication channel, and reset the priority scheduling identifier of the target communication channel. In this way, the scheduling weight of each communication channel can be dynamically adjusted through the communication message in each communication channel and the scheduling situation of each communication channel, and the priority scheduling identifier can be configured for the communication channel based on the dynamic scheduling weight of the communication, and then the target communication channel can be determined among multiple communication channels to realize communication scheduling; the communication scheduling based on the above process can fully consider the load difference and load change of the communication channel by dynamically adjusting the determined scheduling weight and priority scheduling identifier based on the communication message in the communication channel and the scheduling situation, thereby improving the reliability of communication scheduling. BRIEF DESCRIPTION OF THE DRAWINGS
[0042] In order to more clearly illustrate the technical solutions in the embodiments of the present application or related technologies, the drawings required for use in the embodiments of the present application or related technical descriptions will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other related drawings can be obtained based on these drawings without paying creative work.
[0043] FIG1 is an application environment diagram of a communication scheduling method in one embodiment;
[0044] FIG2 is a flow chart of a communication scheduling method in one embodiment;
[0045] FIG3 is a flow chart of steps for determining a communication channel to be scheduled among multiple communication channels of a communication network in one embodiment;
[0046] FIG4 is a flow chart of steps for filtering received communication messages in one embodiment;
[0047] FIG5 is a flow chart of the steps of filtering received communication messages in another embodiment;
[0048] FIG6 is a flow chart showing steps of configuring a priority scheduling identifier for a communication channel in one embodiment;
[0049] FIG7 is a flow chart of the steps of dynamically adjusting the scheduling weight of a communication channel in one embodiment;
[0050] FIG8 is a flow chart of a communication scheduling method in another embodiment;
[0051] FIG9 is a schematic diagram of a process of multi-port balanced scheduling of network messages in one embodiment;
[0052] FIG10 is a block diagram of a communication scheduling device in one embodiment;
[0053] FIG. 11 is a diagram showing the internal structure of a computer device in one embodiment. DETAILED DESCRIPTION
[0054] In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.
[0055] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of relevant data must comply with relevant regulations.
[0056] The communication scheduling method provided in the embodiment of the present application can be applied to the application environment shown in Figure 1. The application environment is a communication scheduling system, which includes multiple communication channels, a scheduler and a data integration unit; referring to Figure 1, each communication channel is composed of an input interface, a filter and a data storage unit.
[0057] In specific applications, the communication dispatching system is installed on the server. The server can be an independent physical server, a server cluster or distributed system composed of multiple physical servers, or a cloud server that provides cloud computing services. The terminal can be, but is not limited to, various personal computers, laptops, smart phones, tablets, IoT devices and portable wearable devices. IoT devices can be smart speakers, smart TVs, smart air conditioners, smart car devices, projection devices, etc. Portable wearable devices can be smart watches, smart bracelets, head-mounted devices, etc. Head-mounted devices can be virtual reality (VR) devices, augmented reality (AR) devices, smart glasses, etc.
[0058] Specifically, a scheduler in a communication scheduling system first determines a communication channel to be scheduled among multiple communication channels of a communication network; then, when there are multiple communication channels to be scheduled, the scheduler determines a candidate communication channel configured with a priority scheduling identifier among the multiple communication channels to be scheduled; the priority scheduling identifier is configured according to the scheduling weight of each communication channel, and the scheduling weight of each communication channel is dynamically adjusted according to the communication messages in the communication channel and the scheduling status of the communication channel; then, the scheduler determines a target communication channel from each candidate communication channel, schedules the target communication channel, and resets the priority scheduling identifier of the target communication channel.
[0059] In a specific application, after the target communication channel is scheduled, the communication messages therein will be integrated and transmitted in the data integration unit of the communication scheduling system.
[0060] In an exemplary embodiment, as shown in FIG2 , a communication scheduling method is provided. Communication scheduling refers to the process of determining the order of sending communication messages in a communication network to improve the performance and communication efficiency of the communication network. Taking the application of the communication scheduling method to the communication scheduling system in FIG1 as an example, each communication scheduling includes the following steps S202 to S206:
[0061] Step S202: determining a communication channel to be scheduled among multiple communication channels of the communication network.
[0062] Referring to FIG. 1 , in the communication scheduling system, there are multiple communication channels of the communication network.
[0063] The communication channel to be scheduled refers to a communication channel among multiple communication channels, in which there are communication messages to be sent, and the existing communication messages are normal communication messages.
[0064] Specifically, referring to FIG. 1 , the scheduler determines, among multiple communication channels, a communication channel in which there are communication messages to be sent and the existing communication messages are normal communication messages, as a communication channel to be scheduled.
[0065] Step S204: when there are multiple communication channels to be scheduled, determine a candidate communication channel configured with a priority scheduling identifier among the multiple communication channels to be scheduled.
[0066] The priority dispatch flag is used to indicate that the corresponding communication channel has priority in the communication dispatch; the priority dispatch flag is configured according to the dispatch weight of each communication channel. In a specific application, the scheduler can configure the priority dispatch flag for the communication channel with a higher dispatch weight.
[0067] Among them, the scheduling weight is used to characterize the priority of the corresponding communication channel in the communication scheduling. For example, the higher the priority of the communication channel, the higher the scheduling weight; the scheduling weight of each communication channel is dynamically adjusted according to the communication messages in the communication channel and the scheduling of the communication channel. In a specific application, the scheduler can dynamically adjust the scheduling weight of the dynamic communication channel based on the communication messages in the communication channel, including but not limited to the number of communication messages, the importance of the communication messages, whether there are new communication messages, and the scheduling of the communication channel, such as whether the communication channel has been scheduled, the number of times the communication channel has been scheduled, and other information.
[0068] Specifically, referring to FIG. 1 , after determining the communication channels to be scheduled, the scheduler determines the number of communication channels to be scheduled. If there are multiple communication channels to be scheduled, the scheduler determines the communication channels to be scheduled that are configured with priority scheduling identifiers among the multiple communication channels to be scheduled as candidate communication channels.
[0069] For example, assuming that there are 5 communication channels, namely communication channel A, communication channel B, communication channel C, communication channel D and communication channel E, among which the communication channels to be scheduled are communication channel C, communication channel D and communication channel E, then the scheduler determines the communication channel configured with a priority scheduling identifier among communication channel C, communication channel D and communication channel E.
[0070] Step S206: determine a target communication channel from the candidate communication channels, schedule the target communication channel, and reset the priority scheduling flag of the target communication channel.
[0071] Among them, resetting the priority scheduling flag refers to clearing the priority scheduling flag, that is, canceling the priority scheduling flag.
[0072] Specifically, referring to FIG. 1 , after determining the candidate communication channels, the scheduler determines the number of candidate communication channels; if there is one candidate communication channel, the scheduler uses it as the target communication channel; if there are multiple candidate communication channels, the scheduler uses any one of the candidate communication channels as the target communication channel, or uses the candidate communication channel with the smallest corresponding channel number among the multiple candidate communication channels as the target communication channel; after determining the target communication channel, the scheduler schedules the target communication channel, that is, processes and transmits the communication messages in the target communication channel, and after scheduling the target communication channel, clears the priority scheduling flag of the target communication channel to avoid scheduling the same communication channel multiple times in a row or multiple times in a short period of time.
[0073] For example, assuming that among communication channel C, communication channel D and communication channel E, communication channel D and communication channel E are both configured with priority scheduling identifiers, then the scheduler compares the channel numbers of communication channel D and communication channel E, and determines the communication channel with the smallest channel number as the target communication channel.
[0074] In the above communication scheduling method, first, the communication scheduling system determines the communication channel to be scheduled among multiple communication channels of the communication network; then, when there are multiple communication channels to be scheduled, the communication scheduling system determines the candidate communication channel configured with the priority scheduling identifier among the multiple communication channels to be scheduled; the priority scheduling identifier is configured according to the scheduling weight of each communication channel, and the scheduling weight of each communication channel is dynamically adjusted according to the communication message in the communication channel and the scheduling situation of the communication channel; then, the communication scheduling system determines the target communication channel from each candidate communication channel, schedules the target communication channel, and resets the priority scheduling identifier of the target communication channel. In this way, the scheduling weight of each communication channel can be dynamically adjusted through the communication message in each communication channel and the scheduling situation of each communication channel, and the priority scheduling identifier can be configured for the communication channel based on the dynamic scheduling weight of the communication, and then the target communication channel can be determined among the multiple communication channels to realize communication scheduling; the communication scheduling based on the above process can fully consider the load difference and load change of the communication channel by dynamically adjusting the determined scheduling weight and priority scheduling identifier based on the communication message in the communication channel and the scheduling situation, thereby improving the reliability of communication scheduling.
[0075] Furthermore, the above communication scheduling method makes the overall scheduling more in line with the actual load situation, reduces the probability of congestion and packet loss caused by high-speed input of communication messages, and improves scheduling efficiency.
[0076] In an exemplary embodiment, in the above step S202, after determining the communication channel to be scheduled among multiple communication channels of the communication network, the following contents are specifically included: when there is only one communication channel to be scheduled, determining the communication channel to be scheduled as the target communication channel, and scheduling the target communication channel.
[0077] In an exemplary embodiment, after the target communication channel is scheduled in the above step, the following steps are specifically included: if the target communication channel is configured with a priority scheduling flag, the priority scheduling flag of the target communication channel is reset.
[0078] In an exemplary embodiment, after the target communication channel is scheduled in the above step, the following contents are specifically included: returning to step S202, determining a communication channel to be scheduled among multiple communication channels of the communication network, and performing the next communication scheduling.
[0079] In an exemplary embodiment, in the above step S202, after determining the communication channel to be scheduled among multiple communication channels of the communication network, the following content is specifically included: if there is no candidate communication channel among the communication channels to be scheduled, scheduling each candidate communication channel based on a polling algorithm.
[0080] In an exemplary embodiment, the above step S202, determining a communication channel to be scheduled among multiple communication channels of a communication network, specifically includes the following contents: determining, among multiple communication channels, a communication channel in which there are communication messages to be sent and the communication messages to be sent carry sideband information as the communication channel to be scheduled.
[0081] The communication message to be sent refers to the communication message at the first position in the communication channel.
[0082] The sideband information refers to the auxiliary information in the communication message in addition to the main data content, which is usually used to manage, control and ensure various functions of communication transmission. In specific applications, under normal circumstances, the communication message will carry sideband information.
[0083] Specifically, referring to Figure 1, the scheduler determines, as a communication channel to be scheduled, a communication channel among multiple communication channels in which there is a communication message to be sent and the communication message to be sent carries sideband information. That is, the communication channel to be scheduled is a communication channel among multiple communication channels in which the channel is not empty and the sideband information of the first communication message is not empty.
[0084] As shown in FIG3 , the above step S302, in which a first communication channel having a communication message to be sent is determined among multiple communication channels, specifically further includes the following steps:
[0085] Step S304: in each first communication channel, determine the second communication channel in which the communication message to be sent carries the sideband information.
[0086] Step S306: determine each second communication channel as a communication channel to be scheduled.
[0087] Specifically, referring to Figure 1, first, the scheduler determines, among multiple communication channels, a communication channel in which there is a communication message to be sent as a first communication channel; then, the scheduler determines, among the first communication channels, a first communication channel in which there is a communication message carrying sideband information as a second communication channel; finally, the scheduler determines the second communication message as the communication channel to be scheduled.
[0088] For example, it is assumed that there are five communication channels, namely communication channel A, communication channel B, communication channel C, communication channel D and communication channel E.
[0089] If there is no communication message in communication channel A, that is, communication channel A is empty, the scheduler will first exclude communication channel A from consideration during scheduling.
[0090] If there are communication messages in communication channel B, but the sideband information of the first communication message is empty, since under normal circumstances, communication messages will carry sideband information, the scheduler can determine that the communication message is an abnormal communication message, and thus exclude communication channel B from consideration for scheduling.
[0091] If communication channel C, communication channel D and communication channel E are not empty, and the first communication messages thereof carry sideband information, then the scheduler determines communication channel C, communication channel D and communication channel E as communication channels to be scheduled.
[0092] In this embodiment, the scheduler first excludes empty communication channels by judging whether there are communication messages to be sent in the communication channel, so as to avoid scheduling empty communication channels and wasting communication resources; by judging whether the communication messages to be sent in the communication channel carry sideband information, the scheduler further excludes communication channels where the corresponding communication messages to be sent are abnormal communication messages, so as to avoid transmitting abnormal communication messages and wasting communication resources; based on the above two exclusions, normal communication channels can be screened out from multiple communication channels for scheduling.
[0093] In an exemplary embodiment, as shown in FIG. 4 , the communication scheduling method provided by the present application further includes the following steps for filtering the received communication messages:
[0094] Step S402: for each communication channel, when the communication channel receives a communication message, determining the existence of a start data packet and an end data packet in the communication message.
[0095] Step S404: when the start data packet or the end data packet does not exist, it is determined that the communication message is abnormal and the communication message is discarded.
[0096] The start data packet refers to the first data packet in the communication message; the end data packet refers to the last data packet in the communication message.
[0097] Referring to FIG. 1 , each communication channel is composed of an input interface, a filter and a data storage unit; the input interface is used to receive communication messages, the filter is used to filter the communication messages, and the data storage unit is used to cache the communication messages that pass the filtering.
[0098] The communication message enters the communication channel through the input interface of each communication channel; after entering the communication channel, the filter of the communication channel will filter the newly received communication message to determine whether the newly received communication message is a normal communication message or an abnormal communication message; if the newly received communication message is a normal communication message, the filter will cache it to the data storage unit of the communication channel and wait for scheduling; if the newly received communication message is an abnormal communication message, the filter will discard it.
[0099] Specifically, the filter filters the communication message as follows:
[0100] For a newly received communication message, the filter first determines whether there is a start data packet and an end data packet in the communication message. If there is no start data packet or no end data packet in the communication message, it means that the communication message data is lost, that is, the communication message is an abnormal communication message, and the filter discards the communication message; if there is both a start data packet and an end data packet in the communication message, it means that the communication message is a normal communication message and has passed the filtering of the filter, and the filter caches it in the data storage unit of the communication channel.
[0101] In specific applications, the communication message carries a start data packet signal sop and an end data packet signal eop; wherein the sop signal is used to indicate that the current data packet is a start data packet, and the eop signal is used to indicate that the current packet is an end data packet; the scheduler determines whether the communication message has a start data packet and an end data packet by whether the communication message carries the sop signal and the eop signal.
[0102] In this embodiment, the filter can determine whether the communication message is a normal communication message by the presence of the start data packet and the end data packet in the communication message, and avoid invalid transmission of abnormal communication messages by discarding abnormal communication messages, thereby avoiding waste of communication resources.
[0103] In an exemplary embodiment, as shown in FIG5 , the communication scheduling method provided by the present application further includes the following steps for filtering the received communication messages:
[0104] Step S502: for each communication channel, when the communication channel receives a communication message, determine the message length of the communication message.
[0105] Step S404: When the message length is less than a preset message length threshold, it is determined that the communication message is abnormal and the communication message is discarded.
[0106] Specifically, the filtering process of the filter on the communication message can also be as follows:
[0107] For a newly received communication message, the filter first determines the message length of the communication message; if the message length of the communication message is less than the preset message length threshold, that is, the message length of the communication message is too short, it means that the communication message is an abnormal communication message, and the filter discards the communication message; if the message length of the communication message is greater than or equal to the preset message length threshold, it means that the communication message is a normal communication message, which has passed the filtering of the filter, and the filter caches it to the data storage unit of the communication channel.
[0108] In actual applications, the preset message length threshold is 64 bytes.
[0109] In this embodiment, the filter can determine whether the communication message is a normal communication message by the message length of the communication message, and avoid invalid transmission of abnormal communication messages by discarding abnormal communication messages, thereby avoiding waste of communication resources.
[0110] In an exemplary embodiment, the specific process of the filter filtering the received communication messages also includes the following: for each communication channel, when the communication channel receives a communication message, determining the existence of a start data packet and an end data packet in the communication message, and determining the message length of the communication message; when the start data packet does not exist, or when the end data packet does not exist, or when the message length is less than a preset message length threshold, determining that the communication message is abnormal and discarding the communication message.
[0111] That is, in this embodiment, if the communication message contains both a start data packet and an end data packet, and its message length is greater than or equal to a preset message length threshold, it means that the communication message is a normal communication message.
[0112] In an exemplary embodiment, as shown in FIG6 , the communication scheduling method provided by the present application further includes the following steps for configuring a priority scheduling identifier for the communication channel:
[0113] Step S602: for each communication channel, determine the scheduling weight of the communication channel.
[0114] Step S604: When the scheduling weight of the communication channel is greater than or equal to the first preset weight threshold and the communication channel is not configured with a priority scheduling flag, a priority scheduling flag is configured for the communication channel.
[0115] Step S606: When the scheduling weight of the communication channel is less than or equal to the second preset weight threshold and the communication channel is configured with a priority scheduling flag, reset the priority scheduling flag of the communication channel.
[0116] Among them, the first preset weight threshold is greater than the second preset weight threshold.
[0117] Specifically, referring to Figure 1, for each communication channel, the scheduler monitors the scheduling weight of the communication channel in real time; if the scheduling weight of the communication channel is greater than or equal to the first preset weight threshold, and the communication channel has not been configured with a priority scheduling flag, the scheduler configures a priority scheduling flag for it; if the scheduling weight of the communication channel is less than or equal to the second preset weight threshold, and the communication channel has been configured with a priority scheduling flag, the scheduler clears its priority scheduling flag.
[0118] In this embodiment, the scheduler can configure a priority scheduling flag for a communication channel whose corresponding scheduling weight meets the priority scheduling condition by real-time monitoring of the scheduling weight of each communication channel, and can reset its priority scheduling flag when it no longer meets the priority scheduling condition. By configuring the priority scheduling flag based on the scheduling weight, the load difference and load change of the communication channel can be fully considered, thereby improving the reliability of communication scheduling.
[0119] In an exemplary embodiment, as shown in FIG. 7 , the communication scheduling method provided by the present application further includes the following steps for dynamically adjusting the scheduling weight of the communication channel:
[0120] Step S702: for each communication channel, when the communication channel receives a communication message, increase the scheduling weight of the communication channel.
[0121] Step S704: when the communication channel is scheduled, reduce the scheduling weight of the communication channel.
[0122] Specifically, referring to Figure 1, for each communication channel, the scheduler monitors the communication message reception status and the scheduling status of the communication channel in real time; if the communication channel has newly received a communication message, the scheduler increases the scheduling weight of the communication channel; if the communication channel has been scheduled, the scheduler reduces the scheduling weight of the communication channel.
[0123] In a specific application, referring to FIG1 , the scheduler may increase the scheduling weight of the communication channel when the communication message enters the communication channel through the input interface, or may increase the scheduling weight of the communication channel when the communication message is filtered and cached in the data storage unit through the filter.
[0124] In this embodiment, the scheduler can dynamically adjust the scheduling weight of the communication channel based on the communication message reception status of the communication channel and the scheduling status of the communication channel through real-time monitoring of each communication channel, thereby fully considering the load differences and load changes of the communication channel, thereby improving the reliability of communication scheduling.
[0125] In an exemplary embodiment, as shown in FIG8 , another communication scheduling method is provided, which is described by taking the method applied to the communication scheduling system shown in FIG1 as an example, and includes the following steps:
[0126] Step S802: Determine, among multiple communication channels, a first communication channel having a communication message to be sent.
[0127] Step S804: In each first communication channel, determine a second communication channel in which a communication message to be sent carries sideband information.
[0128] Step S806: determine each second communication channel as a communication channel to be scheduled.
[0129] Step S808: When there is only one communication channel to be scheduled, determine it as the target communication channel.
[0130] Step S810: When there are multiple communication channels to be scheduled, determine a candidate communication channel configured with a priority scheduling identifier among the multiple communication channels to be scheduled.
[0131] Step S812: When there is only one candidate communication channel, determine it as the target communication channel.
[0132] Step S814: when there are multiple candidate communication channels, determine a target communication channel from the candidate communication channels.
[0133] Step S816, scheduling the target communication channel, and if the target communication channel is configured with a priority scheduling flag, resetting its priority scheduling flag.
[0134] Step S818, return to step S802.
[0135] The priority scheduling identifier is configured according to the scheduling weight of each communication channel, and the scheduling weight of each communication channel is dynamically adjusted according to the communication messages in the communication channel and the scheduling status of the communication channel.
[0136] In this embodiment, the scheduling weight of each communication channel can be dynamically adjusted through the communication messages in each communication channel and the scheduling status of each communication channel. Based on the dynamic scheduling weight of the communication, a priority scheduling identifier can be configured for the communication channel, and then the target communication channel can be determined from multiple communication channels to achieve communication scheduling. The communication scheduling based on the above process can fully consider the load differences and load changes of the communication channels by dynamically adjusting the scheduling weights and priority scheduling identifiers determined based on the communication messages in the communication channels and the scheduling status, thereby improving the reliability of the communication scheduling.
[0137] In order to more clearly illustrate the communication scheduling method provided by the embodiment of the present application, the communication scheduling method is specifically described below with a specific embodiment, but it should be understood that the embodiment of the present application is not limited to this. As shown in Figure 9, in one of the exemplary embodiments, the present application also provides a network message multi-port balanced scheduling method, which is applied to the channel scheduling system shown in Figure 1, and specifically includes the following steps:
[0138] 1. Initialize the system and clear the weight values and priority flags of all communication channels.
[0139] 2. Adjust the weight value of each communication channel in real time, and configure a priority flag for the communication channel based on the weight value of the communication channel.
[0140] Specifically, when a communication message enters the communication channel, the system increases the weight value of the communication channel, and when the communication channel is scheduled, the system decreases the weight value of the communication channel.
[0141] Specifically, when the weight value of the communication channel is greater than or equal to the first preset weight threshold, if the communication channel is not configured with a priority flag, the system configures a priority flag for the communication channel; when the weight value of the communication channel is less than or equal to the second preset weight threshold, if the communication channel is configured with a priority flag, the system clears the priority flag of the communication channel.
[0142] 3. Each communication channel receives the communication message.
[0143] Specifically, the communication message carries corresponding data packets and sideband information.
[0144] 4. The scheduler determines whether there are any abnormalities in all communication channels and excludes the abnormal communication channels in subsequent scheduling.
[0145] In a specific application, the abnormal communication channel is empty or the sideband information therein is empty.
[0146] 5. The scheduler determines whether each communication channel has a priority flag.
[0147] Specifically, if a communication channel has a priority flag, the communication channel with the priority flag is directly scheduled, and if there are multiple communication channels with priority flags at the same time, the communication channel with a smaller channel number value is directly scheduled. Determine and eliminate abnormal communication channels.
[0148] 6. If there is no priority flag for all communication channels, the scheduler uses the polling algorithm to schedule normal communication channels;
[0149] 7. If the scheduled communication channel is configured with a priority flag, its priority flag will be cleared after this scheduling.
[0150] 8. Return to step 2 and repeat steps 2 to 7 above.
[0151] It should be noted that this embodiment is implemented based on a FPGA (Field Programmable Gate Array) chip and does not rely on logic circuits, thereby reducing the computing burden of a SOC chip (System on Chip) and being able to more flexibly handle the scheduling requirements of multiple channels as required.
[0152] In this embodiment, first, the communication message is input from the input interface of multiple communication channels, and enters the data storage unit for temporary storage after the abnormal network message is eliminated by the filter. Then the scheduler uses a multi-level weighted polling scheduling algorithm to schedule multiple communication channels, and takes out the data in the data storage unit of the corresponding channel and sends it to the data integration unit, and outputs it after caching and integration. This method can efficiently schedule multi-channel communication messages, realize the correspondence between multi-channel communication message input and one-channel communication message output, and filter abnormal messages, reducing the probability of message errors in communication. Secondly, the overall scheduling of this method is more in line with the actual situation of network load, and reduces the probability of congestion and packet loss caused by high-speed input of communication messages. The multi-level polling scheduling algorithm avoids polling channels with empty data, prevents time waste caused by scheduling empty channels, and improves scheduling efficiency.
[0153] It should be understood that, although the steps in the flowcharts involved in the above embodiments are displayed in sequence according to the indication of the arrows, these steps are not necessarily executed in sequence according to the order indicated by the arrows. Unless there is a clear explanation in this article, the execution of these steps is not strictly limited in order, and these steps can be executed in other orders. Moreover, at least a part of the steps in the flowcharts involved in the above embodiments may include multiple steps or multiple stages, and these steps or stages are not necessarily executed at the same time, but can be executed at different times, and the execution order of these steps or stages is not necessarily carried out in sequence, but can be executed in turn or alternately with other steps or at least a part of the steps or stages in other steps.
[0154] Based on the same inventive concept, the embodiment of the present application also provides a communication scheduling device for implementing the communication scheduling method involved above. The implementation scheme for solving the problem provided by the device is similar to the implementation scheme recorded in the above method, so the specific limitations in one or more communication scheduling device embodiments provided below can refer to the limitations on the communication scheduling method above, and will not be repeated here.
[0155] In an exemplary embodiment, as shown in FIG10 , a communication scheduling device is provided, including: a first channel determination module 1002, a second channel determination module 1004 and a communication channel scheduling module 1006, wherein:
[0156] The first channel determination module 1002 is used to determine a communication channel to be scheduled among multiple communication channels of the communication network.
[0157] The second channel determination module 1004 is used to determine a candidate communication channel configured with a priority scheduling identifier among the multiple communication channels to be scheduled when there are multiple communication channels to be scheduled; the priority scheduling identifier is configured according to the scheduling weight of each communication channel, and the scheduling weight of each communication channel is dynamically adjusted according to the communication messages in the communication channel and the scheduling status of the communication channel.
[0158] The communication channel scheduling module 1006 is used to determine a target communication channel from the candidate communication channels, schedule the target communication channel, and reset the priority scheduling flag of the target communication channel.
[0159] In an exemplary embodiment, the first channel determination module 1002 is further configured to determine, among multiple communication channels, a communication channel in which there are communication messages to be sent and the communication messages to be sent carry sideband information, as the communication channel to be scheduled.
[0160] In an exemplary embodiment, the communication scheduling device also includes a communication message filtering module, which is used to determine the existence of a start data packet and an end data packet in the communication message for each communication channel when the communication channel receives a communication message; if the start data packet or the end data packet does not exist, it is determined that the communication message is abnormal and the communication message is discarded.
[0161] In an exemplary embodiment, the communication message filtering module is further used to determine, for each communication channel, a message length of the communication message when the communication channel receives the communication message;
[0162] When the message length is less than a preset message length threshold, it is determined that the communication message is abnormal and the communication message is discarded.
[0163] In an exemplary embodiment, the communication scheduling device also includes a priority identifier configuration module, which is used to determine the scheduling weight of the communication channel for each communication channel; when the scheduling weight of the communication channel is greater than or equal to a first preset weight threshold and the communication channel is not configured with a priority scheduling identifier, configure a priority scheduling identifier for the communication channel; when the scheduling weight of the communication channel is less than or equal to a second preset weight threshold and the communication channel is configured with a priority scheduling identifier, reset the priority scheduling identifier of the communication channel; wherein the first preset weight threshold is greater than the second preset weight threshold.
[0164] In an exemplary embodiment, the communication scheduling device also includes a weight dynamic adjustment module, which is used to increase the scheduling weight of each communication channel when the communication channel receives a communication message; and reduce the scheduling weight of the communication channel when the communication channel is scheduled.
[0165] Each module in the above communication scheduling device can be implemented in whole or in part by software, hardware, or a combination thereof. Each module can be embedded in or independent of a processor in a computer device in the form of hardware, or can be stored in a memory in a computer device in the form of software, so that the processor can call and execute operations corresponding to each module.
[0166] In an exemplary embodiment, a computer device is provided, which may be a server, and its internal structure diagram may be shown in FIG11. The computer device includes a processor, a memory, an input / output interface (Input / Output, referred to as I / O) and a communication interface. The processor, the memory and the input / output interface are connected via a system bus, and the communication interface is connected to the system bus via the input / output interface. The processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program and a database. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The input / output interface of the computer device is used to exchange information between the processor and an external device. The communication interface of the computer device is used to communicate with an external terminal through a network connection. When the computer program is executed by the processor, a communication scheduling method is implemented.
[0167] Those skilled in the art will understand that the structure shown in FIG. 11 is merely a block diagram of a partial structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than shown in the figure, or combine certain components, or have a different arrangement of components.
[0168] In an exemplary embodiment, a computer device is further provided, including a memory and a processor, wherein a computer program is stored in the memory, and the processor implements the steps in the above-mentioned method embodiments when executing the computer program.
[0169] In an exemplary embodiment, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the steps in the above-mentioned method embodiments are implemented.
[0170] In an exemplary embodiment, a computer program product is provided, including a computer program, and when the computer program is executed by a processor, the steps in the above method embodiments are implemented.
[0171] A person of ordinary skill in the art can understand that all or part of the processes in the above-mentioned embodiment method can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to the memory, database or other medium used in the embodiments provided in the present application can include at least one of non-volatile memory and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetic random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. As an illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM). The database involved in each embodiment provided in this application may include at least one of a relational database and a non-relational database. Non-relational databases may include distributed databases based on blockchains, etc., but are not limited to this. The processor involved in each embodiment provided in this application may be a general-purpose processor, a central processing unit, a graphics processor, a digital signal processor, a programmable logic device, a data processing logic device based on quantum computing, an artificial intelligence (AI) processor, etc., but are not limited to this.
[0172] The technical features of the above embodiments may be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this application.
[0173] The above-described embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the present application. It should be pointed out that, for a person of ordinary skill in the art, several variations and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the protection scope of the present application shall be subject to the attached claims.
Claims
1. A communication scheduling method, characterized in that: The method comprises: Determining a communication channel to be scheduled among multiple communication channels of a communication network; In the case where there are multiple communication channels to be scheduled, a candidate communication channel configured with a priority scheduling identifier is determined among the multiple communication channels to be scheduled; the priority scheduling identifier is configured according to the scheduling weight of each communication channel, and the scheduling weight of each communication channel is dynamically adjusted according to the communication message in the communication channel and the scheduling situation of the communication channel; A target communication channel is determined from each candidate communication channel, the target communication channel is scheduled, and a priority scheduling flag of the target communication channel is reset.
2. The method according to claim 1, characterized in that The step of determining a communication channel to be scheduled among multiple communication channels of the communication network includes: Among the multiple communication channels, a communication channel in which a communication message to be sent exists and the communication message to be sent carries sideband information is determined as the communication channel to be scheduled.
3. The method according to claim 2, characterized in that The method further comprises: For each communication channel, when the communication channel receives a communication message, determining the existence of a start data packet and an end data packet in the communication message; In the case that the start data packet or the end data packet does not exist, it is determined that the communication message is abnormal and the communication message is discarded.
4. The method according to claim 2, characterized in that: The method further comprises: For each communication channel, when a communication message is received by the communication channel, determining a message length of the communication message; When the message length is less than a preset message length threshold, it is determined that the communication message is abnormal and the communication message is discarded.
5. The method according to any one of claims 1 to 4, characterized in that: The priority dispatching flag is configured in the following manner: For each communication channel, determining a scheduling weight of the communication channel; When the scheduling weight of the communication channel is greater than or equal to a first preset weight threshold and the communication channel is not configured with a priority scheduling identifier, configuring the priority scheduling identifier for the communication channel; When the scheduling weight of the communication channel is less than or equal to the second preset weight threshold and the communication channel is configured with a priority scheduling flag, resetting the priority scheduling flag of the communication channel; Among them, the first preset weight threshold is greater than the second preset weight threshold.
6. The method according to any one of claims 1 to 4, characterized in that: The scheduling weight of each communication channel is dynamically adjusted in the following way: For each communication channel, when the communication channel receives a communication message, increase the scheduling weight of the communication channel; In the case where the communication channel is scheduled, reducing the scheduling weight of the communication channel.
7. A communication scheduling device, characterized in that: The device comprises: A first channel determination module, used to determine a communication channel to be scheduled among multiple communication channels of the communication network; A second channel determination module is used to determine, when there are multiple communication channels to be scheduled, a candidate communication channel configured with a priority scheduling identifier among the multiple communication channels to be scheduled; the priority scheduling identifier is configured according to the scheduling weight of each communication channel, and the scheduling weight of each communication channel is dynamically adjusted according to the communication message in the communication channel and the scheduling situation of the communication channel; The communication channel scheduling module is used to determine a target communication channel from each candidate communication channel, schedule the target communication channel, and reset the priority scheduling flag of the target communication channel.
8. A computer device comprising a memory and a processor, wherein the memory stores a computer program, wherein: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 6 are implemented.
9. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 6 are implemented.
10. A computer program product, comprising a computer program, characterized in that When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 6 are implemented.
Citation Information
Patent Citations
Queue scheduling method and device
CN107800647A
Message sending method and equipment, and computer readable storage medium
CN108848040A
Network channel scheduling method and device
CN114172850A
Communication packet scheduling method and device and electronic equipment
CN116017741A
Data transmission method and device, communication equipment and storage medium
CN116033585A