Response method and device of Internet group management protocol

文档序号:1878257 发布日期:2021-11-23 浏览:13次 中文

阅读说明:本技术 互联网组管理协议的应答方法及装置 (Response method and device of Internet group management protocol ) 是由 王朝 于 2021-07-29 设计创作,主要内容包括:本公开涉及一种互联网组管理协议的应答方法、装置、系统、电子设备及计算机可读介质。该方法包括:获取互联网组管理协议查询报文;解析所述互联网组管理协议查询报文获取当前网段中第一组播组数量;确定本主机设备关注的第二组播组数量;基于所述第一组播组数量和所述第二组播组数量生成所述互联网组管理协议查询报文的应答报文。本公开涉及的互联网组管理协议的应答方法、装置、系统、电子设备及计算机可读介质,能够合理确定主机的应答时间,减少了网络中报文的数量,以及各个主机监听以及应答所带来的消耗。(The disclosure relates to a response method, a response device, a response system, electronic equipment and a computer readable medium of an internet group management protocol. The method comprises the following steps: acquiring an internet group management protocol query message; analyzing the Internet group management protocol query message to obtain the number of first multicast groups in the current network segment; determining the number of second multicast groups concerned by the host equipment; and generating a response message of the internet group management protocol query message based on the first multicast group number and the second multicast group number. The response method, the device, the system, the electronic equipment and the computer readable medium of the Internet group management protocol can reasonably determine the response time of the host, and reduce the number of messages in the network and the consumption caused by monitoring and responding of each host.)

1. An internet group management protocol response method applicable to a host device, comprising:

acquiring an internet group management protocol query message;

analyzing the Internet group management protocol query message to obtain the number of first multicast groups in the current network segment;

determining the number of second multicast groups concerned by the host equipment;

and generating a response message of the internet group management protocol query message based on the first multicast group number and the second multicast group number.

2. The method of claim 1, further comprising:

acquiring a response message;

analyzing the response message to extract at least one host identity;

and generating response messages based on at least one host identifier and the number of the first multicast groups and the number of the second multicast groups.

3. The method of claim 1, wherein determining the number of second multicast groups of interest to the host device comprises:

and determining the number of the second multicast groups based on the member relation report message of the Internet group management protocol of the host equipment.

4. The method of claim 1, wherein generating the response message to the IGMP query message based on the first multicast group number and the second multicast group number comprises:

generating a delayed response time based on the first multicast group number and the second multicast group number;

and generating a response message of the Internet group management protocol query message based on the delay response time.

5. The method of claim 4, wherein generating a delayed acknowledgement time based on the first number of multicast groups and the second number of multicast groups comprises:

and generating the delayed response time according to the ratio of the first multicast group number to the second multicast group number and the preset response time.

6. The method of claim 4, wherein generating the response message to the IGMP query message based on the delayed response time comprises:

and generating the response message based on the member relation report of the Internet group management protocol at the delayed response time.

7. The method of claim 1, comprising:

and when the first multicast group number in the internet group management protocol query message is not analyzed, generating the delayed response time based on preset response time.

8. The method of claim 2, wherein generating reply messages based on at least one host identity and the first and second multicast group numbers comprises:

generating a delayed response time based on the first multicast group number and the second multicast group number;

and generating the response message based on the at least one host identity and the Internet group management protocol membership report message of the host equipment.

9. The method of claim 8, wherein generating the reply message based on the at least one host identity and an internet group management protocol membership report message of the host device comprises:

generating the response message based on the member relation report of the Internet group management protocol;

and eliminating the at least one host identification in the response message.

10. An internet group management protocol response method, which can be applied to an inquirer, is characterized by comprising the following steps:

generating an internet group management protocol query message, wherein the internet group management protocol query message comprises the number of multicast groups in the current network segment;

sending the internet group management protocol query message to at least one host device of the current network segment;

and managing the host equipment in the current network segment based on the response message of the at least one host equipment.

11. An internet group management protocol response method applicable to a host device, comprising:

the acquisition module is used for acquiring an Internet group management protocol query message;

a first quantity module, configured to parse the internet group management protocol query message to obtain a first multicast group quantity in a current network segment;

a second quantity module, configured to determine a second multicast group quantity concerned by the host device;

and the response module is used for generating response messages of the internet group management protocol query messages based on the first multicast group number and the second multicast group number.

12. An internet group management protocol response method, which can be applied to an inquirer, is characterized by comprising the following steps:

the generation module is used for generating an internet group management protocol query message which comprises the number of multicast groups in the current network segment;

a sending module, configured to send the internet group management protocol query message to at least one host device in a current network segment;

and the management module is used for managing the host equipment in the current network segment based on the response message of the at least one host equipment.

13. An answering system for an internet group management protocol, comprising:

the query device is used for generating an internet group management protocol query message which comprises the number of multicast groups in the current network segment; sending the internet group management protocol query message to at least one host device of the current network segment; managing the host equipment in the current network segment based on the response message of the at least one host equipment;

the host equipment is used for acquiring an Internet group management protocol query message; analyzing the Internet group management protocol query message to obtain the number of first multicast groups in the current network segment; determining the number of second multicast groups concerned by the host equipment; and generating a response message of the internet group management protocol query message based on the first multicast group number and the second multicast group number.

Technical Field

The present disclosure relates to the field of computer information processing, and in particular, to a method, an apparatus, a system, an electronic device, and a computer-readable medium for responding to an internet group management protocol.

Background

The Internet Group Management Protocol is called IGMP (Internet Group Management Protocol) and is a multicast Protocol in the Internet Protocol family. The protocol runs between the host and the multicast router.

The host IP software needs to perform multicast extensions to enable the host to send and receive multicast packets over the local network. But this alone is not sufficient because multicast forwarding across multiple networks must rely on routers. The router must know the distribution of each member in the Internet to establish the multicast forwarding route, which requires that the host must be able to inform the local router of the multicast group where the host is located, which is also the basis for establishing the multicast forwarding route. The host and the local router use Internet group management protocol to perform the interaction of the multicast group member information. On the basis, the local router communicates with other multicast routers, propagates member information of the multicast group and establishes a multicast route.

Queries are initiated by queriers (Querier). When only one multicast router exists in one network segment, the router takes the role of an inquirer; when a plurality of multicast routers are in a network segment, the multicast routers can receive an IGMP Membership Report Message (Membership Report Message) from a host, and only one router is required to serve as a querier at the moment, which can be realized through an election mechanism.

The reply is accomplished by the host within the network segment. The response may be initiated actively by the host, for example, the host adds a new traffic reception requirement for a certain multicast group; or initiated by the querier and then responded by the host, so as to avoid the querier from overtime the entry of the multicast group caused by not receiving the group adding request for a long time.

The above information disclosed in this background section is only for enhancement of understanding of the background of the disclosure and therefore it may contain information that does not constitute prior art that is already known to a person of ordinary skill in the art.

Disclosure of Invention

In view of this, the present disclosure provides a response method, device, system, electronic device and computer readable medium for an internet group management protocol, which can reasonably determine response time of a host, and reduce the number of messages in a network and consumption caused by monitoring and responding by each host.

Additional features and advantages of the disclosure will be set forth in the detailed description which follows, or in part will be obvious from the description, or may be learned by practice of the disclosure.

According to an aspect of the present disclosure, a method for responding to an internet group management protocol is provided, which is applicable to a host device, the method including: acquiring an internet group management protocol query message; analyzing the Internet group management protocol query message to obtain the number of first multicast groups in the current network segment; determining the number of second multicast groups concerned by the host equipment; and generating a response message of the internet group management protocol query message based on the first multicast group number and the second multicast group number.

In an exemplary embodiment of the present disclosure, further comprising: acquiring a response message; analyzing the response message to extract at least one host identity; and generating response messages based on at least one host identifier and the number of the first multicast groups and the number of the second multicast groups.

In an exemplary embodiment of the present disclosure, determining the number of second multicast groups of interest to the host device includes: and determining the number of the second multicast groups based on the member relation report message of the Internet group management protocol of the host equipment.

In an exemplary embodiment of the present disclosure, generating a response packet of the internet group management protocol query packet based on the first multicast group number and the second multicast group number includes: generating a delayed response time based on the first multicast group number and the second multicast group number; and generating a response message of the Internet group management protocol query message based on the delay response time.

In an exemplary embodiment of the present disclosure, generating a delayed response time based on the first multicast group number and the second multicast group number includes: and generating the delayed response time according to the ratio of the first multicast group number to the second multicast group number and the preset response time.

In an exemplary embodiment of the present disclosure, generating a response packet of the internet group management protocol query packet based on the delayed response time includes: and generating the response message based on the member relation report of the Internet group management protocol at the delayed response time.

In an exemplary embodiment of the present disclosure, includes: and when the first multicast group number in the internet group management protocol query message is not analyzed, generating the delayed response time based on preset response time.

In an exemplary embodiment of the present disclosure, generating a response packet based on at least one host identifier and the first multicast group number and the second multicast group number includes: generating a delayed response time based on the first multicast group number and the second multicast group number; and generating the response message based on the at least one host identity and the Internet group management protocol membership report message of the host equipment.

In an exemplary embodiment of the present disclosure, generating the response packet based on the at least one host identifier and an internet group management protocol membership report packet of the host device includes: generating the response message based on the member relation report of the Internet group management protocol; and eliminating the at least one host identification in the response message.

According to an aspect of the present disclosure, a method for responding to an internet group management protocol is provided, which is applicable to an interrogator, and includes: generating an internet group management protocol query message, wherein the internet group management protocol query message comprises the number of multicast groups in the current network segment; sending the internet group management protocol query message to at least one host device of the current network segment; and managing the host equipment in the current network segment based on the response message of the at least one host equipment.

According to an aspect of the present disclosure, a response apparatus of an internet group management protocol is provided, which is applicable to a host device, the apparatus including: the acquisition module is used for acquiring an Internet group management protocol query message; a first quantity module, configured to parse the internet group management protocol query message to obtain a first multicast group quantity in a current network segment; a second quantity module, configured to determine a second multicast group quantity concerned by the host device; and the response module is used for generating response messages of the internet group management protocol query messages based on the first multicast group number and the second multicast group number.

According to an aspect of the present disclosure, a responder of an internet group management protocol is provided, which is applicable to an interrogator, and includes: the generation module is used for generating an internet group management protocol query message which comprises the number of multicast groups in the current network segment; a sending module, configured to send the internet group management protocol query message to at least one host device in a current network segment; and the management module is used for managing the host equipment in the current network segment based on the response message of the at least one host equipment.

According to an aspect of the present disclosure, an answering system of an internet group management protocol is provided, the apparatus including: the query device is used for generating an internet group management protocol query message which comprises the number of multicast groups in the current network segment; sending the internet group management protocol query message to at least one host device of the current network segment; managing the host equipment in the current network segment based on the response message of the at least one host equipment; the host equipment is used for acquiring an Internet group management protocol query message; analyzing the Internet group management protocol query message to obtain the number of first multicast groups in the current network segment; determining the number of second multicast groups concerned by the host equipment; and generating a response message of the internet group management protocol query message based on the first multicast group number and the second multicast group number.

According to an aspect of the present disclosure, an electronic device is provided, the electronic device including: one or more processors; storage means for storing one or more programs; when executed by one or more processors, cause the one or more processors to implement a method as above.

According to an aspect of the disclosure, a computer-readable medium is proposed, on which a computer program is stored, which program, when being executed by a processor, carries out the method as above.

According to the response method, device, system, electronic equipment and computer readable medium of the internet group management protocol, the query message of the internet group management protocol is obtained; analyzing the Internet group management protocol query message to obtain the number of first multicast groups in the current network segment; determining the number of second multicast groups concerned by the host equipment; the response time of the host can be reasonably determined based on the mode of generating the response message of the internet group management protocol query message based on the first multicast group number and the second multicast group number, so that the number of messages in the network and the consumption brought by monitoring and responding of each host are reduced.

It is to be understood that both the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the disclosure.

Drawings

The above and other objects, features and advantages of the present disclosure will become more apparent by describing in detail exemplary embodiments thereof with reference to the attached drawings. The drawings described below are merely some embodiments of the present disclosure, and other drawings may be derived from those drawings by those of ordinary skill in the art without inventive effort.

Fig. 1 is a block diagram illustrating an answering system for an internet group management protocol in accordance with an exemplary embodiment.

Fig. 2 is a flow chart illustrating a method of answering according to an internet group management protocol, in accordance with an example embodiment.

Fig. 3 is a flowchart illustrating an answering method of an internet group management protocol according to another exemplary embodiment.

Fig. 4 is a flowchart illustrating an answering method of an internet group management protocol according to another exemplary embodiment.

Fig. 5 is a block diagram illustrating an answering device of an internet group management protocol in accordance with an exemplary embodiment.

Fig. 6 is a block diagram illustrating an answering device of an internet group management protocol according to another exemplary embodiment.

FIG. 7 is a block diagram illustrating an electronic device in accordance with an example embodiment.

FIG. 8 is a block diagram illustrating a computer-readable medium in accordance with an example embodiment.

Detailed Description

Example embodiments will now be described more fully with reference to the accompanying drawings. Example embodiments may, however, be embodied in many different forms and should not be construed as limited to the embodiments set forth herein; rather, these embodiments are provided so that this disclosure will be thorough and complete, and will fully convey the concept of example embodiments to those skilled in the art. The same reference numerals denote the same or similar parts in the drawings, and thus, a repetitive description thereof will be omitted.

Furthermore, the described features, structures, or characteristics may be combined in any suitable manner in one or more embodiments. In the following description, numerous specific details are provided to give a thorough understanding of embodiments of the disclosure. One skilled in the relevant art will recognize, however, that the subject matter of the present disclosure can be practiced without one or more of the specific details, or with other methods, components, devices, steps, and so forth. In other instances, well-known methods, devices, systems, implementations, or operations have not been shown or described in detail to avoid obscuring aspects of the disclosure.

The block diagrams shown in the figures are functional entities only and do not necessarily correspond to physically separate entities. I.e. these functional entities may be implemented in the form of software, or in one or more hardware modules or integrated circuits, or in different networks and/or processor means and/or microcontroller means.

The flow charts shown in the drawings are merely illustrative and do not necessarily include all of the contents and operations/steps, nor do they necessarily have to be performed in the order described. For example, some operations/steps may be decomposed, and some operations/steps may be combined or partially combined, so that the actual execution sequence may be changed according to the actual situation.

It will be understood that, although the terms first, second, third, etc. may be used herein to describe various components, these components should not be limited by these terms. These terms are used to distinguish one element from another. Thus, a first component discussed below may be termed a second component without departing from the teachings of the disclosed concept. As used herein, the term "and/or" includes any and all combinations of one or more of the associated listed items.

It is to be understood by those skilled in the art that the drawings are merely schematic representations of exemplary embodiments, and that the blocks or processes shown in the drawings are not necessarily required to practice the present disclosure and are, therefore, not intended to limit the scope of the present disclosure.

The technical abbreviations involved in this disclosure are explained as follows:

IGMP, Internet Group Management Protocol (Internet Group Management Protocol); IGMP is a protocol responsible for the management of IP multicast members, and is a commonly used multicast protocol at present. The IGMP protocol is responsible for establishing and maintaining multicast group membership between IP hosts and their directly connected multicast routers. IGMP accomplishes the management of multicast group members based on a query and response mechanism.

In the prior art, when receiving an IGMP query packet sent by a querier:

1. if a host needs to receive the flow of a multicast group, the host starts a delay timer to answer the inquiry, and the delay time is a random value which does not exceed the aging time of the multicast group.

2. If the host does not receive any response message of the group within the delay time interval, the host immediately sends an IGMP membership report message of the group, and the message can be received by the querier and other hosts in the network segment.

There may be two reasons for this: 1 is the only concerned person of a multicast group in the network segment, 2 is a plurality of concerned persons of a multicast group in the network segment, and the time delay timer of the host is waited to be overtime firstly.

If the host receives the response message of the group sent by any other host within the delay time interval, the host does not need to answer the query of the group any more because the response message can be received by the querier to avoid the aging of the table entry of the multicast group in the querier, thereby canceling the delay response timer of the group.

The application of the delayed response timer avoids repeated response messages sent by the host in the network segment, thereby reducing the bandwidth occupied by the repeated response messages and lightening the burden of the querier and the host. However, in some scenarios, it still causes more consumption of the multiple hosts in the network segment to respond accordingly.

Assume the scenario as follows: the one network segment comprises an inquirer Q and four hosts (H1, H2, H3 and H4), wherein H1 pays attention to a multicast group G1, H2 pays attention to a multicast group G2, H3 pays attention to a multicast group G3, and H4 pays attention to four multicast groups (G1, G2, G3 and G4).

After receiving the inquiry message sent by the inquirer, the four hosts set the delay response timers to be independent respectively. It is therefore possible to reply in the chronological order of H1, H2, H3, H4, the procedure is as follows:

1, the querier Q sends a query message, and the hosts H1, H2, H3 and H4 set the response delay of the host respectively.

2, the delayed response timer of the host H1 expires first, H1 sends a response message about group G1, H2 and H3 compare and find that the message is not the same group concerned by the host after receiving the response message, and ignore the message; h4 compares and finds one of the concerned groups after receiving, marks that G1 has responded, and continues to listen for IGMP group member messages (G2, G3, G4 have not responded yet by host).

3, the delayed response timer of the host H2 expires, H2 sends a response message about the group G2, and H3 compares the message with the message which is not the same group concerned by the host after receiving the message and ignores the message; h4 compares and finds one of the concerned groups after receiving, marks G2 has responded, and continues to listen for IGMP group member messages (G3, G4 has not responded by the host).

4, the delayed response timer of the host H3 expires, H3 sends a response message about group G3, and after H4 receives the response message, the response message is compared with the response message to find that the host is one of the groups concerned by the host, G3 is marked to have responded, and the IGMP group member message continues to be monitored (G4 no host has responded yet).

5, the delayed reply timer of host H4 expires, H4 sends a reply message regarding group G4.

It can be seen that in this sequence, each host needs to transmit a response message, and some hosts also need to listen and process the response messages transmitted by other hosts for a longer time. The response in this sequence is not optimal.

As can be seen from the examples in the defect section of the prior art scheme, in the prior art scheme, since the response delay time set by each host is independent, the response sequence between the hosts is random, which avoids the burst of traffic in the network, but makes the response sequence between the hosts non-optimal.

In order to solve the technical bottleneck in the prior art, the present disclosure provides a response method of an internet group management protocol, which can perform IGMP response in a better manner. The following is a detailed description with the aid of specific examples.

Fig. 1 is a block diagram illustrating an answering system for an internet group management protocol in accordance with an exemplary embodiment.

As shown in fig. 1, system architecture 10 may include hosts 101, 102, 103, a network 104, and a querier 105. Network 104 is used to provide a medium for communication links between hosts 101, 102, 103 and interrogator 105. Network 104 may include various connection types, such as wired, wireless communication links, or fiber optic cables, to name a few.

Hosts 101, 102, 103 may interact with an interrogator 105 over a network 104 to receive or send message messages and the like. The hosts 101, 102, 103 may have installed thereon various communication client applications, such as shopping-like applications, web browser applications, search-like applications, instant messaging tools, mailbox clients, social platform software, and the like.

Hosts 101, 102, 103 may be a variety of electronic devices having display screens and supporting web browsing, including but not limited to smart phones, tablet computers, laptop portable computers, desktop computers, and the like.

Hosts 101, 102, 103 may, for example, obtain internet group management protocol query messages; the hosts 101, 102, 103 may, for example, analyze the internet group management protocol query message to obtain the number of first multicast groups in the current network segment; the host 101, 102, 103 may, for example, determine a second number of multicast groups that the host device is interested in; the hosts 101, 102, 103 may generate reply messages for the internet group management protocol query message, e.g. based on the first multicast group number and the second multicast group number.

The hosts 101, 102, 103 may also, for example, obtain response messages; the hosts 101, 102, 103 may also, for example, parse the reply message to extract at least one host identity; the hosts 101, 102, 103 may further generate reply messages, e.g. based on at least one host identity and said first and second multicast group number.

The inquirer 105 may, for example, generate an internet group management protocol inquiry message including the number of multicast groups in the current network segment; querier 105 may, for example, send the internet group management protocol query message to at least one host device of the current network segment; the querier 105 may manage the host devices in the current network segment, e.g., based on reply messages of the at least one host device.

It should be noted that the responding method of the internet group management protocol provided by the embodiment of the present disclosure may be executed by the hosts 101, 102, and 103 and the querier 105, and accordingly, the responding device of the internet group management protocol may be disposed in the hosts 101, 102, and 103 and the querier 105.

Fig. 2 is a flow chart illustrating a method of answering according to an internet group management protocol, in accordance with an example embodiment. The response method 20 of the internet group management protocol is applicable to a host device and includes at least steps S202 to S208.

As shown in fig. 2, in S202, an internet group management protocol query message is obtained.

In S204, the internet group management protocol query message is analyzed to obtain the number of the first multicast groups in the current network segment. And determining the number of the second multicast groups based on the member relation report message of the Internet group management protocol of the host equipment. When the inquirer sends inquiry information periodically, a parameter is added to carry the number of multicast groups currently kept by the inquirer in the network segment (N1). 2. When the host receives the query message sent by the querier, the host needs to analyze the number N1 of the query multicast groups carried by the querier in addition to performing normal analysis.

And when the first multicast group number in the internet group management protocol query message is not analyzed, generating the delayed response time based on preset response time. 1. If the host does not support the technical scheme, after N1 is omitted, the delayed response timer is still set according to the prior art.

In S206, the number of second multicast groups to which the host device is interested is determined.

In S208, a response packet of the internet group management protocol query packet is generated based on the first multicast group number and the second multicast group number. Generating a delayed response time based on the first multicast group number and the second multicast group number; and generating a response message of the Internet group management protocol query message based on the delay response time.

Wherein generating a delayed response time based on the first multicast group number and the second multicast group number comprises: and generating the delayed response time according to the ratio of the first multicast group number to the second multicast group number and the preset response time.

Generating a response message of the internet group management protocol query message based on the delayed response time comprises the following steps: and generating the response message based on the member relation report of the Internet group management protocol at the delayed response time.

If the host supports the technical scheme, after the number of multicast groups in the query message is acquired to be N1, the number of multicast groups of the concerned network segment counted by the host is acquired (N2), and the response delay is set according to the size of N2/N1. The method is that after the delay (jitter) is calculated by using the prior art scheme, the delay (jitter) is multiplied by (1-N2/N1), namely, the larger the proportion of the multicast group concerned by the local machine is, the smaller the newly calculated delay interval is. The new delay interval is used to set the local delay reply timer.

In S210, response messages from other hosts are acquired. And after other hosts respond to the response message, acquiring the response message.

In S212, parsing the response packet to extract at least one host identifier;

in S214, a response message is generated based on at least one host identifier and the first multicast group number and the second multicast group number. The method comprises the following steps: generating a delayed response time based on the first multicast group number and the second multicast group number; and generating the response message based on the at least one host identity and the Internet group management protocol membership report message of the host equipment.

Wherein, generating the response message based on the at least one host identifier and the internet group management protocol membership report message of the host device includes: generating the response message based on the member relation report of the Internet group management protocol; and eliminating the at least one host identification in the response message. And monitoring response messages sent by other hosts, comparing whether an intersection exists between the response messages and the multicast group concerned by the host, and if the intersection exists, eliminating the content of the intersection in the response messages of the local machine so as to reduce the length of the response messages of the local machine.

According to the response method of the Internet group management protocol, an Internet group management protocol query message is obtained; analyzing the Internet group management protocol query message to obtain the number of first multicast groups in the current network segment; determining the number of second multicast groups concerned by the host equipment; the response time of the host can be reasonably determined based on the mode of generating the response message of the internet group management protocol query message based on the first multicast group number and the second multicast group number, so that the number of messages in the network and the consumption brought by monitoring and responding of each host are reduced.

It should be clearly understood that this disclosure describes how to make and use particular examples, but the principles of this disclosure are not limited to any details of these examples. Rather, these principles can be applied to many other embodiments based on the teachings of the present disclosure.

Fig. 3 is a flow chart illustrating a method of answering according to an internet group management protocol, in accordance with an example embodiment. The response method 30 of the internet group management protocol is applicable to an interrogator, and includes at least steps S302 to S306.

As shown in fig. 3, in S302, an internet group management protocol query message is generated, where the internet group management protocol query message includes the number of multicast groups in the current network segment. 1. When the inquirer sends inquiry information periodically, a parameter is added to carry the number of multicast groups currently kept by the inquirer in the network segment (N1).

In S304, the internet group management protocol query message is sent to at least one host device in the current network segment.

In S306, the host device in the current network segment is managed based on the response packet of the at least one host device. And extracting the content of the multicast group of each host according to the response messages returned by all the host equipment, and further splicing the conditions of all the multicast groups in the current network segment.

Fig. 4 is a flowchart illustrating an answering method of an internet group management protocol according to another exemplary embodiment. The process 40 shown in fig. 4 is a detailed description of the workflow of the answering system for various internet group management protocols. According to the method and the device, the query message sent by the querier carries the number of the query groups, and the host sets the response delay according to the proportion of the multicast group concerned by the host, so that the host with a larger coverage area responds with higher probability, and therefore the number of messages in a network and the consumption brought by monitoring and responding of each host are reduced.

Also above the scenario is taken as an example: the one network segment comprises an inquirer Q and four hosts (H1, H2, H3 and H4), wherein H1 pays attention to a multicast group G1, H2 pays attention to a multicast group G2, H3 pays attention to a multicast group G3, and H4 pays attention to four multicast groups (G1, G2, G3 and G4).

As shown in fig. 4, in S402, the querier Q sends a query message, and carries N1 ═ 4 therein.

In S404, the hosts H1, H2, and H3 calculate the original delay, multiply by 3/4, and set their own delayed response timers.

In S406, according to the present invention, the host H4 immediately sends the response message since N1 is N2 is 4.

In S408, after receiving the response message sent by H4, the hosts H1, H2, and H3 compare and find that the response already covers the multicast group concerned by the hosts, and then the hosts H1, H2, and H3 do not need to send the response message again.

At S410, when the predetermined time is reached, the inquirer generates multicast group information in the current segment.

Even if there are several hosts in the network that do not support the resolution of N1, e.g., 1-3 of hosts H1, H2, and H3, the actual effect is the same as shown above.

For example, if none of the four hosts supports the parsing of N1, the effect is the same as that of the prior art, and no function loss is caused.

Those skilled in the art will appreciate that all or part of the steps implementing the above embodiments are implemented as computer programs executed by a CPU. When executed by the CPU, performs the functions defined by the above-described methods provided by the present disclosure. The program may be stored in a computer readable storage medium, which may be a read-only memory, a magnetic or optical disk, or the like.

Furthermore, it should be noted that the above-mentioned figures are only schematic illustrations of the processes involved in the methods according to exemplary embodiments of the present disclosure, and are not intended to be limiting. It will be readily understood that the processes shown in the above figures are not intended to indicate or limit the chronological order of the processes. In addition, it is also readily understood that these processes may be performed synchronously or asynchronously, e.g., in multiple modules.

The following are embodiments of the disclosed apparatus that may be used to perform embodiments of the disclosed methods. For details not disclosed in the embodiments of the apparatus of the present disclosure, refer to the embodiments of the method of the present disclosure.

Fig. 5 is a block diagram illustrating an answering device of an internet group management protocol in accordance with an exemplary embodiment. As shown in fig. 5, the answering device 50 of the internet group management protocol is applicable to a host device, and includes: an obtaining module 502, a first quantity module 504, a second quantity module 506, and an answering module 508.

The obtaining module 502 is configured to obtain an internet group management protocol query message;

the first quantity module 504 is configured to parse the internet group management protocol query packet to obtain a first multicast group quantity in a current network segment;

a second quantity module 506 is configured to determine a second multicast group quantity concerned by the host device;

the response module 508 is configured to generate a response packet of the internet group management protocol query packet based on the first multicast group number and the second multicast group number.

Fig. 6 is a block diagram illustrating an answering device of an internet group management protocol according to another exemplary embodiment. As shown in fig. 6, the answering device 60 of the internet group management protocol is applicable to an interrogator, and includes: a generating module 602, a sending module 604 and a managing module 606.

The generating module 602 is configured to generate an internet group management protocol query message, where the internet group management protocol query message includes the number of multicast groups in the current network segment;

the sending module 604 is configured to send the internet group management protocol query message to at least one host device in a current network segment;

the management module 606 is configured to manage the host device in the current network segment based on the response packet of the at least one host device.

According to the response device of the internet group management protocol, an internet group management protocol query message is obtained; analyzing the Internet group management protocol query message to obtain the number of first multicast groups in the current network segment; determining the number of second multicast groups concerned by the host equipment; the response time of the host can be reasonably determined based on the mode of generating the response message of the internet group management protocol query message based on the first multicast group number and the second multicast group number, so that the number of messages in the network and the consumption brought by monitoring and responding of each host are reduced.

FIG. 7 is a block diagram illustrating an electronic device in accordance with an example embodiment.

An electronic device 700 according to this embodiment of the disclosure is described below with reference to fig. 7. The electronic device 700 shown in fig. 7 is only an example and should not bring any limitation to the functions and the scope of use of the embodiments of the present disclosure.

As shown in fig. 7, electronic device 700 is embodied in the form of a general purpose computing device. The components of the electronic device 700 may include, but are not limited to: at least one processing unit 710, at least one memory unit 720, a bus 730 that connects the various system components (including the memory unit 720 and the processing unit 710), a display unit 740, and the like.

Wherein the storage unit stores program code that can be executed by the processing unit 710 to cause the processing unit 710 to perform the steps according to various exemplary embodiments of the present disclosure described in this specification. For example, the processing unit 710 may perform the steps as shown in fig. 2, 3, 4.

The memory unit 720 may include readable media in the form of volatile memory units, such as a random access memory unit (RAM)7201 and/or a cache memory unit 7202, and may further include a read only memory unit (ROM) 7203.

The memory unit 720 may also include a program/utility 7204 having a set (at least one) of program modules 7205, such program modules 7205 including, but not limited to: an operating system, one or more application programs, other program modules, and program data, each of which, or some combination thereof, may comprise an implementation of a network environment.

Bus 730 may be any representation of one or more of several types of bus structures, including a memory unit bus or memory unit controller, a peripheral bus, an accelerated graphics port, a processing unit, or a local bus using any of a variety of bus architectures.

The electronic device 700 may also communicate with one or more external devices 700' (e.g., keyboard, pointing device, bluetooth device, etc.), such that a user can communicate with devices with which the electronic device 700 interacts, and/or any devices (e.g., router, modem, etc.) with which the electronic device 700 can communicate with one or more other computing devices. Such communication may occur via an input/output (I/O) interface 750. Also, the electronic device 700 may communicate with one or more networks (e.g., a Local Area Network (LAN), a Wide Area Network (WAN), and/or a public network such as the internet) via the network adapter 760. The network adapter 760 may communicate with other modules of the electronic device 700 via the bus 730. It should be appreciated that although not shown in the figures, other hardware and/or software modules may be used in conjunction with the electronic device 700, including but not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, and data backup storage systems, among others.

Through the above description of the embodiments, those skilled in the art will readily understand that the exemplary embodiments described herein may be implemented by software, or by software in combination with necessary hardware. Therefore, as shown in fig. 8, the technical solution according to the embodiment of the present disclosure may be embodied in the form of a software product, which may be stored in a non-volatile storage medium (which may be a CD-ROM, a usb disk, a removable hard disk, etc.) or on a network, and includes several instructions to enable a computing device (which may be a personal computer, a server, or a network device, etc.) to execute the above method according to the embodiment of the present disclosure.

The software product may employ any combination of one or more readable media. The readable medium may be a readable signal medium or a readable storage medium. A readable storage medium may be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the foregoing. More specific examples (a non-exhaustive list) of the readable storage medium include: an electrical connection having one or more wires, a portable disk, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.

The computer readable storage medium may include a propagated data signal with readable program code embodied therein, for example, in baseband or as part of a carrier wave. Such a propagated data signal may take many forms, including, but not limited to, electro-magnetic, optical, or any suitable combination thereof. A readable storage medium may also be any readable medium that is not a readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device. Program code embodied on a readable storage medium may be transmitted using any appropriate medium, including but not limited to wireless, wireline, optical fiber cable, RF, etc., or any suitable combination of the foregoing.

Program code for carrying out operations for the present disclosure may be written in any combination of one or more programming languages, including an object oriented programming language such as Java, C + + or the like and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code may execute entirely on the user's computing device, partly on the user's device, as a stand-alone software package, partly on the user's computing device and partly on a remote computing device, or entirely on the remote computing device or server. In the case of a remote computing device, the remote computing device may be connected to the user computing device through any kind of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or may be connected to an external computing device (e.g., through the internet using an internet service provider).

The computer readable medium carries one or more programs which, when executed by a device, cause the computer readable medium to perform the functions of: acquiring an internet group management protocol query message; analyzing the Internet group management protocol query message to obtain the number of first multicast groups in the current network segment; determining the number of second multicast groups concerned by the host equipment; and generating a response message of the internet group management protocol query message based on the first multicast group number and the second multicast group number. The computer readable medium may also implement the following functions: acquiring a response message; analyzing the response message to extract at least one host identity; and generating response messages based on at least one host identifier and the number of the first multicast groups and the number of the second multicast groups. The computer readable medium may also implement the following functions: acquiring an internet group management protocol query message; analyzing the Internet group management protocol query message to obtain the number of first multicast groups in the current network segment; determining the number of second multicast groups concerned by the host equipment; and generating a response message of the internet group management protocol query message based on the first multicast group number and the second multicast group number.

Those skilled in the art will appreciate that the modules described above may be distributed in the apparatus according to the description of the embodiments, or may be modified accordingly in one or more apparatuses unique from the embodiments. The modules of the above embodiments may be combined into one module, or further split into multiple sub-modules.

Through the above description of the embodiments, those skilled in the art will readily understand that the exemplary embodiments described herein may be implemented by software, or by software in combination with necessary hardware. Therefore, the technical solution according to the embodiments of the present disclosure may be embodied in the form of a software product, which may be stored in a non-volatile storage medium (which may be a CD-ROM, a usb disk, a removable hard disk, etc.) or on a network, and includes several instructions to enable a computing device (which may be a personal computer, a server, a mobile terminal, or a network device, etc.) to execute the method according to the embodiments of the present disclosure.

Exemplary embodiments of the present disclosure are specifically illustrated and described above. It is to be understood that the present disclosure is not limited to the precise arrangements, instrumentalities, or instrumentalities described herein; on the contrary, the disclosure is intended to cover various modifications and equivalent arrangements included within the spirit and scope of the appended claims.

18页详细技术资料下载
上一篇:一种医用注射器针头装配设备
下一篇:一种基于同步资源权衡优化的星地协同网络资源分配方法

网友询问留言

已有0条留言

还没有人留言评论。精彩留言会获得点赞!

精彩留言,会给你点赞!