CN117221955A - Communication scheduling method and device and related equipment - Google Patents

Communication scheduling method and device and related equipment Download PDF

Info

Publication number
CN117221955A
CN117221955A CN202210615277.XA CN202210615277A CN117221955A CN 117221955 A CN117221955 A CN 117221955A CN 202210615277 A CN202210615277 A CN 202210615277A CN 117221955 A CN117221955 A CN 117221955A
Authority
CN
China
Prior art keywords
network device
priority
network
communication
session
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
CN202210615277.XA
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.)
Huawei Technologies Co Ltd
Original Assignee
Huawei Technologies 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 Huawei Technologies Co Ltd filed Critical Huawei Technologies Co Ltd
Priority to CN202210615277.XA priority Critical patent/CN117221955A/en
Priority to PCT/CN2023/096320 priority patent/WO2023231899A1/en
Publication of CN117221955A publication Critical patent/CN117221955A/en
Pending legal-status Critical Current

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W28/00Network traffic management; Network resource management
    • H04W28/16Central resource management; Negotiation of resources or communication parameters, e.g. negotiating bandwidth or QoS [Quality of Service]
    • H04W28/24Negotiating SLA [Service Level Agreement]; Negotiating QoS [Quality of Service]
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W72/00Local resource management
    • H04W72/12Wireless traffic scheduling
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W72/00Local resource management
    • H04W72/20Control channels or signalling for resource management
    • H04W72/21Control channels or signalling for resource management in the uplink direction of a wireless link, i.e. towards the network
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W72/00Local resource management
    • H04W72/50Allocation or scheduling criteria for wireless resources
    • H04W72/56Allocation or scheduling criteria for wireless resources based on priority criteria
    • H04W72/566Allocation or scheduling criteria for wireless resources based on priority criteria of the information or information source or recipient

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Quality & Reliability (AREA)
  • Computer And Data Communications (AREA)

Abstract

The application provides a communication scheduling method, a device and related equipment, wherein the method can update the priority for network equipment in real time by acquiring equipment types and real-time operation states, and allocate communication resources for the network equipment according to the priority updated in real time, so that the real-time operation requirements can be met. And the request message carries the response priority, so that the opposite terminal network equipment can process the request message according to the response priority, and the bidirectional communication can be carried out according to the priority. The communication scheduling method provided by the application can also inhibit communication between the network equipment and the port connected with the non-emergency communication equipment in the emergency communication, so that communication data of other equipment cannot occupy communication resources, and the data of the emergency communication can be sent and received preferentially.

Description

Communication scheduling method and device and related equipment
Technical Field
The present application relates to the field of communications, and in particular, to a method and apparatus for scheduling communications, and related devices.
Background
In a communication network, there is often a case where one network device connects a plurality of network devices, the devices connecting the plurality of network devices may be referred to as master devices, and other network devices may be referred to as slave devices. The master device may also set a priority for the slave device, and when receiving a message sent by the slave device with a high priority, the master device will preferentially process the message of the slave device or preferentially send the message to the slave device with a high priority.
However, in actual operation of the network device, the demand of the network device for communication resources may vary with the progress of the operation. The message sent by the network device that is working or preparing working needs to be processed as soon as possible, and the message sent to the network device that is working or preparing working needs to be sent preferentially, so that the corresponding response message can be received as soon as possible, and the service of the network device can be executed on time. However, a fixed priority is set for the network device, and the actual operation requirement cannot be satisfied.
Therefore, how to reasonably allocate communication resources for the network devices in actual operation is a problem to be solved.
Disclosure of Invention
The application provides a communication scheduling method, a device and related equipment, which are used for updating the priority of network equipment in real time by acquiring the equipment type and the real-time operation state, distributing communication resources to the network equipment according to the priority updated in real time and further meeting the real-time operation requirement.
In a first aspect, the present application provides a communication scheduling method, applied to a first network device, including: acquiring the equipment type and the operation state of at least one network equipment connected with the first network equipment; wherein the at least one network device comprises a second network device; determining a first priority table according to the device type of at least one network device, wherein the first priority table comprises the initial priority of the at least one network device, and the initial priorities of the network devices with the same device type are the same; and determining the initial priority of the second network equipment, and determining the target priority of the second network equipment according to the working state of the second network equipment and the initial priority of the second network equipment in the first priority table.
In the above scheme, the initial priority of the network device is ordered based on the device type of the connected network device to obtain the first priority table, and then the initial priority of the second network device is adjusted according to the operation state of the network device to obtain the target priority of the second network device. Thus, the first network device can communicate with the second network device based on the target priority, and the target priority considers the device type of the second network device and the operation state of the second network device, so that the requirement of the second network device on communication in real-time operation can be met.
With reference to the first aspect, in some implementations, the communication scheduling method further includes updating the first priority table to the second priority table according to a target priority of the second network device.
In the above scheme, after the first priority table is obtained, the initial priority is adjusted according to the operation state of the network device, and finally the second priority table is obtained. The communication between the first network device and the network device connected with the first network device is performed according to the second priority table, and when the communication requirement of the network device on the network device changes along with the operation process, the first network device can also communicate with the network device according to the real-time operation state of the network device, so that the requirement of the network device on communication resources can be met.
With reference to the first aspect, in some implementations, in the communication scheduling method, the second priority table is determined by re-ordering network devices with the same initial priority in the first priority table according to priorities corresponding to job states; or the second priority table is determined by adjusting the initial priority of each network device according to the preset ranking corresponding to the job status of each network device.
In the above solution, the second priority table may be obtained by reordering network devices of the same device type according to the job status, or may be obtained by adjusting the initial priority by a preset ranking according to the job status, for example, the initial priority of the network device being worked is adjusted forward by several ranking. Thus, the network equipment priority in the second priority table is obtained comprehensively according to the equipment type and the operation state of the network equipment, and the first network equipment communicates with the network equipment according to the second priority table, so that the requirement of the network equipment on communication resources can be met.
With reference to the first aspect, in some implementations, the communication scheduling method further includes: determining whether to communicate with the second network device according to the second priority table; when the communication with the second network device is determined, a first request message is sent to the second network device, wherein the first request message carries response priority, and the response priority is used for the second network device to determine the time for responding to the first request message.
In the above scheme, when the first network device sends the request message to the second network device, the request message also carries the response priority. The second network device can also arrange the processing of the request message according to the response priority, so that in the bidirectional communication between the first network device and the second network device, the processing can be performed according to the priority, instead of only the first network device can process the data from other network devices according to the priority, and further, the communication efficiency of the two network devices is improved.
With reference to the first aspect, in some implementations, the communication scheduling method further includes: determining whether to communicate with the second network device according to the second priority table; when the communication with the second network equipment is determined, receiving a second request message sent by the second network equipment; and determining the response priority of the second request message according to the second request message, wherein the response priority of the second request message is determined according to the session type of the second request message.
In the above scheme, the first network device determines the time for responding to the request message according to the session type of the request message sent by the second network device. After the first network device determines to communicate with the second network device according to the target priority, the first network device also determines the time for responding to the request message according to the session type of the request message, so that the session with higher priority of the session type can be processed preferentially, and further, the communication efficiency is improved.
With reference to the first aspect, in some implementations, there are a plurality of sessions before the first network device and the second network device, the communication scheduling method further includes: acquiring session types of a plurality of sessions; and determining a target session from the plurality of sessions according to the session types, wherein the target session is determined according to the request priorities corresponding to the session types in the plurality of sessions, and the request priorities corresponding to the session types are used for indicating the sequence of sending the session request messages.
In the above scheme, the first network device may also prioritize the plurality of sessions performed by the second network device according to the session type, and after the first network device determines to communicate with the second network device according to the target priority, the plurality of sessions will be processed according to the session priority. Therefore, the session which needs to be responded faster can be processed preferentially, and further, the service with high session priority can be processed preferentially, and the whole service can be processed orderly, so that the progress of the whole service is improved.
With reference to the first aspect, in some implementations, the communication scheduling method further includes: determining whether in an emergency communication state; determining an emergency communication with the second network device based on the emergency status; and determining whether to communicate with the second network device according to the second priority table after the emergency state is released.
In the above scheme, the first network device can also perform emergency communication with other network devices, and when the first network device is in an emergency state, the opposite network device which performs communication is judged according to the emergency state. When the emergency state is released, the first network device determines the opposite network device for communication according to the second priority table. In this way, the data transmission of the emergency communication is performed first, and then the data transmission is performed according to the priority table, so that the situation that the emergency communication exists in the actual network can be satisfied.
With reference to the first aspect, in some implementations, a first port of the first network device is connected to a second port of the second network device, and the communication scheduling method further includes: receiving an initial message sent by second network equipment, wherein the initial message carries an emergency communication initial mark, and the initial mark is used for indicating the start of an emergency state; and determining emergency communication with the second network equipment according to the initial message, and inhibiting communication of other ports except the first port.
In the scheme, the first network equipment determines to carry out emergency communication with the second network equipment, after the second network equipment initiates the emergency communication, the first network equipment and the second network equipment can inhibit communication of other ports, only the ports of the emergency communication are reserved, so that data of other equipment cannot occupy resources of the emergency communication, and the efficiency of the emergency communication is improved.
With reference to the first aspect, in some implementations, the communication scheduling method further includes: receiving a termination message sent by second network equipment, wherein the initiation message carries an emergency communication termination mark; and restoring the communication of other ports except the first port according to the termination message.
In the above scheme, the second network device sends the termination message to the first network device, so that the emergency communication with the first network device can be ended, and then the first network device and the second network device recover the communication of all ports. In this way, in the emergency communication, the data of other devices does not occupy the resources of the emergency communication, and the efficiency of the emergency communication is improved.
With reference to the first aspect, in some implementations, the communication scheduling method further includes: the initiation message also carries an emergency communication duration, where the emergency communication duration is used for the first network device to determine a communication suppression duration of the ports other than the first port.
In the above scheme, the second network device may further carry an emergency communication duration in the initiation message, and after the emergency communication duration is reached, the first network device and the second network device may end the emergency communication, and resume the communication of all ports. In this way, the second network device does not need to additionally send the termination message, and in the emergency communication, the data of other devices does not occupy the resources of the emergency communication, thereby improving the efficiency of the emergency communication.
With reference to the first aspect, in some implementations, the communication scheduling method further includes: the device types include: motion control class, state control class and state sensing class, wherein the initial priority of the device type corresponding to the network device is from high to low: a motion control class, a state control class, and a state sensing class; the job status includes: an ongoing job, a ready job and an unexecuted job, wherein the priority corresponding to the job status is from high to low: work in progress, preparation work, and no work.
In the above-described scheme, the motion control type network device needs a higher priority because of the operation, and the network device that is operating needs to transmit the ongoing operation service data, so the priority of the corresponding network device is also higher. Therefore, when the communication requirement of the network equipment changes along with the operation process, the first network equipment can also communicate with the network equipment according to the real-time operation state of the network equipment, and the requirement of the network equipment on communication resources can be met.
With reference to the first aspect, in some implementations, the communication scheduling method further includes: the session types include: control class session, inquiry class session and subscription class session, wherein the request priority corresponding to the session type is from high to low: the response priorities corresponding to the session types of the control type session, the query type session and the subscription type session are as follows from high to low: query class session, control class session, subscription class session.
In the above scheme, the first network device also performs priority ranking on the plurality of sessions performed by the second network device according to the session types, so that the session which needs to be responded faster can be processed preferentially, and further, the service with high session priority can be performed preferentially, and the whole service can be performed orderly, so that the progress of the whole service is improved.
In a second aspect, the present application provides a communication scheduling apparatus, applied to a first network device, including: an acquisition unit, a determination unit; the acquisition unit is used for acquiring the equipment type and the operation state of at least one network equipment connected with the first network equipment; wherein the at least one network device comprises a second network device; the determining unit is used for determining a first priority table according to the equipment type of at least one network equipment, wherein the first priority table comprises the initial priority of the at least one network equipment, and the initial priorities of the network equipment with the same equipment type are the same; the determining unit is further configured to determine an initial priority of the second network device, and determine a target priority of the second network device according to the job status of the second network device and the initial priority of the second network device in the first priority table.
With reference to the second aspect, in some implementations, the determining unit is further configured to update the first priority table to the second priority table according to a target priority of the second network device.
With reference to the second aspect, in some implementations, the second priority table is determined by reordering network devices with the same initial priority in the first priority table according to priorities corresponding to job states; or the second priority table is determined by adjusting the initial priority of each network device according to the preset ranking corresponding to the job status of each network device.
With reference to the second aspect, in some implementations, the apparatus further includes a transmitting unit; the determining unit is further configured to determine whether to communicate with the second network device according to the second priority table; the sending unit is used for sending a first request message to the second network device when the first request message is determined to be communicated with the second network device, wherein the first request message carries response priority, and the response priority is used for the second network device to determine the time for responding to the first request message.
With reference to the second aspect, in some implementations, the apparatus further includes a receiving unit; the determining unit is further configured to determine whether to communicate with the second network device according to the second priority table; the receiving unit is used for receiving a second request message sent by the second network equipment when the communication with the second network equipment is determined; the determining unit is further configured to determine a response priority of the second request packet according to the second request packet, where the response priority of the second request packet is determined according to a session type of the second request packet.
With reference to the second aspect, in some implementations, there are a plurality of sessions before the first network device and the second network device, and the acquiring unit is further configured to acquire session types of the plurality of sessions; the determining unit is further configured to determine a target session from the plurality of sessions according to a session type, where the target session is determined according to a request priority corresponding to the session type in the plurality of sessions, and the request priority corresponding to the session type is used to indicate an order of sending the session request messages.
With reference to the second aspect, in some implementations, the determining unit is further configured to determine whether the emergency communication state is in; determining an emergency communication with the second network device based on the emergency status; and, after the emergency state is released, the determining unit is further configured to determine whether to communicate with the second network device according to the second priority table.
With reference to the second aspect, in some implementations, a first port of the first network device is connected with a second port of the second network device; the receiving unit is further configured to receive an initiation message sent by the second network device, where the initiation message carries an emergency communication initiation flag, and the initiation flag is used to indicate that an emergency state begins; the determining unit is further configured to suppress communications of ports other than the first port according to the initiation message.
With reference to the second aspect, in some implementations, the receiving unit is further configured to receive a termination packet sent by the second network device, where the termination packet carries an emergency communication termination flag, and the termination flag is used to indicate that the emergency state is released; the determining unit is further configured to resume communication of ports other than the first port according to the termination message.
With reference to the second aspect, in some implementations, the initiation message further carries an emergency communication duration, where the emergency communication duration is used for the first network device to determine a communication suppression duration of ports other than the first port.
With reference to the second aspect, in some implementations, the device types include: motion control class, state control class and state sensing class, wherein the initial priority of the device type corresponding to the network device is from high to low: a motion control class, a state control class, and a state sensing class; the job status includes: an ongoing job, a ready job and an unexecuted job, wherein the priority corresponding to the job status is from high to low: work in progress, preparation work, and no work.
With reference to the second aspect, in some implementations, the session type includes: control class session, inquiry class session and subscription class session, wherein the request priority corresponding to the session type is from high to low: the response priorities corresponding to the session types of the control type session, the query type session and the subscription type session are as follows from high to low: query class session, control class session, subscription class session.
In a third aspect, the application provides a network device comprising a processor and a memory, the memory being for storing instructions, the processor being for executing the instructions, which when executed by the processor, perform the method as described in the first aspect.
In a fourth aspect, the application provides a computer readable storage medium having instructions stored therein which, when executed on a network device, perform a method as described in the first aspect.
In a fifth aspect, the application provides a computer program product, characterized in that the computer program product comprises computer instructions which, when executed by a computing device, perform the method as described in the first aspect.
In summary, the method and the device provided by the application update the priority for the network device in real time by acquiring the device type and the real-time operation state, and allocate communication resources for the network device according to the priority updated in real time, so that the real-time operation requirement can be satisfied. And the request message carries the response priority, so that the opposite terminal network equipment can process the request message according to the response priority, and the bidirectional communication can be carried out according to the priority. The communication scheduling method provided by the application can also carry out communication inhibition on the ports connected with the network equipment and the non-emergency communication equipment in the emergency communication, so that communication data of other equipment cannot occupy communication resources, and the data of the emergency communication can be sent and received preferentially.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings that are required to be used in the description of the embodiments will be briefly described below.
Fig. 1 is a schematic diagram of a communication system architecture according to an embodiment of the present application;
fig. 2 is a schematic diagram of a communication system architecture of an industrial device network according to an embodiment of the present application;
fig. 3 is a schematic flow chart of a communication scheduling method according to an embodiment of the present application;
FIG. 4 is a schematic diagram of a first priority table according to an embodiment of the present application;
FIG. 5A is a schematic diagram of a second priority table generation process according to an embodiment of the present application;
FIG. 5B is a schematic diagram of another second priority table generation process provided by an embodiment of the present application;
FIG. 6 is a schematic diagram of a second priority table according to an embodiment of the present application;
fig. 7 is a schematic flow chart of a network device sending a request message according to an embodiment of the present application;
FIG. 8 is a schematic diagram of a first port rejection scheme provided by an embodiment of the present application;
fig. 9A is a schematic diagram of session communication between network devices according to an embodiment of the present application;
fig. 9B is a schematic diagram of a plurality of sessions between network devices according to an embodiment of the present application;
Fig. 10 is a schematic flow chart of a network device receiving a request message according to an embodiment of the present application;
fig. 11 is a schematic flow chart of a method for emergency communication between network devices according to an embodiment of the present application;
FIG. 12 is a schematic diagram of a suppression of ports other than the second port provided by an embodiment of the present application;
fig. 13 is a flowchart of another method for emergency communication between network devices according to an embodiment of the present application;
fig. 14A is a schematic flow diagram of a method for emergency communication including an intermediate network node according to an embodiment of the present application;
fig. 14B is a flowchart of another method for emergency communication including an intermediate network node according to an embodiment of the present application;
fig. 15 is a schematic diagram of an intermediate network node suppression port according to an embodiment of the present application;
fig. 16 is a schematic diagram of a network architecture for emergency communication between a plurality of network devices according to another embodiment of the present application;
fig. 17 is a schematic structural diagram of a communication scheduling device according to an embodiment of the present application;
fig. 18 is a schematic structural diagram of a network device according to an embodiment of the present application.
Detailed Description
First, an application scenario according to an embodiment of the present application will be described with reference to the communication system structure shown in fig. 1.
As shown in fig. 1, the communication system includes a network device 110, a network device 120, and a network device 130. The transmission medium between the network devices can be a wired transmission medium such as a cable, an optical fiber, a plastic waveguide and the like, or can be a wireless transmission medium such as microwave, infrared and the like. Through the forwarding operation among the plurality of network devices, the data exchange between the terminal and the control end or the data exchange between the terminal and the backbone network can be realized. It will be appreciated that fig. 1 illustrates only one possible communication system architecture to which embodiments of the present application may be applied, and that in other possible scenarios, only a portion of the communication system architecture described above may comprise, or other devices.
The network device 110 may be a physical server or cloud device, such as an X86 server, an ARM server, or the like, or a terminal, such as a mobile phone terminal, a tablet computer, a notebook computer, a vehicle-mounted terminal, or the like, or a Virtual Machine (VM) implemented by combining a general physical server with a network function virtualization (Network Functions Virtualization, NFV) technology, where the VM refers to a complete computer system with a complete hardware system function and operating in a completely isolated environment, such as a Virtual Machine in a cloud server, through software simulation.
The network device 120 may specifically be a switch, a router, a gateway, a bridge, a server, a repeater, etc., and may also be an evolved Node B (eNB), a Radio network controller (Radio network controller, RNC), a Node B (Node B, NB), a base station controller (base station controller, BSC), a base transceiver station (base transceiver station, BTS), an Access Point (AP) in a WIFI system, a baseband unit (BBU), etc., or may also be a New air interface (New Radio, NR) in a fifth generation mobile communication technology (5th Generation Mobile Communication Technology,5G), a next generation Node B (gNodeB), etc., which is not particularly limited in the present application.
The network device 130 may be a terminal in particular. In some embodiments, the application scenario of the embodiments of the present application may be home network communication, and the terminal may be a mobile phone, a tablet computer, a smart watch, a Virtual Reality (VR) terminal device, an Augmented Reality (AR) terminal device, an internet of things device such as a sweeping robot, an electric cooker, and the like. In some embodiments, the network device 110 may forward the message through the network device 120, control the network device 130, or obtain data of the network device 130, etc.
In some embodiments, the application scenario of the embodiments of the present application may be an industrial equipment network, the network equipment 110 in the embodiments of the present application may be a control end computer or a server, and the network equipment 130 may be a mechanical arm, a monitoring camera, a temperature sensor, a laser sensor, a three-machine controller, a crusher, a reversed loader, a scraper conveyor, a fully-mechanized coal mining controller, a coal mining machine, a hydraulic support, etc., which is not particularly limited in the present application.
As shown in fig. 2, fig. 2 shows another communication system structure of an industrial equipment network, in which a remote controller and an auxiliary acquisition PC1 are connected to a router 2 and a router 4 through the router 1, the router 2 is connected to the auxiliary acquisition PC2 and a router 3, the router 4 is connected to the auxiliary control PC1 and a router 5, the router 3 is connected to a robot arm 1, the robot arm 2 and a monitoring camera, and the router 5 is connected to a sensor and a laser sensor. Further, the auxiliary acquisition PC1 and the auxiliary acquisition PC2 can acquire data of the mechanical arm, the monitoring camera, the temperature sensor, and the laser sensor through the router 1-router 5; the auxiliary control PC1 can acquire data of the mechanical arm, the monitoring camera, the temperature sensor and the laser sensor through the router 1-the router 5 and control the above devices; the remote controller can also acquire data of other devices and control other devices through the router 1-router 5.
In other embodiments, the application scenario of the embodiment of the present application may be an office network, and the network device 130 of the embodiment of the present application may be a mobile phone, a computer, a monitoring camera, a printer, a web server, a database server, or the like. It is to be understood that the above examples are intended to be illustrative and not restrictive.
Accordingly, in the communication system structure as shown in fig. 1 or fig. 2, there is a case where one network device connects a plurality of network devices, the device connecting the plurality of network devices may be referred to as a master device, and other network devices may be referred to as slave devices. The master device and the slave device may be directly connected, or may be connected through a router or a switch. The master device may also set a priority for the slave device, and when receiving a message sent by the slave device with a high priority, the master device will preferentially process the message of the slave device.
However, in actual operation of the network device, the demand of the network device for communication resources may vary with the progress of the operation. For example, in the industrial equipment network as shown in fig. 2, when an object is transferred to the robot arm 1, the robot arm 1 is required to operate the object, and at this time, the communication of the robot arm 1 is important, and at this time, the robot arm 1 is required to have a higher priority than other robot arms. However, when the object is transferred to the robot arm 2, the robot arm 2 is required to operate the object, and at this time, the robot arm 2 is required to have a higher priority than other robot arms. In the process, the priority of the slave device changes.
Therefore, in actual operation of the network device, the demand of the network device for communication resources may vary with the progress of the operation. Messages sent by a network device that is often operating or preparing to operate need to be processed as soon as possible to enable the corresponding response messages to be received as soon as possible, so that the services of the network device can be executed on time. However, a fixed priority is set for the network device, which cannot meet the actual operation requirement.
For example, when the network device 110 needs to process the messages of multiple network devices 130, when the priority of the operating network device 130 is low, the message sent by the network device 130 will be processed by the network device 110 later, and further, a response message from the network device 110 will be received later. When the response message is not received, the network device 130 cannot execute the corresponding service, and finally affects the overall progress of the service, and even serious accidents occur. For another example, the mechanical arm in the working state may miss the articles of the conveyor belt because it does not receive the response message in time, which may cause the articles to be finally produced to be unqualified; or, in the execution of the mechanical arm, the control end monitors that the mechanical arm collides with the wall body and gives an instruction for stopping the mechanical arm, but when the instruction reaches the mechanical arm, the mechanical arm probably collides with the wall body due to lower priority of the mechanical arm.
In summary, the requirement of the network device for the communication resource may vary with the actual operation situation, and a fixed priority is set for the network device, so that the communication resource cannot be reasonably allocated, and the service of the network device cannot be normally performed.
In order to solve the problem that the demand of the network equipment for the communication resources changes along with the actual operation condition, so that the communication resources cannot be reasonably allocated, the application provides a communication scheduling method, which can set the priority of the network equipment according to the equipment type of the network equipment and the real-time operation state of the network equipment and allocate the communication resources according to the priority of the network equipment.
According to the communication scheduling method provided by the application, the first network equipment can acquire the equipment type and the operation state of the connected network equipment; according to the equipment types of the network equipment, carrying out initial priority sorting, and determining a first priority table, wherein the initial priorities of the network equipment with the same equipment type are the same; and then the initial priority is adjusted according to the operation state of the network equipment to obtain the final priority of the network equipment, and the second priority table is determined according to the final priorities of all the network equipment. The first network device communicates with the connected network device based on the second priority table. When the first network device communicates with other network devices, the priority of the session can be determined according to the session type, and the response priority of the session is carried in the sent message, so that the opposite-end network device can process the message according to the response priority. In addition, the network devices can also establish emergency communication, and during the emergency communication, the ports of the network devices participating in the emergency communication and other network devices not in the emergency communication are inhibited from being communicated until the emergency communication is ended.
As shown in fig. 3, fig. 3 is a schematic flow chart of a communication scheduling method provided by the present application, in which the network device 10 and the network device 20 may be the network devices in the communication system shown in fig. 1 or fig. 2. The network device 10 is connected to the network device 20, and the network device 10 and the network device 20 may be directly connected or may be connected through a network device such as a router or a switch. The network device 10 may also be connected to other network devices. It should be understood that the connection manner of the network device 10 and the network device 20 is not particularly limited in the present application. Wherein the network device 10 may also be referred to as a first network device and the network device 20 may also be referred to as a second network device. The steps of the communication scheduling method will be described in detail.
S310: the network device 10 acquires the device type of the network device 20.
The network device 10 sends a message to the network device 20 to acquire the device type of the network device 20, and the network device 20 replies to the network device 10 with its device type. The network device 10 may acquire the device type from the network device 20 when establishing a network connection with the network device 20, or the network device 10 may acquire the device type from the network device 20 after the network device 20 sends a message to the network device 10, or the network device 10 may acquire the device type from the network device 20 periodically according to a preset time.
Wherein the device type of the network device 20 is determined according to the job task performed by the network device 20. For example, the device types may include: motion control class, state sensing class, user terminal, intelligent home appliance class, etc. It should be understood that the application is not particularly limited with respect to the division of the device types of the network device 20.
The device type of the network device 20 is illustrated below in connection with an application scenario.
In an industrial device network, the device types of the network device 20 may include: motion control class, state sensing class. Wherein the network device of the motion control class is used for executing the motion class task; the network equipment of the state control class is used for generating specific states, such as heating, refrigerating, pressure increasing and other work tasks; the network device of the state sensing type is used for executing the task of acquiring environmental states, such as temperature measurement, distance measurement, image acquisition and the like. For example, the mechanical arm, the reversed loader, the crusher, and the like belong to the motion control class, the vacuum pump, the heating furnace, the booster pump, and the like belong to the state control class, and the camera, the temperature sensor, the laser sensor, and the like belong to the state sensing class.
In home network communications, the device types of the network device 20 may include: user terminal, intelligent household electrical appliances. The smart home appliance class may further include: motion control intelligent home appliances, state control intelligent home appliances and state sensing intelligent home appliances. For example, a mobile phone, a smart watch, a computer, etc. belong to a user terminal, a sweeping robot belongs to a motion control type intelligent household appliance, a refrigerator, an electric cooker, an air conditioner, etc. belong to a state control type intelligent household appliance, and a thermometer, a camera, etc. belong to a state sensing type intelligent household appliance.
In office network communications, the device types of network device 20 may include: user terminals, office facilities, etc. Printers, facsimile machines, and the like belong to office facilities.
It should be appreciated that the division of device types is determined based on the tasks that the device is primarily performing. For example, the sweeping robot also comprises a laser sensor, and during the movement, the sweeping robot moves according to the data measured by the laser sensor, but mainly cleans garbage by moving the position, and belongs to the operation task of movement control. The above examples are given by way of illustration only and are not intended to be limiting.
S320: the network device 10 determines an initial priority of the network device 20 according to the device type of the network device 20.
Each device type corresponds to a respective initial priority level, the initial priorities of network devices of the same device type are the same, and network device 10 will first determine the initial priority of network device 20 based on the device type.
The correspondence between device types and initial priority levels is illustrated below.
For example, in an industrial device network, the priority of the motion control class network device is higher than the priority of the state control class network device, and the priority of the state control class network device is higher than the priority of the state sensing class network device. In home network communication, the priority of the user terminal is higher than the priority of the intelligent home appliance, the priority of the motion control type intelligent home appliance is higher than the priority of the state control type intelligent home appliance, and the priority of the state control type intelligent home appliance is higher than the priority of the state sensing type intelligent home appliance. In office network communications, the priority of user terminals is higher than the priority of office facilities. It should be understood that the present application is not particularly limited to the initial priority level corresponding to the device type.
In some embodiments, the network device 10 may also obtain the device type of all network devices connected to the network device 10. After the network device 10 acquires the device types of all the network devices, a first priority table is also established, and the first priority table is determined according to the respective device types of the network devices connected to the network device 10. That is, the priorities of all the network devices are ordered according to the device types of all the network devices, where the priority levels corresponding to the device types are referred to the above description, and are not repeated herein. The establishment of the first priority table by the network device 10 is illustrated below.
For example, the network device 10 is further connected to the network device 21, the network device 22, the network device 23, and the network device 24, where the network device 21 belongs to the motion control class, the network device 20, the network device 22, and the network device 24 belong to the state control class, and the network device 23 belongs to the state sensing class, and the first priority table established by the network device 10 may refer to fig. 4, as shown in fig. 4, where the initial priority of the network device 21 is higher than the initial priority of the network device 20, the network device 22, and the network device 24, and the initial priority of the network device 20, the network device 22, and the network device 24 is the same, and the initial priority of the network device 20, the network device 22, and the network device 24 is higher than the initial priority of the network device 23.
S330: the network device 10 acquires the job status of the network device 20.
The network device 10 transmits a message for acquiring the operation state of the network device 20 to the network device 20, and the network device 20 replies the operation state thereof to the network device 10. The network device 10 may acquire the operation state of the network device 20 at regular time, or acquire the current operation state of the network device 20 after the operation state of the network device 20 changes or after a user triggers. The job status is used to indicate whether the network device 20 is currently operating, and may include, for example, operating, about to operate, not operating, etc., where the operating network device priority is greater than the about to operate network device priority, and the about to operate network device priority is greater than the not operating network device priority. It should be understood that the present application is not particularly limited to the division of the job status. Alternatively, job status may be divided according to a specific work performed.
The manner in which the network device 10 acquires the job status of the network device 20 is described in detail below.
Specifically, the network device 10 sends a request for acquiring a job status to the network device 20 at regular time, and the network device 20 replies to the current job status according to the request after receiving the request. Alternatively, the network device 10 transmits a request to the network device 20 to acquire the job status at regular intervals, and the network device 20 transmits the current job status to the network device 10 at regular intervals. Or, after the network device 10 acquires the job status request for the first time, the network device 20 sends the current job status to the network device 10 after the job status of the network device 20 changes. Or, when the network device 10 or the network device 20 receives the user operation instruction, the network device 10 acquires the operation mode from the network device 20 according to the user operation instruction. It should be understood that the manner in which the network device 10 obtains the operational status of the network device 20 is not particularly limited by the present application.
In some embodiments, the operation state of the network device 20 is controlled by the network device 10, and when the network device 10 adjusts the operation state of the network device 20, the network device 10 directly updates the adjusted operation state of the network device 20, and may not need to acquire the operation state from the network device 20. Alternatively, the network device 10 stores the operation time of the network device 20, and the network device 10 can directly update the operation state of the network device 20 according to the operation time of the network device 20.
S340: the network device 10 determines a target priority of the network device 20 based on the initial priority and job status of the network device 20.
The network device 10 adjusts the initial priority of the network device 20 according to the operation state of the network device 20 to obtain the target priority of the network device 20, wherein, the higher the target priority is, the more preferably the network device 10 will receive, send or process the message of the network device 20. The network device 10 may adjust the initial priority to be higher or lower by a preset ranking according to the operation state of the network device 20 to obtain the target priority; alternatively, in the case of retaining the initial priority, the target priority is obtained by performing secondary marking according to the job status, for example, the network device 20 may be the network device with the lowest job status type priority among the network devices with high device type priorities.
In some embodiments, the network device 10 may further acquire the job status of all network devices connected to the network device 10, and establish a second priority table, where the second priority table is determined according to the respective job status of the network devices connected to the network device 10 by the first priority, and may refer to a confirmation procedure of the target priority of the network device 20, which is not described herein.
The network device 10 will be exemplified below by adjusting the initial priority of the network device 20 according to the job status and establishing the second priority table.
The network device 10 may turn the initial priority up or down a preset ranking according to the job status of the network device 20. For example, if the device types have N classes, i.e. the initial priority has N levels, when the initial priority of the network device 20 is the mth name, M is less than or equal to N, and M and N are positive integers. When the network device 20 is working, the priority of the network device 20 is increased by J grades, wherein J is a positive integer; when the network device 20 is at the impending job, the priority of the network device 20 is unchanged; when the network device 20 is not doing the job, the priority of the network device 20 is lowered by K number of ranks, K being a positive integer. Wherein, when J is greater than M, the target priority is highest, and when K is greater than N-M, the target priority is lowest.
For example, as shown in fig. 5A, the network device 20, the network device 22 and the network device 24 have the same initial priority because the device types are the same, but because the network device 20 is in the operating state, the network device 22 is in the non-operating state, and the other devices are in the waiting state, the priority of the network device in the operating state is increased by two ranks, the priority of the network device in the non-operating state is decreased by two ranks, and the priority of the other network devices is unchanged. Therefore, the priorities in the finally obtained second priority table are from high to low: network device 20, network device 21, network device 24, network device 23, network device 22.
The network device 10 may also perform secondary marking on the priority of the network device 20 according to the job status, where the initial priority is maintained, to obtain the network device priority. The method specifically comprises the following steps: when the network device 20 is operating, the target priority of the network device 20 is highest among the network devices of the same device type; when the network device 20 is about to work, the priority of the network device 20 is medium among the network devices of the same device type; when the network device 20 is in a non-performing job, the priority of the network device 20 is lowest among the network devices of the same device type.
For example, as shown in fig. 5B, because the network device 20, the network device 22 and the network device 24 are the same in device type, the initial priorities of the three are the same, but because the network device 20 is working, the network device 24 is about to work, and the network device 22 is not working, the final network device priorities in the second priority table are from high to low: network device 21, network device 20, network device 24, network device 22, network device 23.
In summary, the present application can set a priority for a slave device connected to a master device and obtain a priority table as shown in fig. 6 by acquiring a device type, for example, device 1-device 8, for example, device type 1-type 4, and a job status, for example, job 1-job 3, and the process of generating the priority table as shown in fig. 6 may be described in connection with fig. 4-5B. In this way, the obtained priority table considers the equipment type of the slave equipment and the operation state of the slave equipment, so that the master equipment can perform according to the real-time operation state of the slave equipment when communicating with the slave equipment, and the communication requirement of the slave equipment is met.
In other embodiments, the initial priority of the network device 20 may be determined according to the job status of the network device 20, and then the initial priority may be adjusted according to the device type of the network device to obtain the target priority of the network device 20. For example, when the job status includes a job being performed, an upcoming job, and a non-performed job, the priority at the time of the job is greater than the priority at the time of the upcoming job, and the priority at the time of the upcoming job is greater than the priority at the time of the non-performed job. After determining the initial priority according to the operation state of the network device 20, the initial priority is adjusted according to the device type of the network device 20, specifically, the priority of the network device 20 may be adjusted in the network device in the same operation state according to the device type, or the initial priority may be adjusted up or down by a preset ranking according to the device type of the network device 20.
In other embodiments, step S310 may be performed: after the network device 10 acquires the device type of the network device 20, step S330 is performed: the network device 10 acquires the job status of the network device 20, and then performs step S320: the network device 10 determines the initial priority of the network device 20 according to the device type of the network device 20, and performs step S340: the network device 10 determines a target priority of the network device 20 based on the initial priority and job status of the network device 20.
In other embodiments, step S310 may be performed: after the network device 10 acquires the device type of the network device 20, step S330 is performed: the network device 10 obtains the operation state of the network device 20, determines the initial priority of the network device 20 according to the operation state of the network device 20, and finally adjusts the initial priority according to the device type of the network device 20 to obtain the target priority of the network device 20.
In other embodiments, after network device 10 determines the target priority of network device 20, data from network device 20 will be received and messages sent to network device 20 according to the target priority of network device 20. When the network device 10 has data of multiple devices to be transmitted or received, the network device 10 will preferentially transmit or receive the message of the network device with the higher target priority.
The following describes in detail the process of the network device 10 receiving the message sent by the network device 20 with reference to fig. 7.
S710: the network device 20 sends a request message to the network device 10.
When a session exists between the network device 20 and the network device 10, a request message for the session may be sent to the network device 10 to obtain a response from the network device 10. It should be understood that there may be multiple sessions between the network device 20 and the network device 10, and the network device 20 may send multiple request messages to the network device 10, where each request message carries a unique identifier of the corresponding session.
S720: the network device 10 determines whether to receive the data of the network device 20 according to the target priority of the network device 20.
The network device 10 first determines whether data of other network devices are currently being received, and if the network device 10 is not receiving data of other network devices, the network device 10 may currently receive data from the network device 20, i.e. step S740 is to be performed.
If network device 10 is receiving or is about to receive data from other network devices, network device 10 will also determine whether data from network device 20 can be received based on the target priority of network device 20. Wherein, when the network device 10 is receiving or is about to receive the data of the network device with the lower priority than the target priority of the network device 20, the network device 10 may currently receive the data from the network device 20 first, and step S740 is about to be performed. When the network device 10 is receiving or is about to receive data of a network device having a higher priority than the target priority of the network device 20, the network device 10 will receive data of the network device having the higher priority first, i.e., perform step S730.
S730: the network device 10 receives data of a higher priority network device.
The first port of the network device 10 is connected to the second port of the network device 20, and when the network device 10 cannot receive the message of the network device 20, the network device receives the data of the network device with higher priority.
In some embodiments, when the network device 10 cannot receive the message of the network device 20, the suppression instruction is further sent to the first port, until the network device 10 has received the data of the network device with the higher priority than the target priority of the network device 20, the first port is restored, and the data of the network device 20 is received from the first port.
For example, as shown in fig. 8, the network device 10 may send a MAC control frame to the first port, where the MAC control frame carries a PAUSE flag, and the PAUSE flag may also carry a time parameter, where the time parameter is used to indicate a time to suppress the first port. When the network device 10 has received the data of the network device with the higher priority than the target priority of the network device 20, the MAC control frame carrying the PAUSE flag is sent to the first port, and the time parameter carried by the PAUSE flag is 0, so as to instruct to stop the suppression of the first port.
S740: the network device 10 receives and processes the request message to obtain a response message.
When the network device 10 can receive the request message of the network device 20, the request message is received from the first port, and the request message is processed to generate a response message.
In some embodiments, network device 20 and network device 10 may also have multiple sessions, and when network device 20 sends a request to network device 10 based on all of the multiple sessions, network device 10 will also determine a request priority based on the session type of each session. The network device 10 will first receive and process request messages with high request priority. The session types may include a control type session, a query type session, and a subscription type session, where the request priorities corresponding to the session types are from high to low: control class session, query class session, subscription class session. It should be appreciated that the present application is not particularly limited in terms of the setting of session type and request priority.
S750: the network device 10 replies to the network device 20 with a response message.
After the network device 10 processes the request message, it replies a response message to the network device 20. As shown in fig. 9A, a session 1 exists between the network device 10 and the network device 21, a session 2 exists between the network device 10 and the network device 20, and a session 3 exists between the network device 10 and the network device 24. When the network device 10 determines to communicate with the network device 20, after receiving the request message 1 sent by the network device 20 based on the session 2, the network device processes the request message 1 according to the response priority of the session 2, and replies a response message 1 obtained after processing the request message to the network device 20.
In some embodiments, when there are multiple sessions in progress between the network device 20 and the network device 10, the network device 10 generates multiple response messages based on multiple request messages sent by the network device 20, and the network device 10 determines a response priority of each response message according to the session type of each response message, and replies the response messages sequentially according to the response priority. The priorities of the request message and the response message of the same session type may also be different, for example, the response priority corresponding to the session type is from high to low: query class session, control class session, subscription class session, wherein the query class session requests a lower priority than the control class session, but the query class session responds a higher priority than the control class session. That is, the network device 10 will receive and process the request message of the control class session preferentially, but the request message of the control class session may be replied later. It should be understood that the present application is not limited to the setting of session type and response message priority.
For example, as shown in fig. 9B, a session 1 exists between the network device 10 and the network device 21, a session 2 and a session 4 exist between the network device 10 and the network device 20, and a session 3 exists between the network device 10 and the network device 24. When the network device 20 sends the request message 1 and the request message 2 to the network device 10, since the session 2 has a high request priority, the network device 10 will receive the request message 1 first and then receive the request message 2. Then, the network device 10 finishes processing the request message 1 and the request message 2 at the same time, and sends the response message 2 first and then sends the response message 1 because the response priority of the session 4 is high.
In summary, when the network device 10 receives data, the priority order of the network devices at the opposite end is adopted, and for the network device with low priority, the network device 10 can also suppress the port connected to the network device, so that even if a large number of network devices send data to the network device 10 at the same time, the network device 10 is not overloaded. In addition, the network device 10 can also determine the response priority according to the session type, so that the request message and the response message can both determine the priority according to the session type, the bidirectional communication can both be performed according to the priority, and the reasonable performance of the bidirectional communication resources is ensured.
The process by which network device 10 sends a message to network device 20 is described in detail below in conjunction with fig. 10.
S1010: the network device 10 determines whether to send a request message to the network device 20 according to the target priority of the network device 20.
The network device 10 first determines whether data of other network devices are currently being transmitted, and if the network device 10 is not transmitting data of other network devices, the network device 10 may currently transmit data to the network device 20, i.e., step S1030 is to be performed.
If the network device 10 is transmitting or is about to transmit data of other network devices, the network device 10 will also determine whether or not data can be transmitted to the network device 20 based on the target priority of the network device 20. Wherein, when the network device 10 is transmitting or is about to transmit data of a network device having a lower priority than the target priority of the network device 20, the network device 10 may currently transmit data to the network device 20 first, and step S1030 is about to be performed. When the network device 10 is receiving or is about to receive data of a network device having a higher priority than the target priority of the network device 20, the network device 10 will receive data of the network device having the higher priority first, i.e., perform step S1020.
S1020: the network device 10 transmits data to the network device of higher priority.
When the priority of the network device 20 is lower than the priority of the other network devices, the network device 10 will transmit the data of the network device with higher priority first. When the network device 10 has completed transmitting the data of the network device with the higher priority, the network device 10 will execute step S1030.
S1030: the network device 10 sends a request message to the network device 20, the request message carrying a response priority.
When the network device 20 is not transmitting data of other network devices or has already transmitted data of a network device with higher priority, the network device 10 may send a request message to the network device 20, where the request message carries a response priority of a session corresponding to the request message, so that the network device 20 can respond to the request message according to the response priority. Details of the response priority may be referred to the relevant description in fig. 7, and will not be described here.
In some embodiments, there may be multiple sessions between the network device 10 and the network device 20, and when the network device 10 needs to send multiple request messages to the network device 20, the network device 10 will further determine the request priority of each request message, and send the request message with a higher request priority preferentially. Details of the session type and request priority may be referred to the relevant description in fig. 7, and will not be repeated here.
S1040: the network device 20 receives and processes the request message according to the response priority, and obtains a response message.
After receiving the request message, the network device 20 processes the request message to generate a response message.
In some embodiments, the network device 10 and the network device 20 have multiple sessions, when the network device 20 receives multiple request messages, the network device 20 will also determine the order of processing the request messages according to the response priorities carried on the request messages, where the network device 20 will preferentially process the request messages with higher response priorities.
S1050: the network device 20 replies to the network device 10 with a response message.
After the network device 20 processes the request message, it replies a response message to the network device 10.
In some embodiments, when there are multiple sessions between the network device 10 and the network device 20, the network device 20 further determines the order of responding to the response messages according to the response priority when the network device 20 needs to reply to the multiple response messages.
In summary, when the network device 10 transmits data to other network devices, the network device that is transmitted first will be determined according to the priority of the network device. Then, the order of sending the request messages is determined according to the session type, and the request messages can also carry response priorities, so that the opposite terminal network equipment can process and reply the request messages according to the response priorities. Therefore, the request message and the response message can both determine the priority according to the session type, the bidirectional communication can be performed according to the priority, and the reasonable performance of the bidirectional communication resources is ensured.
In other embodiments, emergency communications can also be established between network device 20 and network device 10, for example, when network device 20 needs to establish emergency communications with network device 10, network device 20 will initiate an initiation message for the emergency communications with network device 10 and refrain from communicating other ports than the second port to which network device 10 is connected. After the network device 10 receives the emergency communication message, communication of other ports except the first port is also inhibited, so that communication resources between the network device 10 and the network device 20 are not occupied by other network devices.
The emergency communication between the network device 10 and the network device 20 will be described in detail. For convenience of explanation, the following description will be given by taking an example that the network device 20 initiates the emergency communication to the network device 10, where the network device 10 is connected to the second port of the network device 20 through the first port, and it should be understood that any network device in the communication scheduling method provided by the present application may initiate the emergency communication, and the present application is not limited to the network device initiating the emergency communication specifically.
When the network device 20 needs to establish emergency communication with the network device 10, the initiation message sent to the network device 10 may carry an initiation flag, where the initiation flag is used to indicate that the network device 20 needs to establish emergency communication with the network device 10, and the initiation message may also carry an emergency communication duration.
When the initiation message carries only the initiation flag, the process of the network device 20 and the network device 10 for emergency communication may refer to the method flow shown in fig. 11.
S1110: the network device 20 suppresses communication of the ports other than the second port.
As shown in fig. 12, the network device 20 may send a MAC control frame to the other ports except the second port, where the MAC control frame carries a PAUSE flag for indicating that the port is inhibited from receiving and sending data.
S1120: the network device 20 sends a start message to the network device 10, the start message carrying a start flag.
The initiation message sent by the network device 20 to the network device 10 carries an initiation flag for indicating to the network device 10 that the network device 20 needs to make an emergency communication.
In some embodiments, network device 20 may send an initiation message to network device 10, and refrain from communicating other ports than the first port. That is, step S1120 is performed first, and then step S1110 is performed.
S1130: the network device 10 suppresses communication of ports other than the first port according to the start flag.
The network device 10 may send a MAC control frame to ports other than the first port, where the MAC control frame carries a PAUSE flag for indicating that the port is inhibited from receiving and sending data.
S1140: the network device 20 transmits emergency communication data to the network device 10.
The network device 20 continuously transmits the emergency communication related message to the network device 10 until the transmission of the emergency communication data of the network device 20 is completed, and the network device 20 will perform step S1150.
S1150: the network device 20 resumes communication with the ports to which the other devices are connected.
The network device 20 may send a MAC control frame to ports other than the first port, the MAC control frame carrying a PAUSE flag with a PAUSE flag time parameter of 0 for ending the communication suppression to the port.
S1160: the network device 20 sends a termination message to the network device 10, the termination message carrying a termination flag.
The termination message sent by the network device 20 to the network device 10 carries a termination flag for indicating the end of the emergency communication.
S1170: the network device 10 resumes communication with the ports to which the other devices are connected.
After receiving the termination message carrying the termination flag, the network device 10 will send the MAC control frame to the ports other than the second port, where the MAC control frame carries a PAUSE flag, and the time parameter of the PAUSE flag is marked as 0, so as to end the communication suppression on the ports.
In some embodiments, the network device 10 and the network device 20 are connected through other intermediate network devices, for example, the network device 10 and the network device 20 are connected through a router or a switch, and the intermediate network devices are used for forwarding the message in the above-mentioned step method. When the intermediate device receives the initiation message, communications other than the ports connecting the network device 10 and the network device 20 will also be suppressed; and after the intermediate equipment receives the termination message, the communication of all ports is restored.
When the initiation message carries the initiation flag and the duration of the emergency communication, the process of the emergency communication between the network device 20 and the network device 10 may refer to the method flow shown in fig. 13.
S1310: the network device 20 suppresses communication of ports other than the first port.
The network device 20 may send a MAC control frame to ports other than the first port, the MAC control frame carrying a PAUSE flag and a time parameter for indicating the time at which the port was suppressed to receive and transmit data.
S1320: the network device 20 sends a start message to the network device 10, the start message carrying a start flag and an emergency communication duration.
The initiation message sent by the network device 20 to the network device 10 carries an initiation flag and an emergency communication duration, where the initiation flag is used to indicate to the network device 10 that the network device 20 needs to perform emergency communication, and the emergency communication duration is used to indicate the time required for the emergency communication.
In some embodiments, network device 20 may send an initiation message to network device 10, and refrain from communicating other ports than the first port. That is, step S1320 is performed before step S1310 is performed.
S1330: the network device 10 suppresses communication of ports other than the second port according to the start flag.
The network device 10 may send a MAC control frame to ports other than the second port, where the MAC control frame carries a PAUSE flag and a time parameter for indicating the time at which the port is suppressed, and the time parameter is used to indicate the time at which the port is suppressed.
S1340: the network device 20 transmits emergency communication data to the network device 10.
Emergency communication related messages are continually sent to the network device 10 at the network device 20 until the emergency communication duration is reached. After the duration of the emergency communication is reached, communication will resume at all ports of network device 10 and network device 20.
In some embodiments, the network device 10 and the network device 20 are connected through other intermediate network devices, for example, a router or a switch is connected between the network device 10 and the network device 20, and the intermediate network devices are used for forwarding the message. When the intermediate device receives the initiation message, communications other than the ports connecting the network device 10 and the network device 20 will also be suppressed; after the emergency communication duration is reached, the communication of all ports is restored.
As shown in fig. 14A, the start message sent by the network device 20 carries a start flag, and the network device 20 suppresses communication except for the other ports connected to the intermediate network device. After the intermediate network device receives the initial message, the communication with the ports connected to other devices is also inhibited, and the initial message is forwarded to the next intermediate network device until the network device 10 receives the initial message. The network device 20 then transmits the emergency communication data to the network device 10 through the intermediate network device. Until the transmission of the emergency communication data is completed, the network device 20 transmits a termination message to the network device 10 through the intermediate network node, the network device 20 resumes the communication of other ports, and after the intermediate network node and the network device 10 receive the termination message, the communication of other ports will also resume.
As shown in fig. 14B, the initiation message sent by the network device 20 may also be a message carrying an initiation flag and an emergency communication duration. Likewise, the network device 20 suppresses communication except for the other ports connected to the intermediate network device. After the intermediate network device receives the initial message, the intermediate network device will parse to obtain the emergency communication duration, and will also inhibit the communication with the ports connected with other devices, and forward the initial message to the next intermediate network device until the network device 10 receives the initial message. The network device 20 then transmits the emergency communication data to the network device 10 through the intermediate network device. When the duration of the emergency communication is reached, the network device 20 will automatically end the transmission of the emergency communication data and resume the communication of the other ports. The intermediate network device and the network device 10 will also automatically resume communication with other ports after receiving the duration of the emergency communication of the initiation message.
Fig. 15 illustrates a schematic diagram of an intermediate network node suppressing other ports in emergency communication. The intermediate network node will reserve ports with the emergency communication device, i.e. an egress/ingress port and an ingress/egress port, send MAC control frames to the other ports, the MAC control frames carrying a PAUSE tag.
The following illustrates the emergency communication with reference to fig. 16, and when the monitoring camera needs to perform the emergency communication with the remote controller, the following steps are performed when the monitoring camera initiates the emergency communication to the remote controller:
s1601: the monitoring camera sends a start message to the router 3.
The initial message sent by the monitoring camera to the router 3 carries an emergency communication sign, or carries an emergency communication sign and an emergency communication duration.
S1602: the router 3 forwards the initiation message to the router 2 and suppresses communication with the ports of the robot arm 1 and the robot arm 2.
S1603: router 2 forwards the initiation message to router 1 and suppresses communication with the port of secondary acquisition PC 2.
S1604: the router 1 forwards the initiation message to the remote controller and suppresses communication with the port of the auxiliary acquisition PC 1.
Then, the monitoring camera and the remote controller perform emergency communication through the router 1, the router 2, and the router 3. The emergency communication is not ended until the monitoring camera sends a termination message to the remote controller or the emergency communication duration is reached, at this time, the router 3 will restore the ports of the mechanical arm 1 and the mechanical arm 2, the router 2 will restore the port of the auxiliary acquisition PC2, and the router 1 will restore the port of the auxiliary acquisition PC 1.
In summary, the communication scheduling method provided by the application can update the priority for the network device in real time by acquiring the device type and the real-time operation state, and allocate communication resources for the network device according to the priority updated in real time, so that the real-time operation requirement can be met. And the request message carries the response priority, so that the opposite terminal network equipment can process the request message according to the response priority, and the bidirectional communication can be carried out according to the priority. The communication scheduling method provided by the application can also inhibit communication between the network equipment and the port connected with the non-emergency communication equipment in the emergency communication, so that communication data of other equipment cannot occupy communication resources, and the data of the emergency communication can be sent and received preferentially.
In order to solve the problem that the demand of the network device for the communication resources changes along with the actual operation situation, so that the communication resources cannot be reasonably allocated, the application provides a communication scheduling device 1700, which can set the priority of the network device according to the device type of the network device and the real-time operation state of the network device, and allocate the communication resources according to the priority of the network device. As shown in fig. 17, the communication scheduling apparatus 1700 includes: acquisition unit 1710, determination unit 1720.
The acquiring unit 1710 is configured to acquire a device type and a job status of at least one network device connected to the first network device; wherein the at least one network device comprises a second network device; the determining unit 1720 is configured to determine, according to a device type of at least one network device, a first priority table, where the first priority table includes initial priorities of the at least one network device, and initial priorities of network devices with the same device type are the same; the determining unit 1720 is further configured to determine an initial priority of the second network device, and determine a target priority of the second network device according to the job status of the second network device and the initial priority of the second network device in the first priority table.
In some embodiments, the determining unit 1720 is further configured to update the first priority table to the second priority table according to the target priority of the second network device.
In some embodiments, the second priority table is determined by re-ordering the network devices with the same initial priority in the first priority table according to the priority corresponding to the job status; or the second priority table is determined by adjusting the initial priority of each network device according to the preset ranking corresponding to the job status of each network device.
In some embodiments, the apparatus further comprises a transmitting unit 1730; the determining unit 1720 is further configured to determine whether to communicate with the second network device according to the second priority table; the sending unit 1730 is configured to send a first request packet to the second network device when determining to communicate with the second network device, where the first request packet carries a response priority, and the response priority is used by the second network device to determine a time for responding to the first request packet.
In some embodiments, the apparatus further comprises a receiving unit 1740; the determining unit 1720 is further configured to determine whether to communicate with the second network device according to the second priority table; the receiving unit 1740 is configured to receive a second request packet sent by the second network device when it is determined to communicate with the second network device; the determining unit 1720 is further configured to determine a response priority of the second request packet according to the second request packet, where the response priority of the second request packet is determined according to a session type of the second request packet.
In some embodiments, the first network device and the second network device have a plurality of sessions before each other, and the acquiring unit 1710 is further configured to acquire session types of the plurality of sessions; the determining unit 1720 is further configured to determine a target session from the plurality of sessions according to a session type, where the target session is determined according to a request priority corresponding to the session type in the plurality of sessions, and the request priority corresponding to the session type is used to indicate an order of sending the session request messages.
In some embodiments, a first port of a first network device is connected to a second port of a second network device; the receiving unit 1740 is further configured to receive an initiation message sent by the second network device, where the initiation message carries an emergency communication initiation flag; the determining unit 1720 is further configured to suppress communications of ports other than the first port according to the start message.
In some embodiments, the receiving unit 1740 is further configured to receive a termination message sent by the second network device, where the termination message carries an emergency communication termination flag; the determining unit 1720 is further configured to resume communication of the other ports except the first port according to the termination message.
In some embodiments, the initiation message further carries an emergency communication duration, where the emergency communication duration is used to indicate a communication suppression duration of the ports other than the first port.
In some embodiments, the device types include: motion control class, state control class and state sensing class, wherein the initial priority of the device type corresponding to the network device is from high to low: a motion control class, a state control class, and a state sensing class; the job status includes: an ongoing job, a ready job and an unexecuted job, wherein the priority corresponding to the job status is from high to low: work in progress, preparation work, and no work.
In some embodiments, the session types include: control class session, inquiry class session and subscription class session, wherein the request priority corresponding to the session type is from high to low: control class session, inquiry class session and subscription class session, wherein the response priority corresponding to the session type is from high to low: query class session, control class session, subscription class session.
In summary, the communication scheduling device provided by the application can update the priority for the network device in real time by acquiring the device type and the real-time operation state, and allocate communication resources for the network device according to the priority updated in real time, so that the real-time operation requirement can be met. And the request message carries the response priority, so that the opposite terminal network equipment can process the request message according to the response priority, and the bidirectional communication can be carried out according to the priority. The communication scheduling method provided by the application can also inhibit communication between the network equipment and the port connected with the non-emergency communication equipment in the emergency communication, so that communication data of other equipment cannot occupy communication resources, and the data of the emergency communication can be sent and received preferentially.
The foregoing details of the method according to the embodiments of the present application are provided for better implementing the foregoing aspects of the embodiments of the present application, and accordingly, related devices for implementing the foregoing aspects in cooperation are also provided below.
Fig. 18 is a schematic structural diagram of a computing device 1800 provided by the present application, where the computing device 1800 may be the communication scheduler 1800 described above. As shown in fig. 9, the network device 1800 includes: processor 1810, communication interface 1820, and memory 1830. The processor 1810, the communication interface 1820, and the memory 1830 may be connected to each other through an internal bus 1840, or may communicate with each other through other means such as wireless transmission. In the embodiment of the present application, the bus 1840 may be a PCI express (Peripheral Component Interconnect Express, PCIe) bus, or an extended industry Standard architecture (extended industry standard architecture, EISA) bus, a universal bus (Ubus or UB), a computer quick link (compute express link, CXL), a cache coherent interconnect protocol (cache coherent interconnect for accelerators, CCIX), or the like, as exemplified by a connection via the bus 1840. The bus 1840 may be classified as an address bus, a data bus, a control bus, or the like. The bus 1840 may include a power bus, a control bus, a status signal bus, and the like in addition to a data bus. But for clarity of illustration, the various buses are labeled as bus 1840 in the figures.
The processor 1810 may include at least one general purpose processor such as a central processing unit (Central Processing Unit, CPU), or a combination of CPU and hardware chips. The hardware chip may be an Application-specific integrated circuit (ASIC), a programmable logic device (Programmable Logic Device, PLD), or a combination thereof. The PLD may be a complex programmable logic device (Complex Programmable Logic Device, CPLD), a Field programmable gate array (Field-Programmable Gate Array, FPGA), general-purpose array logic (Generic Array Logic, GAL), or any combination thereof. Processor 1810 executes various types of digitally stored instructions, such as software or firmware programs stored in memory 1830, which enable computing device 900 to provide a variety of services.
The memory 1830 is used for storing program codes and is controlled to be executed by the processor 1810 to perform the processing steps of the communication scheduling method in the above-described embodiment. The program code may include one or more software modules, which may be the software modules provided in the embodiment of fig. 17, for example, the acquisition unit, the determination unit: the acquisition unit is used for acquiring the equipment type and the operation state of at least one network equipment connected with the first network equipment; wherein the at least one network device comprises a second network device; the determining unit is used for determining a first priority table according to the equipment type of at least one network equipment, wherein the first priority table comprises the initial priority of the at least one network equipment, and the initial priorities of the network equipment with the same equipment type are the same; the determining unit is further configured to determine an initial priority of the second network device, and determine a target priority of the second network device according to the job status of the second network device and the initial priority of the second network device in the first priority table.
It should be noted that, the present embodiment may be implemented by a general physical server, for example, an ARM server or an X86 server, or may be implemented by a virtual machine implemented by combining an NFV technology with a general physical server, where the virtual machine refers to a complete computer system that is simulated by software and has a complete hardware system function and operates in a completely isolated environment, and the present application is not limited in particular.
Memory 1830 may include Volatile Memory (RAM), such as random access Memory (Random Access Memory); the Memory 1830 may also include a Non-Volatile Memory (Non-Volatile Memory), such as a Read-Only Memory (ROM), a Flash Memory (Flash Memory), a Hard Disk (HDD), or a Solid State Drive (SSD); the memory 1830 may also include a combination of the above. The memory 1830 may store program codes for specifically executing steps S310-S340 and optional steps thereof in the embodiment of fig. 3, or executing steps S710-S750 and optional steps thereof in the embodiment of fig. 7, or executing steps S1010-S1050 and optional steps thereof in the embodiment of fig. 10, or executing steps S1110-S1170 and optional steps thereof in the embodiment of fig. 11, or executing steps S1310-S1340 and optional steps thereof in the embodiment of fig. 13, which will not be repeated here.
The communication interface 1820 may be a wired interface (e.g., an ethernet interface), may be an internal interface (e.g., a high-speed serial computer expansion bus (Peripheral Component Interconnect express, PCIe) bus interface), a wired interface (e.g., an ethernet interface), or a wireless interface (e.g., a cellular network interface or using a wireless local area network interface) for communicating with other devices or modules.
It should be noted that fig. 18 is only one possible implementation of an embodiment of the present application, and in practical applications, the network device 1800 may include more or fewer components, which is not limited herein. For details not shown or described in the embodiments of the present application, reference may be made to the foregoing descriptions of the embodiments of fig. 3, 7, 10, 11 and 13, which are not repeated herein.
It should be appreciated that the computing device shown in fig. 18 may also be a computer cluster of at least one server, and the application is not particularly limited.
Embodiments of the present application also provide a computer readable storage medium having instructions stored therein that, when executed on a processor, implement the method flows shown in fig. 3, 7, 10, 11, and 13.
The embodiments of the present application also provide a computer program product, which when run on a processor, implements the method flows shown in fig. 3, 7, 10, 11 and 13.
The above embodiments may be implemented in whole or in part by software, hardware, firmware, or any other combination. When implemented in software, the above-described embodiments may be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When loaded or executed on a computer, produces a flow or function in accordance with embodiments of the present application, in whole or in part. The computer may be a general purpose computer, a special purpose computer, a computer network, or other programmable apparatus. The computer instructions may be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another computer-readable storage medium, e.g., from one website, computer, server, or data center by a wired (e.g., coaxial cable, fiber optic, digital subscriber line (Digital Subscriber Line, DSL), or wireless (e.g., infrared, wireless, microwave, etc.) means, the computer-readable storage medium may be any available medium that can be accessed by the computer or a data storage device such as a server, data center, etc., that contains a collection of one or more available media, the available media may be magnetic media (e.g., floppy disk, hard disk, tape), optical media (e.g., high-density digital video disc (Digital Video Disc, DVD), or semiconductor media.
While the invention has been described with reference to certain preferred embodiments, it will be understood by those skilled in the art that various changes and substitutions of equivalents may be made and equivalents will be apparent to those skilled in the art without departing from the scope of the invention. Therefore, the protection scope of the invention is subject to the protection scope of the claims.

Claims (16)

1. A method of communication scheduling, applied to a first network device, comprising:
acquiring the equipment type and the operation state of at least one network equipment connected with the first network equipment; wherein the at least one network device comprises a second network device;
determining a first priority table according to the equipment type of the at least one network equipment, wherein the first priority table comprises initial priorities of the at least one network equipment, and the initial priorities of the network equipment with the same equipment type are the same;
and determining the initial priority of the second network equipment, and determining the target priority of the second network equipment according to the job state of the second network equipment and the initial priority of the second network equipment in the first priority table.
2. The method according to claim 1, wherein the method further comprises:
and updating the first priority table into a second priority table according to the target priority of the second network equipment.
3. The method of claim 2, wherein the step of determining the position of the substrate comprises,
the second priority table is determined by sequencing the network devices with the same initial priority in the first priority table again according to the priority corresponding to the operation state; or,
the second priority table is used for determining the initial priority of each network device according to the preset ranking corresponding to the job status adjustment job status of each network device.
4. A method according to any one of claims 2 or 3, wherein the method further comprises:
determining whether to communicate with the second network device according to the second priority table;
when the communication with the second network equipment is determined, a first request message is sent to the second network equipment, wherein the first request message carries response priority, and the response priority is used for the second network equipment to determine the time for responding to the first request message.
5. A method according to any one of claims 2 or 3, wherein the method further comprises:
Determining whether to communicate with the second network device according to the second priority table;
when the communication with the second network equipment is determined, receiving a second request message sent by the second network equipment;
and determining the response priority of the second request message according to the second request message, wherein the response priority of the second request message is determined according to the session type of the second request message.
6. The method of any of claims 4 or 5, wherein the first network device and the second network device are preceded by a plurality of sessions, the determining to communicate with the second network device comprising:
acquiring session types of the plurality of sessions;
and determining a target session from the plurality of sessions according to the session type, wherein the target session is determined according to the request priority corresponding to the session type in the plurality of sessions, and the request priority corresponding to the session type is used for indicating the sequence of sending the session request messages.
7. The method according to any one of claims 2 or 6, further comprising:
determining whether in an emergency communication state;
Determining an emergency communication with the second network device based on the emergency state;
and after the emergency state is released, determining whether to communicate with the second network device according to the second priority table.
8. The method of claim 7, wherein the first port of the first network device is connected to the second port of the second network device, the method further comprising:
receiving an initial message sent by the second network equipment, wherein the initial message carries an emergency communication initial mark, and the initial mark is used for indicating the start of an emergency state;
and according to the initial message, inhibiting communication of other ports except the first port.
9. The method as recited in claim 7, further comprising:
receiving a termination message sent by the second network device, wherein the termination message carries an emergency communication termination mark, and the termination mark is used for indicating the release of an emergency state;
and restoring the communication of the ports except the first port according to the termination message.
10. The method of claim 8, wherein the initiation message further carries an emergency communication duration for the first network device to determine the communication suppression duration for the ports other than the first port.
11. The method according to any one of claims 1 to 10, wherein,
the device types include: the device type comprises a motion control class, a state control class and a state sensing class, wherein the initial priority of the device type corresponding to the network device is as follows from high to low: a motion control class, a state control class, and a state sensing class;
the job status includes: an ongoing operation, a preparation operation and an unexecuted operation, wherein the priority corresponding to the operation state is from high to low: work in progress, preparation work, and no work.
12. The method according to any one of claims 5 to 11, wherein,
the session type includes: control class session, inquiry class session and subscription class session, wherein the request priority corresponding to the session type is from high to low: control class session, inquiry class session and subscription class session, wherein the response priority corresponding to the session type is from high to low: query class session, control class session, subscription class session.
13. A communications scheduling apparatus for use with a first network device, comprising: an acquisition unit, a determination unit;
the acquisition unit is used for acquiring the equipment type and the operation state of at least one network equipment connected with the first network equipment; wherein the at least one network device comprises a second network device;
The determining unit is configured to determine a first priority table according to a device type of the at least one network device, where the first priority table includes initial priorities of the at least one network device, and initial priorities of network devices with the same device type are the same;
the determining unit is further configured to determine an initial priority of the second network device, and determine a target priority of the second network device according to the job status of the second network device and the initial priority of the second network device in the first priority table.
14. A network device comprising a processor and a memory, the memory for storing instructions, the processor for executing the instructions, which when executed by the processor, perform the method of any of claims 1 to 12.
15. A computer program product comprising computer instructions which, when executed by a network device, cause a computing device to perform the method of any of claims 1 to 12.
16. A computer readable storage medium comprising instructions which, when run on a network device, cause the network device to perform the method of any of claims 1 to 12.
CN202210615277.XA 2022-05-31 2022-05-31 Communication scheduling method and device and related equipment Pending CN117221955A (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN202210615277.XA CN117221955A (en) 2022-05-31 2022-05-31 Communication scheduling method and device and related equipment
PCT/CN2023/096320 WO2023231899A1 (en) 2022-05-31 2023-05-25 Communication scheduling method and apparatus, and related device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210615277.XA CN117221955A (en) 2022-05-31 2022-05-31 Communication scheduling method and device and related equipment

Publications (1)

Publication Number Publication Date
CN117221955A true CN117221955A (en) 2023-12-12

Family

ID=89026894

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210615277.XA Pending CN117221955A (en) 2022-05-31 2022-05-31 Communication scheduling method and device and related equipment

Country Status (2)

Country Link
CN (1) CN117221955A (en)
WO (1) WO2023231899A1 (en)

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107580340B (en) * 2016-07-05 2020-01-17 普天信息技术有限公司 Resource scheduling method in V2X network
US10390257B2 (en) * 2016-07-21 2019-08-20 At&T Mobility Ii Llc Traffic priority for long term evolution networks
CN113760473A (en) * 2020-06-03 2021-12-07 Oppo广东移动通信有限公司 Priority processing method, processor, processing chip, circuit board and electronic equipment
CN113626164A (en) * 2021-07-23 2021-11-09 济南浪潮数据技术有限公司 Monitoring platform job scheduling method, device, terminal and storage medium

Also Published As

Publication number Publication date
WO2023231899A1 (en) 2023-12-07

Similar Documents

Publication Publication Date Title
KR102290690B1 (en) Communication mode switching method, network-side device and terminal device
US10051561B2 (en) Methods and nodes for M2M communication
CN111200847A (en) Communication method and device
CN109842507B (en) Network slice management method and equipment
US11528167B2 (en) Method and device for implementing gateway cooperation, IoT gateway and storage medium
CN105392185B (en) A kind of networking method of smart machine, apparatus and system
CN104283743A (en) Home network equipment and proxy service discovering method
KR101640338B1 (en) Method for operating a network element of a wireless communication network and network element
US10602475B2 (en) Method and system for device location management
US11356328B2 (en) Service management method and apparatus, and storage medium
EP4247039A1 (en) Computing-aware session management method and communication device
CN113747478A (en) Communication method and device
CN104955128B (en) Load information transmission method and system, and network element
US20230139345A1 (en) Computing service implementation method and apparatus
WO2023116772A1 (en) Satellite switching method and apparatus, storage medium, and chip system
RU2732736C1 (en) Communication method, secondary network node and terminal
JP2017121038A (en) Terminal apparatus, communication system and connection target selection method
CN107534917A (en) Switching method, main equipment, slave unit and system in a kind of master-slave type network
CN117221955A (en) Communication scheduling method and device and related equipment
CN111684837B (en) Radio communication system for an industrial automation system and method for operating a radio communication system
WO2018104273A1 (en) Method and device for obtaining resources and information of sdn networks of different operators
CN103701952A (en) Downlink transmission method of business data and grouped data gateway
CN113873600A (en) Method, device, terminal, storage medium and program product for switching sidelink
JP2019022057A (en) Virtual server configuration changing method and virtual server configuration changing system
CN109495918B (en) Data transmission method and device

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