CN110730500B - Terminal network access method, server, terminal, electronic equipment and storage medium - Google Patents

Terminal network access method, server, terminal, electronic equipment and storage medium Download PDF

Info

Publication number
CN110730500B
CN110730500B CN201910866757.1A CN201910866757A CN110730500B CN 110730500 B CN110730500 B CN 110730500B CN 201910866757 A CN201910866757 A CN 201910866757A CN 110730500 B CN110730500 B CN 110730500B
Authority
CN
China
Prior art keywords
terminal
packet
network access
target terminal
network
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201910866757.1A
Other languages
Chinese (zh)
Other versions
CN110730500A (en
Inventor
张召
朱道彦
韩杰
王艳辉
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Visionvera Information Technology Co Ltd
Original Assignee
Visionvera Information Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Visionvera Information Technology Co Ltd filed Critical Visionvera Information Technology Co Ltd
Priority to CN201910866757.1A priority Critical patent/CN110730500B/en
Publication of CN110730500A publication Critical patent/CN110730500A/en
Application granted granted Critical
Publication of CN110730500B publication Critical patent/CN110730500B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W60/00Affiliation to network, e.g. registration; Terminating affiliation with the network, e.g. de-registration
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W48/00Access restriction; Network selection; Access point selection
    • H04W48/08Access restriction or access information delivery, e.g. discovery data delivery
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W48/00Access restriction; Network selection; Access point selection
    • H04W48/20Selecting an access point

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Computer Security & Cryptography (AREA)
  • Small-Scale Networks (AREA)

Abstract

The application provides a terminal network access method, a server, a terminal, electronic equipment and a storage medium. The method comprises the following steps: after the target terminal is powered on, generating a broadcast packet according to the MAC address of the target terminal and issuing the broadcast packet to the outside; the video network core server returns a broadcast response packet after receiving the broadcast packet; the target terminal sends a network access application packet to the video network core server after receiving the broadcast response packet; the video network core server verifies the terminal validity of the target terminal according to the network access application packet; after the target terminal is verified to be a legal terminal, verifying the validity of the MAC address of the target terminal; if the target terminal is a legal terminal and the MAC address is legal, automatically allocating an unoccupied and unique terminal equipment number in the video network to the target terminal, then generating a network access application response packet and sending the network access application response packet to the target terminal, and after the target terminal verifies that the network access application response packet is of a correct type, sending a successful network access notification packet to a core server of the video network to finish network access.

Description

Terminal network access method, server, terminal, electronic equipment and storage medium
Technical Field
The present invention relates to the field of video networking technologies, and in particular, to a terminal networking method, a server, a terminal, an electronic device, and a storage medium.
Background
With the rapid development of network technologies, bidirectional communications such as video conferences and video teaching are widely popularized in the aspects of life, work, learning and the like of users. Video networking communication technology is becoming a communication option for many users.
In the video network, all terminals of the video network must perform network access operation before accessing the video network, and the network access operation is the basis for the terminals of the video network to perform other business process operations, such as: after the video networking terminal performs the network access operation, the audio and video service can be performed. A network access operation method in the related art is: manually distributing terminal equipment numbers for a plurality of video network terminals, then manually writing the terminal equipment numbers of all the video network terminals into a network management server, periodically inquiring the network management server by a video network core server, initiating a network access instruction to the video network terminals which do not access the network, and informing the video network terminals of accessing the network. However, in the above process, when the number of the terminals of the video network is large, the manual allocation of the terminal device number to the terminals of the video network and the writing of the terminal device number in the network management server are not only cumbersome in operation process, but also reduce the network access operation efficiency of the terminals of the video network.
Disclosure of Invention
The embodiment of the application provides a terminal network access method, a server, a terminal, electronic equipment and a storage medium, aims to simplify complicated network access steps, and provides a more efficient network access method.
A first aspect of an embodiment of the present application provides a terminal network access method, which is applied to a core server of a video network, and the method includes:
receiving a broadcast packet, and determining a target terminal according to the broadcast packet, wherein the broadcast packet is generated and externally issued according to an MAC address of the target terminal after the target terminal is powered on;
transmitting a broadcast response packet for the broadcast packet to the target terminal;
detecting whether an access application packet sent by the target terminal aiming at the broadcast response packet is received;
if the network access application packet is received, verifying the terminal validity of the target terminal according to the network access application packet;
if the target terminal is a legal terminal, verifying the validity of the MAC address of the target terminal;
if the MAC address of the target terminal is legal, distributing an unoccupied terminal equipment number for the target terminal, and generating a network access application response packet aiming at the network access application packet according to the terminal equipment number, wherein the terminal equipment number is the only terminal equipment number in the video network;
sending the network access application response packet to the target terminal;
detecting whether a successful network access notification packet sent by the target terminal aiming at the network access application response packet is received, wherein the successful network access notification packet is sent to the video network core server by the target terminal after judging that the data type of the network access application response packet is the correct type;
and if the successful network access notification packet is received, marking the target terminal as a network access terminal.
A second aspect of the present application provides a terminal network access method, which is applied to a terminal, and the method includes:
after power-on, generating a broadcast packet according to the MAC address of the user, and sending the broadcast packet to the outside;
detecting whether a broadcast response packet for the broadcast packet is received;
if the broadcast response packet is received, acquiring a random number generation formula from the broadcast response packet, and generating a random number according to the random number generation formula according to the MAC address of the random number generation formula;
generating a network access application packet according to the random number and the MAC address of the random number;
determining a target video network core server according to the broadcast response packet, and sending the network access application packet to the target video network core server;
detecting whether a network access application response packet sent by the target video network core server aiming at the network access application packet is received, wherein the network access application response packet is generated after the target video network core server verifies the terminal validity of the target terminal according to the random number and verifies the validity of the MAC address of the target terminal according to the MAC address of the target terminal;
detecting the data type of the network access application response packet;
and if the data type is the correct type, sending a successful network access notification packet to the target video network core server.
A third aspect of the embodiments of the present application provides a video networking core server, where the server includes:
the first receiving module is used for receiving a broadcast packet and determining a target terminal according to the broadcast packet, wherein the broadcast packet is generated and issued to the outside according to the MAC address of the target terminal after the target terminal is powered on;
a first sending module, configured to send a broadcast response packet for the broadcast packet to the target terminal;
the first detection module is used for detecting whether a network access application packet sent by the target terminal aiming at the broadcast response packet is received or not;
the first verification module is used for verifying the terminal validity of the target terminal according to the network access application packet if the network access application packet is received;
the second verification module is used for verifying the validity of the MAC address of the target terminal if the target terminal is a legal terminal;
the distribution module is used for distributing an unoccupied terminal equipment number for the target terminal if the MAC address of the target terminal is legal, and generating a network access application response packet aiming at the network access application packet according to the terminal equipment number, wherein the terminal equipment number is the only terminal equipment number in the video network;
a second sending module, configured to send the network access application response packet to the target terminal;
a second detection module, configured to detect whether a successful network access notification packet sent by the target terminal for the network access application response packet is received, where the successful network access notification packet is sent to the core server of the video network after the target terminal determines that the data type of the network access application response packet is the correct type;
and the first marking module is used for marking the target terminal as the accessed terminal if the successful network access notification packet is received.
A fourth aspect of the embodiments of the present application provides a terminal, including:
the fourth sending module is used for generating a broadcast packet according to the MAC address of the fourth sending module after the fourth sending module is powered on, and sending the broadcast packet to the outside;
a third detecting module, configured to detect whether a broadcast response packet for the broadcast packet is received;
the third generation module is used for acquiring a random number generation formula from the broadcast response packet if the broadcast response packet is received, and generating a random number according to the random number generation formula according to the MAC address of the third generation module;
the fourth generation module is used for generating a network access application packet according to the random number and the MAC address of the fourth generation module;
a fifth sending module, configured to determine a target video network core server according to the broadcast response packet, and send the network access application packet to the target video network core server;
a fourth detection module, configured to detect whether a network access application response packet sent by the target video network core server for the network access application packet is received, where the network access application response packet is generated after the target video network core server verifies terminal validity of the target terminal according to the random number and verifies validity of an MAC address of the target terminal according to the MAC address of the target terminal;
a fifth detection module, configured to detect a data type of the network access application response packet;
and the sixth sending module is used for sending a successful network access notification packet to the target video network core server if the data type is the correct type.
A fifth aspect of the embodiments of the present application provides an electronic device, including a memory, a processor, and a computer program stored on the memory and executable on the processor, where the processor implements the steps of the method according to the first aspect of the present application when executing the computer program.
A sixth aspect of embodiments of the present application provides a computer-readable storage medium, on which a computer program is stored, which when executed by a processor, performs the steps in the method according to the first aspect of the present application.
The application provides a terminal network access method, a target terminal generates a broadcast packet and issues the broadcast packet to the outside after being electrified; the video network core server returns a broadcast response packet after receiving the broadcast packet; the target terminal sends a network access application packet after receiving the broadcast response packet; and the core server of the video network sequentially verifies the terminal legality and the legality of the MAC address of the target terminal according to the network access application packet, if both are legal, an unoccupied terminal equipment number is automatically allocated to the target terminal, then a network access application response packet is generated and sent to the target terminal, and after the target terminal verifies that the network access application response packet is of a correct type, a successful network access notification packet is sent to the core server of the video network to complete network access. The terminal network access method provided by the application has the following beneficial effects:
the method has the advantages that the number of the terminal equipment is automatically distributed for the terminal, complex operation steps during manual distribution and writing of the number of the terminal equipment in the related technology are simplified, labor cost is reduced, operation efficiency of network access of the terminal is improved, and when a large number of terminals in a video network access, the effect of improving the network access efficiency during network access operation is particularly prominent.
The number of the terminal equipment is automatically allocated, the number of the terminal equipment does not need to be manually allocated and written in a network management server, and the probability that the terminal cannot access the network due to manual misoperation is reduced, for example: the problem that the terminal cannot access the network due to the repeated number of the terminal equipment is solved.
And thirdly, in the network access process, the legality of the terminal is verified, so that an illegal terminal is prevented from being accessed into the video network, and the safety, stability and reliable transmission of the video network are improved.
And fourthly, after the target terminal is verified to be a legal terminal, verifying the legality of the MAC address of the target terminal, avoiding the phenomenon of MAC address conflict caused by MAC address repetition after network access, preventing audio and video services from being disordered, and ensuring the normal operation of the audio and video services.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings needed to be used in the description of the embodiments of the present application will be briefly introduced 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 that other drawings can be obtained according to these drawings without inventive exercise.
Fig. 1 is a flowchart illustrating a terminal network access method according to an embodiment of the present application;
FIG. 2 is a schematic diagram of a network architecture according to an embodiment of the present application;
fig. 3 is a flowchart illustrating a core server of a video network processing a network access service according to an embodiment of the present application;
fig. 4 is a flowchart illustrating another terminal network access method according to an embodiment of the present application;
fig. 5 is a flowchart illustrating a terminal processing a network access service according to an embodiment of the present application;
fig. 6A is an overall flowchart illustrating a method for processing a network access service according to an embodiment of the present application;
fig. 6B is a schematic state diagram of a terminal in a network access process according to an embodiment of the present application;
fig. 7 is a schematic structural diagram of a core server of a video network according to an embodiment of the present application;
fig. 8 is a schematic structural diagram of a terminal according to an embodiment of the present application;
FIG. 9 is a schematic diagram of an electronic device shown in an embodiment of the present application;
FIG. 10 is a schematic diagram illustrating a networking of a video network according to an embodiment of the present application;
fig. 11 is a schematic diagram illustrating a hardware structure of a node server according to an embodiment of the present application;
fig. 12 is a schematic diagram illustrating a hardware structure of an access switch according to an embodiment of the present application;
fig. 13 is a schematic diagram of a hardware structure of an ethernet protocol conversion gateway 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 some, but not all, embodiments of the present application. 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.
The embodiment of the invention provides one of core concepts based on the characteristics of the video network (see the following for detailed description of the video network), namely: following the video networking protocol, in the network access process, a video networking core server firstly receives a broadcast packet sent by a target terminal and returns a broadcast response packet; then receiving a network access application packet sent by a target terminal, verifying the terminal validity of the target terminal and the validity of the MAC address according to the network access application packet, automatically allocating an unoccupied terminal equipment number to the target terminal if both the terminal validity and the MAC address validity are legal, and returning a network access application response packet to the target terminal; and finally, detecting whether a successful network access notification packet sent by the target terminal is received, if the successful network access notification packet is received, indicating that the target terminal has successfully accessed the network, and marking the target terminal as an accessed terminal.
Fig. 1 is a flowchart illustrating a terminal network access method according to an embodiment of the present application. Referring to fig. 1, the terminal network access method provided by the present application is applied to a core server of a video network, and includes the following steps:
step S11: receiving a broadcast packet, and determining a target terminal according to the broadcast packet, wherein the broadcast packet is generated and issued to the outside according to the MAC address of the target terminal after the target terminal is powered on.
After the target terminal is powered on, the MAC address of the target terminal is read from the memory, a broadcast packet is generated according to the MAC address, the broadcast packet is externally issued, and the response of the core server of the video network is waited. The broadcast packet is provided with a source address and a destination address, the destination terminal fills in the MAC address of the destination terminal at the source address, and the destination address is kept empty, so that the generated broadcast packet can be issued to a plurality of video network core servers. In the video network, the video network core server which responds to the broadcast packet firstly processes the network access service of the target terminal.
In the embodiment of the application, the core server of the video network is provided with a designated port to monitor data packets sent by all terminals. The types of the data packets received by the specified port include: the system comprises a broadcast packet, a network access application packet and a successful network access notification packet. After receiving a data packet, the core server of the video network firstly judges whether the type of the data packet is a broadcast packet, if the data packet is the broadcast packet, a target terminal is determined according to a source address in the broadcast packet, and then a broadcast response packet is sent to the target terminal, wherein the broadcast response packet is used for informing the target terminal that the core server of the video network can apply for network access.
Step S12: and sending a broadcast response packet aiming at the broadcast packet to the target terminal.
Step S13: and detecting whether the network access application packet sent by the target terminal aiming at the broadcast response packet is received.
After receiving the broadcast response packet returned by the video network core server, the target terminal may send a network access application response packet to the video network core server to apply for network access.
Step S14: and if the network access application packet is received, verifying the terminal validity of the target terminal according to the network access application packet.
In this embodiment of the present application, the network access application packet carries a first random number and an MAC address of the target terminal, where the first random number is generated by the target terminal according to a first random number generation formula according to the MAC address of the target terminal, and the first random number generation formula is obtained from the broadcast response packet. The video network core server informs the target terminal of a legal random number generation formula through a broadcast response packet.
Specifically, the step S14 may include:
acquiring the first random number and the MAC address of the target terminal from the network access application packet;
generating a second random number according to a second random number generation formula according to the MAC address of the target terminal;
and if the first random number is the same as the second random number, determining that the target terminal is a legal terminal.
The core server of the video network obtains a random number (second random number), such as a 64-bit random number, by using its own random number generation formula (second random number generation formula) according to the MAC address in the network access application packet, and compares the random number (second random number) with the random number (first random number) in the network access application packet, if the two are the same, the random number generation formula (first random number generation formula) used by the target terminal is the random number generation formula (second random number generation formula) notified by the core server of the video network in the broadcast response packet, and therefore the target terminal is a legal terminal.
According to the embodiment of the application, whether the target terminal is a legal terminal or not is verified, so that an illegal terminal is prevented from being accessed into the video network, and the safety, stability and reliable transmission of the video network are improved.
Step S15: and if the target terminal is a legal terminal, verifying the validity of the MAC address of the target terminal.
In the embodiment of the present application, a legitimate terminal may also have a problem of MAC address duplication. Therefore, after the target terminal is verified to be a legal terminal, the validity of the MAC address of the target terminal needs to be verified, and the specific process is as follows:
acquiring the MAC address of the target terminal from the network access application response packet;
judging whether a successful network access notification packet containing the MAC address is received or not;
if a successful network access notification packet containing the MAC address is received, generating a network access application response packet with the data type being an error type;
and sending the network access application response packet to the target terminal.
In the embodiment of the present application, if the video network core server determines that a successful network entry notification packet including the MAC address of the target terminal has been previously received, it indicates that there is another terminal that has successfully entered a network using the MAC address, and therefore, the MAC address of the target terminal and the MAC address of the terminal that has successfully entered the network are duplicated, and the MAC address of the target terminal is illegal.
When the MAC address of the target terminal is illegal, the video network core server generates a network access application response packet with the data type of error, which indicates that the target terminal fails to access the network. In this application, the case where the core server of the video network generates the network entry application response packet whose data type is the error type includes: firstly, the target terminal is not a legal terminal; secondly, the MAC address of the target terminal is illegal.
Step S16: if the MAC address of the target terminal is legal, distributing an unoccupied terminal equipment number for the target terminal, and generating a network access application response packet aiming at the network access application packet according to the terminal equipment number, wherein the terminal equipment number is the only terminal equipment number in the video network.
In the embodiment of the application, if the core server of the video network judges that the target terminal is a legal terminal and the MAC address is also legal, an unoccupied terminal equipment number is automatically allocated to the target terminal, and the terminal equipment number is the only terminal equipment number in the video network, so that the terminal equipment number is prevented from being repeated.
According to the method and the device, the mode that the video networking core server automatically allocates the terminal equipment number to the target terminal is adopted, so that on one hand, complicated operation steps during manual allocation and terminal equipment number writing are simplified, the labor cost is reduced, and the network access operation efficiency of the terminal is improved; on the other hand, the probability that the terminal cannot access the network due to manual misoperation is reduced, for example: the problem that the terminal cannot access the network due to the repeated number of the terminal equipment is solved.
Fig. 2 is a schematic diagram of a network architecture according to an embodiment of the present application. In the embodiment of the application, the video network core server is in communication connection with the network management server, as shown in fig. 2. Before the step S16, the following steps may be further included:
receiving a terminal device number generation instruction from the network management server;
setting a terminal equipment number list, and setting a plurality of terminal equipment numbers in the terminal equipment number list according to the terminal equipment number generation instruction;
and marking the plurality of terminal equipment numbers as unoccupied.
In this embodiment, a terminal device number list is set in the core server of the video network, and the network management server is configured to issue a command for creating the terminal device number list and setting the terminal device numbers in the list to the core server of the video network. For example, the specific content of the command of the terminal device number in the setting list issued by the network management server may be: and taking the integer between 0 and 9999 as the number of the terminal equipment, and maintaining all the integers between 0 and 9999 as the number of the terminal equipment by the video networking core server. And the video network core server marks the terminal equipment number as unoccupied when setting the terminal equipment number for the first time.
Therefore, in step S16, the specific process of allocating the unoccupied terminal device number to the target terminal may be:
and acquiring a terminal equipment number marked as unoccupied from the terminal equipment number list.
Further, after the target terminal is marked as a terminal which is accessed to the network, the method further comprises the following steps:
positioning the target terminal in the terminal equipment number list;
and marking the target terminal as occupied.
In the embodiment of the application, the core server of the video network adds the marks to all the terminal equipment numbers in the terminal equipment number list to distinguish whether the terminal equipment numbers are occupied or not, so that the phenomenon of repeatedly using the terminal equipment numbers can be avoided when the video network numbers are distributed to the target terminal next time, and all legal terminals can normally access the network.
Step S17: and sending the network access application response packet to the target terminal.
And the video network core server generates a network access application response packet according to the terminal equipment number and sends the network access application response packet to the target terminal. The data type of the network access application response packet is the correct type so as to inform the target terminal that the network access is successful.
Step S18: and detecting whether a successful network access notification packet sent by the target terminal aiming at the network access application response packet is received, wherein the successful network access notification packet is sent to the video network core server by the target terminal after judging that the data type of the network access application response packet is the correct type.
After receiving the network access application response packet, the target terminal judges the data type, and if the data type is the correct type, the target terminal sends a successful network access notification packet to the core server of the video network to inform the core server of the video network of the successful network access; if the data type is the error type, judging which error type is, if the data type is the error type, eliminating the error, and sending the network access application packet again.
Step S19: and if the successful network access notification packet is received, marking the target terminal as a network access terminal.
And if the video networking core server receives the successful network access notification packet, marking the target terminal as a network access terminal, and periodically sending a heartbeat packet to the target terminal. After the target terminal accesses the network, the target terminal may request other services through the core server of the video network, for example: and acquiring the service of the audio stream or the video stream.
In the embodiment of the application, after the target terminal is powered on, a broadcast packet is generated and issued to the outside; the video network core server returns a broadcast response packet after receiving the broadcast packet; the target terminal sends a network access application packet after receiving the broadcast response packet; and the core server of the video network sequentially verifies the terminal legality and the legality of the MAC address of the target terminal according to the network access application packet, if both are legal, an unoccupied terminal equipment number is automatically allocated to the target terminal, then a network access application response packet is generated and sent to the target terminal, and after the target terminal verifies that the network access application response packet is of a correct type, a successful network access notification packet is sent to the core server of the video network to complete network access. The terminal network access method provided by the application has the following beneficial effects:
the method has the advantages that the number of the terminal equipment is automatically distributed for the terminal, complex operation steps during manual distribution and writing of the number of the terminal equipment in the related technology are simplified, labor cost is reduced, operation efficiency of network access of the terminal is improved, and when a large number of terminals in a video network access, the effect is particularly remarkable when the method is used for network access operation.
The number of the terminal equipment is automatically allocated, the number of the terminal equipment does not need to be manually allocated and written in a network management server, and the probability that the terminal cannot access the network due to manual misoperation is reduced, for example: the problem that the terminal cannot access the network due to the repeated number of the terminal equipment is solved.
And thirdly, in the network access process, the legality of the terminal is verified, so that an illegal terminal is prevented from being accessed into the video network, and the safety, stability and reliable transmission of the video network are improved.
And fourthly, after the target terminal is verified to be a legal terminal, verifying the legality of the MAC address of the target terminal, avoiding the phenomenon of MAC address conflict caused by MAC address repetition after network access, preventing audio and video services from being disordered, and ensuring the normal operation of the audio and video services.
Fig. 3 is a flowchart illustrating a core server of a video network processing network access service according to an embodiment of the present application.
Referring to fig. 3, after the video network core server is started, the following steps are sequentially executed:
monitoring data of a designated port;
if the data is monitored, analyzing the data, judging whether the data is a broadcast packet, and if the data is the broadcast packet, returning a broadcast response packet to a terminal sending the broadcast packet;
if the terminal is a legal terminal and the MAC address is legal, automatically allocating an unoccupied terminal equipment number to the terminal, then generating a network access application response packet with the correct data type according to the terminal equipment number, and returning the network access application response packet to the terminal; if the terminal is not a legal terminal or the MAC address of the terminal is not legal, generating a network access application response packet with the data type of the error type and returning the network access application response packet to the terminal;
if not, judging whether the network access request packet is a successful network access notification packet, and if not, continuing to monitor the data of the specified port.
The application also provides another terminal network access method which is applied to the terminal. Fig. 4 is a flowchart illustrating another terminal network access method according to an embodiment of the present application. Referring to fig. 4, another terminal network access method provided by the present application includes the following steps:
step S21: after power-on, generating a broadcast packet according to the MAC address of the user, and sending the broadcast packet to the outside;
step S22: detecting whether a broadcast response packet for the broadcast packet is received;
step S23: if the broadcast response packet is received, acquiring a random number generation formula from the broadcast response packet, and generating a random number according to the random number generation formula according to the MAC address of the random number generation formula;
step S24: generating a network access application packet according to the random number and the MAC address of the random number;
step S25: determining a target video network core server according to the broadcast response packet, and sending the network access application packet to the target video network core server;
step S26: detecting whether a network access application response packet sent by the target video network core server aiming at the network access application packet is received, wherein the network access application response packet is generated after the target video network core server verifies the terminal validity of the target terminal according to the random number and verifies the validity of the MAC address of the target terminal according to the MAC address of the target terminal;
step S27: detecting the data type of the network access application response packet;
step S28: and if the data type is the correct type, sending a successful network access notification packet to the target video network core server.
The detailed description of step S21-step S28 can refer to the above description.
Fig. 5 is a flowchart illustrating a terminal processing a network access service according to an embodiment of the present application.
Referring to fig. 5, after the terminal is started, the following steps are sequentially performed:
reading the MAC address from the FLASH, generating a broadcast packet according to the MAC address, and externally issuing the broadcast packet;
detecting whether a broadcast response packet sent by a video network core server aiming at the broadcast packet is received;
if a broadcast response packet is received, generating a 64-bit random number according to the MAC address of the broadcast response packet, generating a network access application packet according to the random number, and sending the network access application packet to a core server of the video network;
detecting whether a network access application response packet returned by a video network core server is received;
if the network access application response packet is received, judging whether the data type of the network access application response packet is the correct type, and if the data type of the network access application response packet is the correct type, generating a successful network access notification packet; if the type of the error is the error type, judging whether the reason causing the error is that the MAC address is illegal, if the type of the error is the error type, retransmitting the network access application packet after eliminating the error of the MAC address.
Fig. 6A is an overall flowchart illustrating a process of handling a network access service according to an embodiment of the present application.
Referring to fig. 6A, the whole network access process includes 9 steps, which are divided into 4 stages, including: power-on, network access waiting, network access notification and network access.
The power-on phase comprises steps 1-3, and specifically comprises the following steps: after the terminal is powered on, a broadcast packet is generated and issued to the outside, and after the server monitors the broadcast packet through the port, a broadcast response packet is returned; the terminal receives the broadcast response packet.
The network access stage comprises steps 4-6, and specifically comprises the following steps: a terminal generates a network access application packet carrying a 64-bit random number, a server detects the validity of the MAC of the terminal after receiving the network access application packet (specifically, the terminal validity of the terminal is verified according to the random number generated by the MAC address, whether the MAC address of the terminal is repeated with the MAC addresses of other terminals which successfully access the network before is judged), if the terminal is a legal terminal and the MAC address is legal, an unoccupied terminal equipment number is automatically distributed to the terminal, and then a network access application response packet with the correct data type is generated according to the terminal equipment number and returned to the terminal; and if the terminal is not a legal terminal or the MAC address of the terminal is not legal, generating a network access application response packet with the data type of the error type and returning the network access application response packet to the terminal.
The network access notification stage comprises steps 7-8, and specifically comprises the following steps: the terminal detects the data type of the received network access application response packet, if the data type is the correct type, a successful network access notification packet is sent to the server, after the server receives the successful network access notification packet, the terminal is marked to access the network, and then the heartbeat packet is sent at regular time.
The network access stage comprises a step 9, which specifically comprises the following steps: the terminal and the server perform service data interaction, for example: the terminal requests the audio and video data from the server, and the server acquires the audio and video data from the service server and returns the audio and video data to the terminal.
Fig. 6B is a schematic state diagram of a terminal in a network access process according to an embodiment of the present application. Referring to fig. 6B, the initialization state is a state of the terminal in the power-on phase, the to-be-accessed state is a state of the terminal in the to-be-accessed phase, and the accessed state is a state of the terminal in the network access notification phase and the network access phase. After the terminal sends the broadcast packet, if the terminal receives the broadcast response packet, the terminal is switched from the initialization state to a state to be accessed to the network, and if the terminal does not receive the broadcast response packet, the terminal is continuously kept in the initialization state; after the terminal sends the network access application packet, if the network access application response packet is received, the terminal is changed from the state of waiting for network access to the state of network access, and if the network access application response packet is not received, the terminal is kept in the state of waiting for network access; in the network access state, if the network access of the terminal fails, the terminal is powered on again, the terminal is changed into the initialization state, and then the steps are executed repeatedly.
The embodiment of the application also provides a video networking core server 700. Fig. 7 is a schematic structural diagram of a core server of a video network according to an embodiment of the present application. Referring to fig. 9, the video network core server 700 includes:
a first receiving module 701, configured to receive a broadcast packet, and determine a target terminal according to the broadcast packet, where the broadcast packet is generated and issued to the outside according to an own MAC address after the target terminal is powered on;
a first sending module 702, configured to send a broadcast response packet for the broadcast packet to the target terminal;
a first detecting module 703, configured to detect whether a network access application packet sent by the target terminal for the broadcast response packet is received;
a first verification module 704, configured to verify, if the network access application packet is received, the terminal validity of the target terminal according to the network access application packet;
a second verification module 705, configured to verify validity of the MAC address of the target terminal if the target terminal is a valid terminal;
an allocating module 706, configured to allocate an unoccupied terminal device number to the target terminal if the MAC address of the target terminal is legal, and generate a network access application response packet for the network access application packet according to the terminal device number, where the terminal device number is a unique terminal device number in the video network;
a second sending module 707, configured to send the network access application response packet to the target terminal;
a second detecting module 708, configured to detect whether a successful network access notification packet sent by the target terminal for the network access application response packet is received, where the successful network access notification packet is sent to the video network core server by the target terminal after determining that the data type of the network access application response packet is a correct type;
a first marking module 709, configured to mark the target terminal as a terminal that has accessed the network if the successful network access notification packet is received.
Optionally, the network access application packet carries a first random number and an MAC address of the target terminal, where the first random number is generated by the target terminal according to a first random number generation formula according to the MAC address of the target terminal, and the first random number generation formula is obtained from the broadcast response packet; the first authentication module 704 includes:
a first obtaining module, configured to obtain the first random number and the MAC address of the target terminal from the network access application packet;
the first generation module is used for generating a second random number according to a second random number generation formula according to the MAC address of the target terminal;
and the determining module is used for determining that the target terminal is a legal terminal if the first random number is the same as the second random number.
Optionally, the video networking core server is in communication connection with a network management server; the video networking core server 700 further includes:
the second receiving module is used for receiving a terminal equipment number generation instruction from the network management server;
the setting module is used for setting a terminal equipment number list and setting a plurality of terminal equipment numbers in the terminal equipment number list according to the terminal equipment number generation instruction;
and the second marking module is used for marking the plurality of terminal equipment numbers as unoccupied numbers.
Optionally, the allocating module 706 comprises:
the distribution submodule is used for acquiring a terminal equipment number marked as unoccupied from the terminal equipment number list;
the video networking core server 700 further includes:
the positioning module is used for positioning the target terminal in the terminal equipment number list;
and the third marking module is used for marking the target terminal as occupied.
Optionally, the second verification module 705 includes:
a second obtaining module, configured to obtain the MAC address of the target terminal from the network access application response packet;
the judging module is used for judging whether a successful network access notification packet containing the MAC address is received or not;
the second generation module is used for generating a network access application response packet with the data type being the error type if the successful network access notification packet containing the MAC address is received;
and the third sending module is used for sending the network access application response packet to the target terminal.
The embodiment of the application also provides a terminal 800. Fig. 8 is a schematic structural diagram of a terminal according to an embodiment of the present application. Referring to fig. 8, a terminal 800 includes:
a fourth sending module 801, configured to generate a broadcast packet according to an own MAC address after being powered on, and send the broadcast packet to the outside;
a third detecting module 802, configured to detect whether a broadcast response packet for the broadcast packet is received;
a third generating module 803, configured to, if the broadcast response packet is received, obtain a random number generating formula from the broadcast response packet, and generate a random number according to the random number generating formula according to the MAC address of the third generating module;
a fourth generating module 804, configured to generate a network access application packet according to the random number and the MAC address of the fourth generating module;
a fifth sending module 805, configured to determine a target video network core server according to the broadcast response packet, and send the network access application packet to the target video network core server;
a fourth detecting module 806, configured to detect whether a network access application response packet sent by the target video network core server for the network access application packet is received, where the network access application response packet is generated after the target video network core server verifies terminal validity of the target terminal according to the random number and verifies validity of an MAC address of the target terminal according to the MAC address of the target terminal;
a fifth detecting module 807, configured to detect a data type of the network access application response packet;
a sixth sending module 808, configured to send a successful network access notification packet to the target video network core server if the data type is the correct type.
Based on the same inventive concept, another embodiment of the present application provides an electronic device 900, as shown in fig. 9. Fig. 9 is a schematic diagram of an electronic device according to an embodiment of the present application. The electronic device comprises a memory 902, a processor 901 and a computer program stored on the memory and executable on the processor, which when executed performs the steps of the method according to any of the embodiments of the present application.
Based on the same inventive concept, another embodiment of the present application provides a computer-readable storage medium, on which a computer program is stored, which when executed by a processor implements the steps in the method according to any of the above-mentioned embodiments of the present application.
The video networking technology used in the present application will be described in detail below.
The video networking is an important milestone for network development, is a real-time network, can realize high-definition video real-time transmission, and pushes a plurality of internet applications to high-definition video, and high-definition faces each other.
The video networking adopts a real-time high-definition video exchange technology, can integrate required services such as dozens of services of video, voice, pictures, characters, communication, data and the like on a system platform on a network platform, such as high-definition video conference, video monitoring, intelligent monitoring analysis, emergency command, digital broadcast television, delayed television, network teaching, live broadcast, VOD on demand, television mail, Personal Video Recorder (PVR), intranet (self-office) channels, intelligent video broadcast control, information distribution and the like, and realizes high-definition quality video broadcast through a television or a computer.
To better understand the embodiments of the present invention, the following description refers to the internet of view:
some of the technologies applied in the video networking are as follows:
network Technology (Network Technology)
Network technology innovation in video networking has improved over traditional Ethernet (Ethernet) to face the potentially enormous video traffic on the network. Unlike pure network Packet Switching (Packet Switching) or network Circuit Switching (Circuit Switching), the Packet Switching is adopted by the technology of the video networking to meet the Streaming requirement. The video networking technology has the advantages of flexibility, simplicity and low price of packet switching, and simultaneously has the quality and safety guarantee of circuit switching, thereby realizing the seamless connection of the whole network switching type virtual circuit and the data format.
Switching Technology (Switching Technology)
The video network adopts two advantages of asynchronism and packet switching of the Ethernet, eliminates the defects of the Ethernet on the premise of full compatibility, has end-to-end seamless connection of the whole network, is directly communicated with a user terminal, and directly bears an IP data packet. The user data does not require any format conversion across the entire network. The video networking is a higher-level form of the Ethernet, is a real-time exchange platform, can realize the real-time transmission of the whole-network large-scale high-definition video which cannot be realized by the existing Internet, and pushes a plurality of network video applications to high-definition and unification.
Server Technology (Server Technology)
The server technology on the video networking and unified video platform is different from the traditional server, the streaming media transmission of the video networking and unified video platform is established on the basis of connection orientation, the data processing capacity of the video networking and unified video platform is independent of flow and communication time, and a single network layer can contain signaling and data transmission. For voice and video services, the complexity of video networking and unified video platform streaming media processing is much simpler than that of data processing, and the efficiency is greatly improved by more than one hundred times compared with that of a traditional server.
Storage Technology (Storage Technology)
The super-high speed storage technology of the unified video platform adopts the most advanced real-time operating system in order to adapt to the media content with super-large capacity and super-large flow, the program information in the server instruction is mapped to the specific hard disk space, the media content is not passed through the server any more, and is directly sent to the user terminal instantly, and the general waiting time of the user is less than 0.2 second. The optimized sector distribution greatly reduces the mechanical motion of the magnetic head track seeking of the hard disk, the resource consumption only accounts for 20% of that of the IP internet of the same grade, but concurrent flow which is 3 times larger than that of the traditional hard disk array is generated, and the comprehensive efficiency is improved by more than 10 times.
Network Security Technology (Network Security Technology)
The structural design of the video network completely eliminates the network security problem troubling the internet structurally by the modes of independent service permission control each time, complete isolation of equipment and user data and the like, generally does not need antivirus programs and firewalls, avoids the attack of hackers and viruses, and provides a structural carefree security network for users.
Service Innovation Technology (Service Innovation Technology)
The unified video platform integrates services and transmission, and is not only automatically connected once whether a single user, a private network user or a network aggregate. The user terminal, the set-top box or the PC are directly connected to the unified video platform to obtain various multimedia video services in various forms. The unified video platform adopts a menu type configuration table mode to replace the traditional complex application programming, can realize complex application by using very few codes, and realizes infinite new service innovation.
Networking of the video network is as follows:
the video network is a centralized control network structure, and the network can be a tree network, a star network, a ring network and the like, but on the basis of the centralized control node, the whole network is controlled by the centralized control node in the network.
Fig. 10 is a schematic networking diagram of a video network according to an embodiment of the present application, where the video network is divided into an access network and a metropolitan area network, as shown in fig. 10.
The devices of the access network part can be mainly classified into 3 types: node server, access switch, terminal (including various set-top boxes, coding boards, memories, etc.). The node server is connected to an access switch, which may be connected to a plurality of terminals and may be connected to an ethernet network.
The node server is a node which plays a centralized control function in the access network and can control the access switch and the terminal. The node server can be directly connected with the access switch or directly connected with the terminal.
Similarly, devices of the metropolitan network portion may also be classified into 3 types: a metropolitan area server, a node switch and a node server. The metro server is connected to a node switch, which may be connected to a plurality of node servers.
The node server is a node server of the access network part, namely the node server belongs to both the access network part and the metropolitan area network part.
The metropolitan area server is a node which plays a centralized control function in the metropolitan area network and can control a node switch and a node server. The metropolitan area server can be directly connected with the node switch or directly connected with the node server.
Therefore, the whole video network is a network structure with layered centralized control, and the network controlled by the node server and the metropolitan area server can be in various structures such as tree, star and ring.
The access network part can form a unified video platform (the part in the dotted circle), and a plurality of unified video platforms can form a video network; each unified video platform may be interconnected via metropolitan area and wide area video networking.
Video networking device classification
1.1 devices in the video network of the embodiment of the present invention can be mainly classified into 3 types: servers, switches (including ethernet gateways), terminals (including various set-top boxes, code boards, memories, etc.). The video network as a whole can be divided into a metropolitan area network (or national network, global network, etc.) and an access network.
1.2 wherein the devices of the access network part can be mainly classified into 3 types: node servers, access switches (including ethernet gateways), terminals (including various set-top boxes, code boards, memories, etc.).
The specific hardware structure of each access network device is as follows:
a node server:
fig. 11 is a schematic diagram illustrating a hardware structure of a node server according to an embodiment of the present application. As shown in fig. 11, the system mainly includes a network interface module 201, a switching engine module 202, a CPU module 203, and a disk array module 204;
the network interface module 201, the CPU module 203, and the disk array module 204 all enter the switching engine module 202; the switching engine module 202 performs an operation of looking up the address table 205 on the incoming packet, thereby obtaining the direction information of the packet; and stores the packet in a queue of the corresponding packet buffer 206 based on the packet's steering information; if the queue of the packet buffer 206 is nearly full, it is discarded; the switching engine module 202 polls all packet buffer queues for forwarding if the following conditions are met: 1) the port send buffer is not full; 2) the queue packet counter is greater than zero. The disk array module 204 mainly implements control over the hard disk, including initialization, read-write, and other operations on the hard disk; the CPU module 203 is mainly responsible for protocol processing with an access switch and a terminal (not shown in the figure), configuring an address table 205 (including a downlink protocol packet address table, an uplink protocol packet address table, and a data packet address table), and configuring the disk array module 204.
The access switch:
fig. 12 is a schematic diagram illustrating a hardware structure of an access switch according to an embodiment of the present application. As shown in fig. 12, the network interface module (downlink network interface module 301, uplink network interface module 302), switching engine module 303, and CPU module 304 are mainly included;
wherein, the packet (uplink data) coming from the downlink network interface module 301 enters the packet detection module 305; the packet detection module 305 detects whether the Destination Address (DA), the Source Address (SA), the packet type, and the packet length of the packet meet the requirements, and if so, allocates a corresponding stream identifier (stream-id) and enters the switching engine module 303, otherwise, discards the stream identifier; the packet (downstream data) coming from the upstream network interface module 302 enters the switching engine module 303; the data packet coming from the CPU module 204 enters the switching engine module 303; the switching engine module 303 performs an operation of looking up the address table 306 on the incoming packet, thereby obtaining the direction information of the packet; if the packet entering the switching engine module 303 is from the downstream network interface to the upstream network interface, the packet is stored in the queue of the corresponding packet buffer 307 in association with the stream-id; if the queue of the packet buffer 307 is nearly full, it is discarded; if the packet entering the switching engine module 303 is not from the downlink network interface to the uplink network interface, the data packet is stored in the queue of the corresponding packet buffer 307 according to the guiding information of the packet; if the queue of the packet buffer 307 is nearly full, it is discarded.
The switching engine module 303 polls all packet buffer queues, which in this embodiment of the present invention is divided into two cases:
if the queue is from the downlink network interface to the uplink network interface, the following conditions are met for forwarding: 1) the port send buffer is not full; 2) the queued packet counter is greater than zero; 3) obtaining a token generated by a code rate control module;
if the queue is not from the downlink network interface to the uplink network interface, the following conditions are met for forwarding: 1) the port send buffer is not full; 2) the queue packet counter is greater than zero.
The rate control module 208 is configured by the CPU module 204, and generates tokens for packet buffer queues from all downstream network interfaces to upstream network interfaces at programmable intervals to control the rate of upstream forwarding.
The CPU module 304 is mainly responsible for protocol processing with the node server, configuration of the address table 306, and configuration of the code rate control module 308.
Ethernet protocol conversion gateway
Fig. 13 is a schematic diagram of a hardware structure of an ethernet protocol conversion gateway according to an embodiment of the present application. As shown in fig. 13, the system mainly includes a network interface module (a downlink network interface module 401 and an uplink network interface module 402), a switching engine module 403, a CPU module 404, a packet detection module 405, a rate control module 408, an address table 406, a packet buffer 407, a MAC adding module 409, and a MAC deleting module 410.
Wherein, the data packet coming from the downlink network interface module 401 enters the packet detection module 405; the packet detection module 405 detects whether the ethernet MAC DA, the ethernet MAC SA, the ethernet length or frame type, the video network destination address DA, the video network source address SA, the video network packet type, and the packet length of the packet meet the requirements, and if so, allocates a corresponding stream identifier (stream-id); then, the MAC deletion module 410 subtracts MAC DA, MAC SA, length or frame type (2byte) and enters the corresponding receiving buffer, otherwise, discards it;
the downlink network interface module 401 detects the sending buffer of the port, and if there is a packet, obtains the ethernet MAC DA of the corresponding terminal according to the destination address DA of the packet, adds the ethernet MAC DA of the terminal, the MAC SA of the ethernet protocol gateway, and the ethernet length or frame type, and sends the packet.
The other modules in the ethernet protocol gateway function similarly to the access switch.
A terminal:
the system mainly comprises a network interface module, a service processing module and a CPU module; for example, the set-top box mainly comprises a network interface module, a video and audio coding and decoding engine module and a CPU module; the coding board mainly comprises a network interface module, a video and audio coding engine module and a CPU module; the memory mainly comprises a network interface module, a CPU module and a disk array module.
1.3 devices of the metropolitan area network part can be mainly classified into 2 types: node server, node exchanger, metropolitan area server. The node switch mainly comprises a network interface module, a switching engine module and a CPU module; the metropolitan area server mainly comprises a network interface module, a switching engine module and a CPU module.
2. Video networking packet definition
2.1 Access network packet definition
The data packet of the access network mainly comprises the following parts: destination Address (DA), Source Address (SA), reserved bytes, payload (pdu), CRC.
As shown in the following table, the data packet of the access network mainly includes the following parts:
DA SA Reserved Payload CRC
wherein:
the Destination Address (DA) is composed of 8 bytes (byte), the first byte represents the type of the data packet (such as various protocol packets, multicast data packets, unicast data packets, etc.), there are 256 possibilities at most, the second byte to the sixth byte are metropolitan area network addresses, and the seventh byte and the eighth byte are access network addresses;
the Source Address (SA) is also composed of 8 bytes (byte), defined as the same as the Destination Address (DA);
the reserved byte consists of 2 bytes;
the payload part has different lengths according to different types of datagrams, and is 64 bytes if the datagram is various types of protocol packets, and is 32+1024 or 1056 bytes if the datagram is a unicast packet, of course, the length is not limited to the above 2 types;
the CRC consists of 4 bytes and is calculated in accordance with the standard ethernet CRC algorithm.
2.2 metropolitan area network packet definition
The topology of a metropolitan area network is a graph and there may be 2, or even more than 2, connections between two devices, i.e., there may be more than 2 connections between a node switch and a node server, a node switch and a node switch, and a node switch and a node server. However, the metro network address of the metro network device is unique, and in order to accurately describe the connection relationship between the metro network devices, parameters are introduced in the embodiment of the present invention: a label to uniquely describe a metropolitan area network device.
In this specification, the definition of the Label is similar to that of the Label of MPLS (Multi-Protocol Label Switch), and assuming that there are two connections between the device a and the device B, there are 2 labels for the packet from the device a to the device B, and 2 labels for the packet from the device B to the device a. The label is classified into an incoming label and an outgoing label, and assuming that the label (incoming label) of the packet entering the device a is 0x0000, the label (outgoing label) of the packet leaving the device a may become 0x 0001. The network access process of the metro network is a network access process under centralized control, that is, address allocation and label allocation of the metro network are both dominated by the metro server, and the node switch and the node server are both passively executed, which is different from label allocation of MPLS, and label allocation of MPLS is a result of mutual negotiation between the switch and the server.
As shown in the following table, the data packet of the metro network mainly includes the following parts:
DA SA Reserved label (R) Payload CRC
Namely Destination Address (DA), Source Address (SA), Reserved byte (Reserved), tag, payload (pdu), CRC. The format of the tag may be defined by reference to the following: the tag is 32 bits with the upper 16 bits reserved and only the lower 16 bits used, and its position is between the reserved bytes and payload of the packet.
The embodiments in the present specification are described in a progressive manner, each embodiment focuses on differences from other embodiments, and the same and similar parts among the embodiments are referred to each other.
As will be appreciated by one skilled in the art, embodiments of the present invention may be provided as a method, apparatus, or computer program product. Accordingly, embodiments of the present invention may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, embodiments of the present invention may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
Embodiments of the present invention are described with reference to flowchart illustrations and/or block diagrams of methods, terminal devices (systems), and computer program products according to embodiments of the invention. It will be understood that each flow and/or block of the flow diagrams and/or block diagrams, and combinations of flows and/or blocks in the flow diagrams and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing terminal to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing terminal, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing terminal to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing terminal to cause a series of operational steps to be performed on the computer or other programmable terminal to produce a computer implemented process such that the instructions which execute on the computer or other programmable terminal provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
The terminal network access method, the server, the terminal, the electronic device and the storage medium provided by the invention are introduced in detail, and a specific example is applied in the text to explain the principle and the implementation of the invention, and the description of the embodiment is only used for helping to understand the method and the core idea of the invention; meanwhile, for a person skilled in the art, according to the idea of the present invention, there may be variations in the specific embodiments and the application scope, and in summary, the content of the present specification should not be construed as a limitation to the present invention.

Claims (10)

1. A terminal network access method is applied to a video network core server, and comprises the following steps:
receiving a broadcast packet, and determining a target terminal according to the broadcast packet, wherein the broadcast packet is generated and externally issued according to an MAC address of the target terminal after the target terminal is powered on;
transmitting a broadcast response packet for the broadcast packet to the target terminal;
detecting whether an access application packet sent by the target terminal aiming at the broadcast response packet is received or not, wherein the access application packet carries a first random number and an MAC address of the target terminal, the first random number is generated by the target terminal according to a first random number generation formula according to the MAC address of the target terminal, and the first random number generation formula is obtained from the broadcast response packet;
if the network access application packet is received, verifying the terminal validity of the target terminal according to the network access application packet;
if the target terminal is a legal terminal, verifying the validity of the MAC address of the target terminal;
if the MAC address of the target terminal is legal, distributing an unoccupied terminal equipment number for the target terminal, and generating a network access application response packet aiming at the network access application packet according to the terminal equipment number, wherein the terminal equipment number is the only terminal equipment number in the video network;
sending the network access application response packet to the target terminal;
detecting whether a successful network access notification packet sent by the target terminal aiming at the network access application response packet is received, wherein the successful network access notification packet is sent to the video network core server by the target terminal after judging that the data type of the network access application response packet is the correct type;
and if the successful network access notification packet is received, marking the target terminal as a network access terminal.
2. The method of claim 1, wherein verifying the terminal validity of the target terminal according to the network access application packet comprises:
acquiring the first random number and the MAC address of the target terminal from the network access application packet;
generating a second random number according to a second random number generation formula according to the MAC address of the target terminal;
and if the first random number is the same as the second random number, determining that the target terminal is a legal terminal.
3. The method of claim 1, wherein the video networking core server is communicatively coupled to a network management server;
before allocating an unoccupied terminal device number to the target terminal, the method further includes:
receiving a terminal device number generation instruction from the network management server;
setting a terminal equipment number list, and setting a plurality of terminal equipment numbers in the terminal equipment number list according to the terminal equipment number generation instruction;
and marking the plurality of terminal equipment numbers as unoccupied.
4. The method of claim 3, wherein assigning the unoccupied terminal device number to the target terminal comprises:
acquiring a terminal equipment number marked as unoccupied from the terminal equipment number list;
after the target terminal is marked as a network-accessed terminal, the method further comprises the following steps:
positioning the target terminal in the terminal equipment number list;
and marking the number of the terminal equipment of the target terminal as occupied.
5. The method of claim 1, wherein verifying the validity of the MAC address of the target terminal comprises:
acquiring the MAC address of the target terminal from the network access application packet;
judging whether a successful network access notification packet containing the MAC address is received or not;
if a successful network access notification packet containing the MAC address is received, generating a network access application response packet with the data type being an error type;
and sending the network access application response packet to the target terminal.
6. A terminal network access method is applied to a terminal, and is characterized by comprising the following steps:
after power-on, generating a broadcast packet according to the MAC address of the user, and sending the broadcast packet to the outside;
detecting whether a broadcast response packet for the broadcast packet is received;
if the broadcast response packet is received, acquiring a random number generation formula from the broadcast response packet, and generating a random number according to the random number generation formula according to the MAC address of the random number generation formula;
generating a network access application packet according to the random number and the MAC address of the random number;
determining a target video network core server according to the broadcast response packet, and sending the network access application packet to the target video network core server;
detecting whether a network access application response packet sent by the target video network core server aiming at the network access application packet is received, wherein the network access application response packet is generated by distributing an unoccupied terminal equipment number to the target terminal after the target video network core server verifies the terminal validity of the target terminal according to the random number and verifies the validity of the MAC address of the target terminal according to the MAC address of the target terminal, and generating the unoccupied terminal equipment number according to the terminal equipment number; the terminal equipment number is the only terminal equipment number in the video network;
detecting the data type of the network access application response packet;
and if the data type is the correct type, sending a successful network access notification packet to the target video network core server.
7. A video networking core server, the server comprising:
the first receiving module is used for receiving a broadcast packet and determining a target terminal according to the broadcast packet, wherein the broadcast packet is generated and issued to the outside according to the MAC address of the target terminal after the target terminal is powered on;
a first sending module, configured to send a broadcast response packet for the broadcast packet to the target terminal;
a first detection module, configured to detect whether an access application packet sent by the target terminal for the broadcast response packet is received, where the access application packet carries a first random number and an MAC address of the target terminal, the first random number is generated by the target terminal according to a first random number generation formula according to the MAC address of the target terminal, and the first random number generation formula is obtained from the broadcast response packet;
the first verification module is used for verifying the terminal validity of the target terminal according to the network access application packet if the network access application packet is received;
the second verification module is used for verifying the validity of the MAC address of the target terminal if the target terminal is a legal terminal;
the distribution module is used for distributing an unoccupied terminal equipment number for the target terminal if the MAC address of the target terminal is legal, and generating a network access application response packet aiming at the network access application packet according to the terminal equipment number, wherein the terminal equipment number is the only terminal equipment number in the video network;
a second sending module, configured to send the network access application response packet to the target terminal;
a second detection module, configured to detect whether a successful network access notification packet sent by the target terminal for the network access application response packet is received, where the successful network access notification packet is sent to the core server of the video network after the target terminal determines that the data type of the network access application response packet is the correct type;
and the first marking module is used for marking the target terminal as the accessed terminal if the successful network access notification packet is received.
8. A terminal, characterized in that the terminal comprises:
the fourth sending module is used for generating a broadcast packet according to the MAC address of the fourth sending module after the fourth sending module is powered on, and sending the broadcast packet to the outside;
a third detecting module, configured to detect whether a broadcast response packet for the broadcast packet is received;
the third generation module is used for acquiring a random number generation formula from the broadcast response packet if the broadcast response packet is received, and generating a random number according to the random number generation formula according to the MAC address of the third generation module;
the fourth generation module is used for generating a network access application packet according to the random number and the MAC address of the fourth generation module;
a fifth sending module, configured to determine a target video network core server according to the broadcast response packet, and send the network access application packet to the target video network core server;
a fourth detection module, configured to detect whether a network access application response packet sent by the target video network core server for the network access application packet is received, where the network access application response packet is generated by allocating an unoccupied terminal device number to the target terminal after the target video network core server verifies the terminal validity of the target terminal according to the random number and verifies the validity of the MAC address of the target terminal according to the MAC address of the target terminal, and according to the terminal device number; the terminal equipment number is the only terminal equipment number in the video network;
a fifth detection module, configured to detect a data type of the network access application response packet;
and the sixth sending module is used for sending a successful network access notification packet to the target video network core server if the data type is the correct type.
9. An electronic device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, wherein the processor when executed implements the steps of the method according to any of claims 1-6.
10. A computer-readable storage medium, on which a computer program is stored which, when being executed by a processor, carries out the steps of the method according to any one of claims 1 to 6.
CN201910866757.1A 2019-09-12 2019-09-12 Terminal network access method, server, terminal, electronic equipment and storage medium Active CN110730500B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910866757.1A CN110730500B (en) 2019-09-12 2019-09-12 Terminal network access method, server, terminal, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910866757.1A CN110730500B (en) 2019-09-12 2019-09-12 Terminal network access method, server, terminal, electronic equipment and storage medium

Publications (2)

Publication Number Publication Date
CN110730500A CN110730500A (en) 2020-01-24
CN110730500B true CN110730500B (en) 2022-03-11

Family

ID=69218938

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910866757.1A Active CN110730500B (en) 2019-09-12 2019-09-12 Terminal network access method, server, terminal, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN110730500B (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113347741B (en) * 2020-02-18 2022-12-13 佛山市云米电器科技有限公司 Online method and system of gateway equipment
CN111885422B (en) * 2020-06-12 2024-07-23 视联动力信息技术股份有限公司 Multicast source processing method, system and device

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP2566129A1 (en) * 2010-12-21 2013-03-06 Huawei Technologies Co., Ltd. Method, apparatus and system for acquiring media access control address
CN106603743A (en) * 2016-12-16 2017-04-26 合网络技术(北京)有限公司 Broadcast request response method based on DHCP protocol customization, system and terminal thereof
CN109347844A (en) * 2018-10-29 2019-02-15 视联动力信息技术股份有限公司 A kind of method and device of equipment access internet
CN109617672A (en) * 2018-12-27 2019-04-12 八维通科技有限公司 A kind of novel filling code key method

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP2566129A1 (en) * 2010-12-21 2013-03-06 Huawei Technologies Co., Ltd. Method, apparatus and system for acquiring media access control address
CN106603743A (en) * 2016-12-16 2017-04-26 合网络技术(北京)有限公司 Broadcast request response method based on DHCP protocol customization, system and terminal thereof
CN109347844A (en) * 2018-10-29 2019-02-15 视联动力信息技术股份有限公司 A kind of method and device of equipment access internet
CN109617672A (en) * 2018-12-27 2019-04-12 八维通科技有限公司 A kind of novel filling code key method

Also Published As

Publication number Publication date
CN110730500A (en) 2020-01-24

Similar Documents

Publication Publication Date Title
CN111193788A (en) Audio and video stream load balancing method and device
CN109788247B (en) Method and device for identifying monitoring instruction
CN110602039A (en) Data acquisition method and system
CN111431966B (en) Service request processing method and device, electronic equipment and storage medium
CN110460469B (en) System upgrading method and device and storage medium
CN109347844B (en) Method and device for accessing equipment to Internet
CN109151519B (en) Configuration distribution method and system based on video network
CN110730500B (en) Terminal network access method, server, terminal, electronic equipment and storage medium
CN109151061B (en) Data storage method and device
CN110493149B (en) Message processing method and device
CN110289974B (en) Data stream processing method, system and device and storage medium
CN110022500B (en) Packet loss processing method and device
CN109743360B (en) Information processing method and device
CN110022353B (en) Service sharing method and video networking system
CN109889516B (en) Method and device for establishing session channel
CN109586851B (en) Data transmission method and device based on video network
CN108965219B (en) Data processing method and device based on video network
CN110166840B (en) Service processing method, system and device
CN110493555B (en) Request processing method, user terminal, core server, device and storage medium
CN110830817A (en) Video transcoding capacity adjusting method and video transcoding server
CN110557411A (en) video stream processing method and device based on video network
CN110177249B (en) Video downloading method and device based on video network
CN110213533B (en) Method and device for acquiring video stream monitored by video network
CN109587436B (en) Video networking conference management platform login method and device
CN109951670B (en) Method and device for issuing instruction in video conference

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant