CN115297178B - Message sending method and device, storage medium and electronic device - Google Patents

Message sending method and device, storage medium and electronic device Download PDF

Info

Publication number
CN115297178B
CN115297178B CN202211117473.0A CN202211117473A CN115297178B CN 115297178 B CN115297178 B CN 115297178B CN 202211117473 A CN202211117473 A CN 202211117473A CN 115297178 B CN115297178 B CN 115297178B
Authority
CN
China
Prior art keywords
message
sending
uplink data
priority
target
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.)
Active
Application number
CN202211117473.0A
Other languages
Chinese (zh)
Other versions
CN115297178A (en
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.)
Zhejiang Dahua Technology Co Ltd
Original Assignee
Zhejiang Dahua Technology 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 Zhejiang Dahua Technology Co Ltd filed Critical Zhejiang Dahua Technology Co Ltd
Priority to CN202211117473.0A priority Critical patent/CN115297178B/en
Publication of CN115297178A publication Critical patent/CN115297178A/en
Application granted granted Critical
Publication of CN115297178B publication Critical patent/CN115297178B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L43/00Arrangements for monitoring or testing data switching networks
    • H04L43/08Monitoring or testing based on specific metrics, e.g. QoS, energy consumption or environmental parameters
    • H04L43/0823Errors, e.g. transmission errors
    • H04L43/0829Packet loss
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L43/00Arrangements for monitoring or testing data switching networks
    • H04L43/16Threshold monitoring
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/10Protocols in which an application is distributed across nodes in the network

Abstract

The invention provides a message sending method and device, a storage medium and an electronic device, wherein the method comprises the following steps: under the condition that the first packet loss rate of the first uplink data message sent by the first equipment is larger than or equal to a first preset threshold value, sending query messages to N other equipment; receiving response messages sent by each other device to obtain N first response messages, and determining a target device from the N other devices based on the sending information of the uplink data messages indicated by the N first response messages; and sending a request message to the target equipment, wherein the request message is used for requesting the target equipment to reduce the priority of sending the second uplink data message so as to reduce the first packet loss rate. The invention solves the problem that the competition between devices in uplink data transmission can not be effectively solved in the related technology.

Description

Message sending method and device, storage medium and electronic device
Technical Field
The present invention relates to the field of computers, and in particular, to a method and apparatus for sending a message, a storage medium, and an electronic apparatus.
Background
In the uplink data transmission process, an enhanced distributed channel allocation mechanism (Enhanced Distributed Channel Allocation, abbreviated EDCA) is generally adopted to adjust multiple terminals to transmit uplink data simultaneously. More network collisions (e.g., audio-video data with higher transmission opportunities) can result, leading to reduced audio-video streaming performance.
In the prior art, a single terminal adjusts a transmission queue according to a service, or controls a contention window through a wireless Access Point (AP) and cannot cooperate with other devices to adjust, so that collision among the devices is avoided when the same device simultaneously transmits uplink data.
Disclosure of Invention
The embodiment of the invention provides a message sending method and device, a storage medium and an electronic device, which at least solve the problem that the related technology cannot effectively solve the competition between devices in the uplink data transmission.
According to one embodiment of the present invention, there is provided a message sending method, including: under the condition that the first packet loss rate of the first uplink data message sent by the first device is larger than or equal to a first preset threshold value, sending a query message to N other devices, wherein N is a natural number larger than or equal to 1, the other devices are devices which perform message transmission under the same network with the first device, and the query message is used for requesting to query the sending information of the uplink data message of the other devices; receiving response messages sent by each other device to obtain N first response messages, and determining a target device from the N other devices based on the sending information of the uplink data messages indicated by the N first response messages; and sending a request message to the target device, wherein the request message is used for requesting the target device to reduce the priority of sending the second uplink data message so as to reduce the first packet loss rate.
According to another embodiment of the present invention, there is provided a message processing method, including: receiving a query message sent by a first device, wherein the query message is used for requesting to query target sending information of a second uplink data message of a target device, the target device is a device which performs message transmission under the same network as the first device, and the query message is sent by the first device under the condition that the first packet loss rate of sending the first uplink data message is greater than or equal to a first preset threshold value; determining the target sending information, generating a first response message comprising the target sending information, and sending the first response message to the first device; receiving a request message sent by the first device, wherein the request message is used for requesting the target device to reduce a second preset priority for sending the second uplink data message so as to reduce a first packet loss rate of the first device for sending the first uplink data message; and reducing the current priority of sending the second uplink data message based on the request message.
According to another embodiment of the present invention, there is provided a message transmitting apparatus including: the first sending module is configured to send a query message to N other devices when it is determined that a first packet loss rate of a first uplink data packet sent by the first device is greater than or equal to a first preset threshold, where N is a natural number greater than or equal to 1, and the other devices are devices that perform packet transmission under the same network as the first device, where the query message is used to request to query sending information of the uplink data packet of the other devices; the first receiving module is used for receiving the response messages sent by each other device to obtain N first response messages, and determining target devices from the N other devices based on the sending information of the uplink data messages indicated by the N first response messages; and the second sending module is used for sending a request message to the target equipment, wherein the request message is used for requesting the target equipment to reduce the priority of sending a second uplink data message so as to reduce the first packet loss rate.
In an exemplary embodiment, the above apparatus further includes: a fourth sending module, configured to send the first uplink data packet according to a first preset priority indicated in the distributed channel allocation mechanism, before sending the query packet to N other devices; the first transmitting module includes: and the first sending unit is used for sending the query message to the N other devices in a multicast sending mode.
In an exemplary embodiment, the first receiving module includes: a first determining unit, configured to determine the following information included in each of the first response messages: each of the other devices transmits a second packet loss rate of the corresponding uplink data message and a second signal transmission intensity of each of the other devices; and a second determining unit configured to determine, as the target device, another device that has a second signal transmission strength that is greater than the first signal transmission strength of the first device and that corresponds to the second packet loss rate that is less than the first packet loss rate.
In an exemplary embodiment, the above apparatus further includes: a fourth receiving module, configured to receive a second response message sent by the target device after sending a request message to the target device, where the second response message includes a result of reducing, by the target device, a priority of sending the second uplink data message; the first detection module is configured to detect the first packet loss rate again when it is determined that, based on the second response packet, there is a device that reduces the priority of sending the second uplink data packet in the target device; the first reduction module is configured to reduce, when it is detected that the first packet loss rate is greater than or equal to the first preset threshold, a priority of the first device for sending the first uplink data packet, so that the first packet loss rate is smaller than the first preset threshold.
In an exemplary embodiment, the above apparatus further includes: and the first recovery module is used for recovering the priority of the first equipment for sending the uplink data message under the condition that the first uplink data message is determined to be sent after the priority of the first equipment for sending the first uplink data message is reduced.
According to another embodiment of the present invention, there is provided a message processing apparatus including: the second receiving module is configured to receive a query message sent by a first device, where the query message is used to request target sending information of a second uplink data message of a query target device, where the target device is a device that performs message transmission under the same network as the first device, and the query message is sent by the first device when it is determined that a first packet loss rate of sending the first uplink data message is greater than or equal to a first preset threshold; the first determining module is used for determining the target sending information, generating a first response message comprising the target sending information and sending the first response message to the first device; the third receiving module is configured to receive a request packet sent by the first device, where the request packet is used to request the target device to reduce a second preset priority for sending the second uplink data packet, so as to reduce a first packet loss rate of the first device sending the first uplink data packet; and the first reducing module is used for reducing the current priority of sending the second uplink data message based on the request message.
In an exemplary embodiment, the above apparatus further includes: a fifth sending module, configured to send the second uplink data packet according to a second preset priority indicated by the distributed channel allocation mechanism, before receiving the query packet sent by the first device; the second receiving module includes: the first receiving unit is configured to receive the query message sent by the first device in a multicast manner.
In an exemplary embodiment, the first determining module includes: a first obtaining unit, configured to obtain the first packet loss rate, a first signal transmission strength of the first device, and address information of the first device from the query packet; a third determining unit, configured to determine a second packet loss rate of the target device sending the second uplink data packet and a second signal sending strength of the target device, where the second packet loss rate and the second signal sending strength are included in the target sending information; a first generating unit, configured to generate the first response packet when it is determined that the second packet loss rate is smaller than the first packet loss rate and the second signal transmission strength is greater than the first signal transmission strength; and the first sending unit is used for sending the first response message to the first equipment according to the address information of the first equipment.
In an exemplary embodiment, the first reducing module includes: a fourth determining unit, configured to determine a third packet loss rate of the target device sending the second uplink data packet according to a third preset priority, where the second preset priority is lower than the second preset priority; and the first adjusting unit is used for adjusting the priority of the target equipment for sending the second uplink data message from the second preset priority to the third preset priority under the condition that the third packet loss rate is smaller than the first preset threshold.
In an exemplary embodiment, the above apparatus further includes: and a second recovery module, configured to, after adjusting the priority of the target device for sending the second uplink data packet from the second preset priority to the third preset priority, recover the priority of the target device for sending the second uplink data packet from the third preset priority to the second preset priority when it is determined that the second uplink data packet has been sent.
In an exemplary embodiment, the above apparatus further includes: and a sixth sending module, configured to send a second response message to the first device after the current priority of sending the second uplink data message is reduced based on the request message, where the second response message includes a result of reducing, by the target device, the priority of sending the second uplink data message.
According to a further embodiment of the invention, there is also provided a computer readable storage medium having stored therein a computer program, wherein the computer program is arranged to perform the steps of any of the method embodiments described above when run.
According to a further embodiment of the invention, there is also provided an electronic device comprising a memory having stored therein a computer program and a processor arranged to run the computer program to perform the steps of any of the method embodiments described above.
According to the invention, under the condition that the first packet loss rate of the first uplink data message sent by the first device is larger than or equal to a first preset threshold value, a query message is sent to N other devices, wherein N is a natural number larger than or equal to 1, the other devices are devices which perform message transmission under the same network with the first device, and the query message is used for requesting to query the sending information of the uplink data message of the other devices; receiving response messages sent by each other device to obtain N first response messages, and determining a target device from the N other devices based on the sending information of the uplink data messages indicated by the N first response messages; and sending a request message to the target equipment, wherein the request message is used for requesting the target equipment to reduce the priority of sending the second uplink data message so as to reduce the first packet loss rate. In the method, the first device reduces the priority of sending the uplink message data by cooperating with other devices to achieve the purpose of reducing the packet loss rate, unified management is not needed through the AP, and only the transmission competition window is needed to be negotiated between the devices, so that the mutual conflict is avoided, and the competition window can be effectively coordinated. Therefore, the problem that the competition between devices in the uplink data transmission cannot be effectively solved in the related art can be solved.
Drawings
Fig. 1 is a block diagram of a hardware structure of a mobile terminal of a message sending method according to an embodiment of the present invention;
FIG. 2 is a flow chart of a method of messaging according to an embodiment of the present invention;
FIG. 3 is a flow chart of a message processing method according to an embodiment of the invention;
FIG. 4 is a flow chart according to an embodiment of the invention
Fig. 5 is a block diagram of a message transmitting apparatus according to an embodiment of the present invention;
fig. 6 is a block diagram of a message processing apparatus according to an embodiment of the present invention.
Detailed Description
Embodiments of the present invention will be described in detail below with reference to the accompanying drawings in conjunction with the embodiments.
It should be noted that the terms "first," "second," and the like in the description and the claims of the present invention and the above figures are used for distinguishing between similar objects and not necessarily for describing a particular sequential or chronological order.
The method embodiments provided in the embodiments of the present application may be performed in a mobile terminal, a computer terminal or similar computing device. Taking the mobile terminal as an example, fig. 1 is a block diagram of a hardware structure of a mobile terminal of a message sending method according to an embodiment of the present invention. As shown in fig. 1, a mobile terminal may include one or more (only one is shown in fig. 1) processors 102 (the processor 102 may include, but is not limited to, a microprocessor MCU or a processing device such as a programmable logic device FPGA) and a memory 104 for storing data, wherein the mobile terminal may also include a transmission device 106 for communication functions and an input-output device 108. It will be appreciated by those skilled in the art that the structure shown in fig. 1 is merely illustrative and not limiting of the structure of the mobile terminal described above. For example, the mobile terminal may also include more or fewer components than shown in fig. 1, or have a different configuration than shown in fig. 1.
The memory 104 may be used to store a computer program, for example, a software program of application software and a module, such as a computer program corresponding to a method for sending a message in an embodiment of the present invention, and the processor 102 executes the computer program stored in the memory 104, thereby performing various functional applications and data processing, that is, implementing the method described above. Memory 104 may include high-speed random access memory, and may also include non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some examples, the memory 104 may further include memory remotely located relative to the processor 102, which may be connected to the mobile terminal via a network. Examples of such networks include, but are not limited to, the internet, intranets, local area networks, mobile communication networks, and combinations thereof.
The transmission means 106 is arranged to receive or transmit data via a network. Specific examples of the network described above may include a wireless network provided by a communication provider of the mobile terminal. In one example, the transmission device 106 includes a network adapter (Network Interface Controller, simply referred to as NIC) that can connect to other network devices through a base station to communicate with the internet. In one example, the transmission device 106 may be a Radio Frequency (RF) module, which is used to communicate with the internet wirelessly.
In this embodiment, a method for sending a message is provided, and fig. 2 is a flowchart of a method for sending a message according to an embodiment of the present invention, as shown in fig. 2, where the flowchart includes the following steps:
step S202, under the condition that the first packet loss rate of the first uplink data message sent by the first device is larger than or equal to a first preset threshold value, sending query messages to N other devices, wherein N is a natural number larger than or equal to 1, the other devices are devices which perform message transmission under the same network with the first device, and the query messages are used for requesting to query the sending information of the uplink data messages of the other devices;
step S204, receiving response messages sent by each other device to obtain N first response messages, and determining a target device from the N other devices based on the sending information of the uplink data messages indicated by the N first response messages;
step S206, a request message is sent to the target device, wherein the request message is used for requesting the target device to reduce the priority of sending the second uplink data message so as to reduce the first packet loss rate.
Optionally, the first device and the N other devices are devices transmitting messages under the same network. For example, a plurality of devices periodically transmitting audio and video data in an 802.11e network.
Alternatively, the value of N may be flexibly set based on the actual scenario, for example, 3 terminal devices in the same network as the first device may be determined as other devices.
Optionally, the query packet may carry a first packet loss rate of the first device, a priority used for currently sending the uplink data packet, an IP address of the first device, a signal transmission strength (signal transmission strength may be RSSI), and so on. The sending information of the uplink data message sent by other devices may include the packet loss rate of the other devices, the priority used for sending the uplink data message currently, the IP address information of the other devices, the signal sending strength, and the like.
Optionally, the request message is sent in a unicast mode, and the request message may carry information such as an IP address and a packet loss rate of the first device.
Optionally, the first preset threshold may be flexibly set based on different device types or different data packet lengths and transmission frequencies, for example, when the traffic of the gigabit network card is greater than 200Mbps, the packet loss rate is less than five parts per million; when the flow is greater than 60Mbps, the packet loss rate of the hundred megacard is less than one ten thousandth. Under the condition of large packet loss rate, the audio and video sent by the equipment can be blocked.
Optionally, when the first device sends the first uplink data packet, the first device may send the first uplink data packet according to a highest priority default by an EDCA mechanism, or may send the first uplink data packet according to a priority set by user.
Alternatively, the target device may be one or more. For example, a device, of the plurality of other devices, having both a better packet loss rate and RSSI than the first device is determined as the target device. The first device may send request messages to the plurality of target devices according to the ordering of the packet loss rate, and the plurality of target messages reduce the sending priority according to the received request messages until the first packet loss rate of the first device is normal. In addition, when the priority of each of the plurality of target devices is reduced by one round, the first packet loss rate is still greater than or equal to the first preset threshold value, the query message and the request message are continuously and circularly sent to other devices, and a new round of operation of reducing the priority is started. And under the condition that the target device meeting the condition does not exist, the first device reduces the packet loss rate of the message by reducing the transmission priority of the first device until the packet loss rate is normal or the first device is reduced to the lowest transmission priority.
The main body of execution of the above steps may be a terminal (e.g., a first device), or a processor or a processing device that is provided relatively independently of the terminal, but is not limited thereto.
Through the steps, under the condition that the first packet loss rate of the first uplink data message sent by the first device is larger than or equal to a first preset threshold value, sending query messages to N other devices, wherein N is a natural number larger than or equal to 1, the other devices are devices which perform message transmission under the same network with the first device, and the query messages are used for requesting to query the sending information of the uplink data messages of the other devices; receiving response messages sent by each other device to obtain N first response messages, and determining a target device from the N other devices based on the sending information of the uplink data messages indicated by the N first response messages; and sending a request message to the target equipment, wherein the request message is used for requesting the target equipment to reduce the priority of sending the second uplink data message so as to reduce the first packet loss rate. In the method, the first device reduces the priority of sending the uplink message data by cooperating with other devices to achieve the purpose of reducing the packet loss rate, unified management is not needed through the AP, and only the transmission competition window is needed to be negotiated between the devices, so that the mutual conflict is avoided, and the competition window can be effectively coordinated. Therefore, the problem that the competition between devices in the uplink data transmission cannot be effectively solved in the related art can be solved.
In an exemplary embodiment, before sending the query message to the N other devices, the method further includes: sending a first uplink data message according to a first preset priority of the first uplink data message sent by first equipment indicated in a distributed channel allocation mechanism;
alternatively, the distributed channel allocation mechanism may be an EDCA mechanism, and the first preset priority may be a highest priority in the EDCA mechanism, or may be another level of priority.
In this embodiment, sending the query message to N other devices includes: and sending the query message to N other devices in a multicast sending mode.
Optionally, the multicast transmission mode can enable all devices to receive the query message, and transmission resources can be saved.
In an exemplary embodiment, determining, from N other devices, the target device based on the transmission information of the uplink data packet indicated by the N first response packets includes:
s1, determining the following information included in each first response message: each other device sends a second packet loss rate of the corresponding uplink data message and a second signal sending intensity of each other device;
s2, determining other devices, corresponding to the second packet loss rate smaller than the first packet loss rate and with second signal transmission intensity larger than the first signal transmission intensity of the first device, as target devices.
Optionally, the second signal transmission strength may be RSSI, where the second packet loss rate is smaller than the first packet loss rate, that is, only other devices that send the uplink packet better than the first device will send the response packet to the first device.
Optionally, the first response message is sent by other devices in a unicast mode, so that the purpose of accurately sending the response message to the first device can be achieved. The first response message may further include a priority and an IP address of the other device for sending the uplink data message.
In an exemplary embodiment, after sending the request message to the target device, the method further includes:
s1, receiving a second response message sent by target equipment, wherein the second response message comprises a reduction result of the priority of the target equipment for reducing and sending a second uplink data message;
s2, detecting the first packet loss rate again under the condition that the target equipment is determined to have equipment for reducing the priority of sending the second uplink data message based on the second response message;
and S3, under the condition that the first packet loss rate is detected to be greater than or equal to a first preset threshold value, reducing the priority of the first device for sending the first uplink data message so that the first packet loss rate is smaller than the first preset threshold value.
Optionally, the priority of the target device for sending the uplink data packet is not the lowest level, and the target device can still ensure its own transmission after reducing the priority, then the priority can be reduced, and the reduced result is sent to the first device. Otherwise, the degradation is not performed, and the undegraded result is also sent to the first device.
Optionally, if the first device determines from the second response message that the target device has degraded transmission, detecting the packet loss rate again, and detecting whether the current packet loss rate meets the requirement. And determining whether a new round of degradation request is needed, the purpose of timely determining degradation requirements can be achieved.
In an exemplary embodiment, after the priority of the first device for sending the first uplink data packet is reduced, the method further includes:
s1, under the condition that the fact that the first uplink data message is sent is confirmed, the priority of the first device for sending the uplink data message is restored.
Optionally, under the condition that the first uplink data message is sent completely, the first device and the target device restore the original priority and ensure the next message sending.
In this embodiment, a message processing method is provided, and fig. 3 is a flowchart of a message processing method according to an embodiment of the present invention, as shown in fig. 3, where the flowchart includes the following steps:
Step S302, receiving a query message sent by a first device, wherein the query message is used for requesting to query target sending information of a second uplink data message of a target device, the target device is a device which performs message transmission under the same network as the first device, and the query message is sent by the first device under the condition that the first packet loss rate of the first uplink data message is determined to be greater than or equal to a first preset threshold value;
step S304, determining target sending information, generating a first response message comprising the target sending information, and sending the first response message to the first device;
step S306, receiving a request message sent by a first device, wherein the request message is used for requesting a target device to reduce a second preset priority of sending a second uplink data message so as to reduce a first packet loss rate of the first device for sending the first uplink data message;
step S308, the current priority of sending the second uplink data message is reduced based on the request message.
Optionally, the first device and the target device are devices transmitting messages under the same network. For example, a plurality of devices periodically transmitting audio and video data in an 802.11e network.
Optionally, the query message may carry a first packet loss rate of the first device, a priority used for currently sending the uplink data message, an IP address of the first device, a signal transmission strength, and the like. The sending information of the target device sending the uplink data message may include a packet loss rate, a priority level used for currently sending the uplink data message, IP address information, signal sending strength, and the like.
Optionally, the request message may be sent by the first device in a unicast manner, where the request message may carry information such as an IP address and a packet loss rate of the first device.
Optionally, the first preset threshold may be flexibly set based on different device types or different data packet lengths and transmission frequencies, for example, when the traffic of the gigabit network card is greater than 200Mbps, the packet loss rate is less than five parts per million; when the flow is greater than 60Mbps, the packet loss rate of the hundred megacard is less than one ten thousandth. And under the condition that the first packet loss rate is greater than or equal to a first preset threshold value, the audio and video sent by the equipment can be blocked.
Optionally, when the target device and the first device send uplink data packets, the target device and the first device may send uplink data packets according to the highest priority default by the EDCA mechanism, or may send uplink data packets according to flexibly set priorities.
The main body of execution of the above steps may be a terminal (e.g., a target device), or a processor or a processing device that is provided separately from the terminal, but is not limited thereto.
Through the steps, the query message is sent by the first device, wherein the query message is used for requesting to query target sending information of a second uplink data message of the target device, the target device is a device which performs message transmission under the same network with the first device, and the query message is sent by the first device under the condition that the first packet loss rate of the first uplink data message is determined to be greater than or equal to a first preset threshold value; determining target sending information, generating a first response message comprising the target sending information, and sending the first response message to the first device; receiving a request message sent by first equipment, wherein the request message is used for requesting target equipment to reduce a second preset priority for sending a second uplink data message so as to reduce a first packet loss rate of the first uplink data message sent by the first equipment; and reducing the current priority of sending the second uplink data message based on the request message. In the method, the first device reduces the priority of sending the uplink message data by cooperating with other devices to achieve the purpose of reducing the packet loss rate, unified management is not needed through the AP, and only the transmission competition window is needed to be negotiated between the devices, so that the mutual conflict is avoided, and the competition window can be effectively coordinated. Therefore, the problem that the competition between devices in the uplink data transmission cannot be effectively solved in the related art can be solved.
In an exemplary embodiment, before receiving the query message sent by the first device, the method further includes: sending a second uplink data message according to a second preset priority of the second uplink data message sent by the target equipment indicated in the distributed channel allocation mechanism; alternatively, the distributed channel allocation mechanism may be an EDCA mechanism, and the second preset priority may be the highest priority in the EDCA mechanism, or may be another level of priority.
In this embodiment, receiving the query packet sent by the first device includes: and receiving a query message sent by the first equipment in a multicast mode. Optionally, the multicast transmission mode can enable all devices to receive the query message, and transmission resources can be saved.
In one exemplary embodiment, determining the target transmission information, generating a first response message including the target transmission information, and transmitting the first response message to the first device includes:
s1, acquiring a first packet loss rate, first signal transmission intensity of first equipment and address information of the first equipment from a query message;
s2, determining a second packet loss rate of the target device for transmitting a second uplink data message and a second signal transmission intensity of the target device, wherein the second packet loss rate and the second signal transmission intensity are included in the target transmission information;
S3, generating a first response message under the condition that the second packet loss rate is smaller than the first packet loss rate and the second signal transmission intensity is larger than the first signal transmission intensity;
s4, sending the first response message to the first equipment according to the address information of the first equipment.
Optionally, the first signal transmission strength and the second signal transmission strength may be RSSI, and the second packet loss rate is smaller than the first packet loss rate, that is, only other devices that send the uplink packet better than the first device may send the response packet to the first device.
Optionally, the first response message is sent in a unicast mode, so that the purpose of sending the accurate response message to the first device can be achieved. The first response message may further include a priority and an IP address of the destination device for sending the uplink data message.
In one exemplary embodiment, reducing the current priority of sending the second uplink data message based on the request message includes:
s1, determining a third packet loss rate of a second uplink data message sent by target equipment according to a third preset priority, wherein the second preset priority is lower than the second preset priority;
and S2, under the condition that the third packet loss rate is smaller than the first preset threshold value, adjusting the priority of the target equipment for sending the second uplink data message from the second preset priority to the third preset priority.
Optionally, the third preset priority is only lower than the second preset priority, the target device attempts to perform degradation transmission first, detects whether the packet loss rate is normal, reduces the priority under the condition that the transmission of the target device can be ensured, and transmits the reduction result to the first device. Otherwise, the degradation is not performed, and the undegraded result is also sent to the first device.
In an exemplary embodiment, after adjusting the priority of sending the second uplink data packet by the target device from the second preset priority to the third preset priority, the method further includes:
s1, under the condition that the fact that the second uplink data message is sent is confirmed, the priority of the target equipment for sending the second uplink data message is restored to the second preset priority from the third preset priority.
Optionally, the target device restores the original priority and ensures the message transmission of the target device under the condition that the transmission of the first uplink data message is completed.
In an exemplary embodiment, after the current priority of sending the second uplink data message is reduced based on the request message, the method further comprises:
s1, sending a second response message to the first device, wherein the second response message comprises a reduction result of the priority of the target device for reducing the sending of the second uplink data message.
Optionally, the IP address of the first device is sent in unicast.
In addition, in this embodiment, both the first device and the target device may send the query message and the request message to other devices, and the first device and the target device may also receive the query message and the request message sent by other devices. I.e. the level and function of the first device and the target device are the same.
The invention is illustrated below with reference to specific examples:
aiming at the problem that more network conflicts are caused when a plurality of terminals transmit simultaneously in uplink business of audio and video transmission by adopting an EDCA mechanism, the performance of audio and video streams is reduced, the embodiment provides a method for cooperatively adjusting uplink data competition windows among the terminals. As shown in fig. 4, the present embodiment includes the steps of:
s401, when the device 1 sends an uplink message, high priority sending (audio VO, video VI) is used by default according to an EDCA mechanism;
s402, the device 1 detects whether the packet loss rate is higher than a threshold value;
s403, when the device 1 detects that the packet loss rate is higher than a threshold value, and the audio and video are blocked, a query message is sent to query whether other devices are sending messages, and at the moment, a multicast message is sent, and all the devices can receive the multicast message; the inquiry message contains the IP address, packet loss rate, received signal strength indication (Received Signal Strength Indication, RSSI for short) and priority of the equipment 1;
S404, after receiving the inquiry message, if the inquiry message is currently transmitted, the device 2 detects the packet loss rate and the RSSI of the device, and if the inquiry message is better than the device 1, the device 1 replies the inquiry message, wherein the inquiry message comprises an IP address, the packet loss rate, the RSSI and the priority of the transmitted message;
s405, after receiving the inquiry message, if the inquiry message is currently being sent, the device 3 detects the packet loss rate and the RSSI of the device, and if the inquiry message is better than the device 1, the device 1 replies the inquiry message, wherein the inquiry message comprises an IP address, the packet loss rate, the RSSI and the priority of the sent message;
s406, the device 1 processes the reply messages of the device 2 and the device 3, and sequentially requests the device 2 and the device 3 to reduce priority transmission according to the packet loss rate sequencing until the packet loss rate sent by the device itself is normal;
s407, after receiving the request message for lowering the priority, the device 2 tries to lower the transmission, and detects whether the packet loss rate is normal or not, if so, the transmission is degraded, otherwise, the transmission is not lowered, and the lowering result of the device 1 is timely replied;
s408, after receiving the request message of lowering priority, the device 3 tries to lower the transmission, and detects whether the packet loss rate is normal or not, if so, the transmission is degraded, otherwise, the transmission is not lowered, and the lowering result of the device 1 is timely replied;
S409, if all terminals are polled once, the packet loss rate of the equipment 1 is not satisfied, the equipment 1 reduces the priority to send, and the above operation is repeated until the priority is reduced to the BE lowest priority);
and S410, recovering the highest priority after the equipment transmission is finished, and ensuring that the highest priority is used for starting transmission and is reduced in cooperation with other equipment in the transmission process.
In summary, the terminal collaboration mechanism is adopted in the embodiment, so that the problem of competition between the same devices can be solved; and interaction among the terminal devices does not need unified management of the AP, and the problem of reduction of the competition window mainly of the uplink service is effectively solved.
From the description of the above embodiments, it will be clear to a person skilled in the art that the method according to the above embodiments may be implemented by means of software plus the necessary general hardware platform, but of course also by means of hardware, but in many cases the former is a preferred embodiment. Based on such understanding, the technical solution of the present invention may be embodied essentially or in a part contributing to the prior art in the form of a software product stored in a storage medium (e.g. ROM/RAM, magnetic disk, optical disk) comprising instructions for causing a terminal device (which may be a mobile phone, a computer, a server, or a network device, etc.) to perform the method according to the embodiments of the present invention.
The present embodiment also provides an image processing apparatus, which is used to implement the foregoing embodiments and preferred embodiments, and will not be described in detail. As used below, the term "module" may be a combination of software and/or hardware that implements a predetermined function. While the means described in the following embodiments are preferably implemented in software, implementation in hardware, or a combination of software and hardware, is also possible and contemplated.
Fig. 5 is a block diagram of a message sending apparatus according to an embodiment of the present invention, as shown in fig. 5, the apparatus includes:
a first sending module 52, configured to send a query message to N other devices when it is determined that a first packet loss rate of a first uplink data packet sent by a first device is greater than or equal to a first preset threshold, where N is a natural number greater than or equal to 1, where the other devices are devices that perform packet transmission under the same network as the first device, and the query message is used to request to query sending information of the uplink data packet of the other devices;
the first receiving module 54 is configured to receive the response messages sent by each of the other devices, obtain N first response messages, and determine a target device from the N other devices based on the sending information of the uplink data messages indicated by the N first response messages;
And a second sending module 56, configured to send a request packet to the target device, where the request packet is used to request the target device to reduce the priority of sending the second uplink data packet, so as to reduce the first packet loss rate.
In an exemplary embodiment, the above apparatus further includes: a fourth sending module, configured to send the first uplink data packet according to a first preset priority indicated in the distributed channel allocation mechanism, before sending the query packet to N other devices;
the first transmitting module includes: and the first sending unit is used for sending the query message to the N other devices in a multicast sending mode.
In an exemplary embodiment, the first receiving module includes:
a first determining unit, configured to determine the following information included in each of the first response messages: each of the other devices transmits a second packet loss rate of the corresponding uplink data message and a second signal transmission intensity of each of the other devices;
and a second determining unit configured to determine, as the target device, another device that has a second signal transmission strength that is greater than the first signal transmission strength of the first device and that corresponds to the second packet loss rate that is less than the first packet loss rate.
In an exemplary embodiment, the above apparatus further includes:
a fourth receiving module, configured to receive a second response message sent by the target device after sending a request message to the target device, where the second response message includes a result of reducing, by the target device, a priority of sending the second uplink data message;
the first detection module is configured to detect the first packet loss rate again when it is determined that, based on the second response packet, there is a device that reduces the priority of sending the second uplink data packet in the target device;
the first reduction module is configured to reduce, when it is detected that the first packet loss rate is greater than or equal to the first preset threshold, a priority of the first device for sending the first uplink data packet, so that the first packet loss rate is smaller than the first preset threshold.
In an exemplary embodiment, the above apparatus further includes:
and the first recovery module is used for recovering the priority of the first equipment for sending the uplink data message under the condition that the first uplink data message is determined to be sent after the priority of the first equipment for sending the first uplink data message is reduced.
Fig. 6 is a block diagram of a message processing apparatus according to an embodiment of the present invention, as shown in fig. 6, the apparatus includes:
a second receiving module 62, configured to receive a query packet sent by a first device, where the query packet is used to request target sending information of a second uplink data packet of a query target device, where the target device is a device that performs packet transmission under the same network as the first device, and the query packet is sent by the first device when it is determined that a first packet loss rate of sending the first uplink data packet is greater than or equal to a first preset threshold;
a first determining module 64, configured to determine the target sending information, generate a first response packet including the target sending information, and send the first response packet to the first device;
a third receiving module 66, configured to receive a request packet sent by the first device, where the request packet is configured to request the target device to reduce a second preset priority for sending the second uplink data packet, so as to reduce a first packet loss rate of the first device sending the first uplink data packet;
a first reducing module 68, configured to reduce the current priority of sending the second uplink data packet based on the request packet.
In an exemplary embodiment, the above apparatus further includes: a fifth sending module, configured to send the second uplink data packet according to a second preset priority indicated by the distributed channel allocation mechanism, before receiving the query packet sent by the first device;
the second receiving module includes: the first receiving unit is configured to receive the query message sent by the first device in a multicast manner.
In an exemplary embodiment, the first determining module includes:
a first obtaining unit, configured to obtain the first packet loss rate, a first signal transmission strength of the first device, and address information of the first device from the query packet;
a third determining unit, configured to determine a second packet loss rate of the target device sending the second uplink data packet and a second signal sending strength of the target device, where the second packet loss rate and the second signal sending strength are included in the target sending information;
a first generating unit, configured to generate the first response packet when it is determined that the second packet loss rate is smaller than the first packet loss rate and the second signal transmission strength is greater than the first signal transmission strength;
And the first sending unit is used for sending the first response message to the first equipment according to the address information of the first equipment.
In an exemplary embodiment, the first reducing module includes:
a fourth determining unit, configured to determine a third packet loss rate of the target device sending the second uplink data packet according to a third preset priority, where the second preset priority is lower than the second preset priority;
and the first adjusting unit is used for adjusting the priority of the target equipment for sending the second uplink data message from the second preset priority to the third preset priority under the condition that the third packet loss rate is smaller than the first preset threshold.
In an exemplary embodiment, the above apparatus further includes:
and a second recovery module, configured to, after adjusting the priority of the target device for sending the second uplink data packet from the second preset priority to the third preset priority, recover the priority of the target device for sending the second uplink data packet from the third preset priority to the second preset priority when it is determined that the second uplink data packet has been sent.
In an exemplary embodiment, the above apparatus further includes: and a sixth sending module, configured to send a second response message to the first device after the current priority of sending the second uplink data message is reduced based on the request message, where the second response message includes a result of reducing, by the target device, the priority of sending the second uplink data message.
It should be noted that each of the above modules may be implemented by software or hardware, and for the latter, it may be implemented by, but not limited to: the modules are all located in the same processor; alternatively, the above modules may be located in different processors in any combination.
Embodiments of the present invention also provide a computer readable storage medium having a computer program stored therein, wherein the computer program is arranged to perform the steps of any of the method embodiments described above when run.
In the present embodiment, the above-described computer-readable storage medium may be configured to store a computer program for executing the above steps.
In one exemplary embodiment, the computer readable storage medium may include, but is not limited to: a usb disk, a Read-Only Memory (ROM), a random access Memory (Random Access Memory, RAM), a removable hard disk, a magnetic disk, or an optical disk, or other various media capable of storing a computer program.
An embodiment of the invention also provides an electronic device comprising a memory having stored therein a computer program and a processor arranged to run the computer program to perform the steps of any of the method embodiments described above.
In an exemplary embodiment, the electronic apparatus may further include a transmission device connected to the processor, and an input/output device connected to the processor.
In an exemplary embodiment, the above processor may be arranged to perform the above steps by means of a computer program.
Specific examples in this embodiment may refer to the examples described in the foregoing embodiments and the exemplary implementation, and this embodiment is not described herein.
It will be appreciated by those skilled in the art that the modules or steps of the invention described above may be implemented in a general purpose computing device, they may be concentrated on a single computing device, or distributed across a network of computing devices, they may be implemented in program code executable by computing devices, so that they may be stored in a storage device for execution by computing devices, and in some cases, the steps shown or described may be performed in a different order than that shown or described herein, or they may be separately fabricated into individual integrated circuit modules, or multiple modules or steps of them may be fabricated into a single integrated circuit module. Thus, the present invention is not limited to any specific combination of hardware and software.
The above description is only of the preferred embodiments of the present invention and is not intended to limit the present invention, but various modifications and variations can be made to the present invention by those skilled in the art. Any modification, equivalent replacement, improvement, etc. made within the principle of the present invention should be included in the protection scope of the present invention.

Claims (15)

1. A method for sending a message, comprising:
under the condition that the first packet loss rate of the first uplink data message sent by the first device is larger than or equal to a first preset threshold value, sending a query message to N other devices, wherein N is a natural number larger than or equal to 1, the other devices are devices which perform message transmission under the same network with the first device, and the query message is used for requesting to query the sending information of the uplink data message of the other devices;
receiving response messages sent by each other device to obtain N first response messages, and determining a target device from the N other devices based on the sending information of the uplink data messages indicated by the N first response messages;
and sending a request message to the target equipment, wherein the request message is used for requesting the target equipment to reduce the priority of sending the second uplink data message so as to reduce the first packet loss rate.
2. The method of claim 1, wherein the step of determining the position of the substrate comprises,
before sending the query message to the N other devices, the method further includes: transmitting the first uplink data message according to a first preset priority of the first uplink data message, which is indicated by the first equipment in the distributed channel allocation mechanism;
the sending of the query message to the N other devices includes: and sending the query message to N other devices in a multicast sending mode.
3. The method according to claim 1, wherein determining the target device from the N other devices based on the transmission information of the uplink data packets indicated by the N first response packets includes:
determining the following information included in each first response message: each other device sends a second packet loss rate of the corresponding uplink data message and a second signal sending intensity of each other device;
and determining other devices corresponding to the second packet loss rate smaller than the first packet loss rate and having the second signal transmission intensity larger than the first signal transmission intensity of the first device as the target device.
4. The method of claim 1, wherein after sending the request message to the target device, the method further comprises:
Receiving a second response message sent by the target device, wherein the second response message comprises a reduction result of the target device for reducing the priority of sending the second uplink data message;
detecting the first packet loss rate again under the condition that the equipment for reducing the priority of sending the second uplink data message exists in the target equipment based on the second response message;
and under the condition that the first packet loss rate is detected to be greater than or equal to the first preset threshold value, reducing the priority of the first device for sending the first uplink data message, so that the first packet loss rate is smaller than the first preset threshold value.
5. The method of claim 4, wherein after the first device reduces the priority of sending the first upstream data message, the method further comprises:
and under the condition that the first uplink data message is determined to be sent completely, recovering the priority of the first equipment for sending the uplink data message.
6. A method for processing a message, comprising:
receiving a query message sent by a first device, wherein the query message is used for requesting to query target sending information of a second uplink data message of a target device, the target device is a device which performs message transmission under the same network as the first device, and the query message is sent by the first device under the condition that the first packet loss rate of sending the first uplink data message is greater than or equal to a first preset threshold value;
Determining the target sending information, generating a first response message comprising the target sending information, and sending the first response message to the first device;
receiving a request message sent by the first device, wherein the request message is used for requesting the target device to reduce a second preset priority of sending the second uplink data message so as to reduce a first packet loss rate of the first device for sending the first uplink data message;
and reducing the current priority of sending the second uplink data message based on the request message.
7. The method of claim 6, wherein the method comprises the steps of,
before receiving the query message sent by the first device, the method further includes: transmitting the second uplink data message according to a second preset priority of the second uplink data message, which is indicated by the target device in the distributed channel allocation mechanism;
the receiving of the query message sent by the first device includes: and receiving the query message sent by the first equipment in a multicast mode.
8. The method of claim 6, wherein determining the target transmission information and generating a first response message including the target transmission information, and transmitting the first response message to the first device, comprises:
Acquiring the first packet loss rate, the first signal transmission intensity of the first equipment and the address information of the first equipment from the query message;
determining a second packet loss rate of the target device for transmitting the second uplink data message and a second signal transmission strength of the target device, wherein the second packet loss rate and the second signal transmission strength are included in the target transmission information;
generating the first response message under the condition that the second packet loss rate is smaller than the first packet loss rate and the second signal transmission intensity is larger than the first signal transmission intensity;
and sending the first response message to the first equipment according to the address information of the first equipment.
9. The method of claim 6, wherein reducing the current priority of sending the second upstream data message based on the request message comprises:
determining a third packet loss rate of the second uplink data message sent by the target device according to a third preset priority, wherein the second preset priority is lower than the second preset priority;
and under the condition that the third packet loss rate is smaller than the first preset threshold, adjusting the priority of the target equipment for sending the second uplink data message from the second preset priority to the third preset priority.
10. The method of claim 9, wherein after adjusting the priority of the target device for sending the second upstream data message from the second preset priority to the third preset priority, the method further comprises:
and under the condition that the second uplink data message is determined to be sent, restoring the priority of the target equipment for sending the second uplink data message from the third preset priority to the second preset priority.
11. The method of claim 6, wherein after reducing the current priority of sending the second upstream data message based on the request message, the method further comprises:
and sending a second response message to the first device, wherein the second response message comprises a reduction result of the target device for reducing the priority of sending the second uplink data message.
12. A message transmitting apparatus, comprising:
the first sending module is configured to send a query message to N other devices when it is determined that a first packet loss rate of a first uplink data packet sent by a first device is greater than or equal to a first preset threshold, where N is a natural number greater than or equal to 1, and the other devices are devices that perform packet transmission under the same network as the first device, where the query message is used to request to query sending information of the uplink data packet of the other devices;
The first receiving module is used for receiving response messages sent by each other device to obtain N first response messages, and determining target devices from N other devices based on the sending information of the uplink data messages indicated by the N first response messages;
and the second sending module is used for sending a request message to the target equipment, wherein the request message is used for requesting the target equipment to reduce the priority of sending a second uplink data message so as to reduce the first packet loss rate.
13. A message processing apparatus, comprising:
the second receiving module is used for receiving a query message sent by the first device, wherein the query message is used for requesting to query target sending information of a second uplink data message of target equipment, the target equipment is equipment which is used for carrying out message transmission under the same network with the first device, and the query message is sent by the first device under the condition that the first packet loss rate of sending the first uplink data message is determined to be larger than or equal to a first preset threshold value;
the first determining module is used for determining the target sending information, generating a first response message comprising the target sending information and sending the first response message to the first device;
The third receiving module is configured to receive a request packet sent by the first device, where the request packet is used to request the target device to reduce a second preset priority of sending the second uplink data packet, so as to reduce a first packet loss rate of the first device sending the first uplink data packet;
and the third reducing module is used for reducing the current priority of sending the second uplink data message based on the request message.
14. A computer readable storage medium, characterized in that the computer readable storage medium has stored therein a computer program, wherein the computer program when executed by a processor implements the method of any of the claims 1 to 5 or the computer program when executed by a processor implements the method of any of the claims 6 to 11.
15. An electronic device comprising a memory and a processor, characterized in that the memory has stored therein a computer program, the processor being arranged to run the computer program to perform the method of any of the claims 1 to 5 or the processor being arranged to run the computer program to perform the method of any of the claims 6 to 11.
CN202211117473.0A 2022-09-14 2022-09-14 Message sending method and device, storage medium and electronic device Active CN115297178B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202211117473.0A CN115297178B (en) 2022-09-14 2022-09-14 Message sending method and device, storage medium and electronic device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202211117473.0A CN115297178B (en) 2022-09-14 2022-09-14 Message sending method and device, storage medium and electronic device

Publications (2)

Publication Number Publication Date
CN115297178A CN115297178A (en) 2022-11-04
CN115297178B true CN115297178B (en) 2023-07-14

Family

ID=83833116

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202211117473.0A Active CN115297178B (en) 2022-09-14 2022-09-14 Message sending method and device, storage medium and electronic device

Country Status (1)

Country Link
CN (1) CN115297178B (en)

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104661260A (en) * 2015-01-20 2015-05-27 中南大学 Wireless Mesh intelligent power grid routing mechanism with QoS perceiving and loading balancing
CN106059806A (en) * 2016-05-27 2016-10-26 杭州华三通信技术有限公司 CAN message sending method and device
CN109617637A (en) * 2019-01-22 2019-04-12 新华三技术有限公司 A kind of information processing method and device
CN111682992A (en) * 2020-06-03 2020-09-18 西安奇维科技有限公司 Serial bus design method of dynamic priority

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2015115756A (en) * 2013-12-11 2015-06-22 ソニー株式会社 Communication control device, communication control method, and program

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104661260A (en) * 2015-01-20 2015-05-27 中南大学 Wireless Mesh intelligent power grid routing mechanism with QoS perceiving and loading balancing
CN106059806A (en) * 2016-05-27 2016-10-26 杭州华三通信技术有限公司 CAN message sending method and device
CN109617637A (en) * 2019-01-22 2019-04-12 新华三技术有限公司 A kind of information processing method and device
CN111682992A (en) * 2020-06-03 2020-09-18 西安奇维科技有限公司 Serial bus design method of dynamic priority

Also Published As

Publication number Publication date
CN115297178A (en) 2022-11-04

Similar Documents

Publication Publication Date Title
CN109587052B (en) Multilink data transmission method and device
CN111405684A (en) Method for connecting to network access device, terminal and computer readable storage medium
US8363582B2 (en) Wireless communication method, access point, wireless communication station and wireless communication system
US11540318B2 (en) Carrier set determination method and device, storage medium and electronic device
CN110808948B (en) Remote procedure calling method, device and system
CN105262836A (en) Information push method of server and push information reception method of client
CN101202608B (en) Method and system for transmitting of affirmation mode data
CN111884875A (en) Offline device determination method and device
US6229807B1 (en) Process of monitoring the activity status of terminals in a digital communication system
CN112887416B (en) Frequency adjustment method and device for sending keep-alive packets
CN113972967B (en) Auxiliary information sending method, auxiliary information receiving device, terminal and network side equipment
KR20200108305A (en) Data transmission method and apparatus, computer storage medium
CN115297178B (en) Message sending method and device, storage medium and electronic device
US20130115992A1 (en) Method and apparatus for controlling wireless devices
CN112154689A (en) Communication method
CN112188562B (en) Multicast scheduling method and device for relay base station, storage medium and electronic device
US11612007B2 (en) Low power dissipation Bluetooth mesh network system and communication method
CN107371263B (en) Method and device for scheduling uplink resources
CN110876164B (en) Method and device for setting parameters for triggering polling and computer-readable storage medium
CN112714440B (en) Communication method, system, gateway and storage medium compatible with LoRaWAN and self-research protocol
CN107786310B (en) Data packet transmission method and node
CN114640710A (en) Information subscription method and device
CN112637786B (en) Radio transmission apparatus and radio transmission method
CN107113872B (en) Device and method for adjusting competition window, network equipment, terminal and network system
CN112242877A (en) Data transmission method, device and system

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
GR01 Patent grant
GR01 Patent grant