CN110753371B - Data frame transmission method, device and equipment - Google Patents
Data frame transmission method, device and equipment Download PDFInfo
- Publication number
- CN110753371B CN110753371B CN201911013012.7A CN201911013012A CN110753371B CN 110753371 B CN110753371 B CN 110753371B CN 201911013012 A CN201911013012 A CN 201911013012A CN 110753371 B CN110753371 B CN 110753371B
- Authority
- CN
- China
- Prior art keywords
- terminal
- identifier
- record
- data frame
- session
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Active
Links
Images
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04W—WIRELESS COMMUNICATION NETWORKS
- H04W28/00—Network traffic management; Network resource management
- H04W28/02—Traffic management, e.g. flow control or congestion control
- H04W28/0289—Congestion control
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L47/00—Traffic control in data switching networks
- H04L47/10—Flow control; Congestion control
- H04L47/12—Avoiding congestion; Recovering from congestion
-
- Y—GENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
- Y02—TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
- Y02D—CLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
- Y02D30/00—Reducing energy consumption in communication networks
- Y02D30/70—Reducing energy consumption in communication networks in wireless communication networks
Landscapes
- Engineering & Computer Science (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Data Exchanges In Wide-Area Networks (AREA)
Abstract
The application provides a data frame transmission method, a device and equipment, wherein the method comprises the following steps: receiving a first data frame from a server, the first data frame including a first packet identification; determining a second packet identifier which is the same as the first packet identifier from a multicast packet list, wherein the multicast packet list comprises at least one packet identifier, one packet identifier corresponds to at least one terminal, and the at least one terminal belongs to a packet corresponding to the packet identifier; determining at least one target terminal corresponding to the second packet identifier; forwarding the first data frame to the at least one target terminal. The technical scheme can reduce the data frame transmission between the server and the plurality of terminals, thereby reducing the network congestion.
Description
Technical Field
The present application relates to the field of communications technologies, and in particular, to a method, an apparatus, and a device for transmitting a data frame.
Background
The popularization of intelligent terminal equipment enables mobile games to become important composition contents of mobile internet, and currently, most game competitions adopt Wi-Fi networks to connect game terminal equipment of multiple players. The real-time performance of the electronic competition is high, so that the requirements on the aspects of time delay, stability and the like of a Wi-Fi network are high, in the same electronic competition, a server needs to send game data frames aiming at terminal equipment of each player participating in the electronic competition, therefore, for the server, a plurality of game data frames need to be sent, and when the Wi-Fi network works in an unauthorized frequency band, due to the fact that a plurality of terminal equipment are connected with the Wi-Fi network, the terminal equipment compete for Wi-Fi network resources, network congestion is caused, and delay difference can exist in the game data frames received by the terminal equipment participating in the electronic competition.
Disclosure of Invention
The embodiment of the application provides a data frame transmission method, a data frame transmission device and data frame transmission equipment, solves the problem of network congestion caused by data frame transmission between a server and a plurality of terminals, and reduces the time difference of receiving data frames by each terminal equipment.
In a first aspect, a data frame transmission method is provided, including:
receiving a first data frame from a server, the first data frame including a first packet identification;
determining a second packet identifier which is the same as the first packet identifier from a multicast packet list, wherein the multicast packet list comprises at least one packet identifier, one packet identifier corresponds to at least one terminal, and the at least one terminal belongs to a packet corresponding to the packet identifier;
determining at least one target terminal corresponding to the second packet identifier;
forwarding the first data frame to the at least one target terminal.
With reference to the first aspect, in a possible implementation manner, before the receiving the first data frame from the server, the method further includes: receiving a first record creating request sent by a first terminal, wherein the first record creating request comprises a first session identifier of the first terminal and a terminal identifier of the first terminal, and the first terminal is any one of the at least one target terminal; creating a first record in the multicast group list, wherein the first record comprises a terminal identifier of the first terminal and the first session identifier; receiving a second record creating request sent by a second terminal, wherein the second record creating request comprises a second session identifier of the second terminal and a terminal identifier of the second terminal; if the second session identifier is the same as the first session identifier, adding the terminal identifier of the second terminal to the first record; and setting a second group identifier for the first record, wherein the first terminal and the second terminal belong to a group corresponding to the second group identifier.
With reference to the first aspect, in a possible implementation manner, the determining at least one target terminal corresponding to the second packet identifier includes: and acquiring device identifiers of a plurality of terminal devices contained in the first record, and taking the plurality of terminal devices as at least one target terminal corresponding to the second group identifier, wherein the plurality of terminal devices comprise the first terminal device and the second terminal device.
With reference to the first aspect, in a possible implementation manner, the method further includes: and if the second session identifier is different from the first session identifier, establishing a second record, wherein the second record comprises the terminal identifier of the second terminal and the second session identifier.
With reference to the first aspect, in a possible implementation manner, before creating the first record in the multicast packet list, the method further includes: searching whether a third record exists in a multicast grouping list, wherein the third record comprises a terminal identifier of the first terminal and a third session identifier, and the third session identifier is different from the first session identifier; if the third record does not exist, executing the step of creating the first record in the multicast grouping list; and if the third record exists, updating the third record to the first record.
With reference to the first aspect, in a possible implementation manner, after forwarding the first data frame to the at least one target terminal, the method further includes: if a session completion instruction sent by the server is received, sending a second data frame to each target terminal in the at least one target terminal, where the second data frame includes a session completion instruction and the first session identifier, and the session completion instruction is used to indicate that the first session corresponding to the first session identifier is completed; deleting the first record in the multicast packet list.
With reference to the first aspect, in a possible implementation manner, before the receiving the first data frame from the server, the method further includes: and sending the second packet identifier and the terminal identifiers of the plurality of terminal devices contained in the first record to the server, so that the server sends the first data frame according to the second packet identifier and the device identifiers of the plurality of terminal devices.
In a second aspect, a data frame transmission apparatus is provided, including:
a data frame receiving module, configured to receive a first data frame from a server, where the first data frame includes a first packet identifier;
a group identifier determining module, configured to determine a second group identifier that is the same as the first group identifier from a multicast group list, where the multicast group list includes at least one group identifier, and one group identifier corresponds to at least one terminal, and the at least one terminal belongs to a group corresponding to the group identifier;
a terminal determining module, configured to determine at least one target terminal corresponding to the second packet identifier;
and the data frame sending module is used for forwarding the first data frame to the at least one target terminal.
With reference to the second aspect, in a possible implementation manner, the apparatus further includes: a first record creating module, configured to receive a first record creating request sent by a first terminal, where the first record creating request includes a first session identifier of the first terminal and a terminal identifier of the first terminal, and the first terminal is any one of the at least one target terminal; creating a first record in the multicast group list, wherein the first record comprises a terminal identifier of the first terminal and the first session identifier; receiving a second record creating request sent by a second terminal, wherein the second record creating request comprises a second session identifier of the second terminal and a terminal identifier of the second terminal; if the second session identifier is the same as the first session identifier, adding the terminal identifier of the second terminal to the first record; and setting a second group identifier for the first record, wherein the first terminal and the second terminal belong to a group corresponding to the second group identifier.
With reference to the second aspect, in a possible implementation manner, the first record creating module is further configured to obtain device identifiers of a plurality of terminal devices included in the first record, and use the plurality of terminal devices as at least one target terminal corresponding to the second packet identifier, where the plurality of terminal devices include the first terminal device and the second terminal device.
With reference to the second aspect, in a possible implementation manner, the apparatus further includes: and the second record creating module is used for creating a second record if the second session identifier is different from the first session identifier, wherein the second record comprises the terminal identifier of the second terminal and the second session identifier.
With reference to the second aspect, in a possible implementation manner, the apparatus further includes: a record updating module, configured to search for whether a third record exists in a multicast group list, where the third record includes a terminal identifier of the first terminal and a third session identifier, and the third session identifier is different from the first session identifier; if the third record does not exist, executing the step of creating the first record in the multicast grouping list; and if the third record exists, updating the third record to the first record.
With reference to the second aspect, in a possible implementation manner, the apparatus further includes: a record deleting module, configured to send a second data frame to each target terminal of the at least one target terminal if a session completion instruction sent by the server is received, where the second data frame includes a session end instruction and the first session identifier, and the session end instruction is used to indicate that a first session corresponding to the first session identifier ends; deleting the first record in the multicast packet list.
With reference to the second aspect, in a possible implementation manner, the apparatus further includes: and the grouping determination module is used for sending the second grouping identification and the terminal identifications of the plurality of terminal devices contained in the first record to the server so that the server sends the first data frame according to the second grouping identification and the device identifications of the plurality of terminal devices.
In a third aspect, a data frame transmission device is provided, which includes a processor, a memory, and an input/output interface, where the processor, the memory, and the input/output interface are connected to each other, where the input/output interface is used to input or output data, the memory is used to store application program codes for the data frame transmission device to perform the method described above, and the processor is configured to perform the method described above in the first aspect.
In a fourth aspect, there is provided a computer storage medium storing a computer program comprising program instructions which, when executed by a processor, cause the processor to perform the method of the first aspect described above.
In the embodiment of the application, at least one target terminal corresponding to a first packet identifier is determined by determining a second packet identifier in a multicast packet management list which is the same as the first packet identifier in a first data frame sent by a server, and the first data frame is forwarded to the at least one target terminal; because each group identifier in the multicast group management list corresponds to one group, and the first data frame contains game data of a target terminal in the group, when the server forwards the first data frame (namely the game data) to each target terminal in the group, each terminal in the group can receive the same game data only by sending one first data frame to the group, and each terminal does not need to send one first data frame aiming at each terminal, so that the downlink data volume sent to the terminal by the server can be reduced, the network congestion is reduced, and the time difference of receiving the first data frame by each target terminal is not large.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings needed to be used in the embodiments will be briefly described below, and it is obvious that the drawings in the following description are only some embodiments of the present application, and it is obvious for those skilled in the art to obtain other drawings without creative efforts.
Fig. 1 is a schematic structural diagram of a data frame transmission system according to an embodiment of the present application;
fig. 2 is a schematic flowchart of a data frame transmission method according to an embodiment of the present application;
fig. 3 is a schematic structural diagram of a first record creation request provided in an embodiment of the present application;
fig. 4 is a schematic diagram illustrating a server sending a first data frame according to an embodiment of the present application;
fig. 5 is a schematic flowchart of another data frame transmission method according to an embodiment of the present application;
fig. 6 is a schematic structural diagram of a data frame transmission apparatus according to an embodiment of the present application;
fig. 7 is a schematic structural diagram of a data frame transmission device according to an embodiment of the present application.
Detailed Description
The technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are only a part of the embodiments of the present application, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.
Referring to fig. 1, fig. 1 is a schematic structural diagram of a data frame transmission system according to an embodiment of the present disclosure, and as shown in the figure, the data frame transmission system includes a first terminal 101, an access point 102, a server 103, and a second terminal 104. The first terminal 101 may be configured to interact, respond to a user operation, receive a first data frame forwarded by the access point 102, interact with the second terminal 104 through the server 103, and so on. The access point 102 may be configured to receive a first data frame from the server 103, determine a second packet identifier identical to the first packet identifier from the multicast packet list, determine at least one target terminal corresponding to the second packet identifier, and forward the first data frame to the at least one target terminal, which in fig. 1 includes the first terminal 101 and the second terminal 104. Server 103 may be configured to send a first data frame, and so on. The second terminal 104 may be configured to interact, respond to a user operation, receive the first data frame forwarded by the access point 102, interact with the second terminal 101 through the server 103, and so on. Optionally, the data frame transmission system may further include a third terminal, a fourth terminal, a fifth terminal, and the like, and the third terminal, the fourth terminal, and the fifth terminal are the same as the first terminal and the second terminal, and may be connected to the access point in a WiFi connection manner, and a player corresponding to each terminal is different; the access point 102 may connect to the server 103 through the internet to implement forwarding of the first data frame, and the first terminal 101 and the second terminal 104 may be, for example, a mobile phone, a computer, a tablet computer, and the like. The number of the first terminals 101 may be plural; the number of the second terminals 104 may also be multiple; the server 103 may be one server or a server group consisting of a plurality of servers, and the servers in the server group may cooperate to complete sending the first data frame.
Firstly, the server 103 sends a first data frame containing a first packet identifier to the access point 102; then, after receiving the first data frame, the access point 102 determines a second packet identifier that is the same as the first packet identifier from the multicast packet list; then, the access point 102 determines the first terminal 101 and the second terminal 104 corresponding to the second packet identifier; finally, the access point 102 forwards the first data frame to the first terminal 101 and the second terminal 104, so as to reduce data frame transmission between the server and multiple target terminals, thereby reducing network congestion.
Referring to fig. 2, fig. 2 is a schematic flowchart of a data frame transmission method provided in an embodiment of the present application, where as shown in the drawing, the method includes:
s101, receiving a first data frame from a server, wherein the first data frame comprises a first packet identifier.
In a possible scenario, the server is a game server in an electronic competition, and the first data frame is total game data corresponding to all players participating in the electronic competition, including character data corresponding to each player in the game (e.g., data of clothing, equipment, experience value, economy, blood volume, etc., of a character), battlefield data (e.g., current state information of each character), position data of a character corresponding to each player, and the like, for example, ten players participate in the electronic competition, and the first data frame may include data of characters corresponding to ten players, total battlefield data of the game, position data of characters corresponding to ten players, and the like. The first group identification is used to identify all players participating in the game. For example, the first packet identifier may be one of identifiers for identifying MAC addresses of all terminals (i.e., terminals held by each player) included in the first data frame, IP addresses of the terminals, IP addresses of servers, and transport layer protocol ports (hereinafter, referred to as ports) used by the servers to create the game, and it is understood that the first packet identifier may be a MAC address of any other terminal except for the terminal included in the first data frame, an IP address of the terminal, or an IP address and a port of the server.
In an implementable manner, before receiving the first data frame from the server, creating a multicast packet list may further be included, and specifically, creating the multicast packet list may include the following steps:
1. receiving a first record creating request sent by a first terminal, wherein the first record creating request comprises a first session identifier of the first terminal and a terminal identifier of the first terminal, and the first terminal is any one of at least one target terminal.
Here, the first session identifier of the first terminal is connected to the server through the first terminal, the server allocates the first session identifier to the first terminal and sends the first session identifier to the first terminal, and the first session identifier is an authority session identifier allocated to the first terminal by the server, for example, an authority game identifier where the first terminal is located; the terminal identifier of the first terminal is used to uniquely indicate the first terminal, and may be, for example, a device identifier of the first terminal device, a factory number of the first terminal, or an MAC address of the first terminal.
In the specific implementation, after a first terminal enters a game page, a player clicks a game creation button on the game page, the first terminal sends a game creation request to a server, the server receives the game creation request sent by the first terminal and allocates first session identifiers (namely, game identifiers in the current game, the game identifiers of each game are different) to the first terminal, the first terminal sends a first record creation request according to the received first session identifiers, and then receives a first record creation request sent by the first terminal. Optionally, the first record creating request may further include a server IP address and a transport layer protocol port (hereinafter referred to as a port) used by the server to create the first session identifier, that is, the first terminal sends the first session identifier of the first terminal, the terminal identifier of the first terminal (first terminal identifier 1), the server IP address 1, and the port 1, as shown in fig. 3, where fig. 3 is a schematic structural diagram of the first record creating request. The first record creating request sent by the first terminal is received, and the first session identifier of the first terminal sent by the first terminal, the terminal identifier of the first terminal, the server IP address 1 and the port 1 are also included in the first record creating request.
Optionally, a group identifier may also be set for the first record, where the group identifier is used to identify a group in which the first record is located, and the first record may be a MAC address of the first terminal.
2. A first record is created in the multicast group list, the first record comprising a terminal identification of the first terminal and a first session identification.
In a possible case, in a case that the first record creating request includes the first session identifier of the first terminal, the terminal identifier of the first terminal, the server IP address and the port, then the first record includes the first session identifier of the first terminal, the terminal identifier of the first terminal, the server IP address and the port, then the multicast packet management table after creating the first record may be as shown in table 1:
table 1: multicast packet list (example)
The first terminal identifier 1 may be an equipment identifier of the first terminal equipment, a factory number of the first terminal, or an MAC address of the first terminal, and the like; the group identifier 1 may be a device identifier of the first terminal device, a factory number of the first terminal, or a MAC address of the first terminal.
3. And receiving a second record creating request sent by the second terminal, wherein the second record creating request comprises a second session identifier of the second terminal and a terminal identifier of the second terminal.
Here, the second terminal is any one of the at least one target terminal except the first terminal, and a process of creating the second record creation request by the second terminal is the same as a process of creating the first record creation request by the first terminal, that is, after the second terminal is connected with the server, the server allocates a second session identifier to the second terminal and sends the second session identifier to the second terminal; the second session identifier is an authority session identifier distributed to the second terminal by the server, for example, an authority game identifier where the second terminal is located; the terminal identifier of the second terminal is used to uniquely indicate the second terminal, and may be, for example, a device identifier of the second terminal device, a factory number of the second terminal, or a MAC address of the second terminal.
In the specific implementation, after the second terminal enters the game page, when the player clicks a game creation button or a game joining button on the game page, the second terminal sends a request for creating or joining the game to the server, after the server receives the request for creating or joining the game sent by the second terminal, the server allocates a second session identifier (i.e., an in-game identifier) to the second terminal, and the second terminal sends a second record creation request according to the received second session identifier, and receives a second record creation request sent by the second terminal. Optionally, the second record creating request may further include the server IP address and a transport layer protocol port (hereinafter, referred to as a port) used by the server to create the second session identifier, that is, the second terminal sends the second session identifier of the second terminal, the terminal identifier of the second terminal, the server IP address 2, and the port 2, and then the second record creating request sent by the second terminal is received and also includes the second session identifier of the second terminal sent by the second terminal, the terminal identifier of the second terminal, the server IP address 2, and the port 2.
4. And if the second session identification is the same as the first session identification, adding the terminal identification of the second terminal into the first record.
In this embodiment of the application, if the second session identifier is the same as the first session identifier, it indicates that the first terminal and the second terminal are in the same session, for example, the first terminal and the second terminal are in the same game, the terminal identifier of the second terminal is added to the first record, and the first record after adding the terminal identifier of the second terminal may be as shown in table 2:
table 2: multicast group list (example)
The first terminal identifier 1 may be an equipment identifier of the first terminal equipment, a factory number of the first terminal, or an MAC address of the first terminal, and the like; the second terminal identifier 2 may be an equipment identifier of the second terminal equipment, a factory number of the second terminal, or an MAC address of the second terminal, etc.; the second packet identifier is a packet identifier 1, and the packet identifier 1 may be an identifier for identifying all terminals (i.e., the first terminal and the second terminal) in the first record, such as a MAC address of a terminal other than the first terminal and the second terminal, a server MAC address, an IP address of a terminal other than the first terminal and the second terminal, a server IP address, and a port.
In an implementable manner, a second record is established if the second session identity is different from the first session identity, the second record comprising the terminal identity of the second terminal and the second session identity.
Here, in the case where the second record creation request includes the second session identifier of the second terminal, the terminal identifier of the second terminal, the server IP address, and the port, and the second record includes the second session identifier of the second terminal, the terminal identifier of the second terminal, the server IP address, and the port, the multicast packet management table after creating the second record may be as shown in table 3:
table 3: multicast group list (example)
The second terminal identifier 2 may be an equipment identifier of the second terminal equipment, a factory number of the second terminal, or an MAC address of the second terminal, etc.; the group identifier 2 may be a device identifier of the second terminal device, a factory number of the second terminal, or an MAC address of the second terminal, etc.; the port 1 and the port 2 may be the same port on the server.
5. And setting a second group identifier for the first record, wherein the first terminal and the second terminal belong to a group corresponding to the second group identifier.
Here, if the second session identifier is the same as the first session identifier, the second packet identifier is set for the first record after the terminal identifier of the second terminal is added to the first record.
Because the group identifier in the first record is the terminal identifier for identifying the first terminal before the terminal identifier of the second terminal is added to the first record, and the group identifier 1 in table 1 is the group identifier for identifying the first terminal, the group identifier 1, that is, the second group identifier, may be reset after the terminal identifier of the second terminal is added to the first record, or, if the group identifier is not set in the first record before the terminal identifier of the second terminal is added to the first record, the group identifier 1, that is, the second group identifier, may be set. Alternatively, the first record of adding the terminal identifier of the second terminal and setting the second packet identifier may refer to table 2 described above.
In a possible scenario, before creating the first record in the multicast group list, it may be further checked whether a third record exists in the multicast group list, where the third record includes the terminal identifier of the first terminal device and a third session identifier, and the third session identifier is different from the first session identifier.
In a case that the third record does not exist in the multicast group list, the step of creating the first record in the multicast group list is executed, and for a specific method for creating the first record, reference may be made to the step one to the step two, which is not described herein again.
If the third record exists in the multicast group list, the third record is updated to the first record.
For example, the third record in the multicast packet list may be as shown in table 4:
table 4: multicast group list (example)
The third session identifier is different from the first session identifier, that is, the two sessions of the first terminal are different, and the first terminal identifier 1 may be an equipment identifier of the first terminal equipment, a factory number of the first terminal, or an MAC address of the first terminal; the group identifier 1 may be a device identifier of the first terminal device, a factory number of the first terminal, or a MAC address of the first terminal. The multicast packet list after updating the third record to the first record may be as shown in table 1.
Optionally, the third terminal may also send a third record creating request, where the third record creating request includes a fourth session identifier of the third terminal and a terminal identifier of the third terminal, and add the terminal identifier of the third terminal in the first record or establish a fourth record in the multicast group list by determining whether the fourth session identifier of the third terminal is consistent with the first session identifier, the second session identifier, and the third session identifier in each record in the multicast group list, and so on.
In a possible implementation manner, before receiving the first data frame from the server, the method may further include: and sending the second packet identifier and the terminal identifiers of the plurality of terminal devices contained in the first record to the server so that the server sends the first data frame according to the second packet identifier and the device identifiers of the plurality of terminal devices.
In this embodiment of the application, since the second packet identifier and the terminal identifiers of the plurality of terminal devices included in the first record are sent to the server, the server may determine terminals corresponding to the second packet identifier and the terminal identifiers of the plurality of terminal devices included in the first record, that is, the server may determine the plurality of terminal devices corresponding to the second packet identifier, and thus the server may determine and send the first data frames corresponding to the plurality of terminal devices corresponding to the second packet identifier. Referring to fig. 4, fig. 4 is a schematic diagram of a server sending a first data frame according to an embodiment of the present application, as shown in the figure, a first packet identifier included in the first data frame sent by the server 403 is the same as a packet identifier 1 in a multicast packet list a, terminals corresponding to the packet identifier 1 in the multicast packet list a are a terminal identifier 1 and a terminal identifier 2, where the terminal identifier 1 corresponds to a first terminal 401, and the terminal identifier 2 corresponds to a second terminal 404, and then the first data frame is forwarded to the first terminal 401 and the second terminal 404.
S102, a second group identification which is the same as the first group identification is determined from a multicast group list, and the multicast group list comprises at least one group identification, wherein one group identification corresponds to at least one terminal, and at least one terminal belongs to a group corresponding to the group identification.
By the steps one to five in step S101, the multicast packet list may be established, and then a second packet identifier that is the same as the first packet identifier in the first data frame sent by the server may be determined from the multicast packet list by looking up at least one packet identifier (i.e., a packet identifier corresponding to each record) in the multicast packet list.
Here, the multicast group list may include a plurality of records, one record corresponds to one group identifier, as shown in table 2, the multicast group list may include two records, where a group identifier corresponding to a first record is a group identifier 1, a terminal corresponding to the group identifier 1 is one, that is, a first terminal, a group identifier corresponding to a second record is a group identifier 2, and a terminal corresponding to the group identifier 2 is also one, that is, a second terminal. If the fourth session identifier of the fourth terminal is the same as the first session identifier of the first terminal and the terminal identifier of the fourth terminal is different from the terminal identifier of the first terminal, the terminal identifier of the fourth terminal is added to the first record, and the group identifier corresponding to the first record corresponds to two terminals, namely the first terminal and the fourth terminal.
And S103, determining at least one target terminal corresponding to the second grouping identifier.
Specifically, the device identifiers of the plurality of terminal devices included in the first record may be acquired, and the plurality of terminal devices may be used as at least one target terminal corresponding to the second packet identifier, where the plurality of terminal devices include the first terminal device and the second terminal device.
For example, if the first record is shown in the multicast group list 3, the device identifiers of the multiple terminal devices included in the obtained first record are the first terminal identifier 1 and the second terminal identifier 2, and the first terminal identifier 1 and the second terminal identifier 2 are used as at least one target terminal corresponding to the second group identifier, that is, the target terminal includes a first terminal corresponding to the first terminal identifier 1 and a second terminal corresponding to the second terminal identifier 2.
S104, the first data frame is forwarded to at least one target terminal.
Here, for example, if it is determined that the at least one target terminal corresponding to the second packet identifier includes a first terminal and a second terminal, the first data frame is simultaneously forwarded to the first terminal and the second terminal, and the first terminal and the second terminal simultaneously receive the first data frame and display the current session. Since the first terminal and the second terminal are in the same network and in the same record in the multicast group list, the first terminal and the second terminal can receive the first data frame at the same time, that is, the session data (such as game data) received by the first terminal and the second terminal are the same, so that the session data seen by the player who uses the first terminal to perform a session is the same as the session data seen by the player who uses the second terminal to perform a session.
In the embodiment of the application, at least one target terminal corresponding to a first packet identifier is determined by determining a second packet identifier in a multicast packet management list which is the same as the first packet identifier in a first data frame sent by a server, and the first data frame is forwarded to the at least one target terminal; because the terminals belonging to the same group identifier are identified through the multicast group management list, namely all the terminals in the same group are determined, when the server sends the first data frames corresponding to the terminals in the same group, each terminal belonging to the same group identifier in the multicast group management list can receive the same session data (such as game data) only by sending one first data frame because the first data frames corresponding to all the terminals in the same group are the same, and the server does not need to send one first data frame for each terminal, so that the downlink data volume sent to the terminals by the server can be reduced, the network congestion is reduced, and the data frame transmission efficiency is improved; and the time difference of receiving the first data frame by each target terminal is not large, so that the fairness of the session can be increased, and the user experience is improved.
Referring to fig. 5, fig. 5 is a schematic flowchart of a data frame transmission method according to an embodiment of the present application, where as shown in the drawing, the method includes:
s201, receiving a first data frame from a server, where the first data frame includes a first packet identifier.
S202, a second group identification which is the same as the first group identification is determined from the multicast group list, and the multicast group list comprises at least one group identification, wherein one group identification corresponds to at least one terminal, and at least one terminal belongs to the group corresponding to the group identification.
And S203, determining at least one target terminal corresponding to the second grouping identifier.
S204, the first data frame is forwarded to at least one target terminal.
Here, the specific implementation manner of steps S201 to S204 may refer to the description of steps S101 to S104 in the embodiment corresponding to fig. 2, and is not described herein again.
S205, if a session completion instruction sent by the server is received, sending a second data frame to each target terminal in the at least one target terminal, where the second data frame includes a session end instruction and a first session identifier, and the session end instruction is used to indicate that a first session corresponding to the first session identifier is ended.
In the embodiment of the application, after a first session corresponding to a first session identifier is ended, a server sends a session completion instruction, and when the session completion instruction sent by the server is received, a second data frame is sent to each target terminal in at least one target terminal, so that each target terminal in at least one target terminal displays a session completion page, and a player determines that the current session is ended by viewing the session completion page displayed by the target terminal.
Here, the session completion instruction is configured to send a second data frame according to the session completion instruction, where the second data frame includes the session end instruction and the first session identifier, and may further include a server IP address, a second packet identifier, and a terminal identifier of each of the at least one target terminal corresponding to the second packet identifier. And after receiving the second data frame, the target terminal displays a session end page, where the session end page may include a terminal identifier of each target terminal in the at least one target terminal corresponding to the first session identifier and the second packet identifier, so that the player may view information of other players, such as a game result, an experience value, and a gold coin, through the target terminal.
Optionally, after receiving the second data frame, each of the at least one target terminal may further send a third data frame to the server, where the third data frame is used to determine that the first session ends and exits from the first session, and the third data frame may include the first session identifier and the second packet identifier.
S206, delete the first record in the multicast packet list.
Here, since the first session corresponding to the first session identifier is ended, the first record corresponding to the first session identifier in the multicast packet list may be deleted, for example, the multicast packet list is shown in table 5:
table 5: multicast group list (example)
After the first session corresponding to the first session identifier is ended, the multicast packet list after deleting the first record in the multicast packet list may be as shown in table 6:
table 6: multicast group list (example)
In the embodiment of the application, because the target terminal corresponding to the session identifier in the multicast group list does not interact any more after the session is ended, by deleting the record corresponding to the session identifier which is ended in the multicast group list, the efficiency of searching for the second group identifier which is the same as the first group identifier in the multicast group list can be reduced, and the reduction of resource occupation is realized.
The method of the embodiments of the present application is described above, and the apparatus of the embodiments of the present application is described below.
Referring to fig. 6, fig. 6 is a schematic structural diagram of a data frame transmission apparatus according to an embodiment of the present application, where the apparatus 60 includes:
a data frame receiving module 601, configured to receive a first data frame from a server, where the first data frame includes a first packet identifier;
in a possible scenario, the server is a game server in an electronic competition, and the first data frame is total game data corresponding to all players participating in the electronic competition, including character data corresponding to each player in the game (e.g., data of clothing, equipment, experience value, economy, blood volume, etc., of a character), battlefield data (e.g., current state information of each character), position data of a character corresponding to each player, and the like, for example, ten players participate in the electronic competition, and the first data frame may include data of characters corresponding to ten players, total battlefield data of the game, position data of characters corresponding to ten players, and the like. The first group identification is used to identify all players participating in the game. For example, the first packet identifier may be one of identifiers for identifying MAC addresses of all terminals (i.e., terminals held by each player) included in the first data frame, IP addresses of the terminals, IP addresses of servers, and transport layer protocol ports (hereinafter, referred to as ports) used by the servers to create the game, and it is understood that the first packet identifier may be a MAC address of any other terminal except for the terminal included in the first data frame, an IP address of the terminal, or an IP address and a port of the server.
A packet identifier determining module 602, configured to determine a second packet identifier that is the same as the first packet identifier from a multicast packet list, where the multicast packet list includes at least one packet identifier, and one packet identifier corresponds to at least one terminal, and the at least one terminal belongs to a packet corresponding to the packet identifier;
if the multicast packet list can be established through steps one to five in step S101, the packet identifier determining module 602 may determine, from the multicast packet list, a second packet identifier that is the same as the first packet identifier in the first data frame sent by the server by looking up at least one packet identifier (i.e., a packet identifier corresponding to each record) in the multicast packet list.
Here, the multicast group list may include a plurality of records, one record corresponds to one group identifier, and as shown in table 2, the multicast group list may include two records, where a group identifier corresponding to a first record is a group identifier 1, a terminal corresponding to the group identifier 1 is one, i.e., a first terminal, a group identifier corresponding to a second record is a group identifier 2, and a terminal corresponding to the group identifier 2 is also one, i.e., a second terminal. If the fourth session identifier of the fourth terminal is the same as the first session identifier of the first terminal and the terminal identifier of the fourth terminal is different from the terminal identifier of the first terminal, the group identifier determining module 602 adds the terminal identifier of the fourth terminal to the first record, and the group identifier corresponding to the first record corresponds to two terminals, that is, the first terminal and the fourth terminal.
A terminal determining module 603, configured to determine at least one target terminal corresponding to the second packet identifier;
specifically, the terminal determining module 603 may obtain device identifiers of a plurality of terminal devices included in the first record, and use the plurality of terminal devices as at least one target terminal corresponding to the second packet identifier, where the plurality of terminal devices include the first terminal device and the second terminal device.
For example, if the first record is shown in the multicast group list 3, the device identifiers of the multiple terminal devices included in the first record acquired by the terminal determining module 603 are the first terminal identifier 1 and the second terminal identifier 2, and the first terminal identifier 1 and the second terminal identifier 2 are used as at least one target terminal corresponding to the second group identifier, that is, the target terminal includes a first terminal corresponding to the first terminal identifier 1 and a second terminal corresponding to the second terminal identifier 2.
A data frame sending module 604, configured to forward the first data frame to the at least one target terminal.
Here, for example, if the terminal determining module 603 determines that the at least one target terminal corresponding to the second packet identifier includes a first terminal and a second terminal, the data frame sending module 604 forwards the first data frame to the first terminal and the second terminal at the same time, and the first terminal and the second terminal receive the first data frame at the same time and display the current session. Since the first terminal and the second terminal are in the same network and in the same record in the multicast group list, the first terminal and the second terminal can receive the first data frame at the same time, that is, the session data received by the first terminal and the session data received by the second terminal are the same, so that the session data seen by the player using the first terminal for a session is the same as the session data seen by the player using the second terminal for a session.
In one possible design, the apparatus 60 further includes:
a first record creating module 605, configured to receive a first record creating request sent by a first terminal, where the first record creating request includes a first session identifier of the first terminal and a terminal identifier of the first terminal, and the first terminal is any one of the at least one target terminal;
here, the first session identifier of the first terminal is connected to the server through the first terminal, the server allocates the first session identifier to the first terminal and sends the first session identifier to the first terminal, and the first session identifier is an authority session identifier allocated to the first terminal by the server, for example, an authority game identifier where the first terminal is located; the terminal identifier of the first terminal is used to uniquely indicate the first terminal, and may be, for example, a device identifier of the first terminal device, a factory number of the first terminal, or a MAC address of the first terminal.
In a specific implementation, after a first terminal enters a game page, a player clicks a game creation button on the game page, the first terminal sends a game creation request to a server, the server receives the game creation request sent by the first terminal, allocates a first session identifier (that is, a game identifier of the current game, and the game identifiers of each game are different) to the first terminal, the first terminal sends a first record creation request according to the received first session identifier, and the first record creation module 605 receives the first record creation request sent by the first terminal. Optionally, the first record creating request may further include the server IP address and a transport layer protocol port (hereinafter, referred to as a port) used by the server to create the first session identifier, that is, the first terminal sends the first session identifier of the first terminal, the terminal identifier of the first terminal (first terminal identifier 1), the server IP address 1, and the port 1, as shown in fig. 3, where fig. 3 is a schematic structural diagram of the first record creating request. The first record creating module 605 receives that the first record creating request sent by the first terminal also includes the first session identifier of the first terminal sent by the first terminal, the terminal identifier of the first terminal, the IP address 1 of the server, and the port 1.
Optionally, the first record creating module 605 may further set a group identifier for the first record, where the group identifier is used to identify a group in which the first record is located, and the first record may be a MAC address of the first terminal.
The first record creating module 605 is further configured to create a first record in the multicast group list, where the first record includes the terminal identifier of the first terminal and the first session identifier;
in a possible case, in a case that the first record creating request includes the first session identifier of the first terminal, the terminal identifier of the first terminal, the server IP address and the port, then the first record includes the first session identifier of the first terminal, the terminal identifier of the first terminal, the server IP address and the port, then the multicast packet management table after the first record creating module 605 creates the first record may be as shown in table 1. Reference may be made to table 1, which is not described herein.
The first terminal identifier 1 may be an equipment identifier of the first terminal equipment, a factory number of the first terminal, or an MAC address of the first terminal, and the like; the group identifier 1 may be a device identifier of the first terminal device, a factory number of the first terminal, or a MAC address of the first terminal.
The first record creating module 605 is further configured to receive a second record creating request sent by a second terminal, where the second record creating request includes a second session identifier of the second terminal and a terminal identifier of the second terminal;
here, the second terminal is any one of the at least one target terminal except the first terminal, and a process of creating the second record creation request by the second terminal is the same as a process of creating the first record creation request by the first terminal, that is, after the second terminal is connected with the server, the server allocates a second session identifier to the second terminal and sends the second session identifier to the second terminal; the second session identifier is an authority session identifier distributed to the second terminal by the server, for example, an authority game identifier where the second terminal is located; the terminal identifier of the second terminal is used to uniquely indicate the second terminal, and may be, for example, a device identifier of the second terminal device, a factory number of the second terminal, or a MAC address of the second terminal.
In a specific implementation, after the second terminal enters the game page, when the player clicks a game creation button or a game joining button on the game page, the second terminal sends a request for creating or joining the game to the server, after the server receives the request for creating or joining the game sent by the second terminal, the server allocates a second session identifier (i.e., an in-game identifier) to the second terminal, the second terminal sends a second record creation request according to the received second session identifier, and the first record creation module 605 receives the second record creation request sent by the second terminal. Optionally, the second record creating request may further include the server IP address and a transport layer protocol port (hereinafter, referred to as a port) used by the server to create the second session identifier, that is, the second terminal sends the second session identifier of the second terminal, the terminal identifier of the second terminal, the server IP address 2, and the port 2, and then the first record creating module 605 receives the second record creating request sent by the second terminal and also includes the second session identifier of the second terminal sent by the second terminal, the terminal identifier of the second terminal, the server IP address 2, and the port 2.
The first record creating module 605 is further configured to add the terminal identifier of the second terminal to the first record if the second session identifier is the same as the first session identifier;
in this embodiment of the application, if the second session identifier is the same as the first session identifier, it indicates that the first terminal and the second terminal are in the same session, for example, the first terminal and the second terminal are in the same game, the first record creating module 605 adds the terminal identifier of the second terminal to the first record, and the first record after adding the terminal identifier of the second terminal may be as shown in table 2. The first terminal identifier 1 may be an equipment identifier of the first terminal equipment, a factory number of the first terminal, or an MAC address of the first terminal, and the like; the second terminal identifier 2 may be an equipment identifier of the second terminal equipment, a factory number of the second terminal, or an MAC address of the second terminal, etc.; the second packet identifier is a packet identifier 1, and the packet identifier 1 may be an identifier for identifying all terminals (i.e., the first terminal and the second terminal) in the first record, such as a MAC address of a terminal other than the first terminal and the second terminal, a server MAC address, an IP address of a terminal other than the first terminal and the second terminal, a server IP address, and a port.
The first record creating module 605 is further configured to set a second packet identifier for the first record, where the first terminal and the second terminal belong to a group corresponding to the second packet identifier.
Here, if the second session identifier is the same as the first session identifier, the first record creating module 605 sets the second group identifier for the first record after adding the terminal identifier of the second terminal to the first record.
Since the group identifier in the first record is the terminal identifier for identifying the first terminal before the terminal identifier of the second terminal is added to the first record, and the group identifier 1 in table 1 is the group identifier for identifying the first terminal, the first record creating module 605 may reset the group identifier 1, that is, the second group identifier, after the terminal identifier of the second terminal is added to the first record, or may set the group identifier 1, that is, the second group identifier, if the group identifier is not set in the first record before the terminal identifier of the second terminal is added to the first record. Alternatively, the first record creating module 605 may refer to table 2 described above to add the terminal identifier of the second terminal and set the first record of the second packet identifier.
In a possible design, the first record creating module 605 is further configured to obtain device identifiers of a plurality of terminal devices included in the first record, and use the plurality of terminal devices as at least one target terminal corresponding to the second group identifier, where the plurality of terminal devices includes the first terminal device and the second terminal device.
In one possible design, the apparatus 60 further includes:
a second record creating module 606, configured to create a second record if the second session identifier is different from the first session identifier, where the second record includes the terminal identifier of the second terminal and the second session identifier.
Here, in the case where the second record creation request includes the second session identifier of the second terminal, the terminal identifier of the second terminal, the server IP address, and the port, the second record includes the second session identifier of the second terminal, the terminal identifier of the second terminal, the server IP address, and the port, and the multicast packet management table after the second record creation module 606 creates the second record may be as shown in table 3. The second terminal identifier 2 may be an equipment identifier of the second terminal equipment, a factory number of the second terminal, or an MAC address of the second terminal, etc.; the group identifier 2 may be a device identifier of the second terminal device, a factory number of the second terminal, or an MAC address of the second terminal, etc.; the port 1 and the port 2 may be the same port on the server.
In one possible design, the apparatus 60 further includes:
a record updating module 607, configured to search, in a multicast grouping list, whether a third record exists, where the third record includes a terminal identifier of the first terminal and a third session identifier, and the third session identifier is different from the first session identifier;
the record updating module 607 is further configured to execute the step of creating the first record in the multicast grouping list if the third record does not exist;
in a case that the third record does not exist in the multicast group list, the step of creating the first record in the multicast group list is performed, and the method for creating the first record by the record updating module 607 may refer to steps one to two in step S101, which is not described herein again.
The record updating module 607 is further configured to update the third record to the first record if the third record exists.
For example, a third record in the multicast group list may be as shown in table 4, where the third session identifier is different from the first session identifier, that is, the two sessions of the first terminal are different, and the first terminal identifier 1 may be a device identifier of the first terminal device, a factory number of the first terminal, or a MAC address of the first terminal; the group identifier 1 may be a device identifier of the first terminal device, a factory number of the first terminal, or a MAC address of the first terminal. The record update module 607 updates the third record to the multicast group list after the first record may be as shown in table 1.
Optionally, the third terminal may also send a third record creating request, where the third record creating request includes a fourth session identifier of the third terminal and a terminal identifier of the third terminal, and the record updating module 607 adds the terminal identifier of the third terminal to the first record or establishes a fourth record in the multicast group list by determining whether the fourth session identifier of the third terminal is consistent with the first session identifier, the second session identifier, and the third session identifier in each record in the multicast group list, and so on.
In one possible design, the apparatus 60 further includes:
a record deleting module 608, configured to send a second data frame to each target terminal of the at least one target terminal if a session completion instruction sent by the server is received, where the second data frame includes a session end instruction and the first session identifier, and the session end instruction is used to indicate that a first session corresponding to the first session identifier ends;
in this embodiment of the application, when a first session corresponding to a first session identifier is ended, the server sends a session completion instruction, and when the record deleting module 608 receives the session completion instruction sent by the server, the second data frame is sent to each target terminal in the at least one target terminal, so that each target terminal in the at least one target terminal displays a session end page, and the player determines that the current session is ended by viewing the session end page displayed by the target terminal.
Here, the session completion instruction is used for the record deletion module 608 to send a second data frame to the at least one target terminal according to the session completion instruction sent by the server, where the second data frame includes the session end instruction and the first session identifier, and may further include the server IP address, the second packet identifier, and a terminal identifier of each target terminal in the at least one target terminal corresponding to the second packet identifier. And after receiving the second data frame, the target terminal displays a session end page, where the session end page may include a terminal identifier of each target terminal in the at least one target terminal corresponding to the first session identifier and the second packet identifier, so that the player may view information of other players, such as a game result, an experience value, and a gold coin, through the target terminal.
Optionally, after receiving the second data frame, each of the at least one target terminal may further send a third data frame to the recording deletion module 608, and the recording deletion module 608 forwards the third data frame to the server, where the third data frame is used to determine that the first session ends and exits from the first session, and the third data frame may include the first session identifier and the second packet identifier.
The record deleting module 608 is further configured to delete the first record in the multicast group list.
Here, since the first session corresponding to the first session identifier is ended, the first record corresponding to the first session identifier in the multicast packet list may be deleted, for example, the multicast packet list is shown in table 5; after the first session corresponding to the first session identifier is ended, the multicast packet list after deleting the first record in the multicast packet list may be as shown in table 6.
In one possible design, the apparatus 60 further comprises:
the group determining module 609 is configured to send the second group identifier and the terminal identifiers of the multiple terminal devices included in the first record to the server, so that the server sends the first data frame according to the second group identifier and the device identifiers of the multiple terminal devices.
In this embodiment of the application, since the grouping determining module 609 sends the second grouping identifier and the terminal identifiers of the plurality of terminal devices included in the first record to the server, the server may determine terminals corresponding to the second grouping identifier and the terminal identifiers of the plurality of terminal devices included in the first record, that is, the server may determine the plurality of terminal devices corresponding to the second grouping identifier, so that the server may determine and send the first data frames corresponding to the plurality of terminal devices corresponding to the second grouping identifier. Referring to fig. 4, fig. 4 is a schematic diagram of a server sending a first data frame according to an embodiment of the present application, as shown in the figure, a first packet identifier included in the first data frame sent by the server 403 is the same as a packet identifier 1 in a multicast packet list a, terminals corresponding to the packet identifier 1 in the multicast packet list a are a terminal identifier 1 and a terminal identifier 2, where the terminal identifier 1 corresponds to a first terminal 401, and the terminal identifier 2 corresponds to a second terminal 404, and then the first data frame is forwarded to the first terminal 401 and the second terminal 404.
It should be noted that, for the content that is not mentioned in the embodiment corresponding to fig. 6, reference may be made to the description of the method embodiment, and details are not described here again.
In the embodiment of the application, at least one target terminal corresponding to a first packet identifier is determined by determining a second packet identifier in a multicast packet management list which is the same as the first packet identifier in a first data frame sent by a server, and the first data frame is forwarded to the at least one target terminal; because the terminals belonging to the same group identifier are identified through the multicast group management list, that is, all the terminals in the same group are determined, when the server sends the first data frame corresponding to the terminals in the same group, each terminal belonging to the same group identifier in the multicast group management list can receive the same session data (such as game data) because the first data frame corresponding to each terminal in the same group is the same, that is, only one first data frame needs to be sent, and the server does not need to send one first data frame for each terminal, so that the amount of downlink data sent to the terminals by the server can be reduced, thereby reducing network congestion and improving the transmission efficiency of the data frames; moreover, the time difference of receiving the first data frame by each target terminal is not large, so that the fairness of the session can be increased, and the user experience is improved; because the target terminal corresponding to the session identifier in the multicast group list does not interact any more after the session is ended, the efficiency of searching for the second group identifier which is the same as the first group identifier in the multicast group list can be reduced by deleting the record corresponding to the session identifier which is ended in the multicast group list, and the resource occupation can be reduced.
Referring to fig. 7, fig. 7 is a schematic diagram of a composition structure of a data frame transmission device according to an embodiment of the present application, where the device 70 includes a processor 701, a memory 702, and an input/output interface 703. The processor 701 is connected to the memory 702 and the input/output interface 703, for example, the processor 701 may be connected to the memory 702 and the input/output interface 703 through a bus.
The processor 701 is configured to support the data frame transmission apparatus to execute corresponding functions in the data frame transmission methods described in fig. 2 and 5. The processor 701 may be a Central Processing Unit (CPU), a Network Processor (NP), a hardware chip, or any combination thereof. The hardware chip may be an Application Specific Integrated Circuit (ASIC), a Programmable Logic Device (PLD), or a combination thereof. The PLD may be a Complex Programmable Logic Device (CPLD), a field-programmable gate array (FPGA), a General Array Logic (GAL), or any combination thereof.
The memory 702 is used to store program codes and the like. The memory 702 may include Volatile Memory (VM), such as Random Access Memory (RAM); the memory 702 may also include a non-volatile memory (NVM), such as a read-only memory (ROM), a flash memory (flash memory), a Hard Disk Drive (HDD) or a solid-state drive (SSD); the memory 702 may also comprise a combination of the above types of memory.
The input/output interface 703 is used for inputting or outputting data.
The processor 701 may call the program code to perform the following operations:
receiving a first data frame from a server, the first data frame comprising a first packet identification;
determining a second packet identifier which is the same as the first packet identifier from a multicast packet list, wherein the multicast packet list comprises at least one packet identifier, one packet identifier corresponds to at least one terminal, and the at least one terminal belongs to a packet corresponding to the packet identifier;
determining at least one target terminal corresponding to the second packet identifier;
forwarding the first data frame to the at least one target terminal.
Optionally, the processor 701 may call the program code to perform the following operations:
receiving a first record creating request sent by a first terminal, wherein the first record creating request comprises a first session identifier of the first terminal and a terminal identifier of the first terminal, and the first terminal is any one of the at least one target terminal;
creating a first record in the multicast group list, wherein the first record comprises a terminal identifier of the first terminal and the first session identifier;
receiving a second record creating request sent by a second terminal, wherein the second record creating request comprises a second session identifier of the second terminal and a terminal identifier of the second terminal;
if the second session identifier is the same as the first session identifier, adding the terminal identifier of the second terminal to the first record;
and setting a second group identifier for the first record, wherein the first terminal and the second terminal belong to a group corresponding to the second group identifier.
Optionally, the processor 701 performs the operation of determining at least one target terminal corresponding to the second packet identifier, including:
and acquiring device identifiers of a plurality of terminal devices contained in the first record, and using the plurality of terminal devices as at least one target terminal corresponding to the second grouping identifier, wherein the plurality of terminal devices comprise the first terminal device and the second terminal device.
Optionally, the processor 701 may call the program code to perform the following operations:
and if the second session identifier is different from the first session identifier, establishing a second record, wherein the second record comprises the terminal identifier of the second terminal and the second session identifier.
Optionally, the processor 701 may call the program code to perform the following operations:
searching whether a third record exists in a multicast grouping list, wherein the third record comprises a terminal identifier of the first terminal and a third session identifier, and the third session identifier is different from the first session identifier;
if the third record does not exist, executing the step of creating the first record in the multicast grouping list;
and if the third record exists, updating the third record to the first record.
Optionally, the processor 701 may call the program code to perform the following operations:
if a session completion instruction sent by the server is received, sending a second data frame to each target terminal in the at least one target terminal, where the second data frame includes a session completion instruction and the first session identifier, and the session completion instruction is used to indicate that the first session corresponding to the first session identifier is completed;
deleting the first record in the multicast packet list.
Optionally, the processor 701 may call the program code to perform the following operations:
and sending the second packet identifier and the terminal identifiers of the plurality of terminal devices contained in the first record to the server, so that the server sends the first data frame according to the second packet identifier and the device identifiers of the plurality of terminal devices.
It should be noted that, the implementation of each operation may also correspond to the corresponding description with reference to the above method embodiment; the processor 701 may also cooperate with the input/output interface 703 to perform other operations in the above-described method embodiments.
Embodiments of the present application also provide a computer storage medium storing a computer program, the computer program comprising program instructions, which when executed by a computer, the computer may be a part of the above-mentioned data frame transmission device, cause the computer to perform the method according to the foregoing embodiments. Such as the processor 701 described above.
It will be understood by those skilled in the art that all or part of the processes of the methods of the embodiments described above may be implemented by a computer program, which may be stored in a computer readable storage medium and executed to implement the processes of the embodiments of the methods described above. The storage medium may be a magnetic disk, an optical disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), or the like.
The above disclosure is only for the purpose of illustrating the preferred embodiments of the present application and is not to be construed as limiting the scope of the present application, so that the present application is not limited thereto, and all equivalent variations and modifications can be made to the present application.
Claims (9)
1. A data frame transmission method is applied to an access point, wherein the access point is connected with at least one terminal in a WiFi connection mode, and the method comprises the following steps:
receiving a first data frame from a server, the first data frame including a first packet identification;
determining a second packet identifier which is the same as the first packet identifier from a multicast packet list, wherein the multicast packet list comprises at least one packet identifier, one packet identifier corresponds to at least one terminal, and the at least one terminal belongs to a packet corresponding to the packet identifier;
determining at least one target terminal corresponding to the second packet identification, the at least one target terminal corresponding to the first data frame;
forwarding the first data frame to the at least one target terminal;
before the receiving the first data frame from the server, the method further includes:
and sending the second packet identifier and the terminal identifiers of the plurality of terminal devices contained in the first record in the multicast packet list to the server so that the server sends the first data frame according to the second packet identifier and the device identifiers of the plurality of terminal devices, wherein the session identifiers corresponding to the terminal identifiers of the plurality of terminal devices contained in the first record are the same.
2. The method of claim 1, wherein before receiving the first data frame from the server, further comprising:
receiving a first record creating request sent by a first terminal, wherein the first record creating request comprises a first session identifier of the first terminal and a terminal identifier of the first terminal, and the first terminal is any one of the at least one target terminal;
creating a first record in the multicast group list, wherein the first record comprises a terminal identifier of the first terminal and the first session identifier;
receiving a second record creating request sent by a second terminal, wherein the second record creating request comprises a second session identifier of the second terminal and a terminal identifier of the second terminal;
if the second session identifier is the same as the first session identifier, adding the terminal identifier of the second terminal to the first record;
and setting a second group identifier for the first record, wherein the first terminal and the second terminal belong to a group corresponding to the second group identifier.
3. The method of claim 2, wherein the determining at least one target terminal corresponding to the second packet identifier comprises:
and acquiring device identifiers of a plurality of terminal devices contained in the first record, and using the plurality of terminal devices as at least one target terminal corresponding to the second grouping identifier, wherein the plurality of terminal devices comprise the first terminal device and the second terminal device.
4. A method according to claim 2 or 3, characterized in that the method further comprises:
and if the second session identifier is different from the first session identifier, establishing a second record, wherein the second record comprises the terminal identifier of the second terminal and the second session identifier.
5. The method of claim 2, wherein before creating the first record in the multicast packet list, further comprising:
searching whether a third record exists in a multicast grouping list, wherein the third record comprises a terminal identifier of the first terminal and a third session identifier, and the third session identifier is different from the first session identifier;
if the third record does not exist, executing a step of creating a first record in the multicast grouping list;
and if the third record exists, updating the third record to the first record.
6. The method of claim 2, wherein after forwarding the first data frame to the at least one target terminal, further comprising:
if receiving a session completion instruction sent by the server, sending a second data frame to each target terminal in the at least one target terminal, where the second data frame includes a session end instruction and the first session identifier, and the session end instruction is used to indicate that a first session corresponding to the first session identifier is ended;
deleting the first record in the multicast packet list.
7. A data frame transmission apparatus, applied to an access point, where the access point is connected to at least one terminal by a WiFi connection, the apparatus comprising:
a data frame receiving module, configured to receive a first data frame from a server, where the first data frame includes a first packet identifier;
a group identifier determining module, configured to determine a second group identifier that is the same as the first group identifier from a multicast group list, where the multicast group list includes at least one group identifier, and one group identifier corresponds to at least one terminal, and the at least one terminal belongs to a group corresponding to the group identifier;
a terminal determining module, configured to determine at least one target terminal corresponding to the second packet identifier, where the at least one target terminal corresponds to the first data frame;
a data frame sending module, configured to forward the first data frame to the at least one target terminal;
and the group determining module is configured to send the second group identifier and the terminal identifiers of the plurality of terminal devices included in the first record in the multicast group list to the server, so that the server sends the first data frame according to the second group identifier and the device identifiers of the plurality of terminal devices, and session identifiers corresponding to the terminal identifiers of the plurality of terminal devices included in the first record are the same.
8. A data frame transmission device, comprising a processor, a memory and an input/output interface, wherein the processor, the memory and the input/output interface are connected to each other, wherein the input/output interface is used for inputting or outputting data, the memory is used for storing program codes, and the processor is used for calling the program codes to execute the method according to any one of claims 1-6.
9. A computer storage medium, characterized in that the computer storage medium stores a computer program comprising program instructions that, when executed by a processor, cause the processor to perform the method according to any one of claims 1-6.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201911013012.7A CN110753371B (en) | 2019-10-23 | 2019-10-23 | Data frame transmission method, device and equipment |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201911013012.7A CN110753371B (en) | 2019-10-23 | 2019-10-23 | Data frame transmission method, device and equipment |
Publications (2)
Publication Number | Publication Date |
---|---|
CN110753371A CN110753371A (en) | 2020-02-04 |
CN110753371B true CN110753371B (en) | 2023-04-18 |
Family
ID=69279582
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201911013012.7A Active CN110753371B (en) | 2019-10-23 | 2019-10-23 | Data frame transmission method, device and equipment |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN110753371B (en) |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101529803A (en) * | 2006-10-20 | 2009-09-09 | 朗讯科技公司 | Method and apparatus for establishing multicast groups |
CN101707568A (en) * | 2009-12-07 | 2010-05-12 | 中兴通讯股份有限公司 | Method and system for controller user multicast service and multicast main control device |
CN105743663A (en) * | 2014-12-10 | 2016-07-06 | 华为技术有限公司 | Data transmission device and method |
CN109769150A (en) * | 2017-11-09 | 2019-05-17 | 华为技术有限公司 | A kind of method and apparatus of transport multicast business |
Family Cites Families (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP4464766B2 (en) * | 2004-03-03 | 2010-05-19 | 株式会社日立製作所 | Multicast distribution control device |
JP2006042223A (en) * | 2004-07-30 | 2006-02-09 | Hitachi Communication Technologies Ltd | Packet transport unit |
-
2019
- 2019-10-23 CN CN201911013012.7A patent/CN110753371B/en active Active
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101529803A (en) * | 2006-10-20 | 2009-09-09 | 朗讯科技公司 | Method and apparatus for establishing multicast groups |
CN101707568A (en) * | 2009-12-07 | 2010-05-12 | 中兴通讯股份有限公司 | Method and system for controller user multicast service and multicast main control device |
CN105743663A (en) * | 2014-12-10 | 2016-07-06 | 华为技术有限公司 | Data transmission device and method |
CN109769150A (en) * | 2017-11-09 | 2019-05-17 | 华为技术有限公司 | A kind of method and apparatus of transport multicast business |
Non-Patent Citations (1)
Title |
---|
IPTV网络组播技术;李文计等;《计算机与网络》;20110526(第10期);全文 * |
Also Published As
Publication number | Publication date |
---|---|
CN110753371A (en) | 2020-02-04 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN106921578B (en) | Method and device for generating forwarding table item | |
CN109408132A (en) | A kind of configuration file processing method and server, user terminal, storage medium | |
WO2014183427A1 (en) | Method and apparatus for displaying webcast rooms | |
CN105630587A (en) | Method, device and system for migrating application program data between terminals | |
CN111111214B (en) | Game archiving processing method, device and system | |
CN110825448B (en) | Method, device, electronic equipment and storage medium for realizing multi-service module mutual calling | |
CN107733995A (en) | A kind of session keeping method, device and electronic equipment | |
CN109344126B (en) | Method and device for processing map, storage medium and electronic device | |
CN107104949B (en) | Type of database acquisition methods, device and electronic equipment | |
CN112766945A (en) | Virtual resource allocation processing method, device, equipment and storage medium | |
CN105681379A (en) | Cluster management system and method | |
CN103520922A (en) | Method, system and device for conducting game control through mobile internet | |
US10478731B2 (en) | Method and apparatus for storing user data | |
CN113382065A (en) | File downloading method, device, system, equipment and storage medium | |
CN112738019B (en) | Method and device for displaying device information, storage medium and electronic device | |
CN106815283A (en) | Data processing method, device and electronic equipment | |
CN110753371B (en) | Data frame transmission method, device and equipment | |
CN111405007B (en) | TCP session management method, device, storage medium and electronic equipment | |
CN104580084A (en) | Method, terminals and system for sharing multimedia file | |
CN107277640A (en) | Interactive approach, device and storage medium based on live platform | |
CN113037833A (en) | Data processing method and device, storage medium and electronic equipment | |
CN112511440B (en) | Message forwarding method, system, storage medium and electronic equipment | |
CN114697888B (en) | 5G message processing method, device and storage medium | |
CN116821215A (en) | OPC UA server searching method based on port inquiry | |
CN109669956B (en) | Memory, user relationship determination method, device and equipment |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
REG | Reference to a national code |
Ref country code: HK Ref legal event code: DE Ref document number: 40020394 Country of ref document: HK |
|
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |