Network communication method, device, storage medium and electronic device
By creating target network devices and configuring the initial virtual bridge in the IPTV system, obtaining the preset MAC address, the problem of missing device identification caused by canceling the wired interface after miniaturization is solved, and more flexible network access and stability enhancement is achieved.
Patent Information
- Application Number
- CN202411443212.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-16
- Publication Date
- 2024-12-27
- Estimated Expiration
- 2044-10-16
AI Technical Summary
The IPTV system cancels the wired Ethernet interface during the miniaturization process, causing the device to be unable to obtain the MAC address, affecting device identification and permission control, and failing to meet stability and bandwidth requirements.
Create a target network device in the IPTV system, obtain the initial virtual bridge configured with a preset MAC address, configure the target network device into the virtual bridge, and obtain IP address and other network configuration information from the external physical network to ensure that the IPTV system can Normal communication.
The problem of missing device identification is solved through the preset MAC address, providing a more flexible network access method, reducing network conflicts and misidentification, and enhancing the stability of network communication.
Smart Images

Figure CN118972201B_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the field of device communication, and in particular to a network communication method, device, storage medium and electronic device. Background Art
[0002] In the development of IPTV (Internet Protocol Television) systems, with the advancement of technology and changes in user needs, the miniaturization of set-top boxes has become an important trend. That is, the miniaturization of set-top boxes can improve user experience, reduce installation complexity, and meet the needs of modern families for aesthetics and space utilization.
[0003] However, the miniaturization of set-top boxes also brings a series of technical challenges. First, miniaturization means that more functions need to be integrated in a limited physical space, which often leads to the cancellation of some traditional interfaces, such as wired Ethernet interfaces. Although wireless interfaces provide the advantages of simple installation and no wiring, in certain specific scenarios, such as environments with strong signal interference or long distances, the performance of wireless interfaces may be affected and cannot meet the stability and bandwidth requirements of IPTV services.
[0004] In addition, IPTV service applications usually need to read the wired MAC (Media Access Control Address) address as the unique identifier of the device. The MAC address is the physical address of the network device in the network, which is crucial for application scenarios such as device identification and permission control. However, in the absence of an Ethernet port, the set-top box cannot directly obtain the MAC address, resulting in abnormalities in service applications based on the MAC address. Summary of the invention
[0005] The main purpose of the present disclosure is to provide a network communication method, device, storage medium and electronic device.
[0006] In a first aspect, the present disclosure provides a network communication method, which is applied to an IPTV system, comprising:
[0007] Create target network devices in IPTV system;
[0008] Obtaining an initial virtual network bridge, wherein the initial virtual network bridge is configured with a preset MAC address;
[0009] Configuring the target network device into the initial virtual network bridge to obtain a target virtual network bridge including the target network device;
[0010] Based on the MAC address, obtaining target network configuration information of the IPTV system from an external physical network through the target virtual bridge, wherein the target network configuration information includes an IP address;
[0011] The IPTV system is configured according to the target network configuration information so that the IPTV system performs network communication according to the target network configuration information.
[0012] Optionally, the acquiring the target network configuration information of the IPTV system from an external physical network through the target virtual bridge based on the MAC address includes:
[0013] Obtaining a network configuration request sent by the IPTV system;
[0014] Based on the MAC address, forwarding the network configuration request through the target virtual bridge;
[0015] The target network device receives the network configuration request forwarded by the target virtual network bridge, and sends the network configuration request to the network service device in the external physical network;
[0016] In response to the network configuration request, the network service device distributes the target network configuration information to the target virtual bridge.
[0017] Optionally, before acquiring the target network configuration information of the IPTV system from the external physical network through the target virtual bridge based on the MAC address, the method further includes:
[0018] Obtaining a network connection status of a target network interface corresponding to the target network device;
[0019] According to the network connection state, it is determined that the IPTV system establishes a connection with an external physical network through the target network device.
[0020] Optionally, configuring the target network device into the initial virtual network bridge to obtain a target virtual network bridge including the target network device comprises:
[0021] Acquire a first network device change event of the IPTV system;
[0022] In the case where the first network device change event is a network device addition event, the target network device is configured into the initial virtual network bridge to obtain a target virtual network bridge of the target network device.
[0023] Optionally, after configuring the target network device into the initial virtual network bridge to obtain a target virtual network bridge including the target network device, the method further includes:
[0024] Acquire a second network device change event of the IPTV system;
[0025] In a case where the second network device change event is a network device removal event, the target network device is removed from the target virtual network bridge.
[0026] Optionally, creating a target network device in the IPTV system includes:
[0027] Obtaining the network device connection status of the IPTV system;
[0028] Determining whether the IPTV system is connected to an external network device according to the connection status of the network device;
[0029] When the IPTV system is connected to the external network device, a target network device is created in the IPTV system based on the external network device.
[0030] Optionally, before creating the target network device in the IPTV system, the method further includes:
[0031] Creating an initial virtual bridge in the IPTV system;
[0032] Get the preset MAC address;
[0033] The MAC address is configured to the initial virtual bridge.
[0034] In a second aspect, the present disclosure further provides a network communication device, the network communication device comprising:
[0035] A creation module, used for creating a target network device in the IPTV system;
[0036] A first acquisition module is used to acquire an initial virtual network bridge, where the initial virtual network bridge is configured with a preset MAC address;
[0037] A first configuration module, configured to configure the target network device into the initial virtual network bridge to obtain a target virtual network bridge including the target network device;
[0038] A second acquisition module, configured to acquire target network configuration information of the IPTV system from an external physical network through the target virtual bridge based on the MAC address, wherein the target network configuration information includes an IP address;
[0039] The second configuration module is used to configure the IPTV system according to the target network configuration information so that the IPTV system performs network communication according to the target network configuration information.
[0040] In a third aspect, the present disclosure further provides a computer-readable storage medium, on which a computer program is stored, and a processor executes the computer program to implement the above method.
[0041] In a fourth aspect, the present disclosure further provides an electronic device, comprising a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to implement the above method.
[0042] The network communication method, device, storage medium and electronic device proposed in the embodiment of the present disclosure. First, a target network device is created in the IPTV system, and an initial virtual bridge configured with a preset MAC address is obtained. Then the target network device is configured in the initial virtual bridge to obtain a target virtual bridge containing the target network device. Based on the target virtual bridge configured with the preset MAC address, the target network configuration information including the IP address of the IPTV system is obtained from the external physical network. Finally, the IPTV system is configured according to the target network configuration information so that the IPTV system performs network communication according to the target network configuration information. In this way, by creating the target network device and configuring the initial virtual bridge, and presetting a MAC address for it, the technical solution effectively solves the problem of device identification missing caused by canceling the wired interface after the miniaturization of IPTV. This preset MAC address can be used as a unified device identification for the entire IPTV system or a specific business application, ensuring that the business application can normally identify and manage the device. By allowing the use of an external network device and configuring it into the target virtual bridge based on the created target network device, a more flexible network access method is provided. At the same time, since all network communications are conducted through the target virtual bridge and carry a unified MAC address, this helps reduce network conflicts and misidentifications, thereby enhancing the stability of network communications. BRIEF DESCRIPTION OF THE DRAWINGS
[0043] In order to more clearly illustrate the embodiments of the present disclosure or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present disclosure. For ordinary technicians in this field, other drawings can be obtained based on the structures shown in these drawings without paying any creative work.
[0044] Figure 1 A schematic diagram of the device structure of the hardware operating environment involved in the embodiment of the present disclosure;
[0045] Figure 2 A schematic diagram of a flow chart of a network communication method involved in an embodiment of the present disclosure;
[0046] Figure 3The present invention is a structural block diagram of a network communication device involved in an embodiment of the present disclosure.
[0047] The realization of the objectives, functional features and advantages of the present disclosure will be further described in conjunction with embodiments and with reference to the accompanying drawings. DETAILED DESCRIPTION
[0048] The following will be combined with the drawings in the embodiments of the present disclosure to clearly and completely describe the technical solutions in the embodiments of the present disclosure. Obviously, the described embodiments are only part of the embodiments of the present disclosure, rather than all the embodiments. Based on the embodiments in the present disclosure, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present disclosure.
[0049] Reference Figure 1 , Figure 1 The figure is a schematic diagram of the device structure of the hardware operating environment involved in the embodiment of the present disclosure.
[0050] Typically, the device includes: at least one processor 301, a memory 302, and a network communication program stored in the memory 302 and executable on the processor 301, wherein the network communication program is configured to implement the steps of the network communication method as described above.
[0051] The processor 301 may include one or more processing cores, such as a 4-core processor, an 8-core processor, etc. The processor 301 may be implemented in at least one hardware form of DSP (Digital Signal Processing), FPGA (Field-Programmable Gate Array), and PLA (Programmable Logic Array). The processor 301 may also include a main processor and a coprocessor. The main processor is a processor for processing data in the awake state, also known as a CPU (Central Processing Unit); the coprocessor is a low-power processor for processing data in the standby state. In some embodiments, the processor 301 may be integrated with a GPU (Graphics Processing Unit), which is responsible for rendering and drawing the content to be displayed on the display screen. The processor 301 may also include an AI (Artificial Intelligence) processor, which is used to process operations related to the network communication method, so that the network communication method model can be trained and learned autonomously to improve efficiency and accuracy.
[0052] The memory 302 may include one or more storage media, which may be non-transitory. The memory 302 may also include a high-speed random access memory, and a non-volatile memory, such as one or more disk storage devices, flash memory storage devices. In some embodiments, the non-transitory storage medium in the memory 302 is used to store at least one instruction, which is used to be executed by the processor 301 to implement the network communication method provided in the method embodiment of the present disclosure.
[0053] In some embodiments, the terminal may further optionally include: a communication interface 303 and at least one peripheral device. The processor 301, the memory 302 and the communication interface 303 may be connected via a bus or a signal line. Each peripheral device may be connected to the communication interface 303 via a bus, a signal line or a circuit board. Specifically, the peripheral device includes: at least one of a radio frequency circuit 304, a display screen 305 and a power supply 306.
[0054] The communication interface 303 may be used to connect at least one peripheral device related to I / O (Input / Output) to the processor 301 and the memory 302. In some embodiments, the processor 301, the memory 302, and the communication interface 303 are integrated on the same chip or circuit board; in some other embodiments, any one or two of the processor 301, the memory 302, and the communication interface 303 may be implemented on a separate chip or circuit board, which is not limited in this embodiment.
[0055] The radio frequency circuit 304 is used to receive and transmit RF (Radio Frequency) signals, also known as electromagnetic signals. The radio frequency circuit 304 communicates with the communication network and other communication devices through electromagnetic signals. The radio frequency circuit 304 converts electrical signals into electromagnetic signals for transmission, or converts received electromagnetic signals into electrical signals. Optionally, the radio frequency circuit 304 includes: an antenna system, an RF transceiver, one or more amplifiers, a tuner, an oscillator, a digital signal processor, a codec chipset, a user identity module card, and the like. The radio frequency circuit 304 can communicate with other terminals through at least one wireless communication protocol. The wireless communication protocol includes, but is not limited to: a metropolitan area network, various generations of mobile communication networks (2G, 3G, 4G and 5G), a wireless local area network and / or a WiFi (Wireless Fidelity) network. In some embodiments, the radio frequency circuit 304 may also include circuits related to NFC (Near Field Communication), which is not limited in the present disclosure.
[0056] The display screen 305 is used to display the UI (User Interface). The UI may include graphics, text, icons, videos, and any combination thereof. When the display screen 305 is a touch display screen, the display screen 305 also has the ability to collect touch signals on the surface or above the surface of the display screen 305. The touch signal can be input to the processor 301 as a control signal for processing. At this time, the display screen 305 can also be used to provide virtual buttons and / or virtual keyboards, also known as soft buttons and / or soft keyboards. In some embodiments, the display screen 305 can be one, the front panel of the electronic device; in other embodiments, the display screen 305 can be at least two, respectively arranged on different surfaces of the electronic device or in a folding design; in some embodiments, the display screen 305 can be a flexible display screen, arranged on a curved surface or a folding surface of the electronic device. Even, the display screen 305 can also be set to a non-rectangular irregular shape, that is, a special-shaped screen. The display screen 305 can be made of materials such as LCD (Liquid Crystal Display), OLED (Organic Light-Emitting Diode, organic light-emitting diode).
[0057] The power supply 306 is used to power various components in the electronic device. The power supply 306 can be AC power, DC power, a disposable battery, or a rechargeable battery. When the power supply 306 includes a rechargeable battery, the rechargeable battery can support wired charging or wireless charging. The rechargeable battery can also be used to support fast charging technology. Those skilled in the art will understand that Figure 1 The structure shown in the figure does not constitute a limitation of the device, and may include more or less components than shown in the figure, or combine certain components, or arrange the components differently.
[0058] In addition, the embodiment of the present disclosure further proposes a storage medium, on which a network communication program is stored, and when the network communication program is executed by a processor, the steps of the network communication method described above are implemented. Therefore, it will not be repeated here. In addition, the description of the beneficial effects of adopting the same method will not be repeated. For technical details not disclosed in the storage medium embodiment involved in the present disclosure, please refer to the description of the method embodiment of the present disclosure. As an example, the program instructions can be deployed to be executed on one device, or on multiple devices located at one location, or on multiple devices distributed at multiple locations and interconnected by a communication network.
[0059] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiments can be implemented by instructing related hardware through a computer program, and the above-mentioned program can be stored in a storage medium, and when the program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, the above-mentioned storage medium can be a disk, an optical disk, a read-only memory (ROM) or a random access memory (RAM), etc.
[0060] Reference Figure 2 , Figure 2 The present invention is a flowchart of a network communication method involved in an embodiment of the present invention. The network communication method is applied to an IPTV system and includes the following steps:
[0061] Step S11: Create a target network device in the IPTV system.
[0062] Step S12: Acquire an initial virtual network bridge, where a preset MAC address is configured on the initial virtual network bridge.
[0063] Step S13: configuring the target network device into the initial virtual network bridge to obtain a target virtual network bridge including the target network device.
[0064] Step S14: Based on the MAC address, the target network configuration information of the IPTV system is obtained from the external physical network through the target virtual bridge, where the target network configuration information includes an IP address.
[0065] Step S15: configuring the IPTV system according to the target network configuration information so that the IPTV system performs network communication according to the target network configuration information.
[0066] It should be understood that the target network device may be one or more devices used to connect external network devices in the IPTV system, such as a USB network device used to connect a USB network card, and the embodiments of the present disclosure do not specifically limit this.
[0067] For example, a target network device is created in an IPTV system so that the target network device can be used in the IPTV system to simulate or represent an actual hardware device. Since the virtual bridge plays the role of forwarding data packets in the network, and the MAC address is an identifier for the network device to communicate at the network layer. Therefore, after creating the target network device, the initial virtual bridge can be obtained and the preset MAC address can be configured. Then the target network device is added to the preset initial virtual bridge so that the target network device can share the network environment and configuration of the initial virtual bridge. Then, since the IPTV system needs to know its IP address and other network configuration information to communicate with the external network. Therefore, the target network configuration information of the IPTV system can be obtained from the external physical network based on the target virtual bridge configured with the preset MAC address.
[0068] Through this technical solution, firstly, a target network device is created in the IPTV system, and an initial virtual bridge configured with a preset MAC address is obtained. Then, the target network device is configured into the initial virtual bridge to obtain a target virtual bridge containing the target network device. Based on the target virtual bridge configured with the preset MAC address, the target network configuration information including the IP address of the IPTV system is obtained from the external physical network. Finally, the IPTV system is configured according to the target network configuration information so that the IPTV system performs network communication according to the target network configuration information. In this way, by creating the target network device and configuring the initial virtual bridge, and presetting a MAC address for it, the technical solution effectively solves the problem of device identification missing caused by the cancellation of the wired interface after the miniaturization of IPTV. This preset MAC address can be used as a unified device identification for the entire IPTV system or a specific business application, ensuring that the business application can normally identify and manage the device. By allowing the use of an external network device and configuring it into the target virtual bridge based on the created target network device, a more flexible network access method is provided. At the same time, since all network communications are carried out through the target virtual bridge and carry a unified MAC address, this helps to reduce network conflicts and misidentifications, thereby enhancing the stability of network communications.
[0069] In a possible approach, the IPTV system is a system that does not include a wired Ethernet interface.
[0070] It is worth noting that IPTV systems usually rely on broadband networks (including wired Ethernet) as infrastructure to transmit multimedia content. After IPTV is miniaturized, the wired Ethernet interface is removed, and the device directly loses the ability to access the wired network in a traditional way. This poses a challenge to scenarios that require stable, high-speed network connections and network authentication or service authentication based on MAC addresses. In many IPTV application scenarios, the MAC address of the device is key information for network access, content distribution, service authentication, etc. The lack of an Ethernet interface may cause the device to be unable to be directly identified or authenticated in the network, thereby affecting the normal operation of the service. Therefore, the present disclosure is applicable to IPTV systems that do not include wired Ethernet interfaces, as well as to other IPTV systems that can configure virtual network devices so that they can be mapped to USB network cards or other network interfaces to identify and use the network connection provided by external network devices, while retaining the ability to access and control the MAC address of the device. The embodiments of the present disclosure are not specifically limited to this.
[0071] In a possible manner, before creating the target network device in the IPTV system, the following steps are also included:
[0072] Create an initial virtual bridge in the IPTV system;
[0073] Get the preset MAC address;
[0074] Assign the MAC address to the initial virtual bridge.
[0075] For example, during the production stage of an IPTV device, the manufacturer can write a specific MAC address to a specific location in the device's eMMC (Embedded MultiMediaCard) storage as needed. This step is usually completed before the device leaves the factory to ensure that each device has a unique MAC address. The specific location where the MAC address is written to the eMMC depends on the firmware design and storage layout of the device, which is not limited in the embodiments of the present disclosure. Then, when the IPTV device is turned on, its firmware or operating system will perform a series of initialization operations, including reading a preset MAC address from the eMMC. The firmware or operating system will access the specific location in the eMMC where the MAC address is stored, and read the address into the memory for subsequent use.
[0076] During the network configuration phase of the IPTV system, the system creates an initial virtual bridge. The initial virtual bridge is used to connect different network interfaces to forward and manage network traffic. Then, the system configures the preset MAC address previously read from the eMMC to the initial virtual bridge. In this way, the virtual bridge can use the preset MAC address as its unique identifier in the network.
[0077] Among the possible ways, creating a target network device in the IPTV system includes:
[0078] Get the network device connection status of the IPTV system;
[0079] According to the connection status of the network device, determine whether the IPTV system is connected to the external network device;
[0080] When the IPTV system is connected to the external network device, a target network device is created in the IPTV system based on the external network device.
[0081] For example, the dev / socket / netd interface is a socket interface created by the netd service (Network Daemon). By creating a new local socket to communicate with it, the change information of the network interface can be obtained from the netd service. Therefore, the network device connection status of the IPTV system can be obtained through the / dev / socket / netd interface monitoring, and then it can be determined whether the IPTV system is connected to an external network device. For example, when the network device connection status of the target network interface is determined by the / dev / socket / netd interface to be after the USB network card is inserted, it can be determined that the IPTV system is connected to the external network device. Of course, other methods can also be used to determine whether the IPTV system is connected to an external network device, and the embodiments of the present disclosure are not limited to this.
[0082] For example, in a dynamic network environment, in addition to adding the target network device to the virtual bridge, the situation where the device is removed can also be handled. In the present disclosure, network device change events from the netd service or other network monitoring mechanisms can be continuously monitored, and whether new notifications or events are arriving is constantly checked. When a new network device change event is received and parsed as a target network device removal event, the target network device can be removed from the target virtual bridge. In this way, the IPTV system in the present disclosure can flexibly handle changes in network devices, including adding the target network device to the virtual bridge when needed, and removing it when no longer needed.
[0083] Therefore, in a possible manner, configuring the target network device into the initial virtual network bridge to obtain a target virtual network bridge including the target network device includes:
[0084] Acquire a first network device change event of the IPTV system;
[0085] In the case where the first network device change event is a network device addition event, the target network device is configured into the initial virtual network bridge to obtain a target virtual network bridge of the target network device.
[0086] In a possible manner, after configuring the target network device into the initial virtual network bridge to obtain the target virtual network bridge including the target network device, the method further includes:
[0087] Obtain a second network device change event of the IPTV system;
[0088] When the second network device change event is a network device removal event, the target network device is removed from the target virtual network bridge.
[0089] In a possible manner, before obtaining the target network configuration information of the IPTV system from the external physical network through the target virtual bridge based on the MAC address, the method further includes:
[0090] Get the network connection status of the target network interface corresponding to the target network device;
[0091] According to the network connection status, it is determined that the IPTV system establishes a connection with the external physical network through the target network device.
[0092] For example, before obtaining the target network configuration information of the IPTV system from the external physical network through the target virtual network bridge, it is necessary to ensure that the IPTV system has established a connection with the external physical network.
[0093] Specifically, the network connection status of the target network interface corresponding to the target network device can be queried, and based on the network connection status, it can be determined whether the IPTV system has established a connection with the external physical network. For example, when the IPTV system confirms that the USB network card is correctly connected to the physical network, a network online event is triggered. This event is a signal inside the system, which is used to notify other components or services that the target network interface is ready to communicate with the external physical network. After triggering the network online event, the IPTV system will check the network connection status of the target network interface. When it is confirmed that the target network interface has established a connection with the external physical network, and the configuration information of the network interface also meets the requirements of the IPTV system, it is confirmed that the IPTV system has established a connection with the external physical network. At this time, the system triggers a request to obtain the target network configuration information of the IPTV system.
[0094] In this way, it can be ensured that after the IPTV system establishes a stable connection with the external physical network, the request for obtaining the target network configuration information is triggered, thereby ensuring that the system can operate normally and provide services.
[0095] In a possible manner, based on the MAC address, the target network configuration information of the IPTV system is obtained from the external physical network through the target virtual bridge, including:
[0096] Get the network configuration request sent by the IPTV system;
[0097] Based on the MAC address, the network configuration request is forwarded through the target virtual bridge;
[0098] The target network device receives the network configuration request forwarded by the target virtual network bridge, and sends the network configuration request to the network service device in the external physical network;
[0099] In response to the network configuration request, the network service device distributes target network configuration information to the target virtual bridge.
[0100] It should be understood that the network service device is one or more devices in the external physical network, which is responsible for processing network requests, providing network services, etc. In the present disclosure, the network service device can be a DHCP (Dynamic Host Configuration Protocol) server, a network configuration server, or any other device that can respond to a specific type of network configuration request. The embodiments of the present disclosure are not limited to this.
[0101] For example, first, the IPTV system generates a network configuration request, and the target virtual bridge decides whether to forward the request based on the MAC address information carried in the request. If the network configuration request comes from a preset MAC address or meets other forwarding conditions, the target virtual bridge broadcasts the request to one or more related devices in the target virtual bridge. After the target network device receives the network configuration request from the target virtual bridge, it sends it to the external physical network. After receiving the network configuration request, the network service device generates the target network configuration information according to the content of the request, and sends the target network configuration information back to the target network device through the external physical network. The target network device then forwards the response to the target virtual bridge, and the target virtual bridge finally passes the response to the IPTV system.
[0102] It is worth noting that the present disclosure focuses on the forwarding process of requests and responses through the target virtual bridge and the target network device. In actual operation, the network service device may not directly send the response back to the target virtual bridge, but send it back to the source address of the original request (i.e., the network interface of the IPTV system). Then, the IPTV system receives the response through the network interface and configures its network settings accordingly. This situation also belongs to the forwarding process of requests and responses through the target virtual bridge and the target network device in the present disclosure, and the embodiments of the present disclosure will not be repeated in comparison.
[0103] In this way, by using virtual bridges and target network devices, the IPTV system can more flexibly connect to the external physical network and obtain the required network configuration information. This method does not rely on direct connection of the physical network interface, making the network configuration more flexible and changeable.
[0104] In addition, the virtual bridge and the target network device can serve as the boundary of network isolation, limiting which devices or requests can be forwarded to the external physical network through preset MAC addresses or other security policies. This helps prevent unauthorized access and potential network security threats. By bridging the virtual bridge and the external physical network through the target network device, network resources can be used more efficiently. For example, multiple network interfaces can be simulated in a virtual environment without the need to equip each interface with physical hardware, thereby saving costs and simplifying network management. Centralized management of virtual bridges and target network devices can greatly simplify the network configuration and management process. When the IPTV system needs to be expanded or migrated to a new network environment, the network configuration method based on virtual bridges and target network devices can be more easily implemented. It is only necessary to reconfigure the network components in the virtual environment without making extensive changes to the physical network.
[0105] In summary, the process of obtaining the target network configuration information of the IPTV system from the external physical network through the target virtual bridge and the target network device has significant technical effects in improving the flexibility of network configuration, enhancing network security, optimizing network resource utilization, simplifying network management, improving system scalability, ensuring data consistency and supporting dynamic network configuration.
[0106] Reference Figure 3 , Figure 3 This is a structural block diagram of a network communication device involved in an embodiment of the present disclosure. Based on the same inventive concept as the above embodiment, the device includes:
[0107] A creation module 10, used for creating a target network device in the IPTV system;
[0108] A first acquisition module 20 is used to acquire an initial virtual network bridge, where the initial virtual network bridge is configured with a preset MAC address;
[0109] A first configuration module 30, configured to configure the target network device into the initial virtual network bridge to obtain a target virtual network bridge including the target network device;
[0110] A second acquisition module 40 is used to acquire target network configuration information of the IPTV system from an external physical network through the target virtual bridge based on the MAC address, wherein the target network configuration information includes an IP address;
[0111] The second configuration module 50 is used to configure the IPTV system according to the target network configuration information so that the IPTV system performs network communication according to the target network configuration information.
[0112] Optionally, the second acquisition module 40 is used to:
[0113] Obtaining a network configuration request sent by the IPTV system;
[0114] Based on the MAC address, forwarding the network configuration request through the target virtual bridge;
[0115] The target network device receives the network configuration request forwarded by the target virtual network bridge, and sends the network configuration request to the network service device in the external physical network;
[0116] In response to the network configuration request, the network service device distributes the target network configuration information to the target virtual bridge.
[0117] Optionally, the network communication device further includes a determination module, wherein the determination module is configured to:
[0118] Before acquiring the target network configuration information of the IPTV system from the external physical network through the target virtual bridge based on the MAC address, acquiring the network connection status of the target network interface corresponding to the target network device;
[0119] According to the network connection state, it is determined that the IPTV system establishes a connection with an external physical network through the target network device.
[0120] Optionally, the first configuration module 30 is used to:
[0121] Acquire a first network device change event of the IPTV system;
[0122] In the case where the first network device change event is a network device addition event, the target network device is configured into the initial virtual network bridge to obtain a target virtual network bridge of the target network device.
[0123] Optionally, the network communication device further includes a removal module, and the removal module is used to:
[0124] After configuring the target network device into the initial virtual network bridge to obtain the target virtual network bridge including the target network device, acquiring a second network device change event of the IPTV system;
[0125] In a case where the second network device change event is a network device removal event, the target network device is removed from the target virtual network bridge.
[0126] Optionally, the creation module 10 is used to:
[0127] Obtaining the network device connection status of the IPTV system;
[0128] Determining whether the IPTV system is connected to an external network device according to the connection status of the network device;
[0129] When the IPTV system is connected to the external network device, a target network device is created in the IPTV system based on the external network device.
[0130] Optionally, the network communication device further includes a second creation module, wherein the second creation module is used to:
[0131] Before creating the target network device in the IPTV system, creating the initial virtual bridge in the IPTV system;
[0132] Get the preset MAC address;
[0133] The MAC address is configured to the initial virtual bridge.
[0134] It should be noted that, since the steps executed by the device of this embodiment are the same as the steps of the aforementioned method embodiment, its specific implementation method and the technical effects that can be achieved can refer to the aforementioned embodiment and will not be repeated here.
[0135] In addition, in one embodiment, an embodiment of the present disclosure further provides an electronic device, which includes a processor, a memory, and a computer program stored in the memory, and the computer program implements the steps of the method in the aforementioned embodiment when executed by the processor.
[0136] In addition, in one embodiment, an embodiment of the present disclosure further provides a computer storage medium, on which a computer program is stored, and when the computer program is executed by a processor, the steps of the method in the aforementioned embodiment are implemented.
[0137] In some embodiments, the computer readable storage medium may be a memory such as FRAM, ROM, PROM, EPROM, EEPROM, flash memory, magnetic surface memory, optical disk, or CD-ROM; or various devices including one or any combination of the above memories. The computer may be various computing devices including intelligent terminals and servers.
[0138] In some embodiments, executable instructions may be in the form of a program, software, software module, script or code, written in any form of programming language (including compiled or interpreted languages, or declarative or procedural languages), and may be deployed in any form, including as a stand-alone program or as a module, component, subroutine or other unit suitable for use in a computing environment.
[0139] As an example, executable instructions may, but need not, correspond to a file in a file system, may be stored as part of a file that stores other programs or data, such as in one or more scripts in a HyperText Markup Language (HTML) document, in a single file dedicated to the program in question, or in multiple coordinated files (e.g., files storing one or more modules, subroutines, or code portions).
[0140] By way of example, executable instructions may be deployed to be executed on one computing device, or on multiple computing devices located at one site, or on multiple computing devices distributed across multiple sites and interconnected by a communication network.
[0141] It should be noted that, in this article, the terms "include", "may include" or any other variations thereof are intended to cover non-exclusive inclusions, so that a process, method, article or system including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or system. In the absence of further restrictions, an element defined by the sentence "includes a ..." does not exclude the existence of other identical elements in the process, method, article or system including the element.
[0142] The serial numbers of the above-mentioned embodiments of the present disclosure are only for description and do not represent the advantages or disadvantages of the embodiments.
[0143] Through the description of the above implementation methods, those skilled in the art can clearly understand that the above-mentioned embodiment methods can be implemented by means of software plus a necessary general hardware platform, and of course by hardware, but in many cases the former is a better implementation method. Based on such an understanding, the technical solution of the present disclosure, or the part that contributes to the prior art, can be embodied in the form of a software product, which is stored in a storage medium (such as a read-only memory / random access memory, a magnetic disk, or an optical disk), and includes a number of instructions for enabling a multimedia terminal device (which can be a mobile phone, a computer, a television receiver, or a network device, etc.) to execute the methods described in each embodiment of the present disclosure.
[0144] The above descriptions are only optional embodiments of the present disclosure, and are not intended to limit the patent scope of the present disclosure. All equivalent structural transformations made using the contents of the present disclosure and the drawings under the inventive concept of the present disclosure, or direct / indirect applications in other related technical fields are included in the patent protection scope of the present disclosure.
Claims
1. A network communication method, characterized in that: Applied to IPTV systems, including: Create target network devices in IPTV system; Obtaining an initial virtual network bridge, wherein the initial virtual network bridge is configured with a preset MAC address; Configuring the target network device into the initial virtual network bridge to obtain a target virtual network bridge including the target network device; Based on the MAC address, obtaining target network configuration information of the IPTV system from an external physical network through the target virtual bridge, wherein the target network configuration information includes an IP address; The IPTV system is configured according to the target network configuration information so that the IPTV system performs network communication according to the target network configuration information.
2. The method according to claim 1, characterized in that: The step of acquiring target network configuration information of the IPTV system from an external physical network through the target virtual bridge based on the MAC address includes: Obtaining a network configuration request sent by the IPTV system; Based on the MAC address, forwarding the network configuration request through the target virtual bridge; The target network device receives the network configuration request forwarded by the target virtual network bridge, and sends the network configuration request to the network service device in the external physical network; In response to the network configuration request, the network service device distributes the target network configuration information to the target virtual bridge.
3. The method according to claim 1, characterized in that Before acquiring the target network configuration information of the IPTV system from the external physical network through the target virtual bridge based on the MAC address, the method further includes: Obtaining a network connection status of a target network interface corresponding to the target network device; According to the network connection state, it is determined that the IPTV system establishes a connection with an external physical network through the target network device.
4. The method according to claim 1, characterized in that The step of configuring the target network device into the initial virtual network bridge to obtain a target virtual network bridge including the target network device comprises: Acquire a first network device change event of the IPTV system; In the case where the first network device change event is a network device addition event, the target network device is configured into the initial virtual network bridge to obtain a target virtual network bridge of the target network device.
5. The method according to any one of claims 1 to 4, characterized in that After configuring the target network device into the initial virtual network bridge to obtain the target virtual network bridge including the target network device, the method further includes: Acquire a second network device change event of the IPTV system; In a case where the second network device change event is a network device removal event, the target network device is removed from the target virtual network bridge.
6. The method according to claim 1, characterized in that The step of creating a target network device in the IPTV system includes: Obtaining the network device connection status of the IPTV system; Determining whether the IPTV system is connected to an external network device according to the connection status of the network device; When the IPTV system is connected to the external network device, a target network device is created in the IPTV system based on the external network device.
7. The method according to claim 1, characterized in that Before creating the target network device in the IPTV system, the method further includes: Creating an initial virtual bridge in the IPTV system; Get the preset MAC address; The MAC address is configured to the initial virtual bridge.
8. A network communication device, characterized in that: include: A creation module, used for creating a target network device in the IPTV system; A first acquisition module is used to acquire an initial virtual network bridge, where the initial virtual network bridge is configured with a preset MAC address; A first configuration module, configured to configure the target network device into the initial virtual network bridge to obtain a target virtual network bridge including the target network device; A second acquisition module, configured to acquire target network configuration information of the IPTV system from an external physical network through the target virtual bridge based on the MAC address, wherein the target network configuration information includes an IP address; The second configuration module is used to configure the IPTV system according to the target network configuration information so that the IPTV system performs network communication according to the target network configuration information.
9. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and the processor executes the computer program to implement the method according to any one of claims 1 to 7.
10. An electronic device, characterized in that: The electronic device comprises a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to implement the method according to any one of claims 1 to 7.
Citation Information
Patent Citations
Method for enabling set top box to have access to Internet and IPTV network simultaneously
CN103475950A
Virtual machine container mixed arrangement system and IPv6 network implementation method thereof
CN116436727A
Method and device for playing network television service
CN117714807A
Virtual bridge
US20060233168A1
System and Method to Discover Virtual Machine Instantiations and Configure Network Service Level Agreements
US20130275568A1