A network address acquisition method and device, electronic equipment and storage medium

By using a NAT server to allocate external network ports and bind internal network IP addresses to streaming media request units in the base station streaming media platform, and generating access URLs, the problem of high resource consumption in the base station streaming media platform is solved, and efficient resource utilization is achieved.

CN117176683BActive Publication Date: 2026-07-14CHINA TOWER CO LTD

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
CHINA TOWER CO LTD
Filing Date
2023-09-20
Publication Date
2026-07-14

AI Technical Summary

Technical Problem

The existing method of obtaining network addresses for base station streaming media platforms consumes a lot of resources, leading to problems with physical line access resource consumption and fixed network resource occupation.

Method used

The NAT server receives the intranet binding request from the streaming media request unit, allocates an external port, binds the intranet IP address to the external port, and generates an access URL. Users can obtain streaming media data from the streaming media camera through the URL, avoiding the need to lay a dedicated line.

Benefits of technology

It effectively reduces the resource consumption of the base station streaming media platform when obtaining network addresses, and avoids the fixed occupation of physical lines and the continuous consumption of network resources.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117176683B_ABST
    Figure CN117176683B_ABST
Patent Text Reader

Abstract

The application discloses a network address acquisition method and device, electronic equipment and a storage medium, and relates to the technical field of communication. The method comprises the following steps: a network address translation (Nat) server receives an intranet binding request sent by a streaming media request unit in a base station streaming media platform, wherein the intranet binding request carries an intranet IP address of a target edge gateway; an external network port is allocated for the streaming media request unit based on the intranet binding request; the intranet IP address is bound with the external network port to obtain a binding result; the binding result is sent to the streaming media request unit, and the binding result is used for the streaming media request unit to splice the intranet IP address and port information of the external network port to form an access URL, so that the streaming media request unit acquires streaming media of at least one streaming media camera by accessing the URL. The application can effectively reduce resource consumption when the base station streaming media platform acquires a network address.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of communication technology, and in particular to a method, apparatus, electronic device, and storage medium for obtaining network addresses. Background Technology

[0002] As my country's communication network continues to expand, the number of base stations and base station equipment is gradually increasing. These base stations are usually deployed in a decentralized manner, and each base station equipment room is equipped with streaming media cameras, which can provide 24 / 7 real-time video monitoring of the equipment room.

[0003] When users need to view streaming media data within a data center, access is typically initiated based on the network address of the streaming media camera within a dedicated network. However, with the continuous increase in the number of base stations, each new base station requires the deployment of a new dedicated line, inevitably consuming significant physical line access resources. Furthermore, using the network address of a dedicated network also results in the fixed occupation of network resources. Therefore, the existing method of obtaining network addresses for base station streaming media platforms suffers from high resource consumption. Summary of the Invention

[0004] The purpose of this application is to provide a network address acquisition method, apparatus, electronic device, and storage medium to solve the problem of high resource consumption in existing base station streaming media platform network address acquisition methods.

[0005] In a first aspect, embodiments of this application provide a network address acquisition method, applied to a Network Address Translation (NAT) server in a base station streaming media platform, comprising:

[0006] The system receives an intranet binding request sent by the streaming media request unit in the base station streaming media platform. The intranet binding request carries the intranet IP address of the target edge gateway, and the target edge gateway establishes a network connection with at least one streaming media camera through the intranet.

[0007] Based on the intranet binding request, allocate an external network port to the streaming media request unit;

[0008] Bind the internal network IP address to the external network port to obtain a binding result, the binding result including the port information of the internal network IP address and the external network port;

[0009] The binding result is sent to the streaming media request unit. The binding result is used by the streaming media request unit to concatenate the internal network IP address with the port information of the external network port to form an access Uniform Resource Locator (URL), so that the streaming media request unit can obtain the streaming media of the at least one streaming media camera by accessing the URL.

[0010] Secondly, embodiments of this application provide a network address acquisition method, applied to a streaming media request unit in a base station streaming media platform, comprising:

[0011] Identify the target edge gateway;

[0012] Send an intranet binding request to the Network Address Translation (NAT) server. The intranet binding request carries the intranet IP address of the target edge gateway. The target edge gateway establishes a network connection with at least one streaming media camera through the intranet.

[0013] Receive the binding result sent by the NAT server, the binding result including the internal network IP address and the external network port information, the external network port being allocated by the NAT server based on the internal network binding request;

[0014] The binding result is parsed to obtain the internal network IP address and the port information of the external network port. The internal network IP address and the port information of the external network port are concatenated to form a Uniform Resource Locator (URL). The streaming media of the at least one streaming media camera is obtained by accessing the URL.

[0015] Thirdly, embodiments of this application provide a network address acquisition device, comprising:

[0016] The receiving module is used to receive an intranet binding request sent by the streaming media request unit in the base station streaming media platform. The intranet binding request carries the intranet IP address of the target edge gateway, and the target edge gateway establishes a network connection with at least one streaming media camera through the intranet.

[0017] The allocation module is used to allocate an external network port to the streaming media request unit based on the intranet binding request;

[0018] A binding module is used to bind the internal network IP address to the external network port and obtain a binding result, wherein the binding result includes port information of the internal network IP address and the external network port;

[0019] The sending module is used to send the binding result to the streaming media request unit. The binding result is used by the streaming media request unit to concatenate the intranet IP address and the port information of the external port to form a Uniform Resource Locator (URL), so that the streaming media request unit can obtain the streaming media from the at least one streaming media camera by accessing the URL.

[0020] Fourthly, embodiments of this application provide a network address acquisition device, including:

[0021] The determination module is used to determine the target edge gateway;

[0022] The sending module is used to send an intranet binding request to the Network Address Translation (NAT) server. The intranet binding request carries the intranet IP address of the target edge gateway, and the target edge gateway establishes a network connection with at least one streaming media camera through the intranet.

[0023] The receiving module is used to receive the binding result sent by the NAT server. The binding result includes the internal network IP address and the port information of the external network port generated by the NAT server. The external network port is allocated by the NAT server based on the internal network binding request.

[0024] The splicing module is used to parse the binding result to obtain the internal network IP address and the port information of the external network port, splice the internal network IP address and the port information of the external network port to form a Uniform Resource Locator (URL), and obtain the streaming media of the at least one streaming media camera by accessing the URL.

[0025] Fifthly, embodiments of this application provide an electronic device, including: a memory, a processor, and a program or instructions stored in the memory and executable on the processor, wherein when the program or instructions are executed by the processor, they implement the steps in the network address acquisition method as described in the first or second aspect of embodiments of this application.

[0026] In a sixth aspect, embodiments of this application provide a readable storage medium storing a program or instructions, which, when executed by the processor, implement the steps in the network address acquisition method as described in the first or second aspect of embodiments of this application.

[0027] In this embodiment, the streaming media request unit in the base station streaming media platform sends an intranet binding request. This request carries the intranet IP address of the target edge gateway. The target edge gateway establishes a network connection with at least one streaming media camera via the intranet. The NAT server allocates an external network port to the streaming media request unit based on this binding request and binds the intranet IP address with the port information of the external network port to obtain a binding result. After the NAT server sends this binding result to the streaming media request unit, the unit parses the binding result to obtain the intranet IP address and the port information of the external network port, concatenates them to form a URL, and accesses the URL to obtain streaming media from at least one streaming media camera. Since the access URL generated when a user has a streaming media access need is bound in real-time between the target edge gateway's intranet IP address and the external network port allocated by the NAT server, no dedicated line is required, and no fixed network address is occupied, effectively reducing the resource consumption of the base station streaming media platform when obtaining network addresses. Attached Figure Description

[0028] To more clearly illustrate the technical solutions of the embodiments of this application, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0029] Figure 1 This is a block diagram of a base station streaming media platform provided in an embodiment of this application;

[0030] Figure 2 This is a flowchart illustrating a method for obtaining a network address provided in an embodiment of this application;

[0031] Figure 3 This is a flowchart illustrating another method for obtaining a network address provided in an embodiment of this application;

[0032] Figure 4 This is a schematic diagram of the structure of a network address acquisition device provided in an embodiment of this application;

[0033] Figure 5 This is a schematic diagram of another network address acquisition device provided in the embodiments of this application;

[0034] Figure 6 This is a schematic diagram of the structure of the electronic device provided in the embodiments of this application. Detailed Implementation

[0035] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.

[0036] The terms "first," "second," etc., used in the specification and claims of this application are used to distinguish similar objects and not to describe a specific order or sequence. It should be understood that such usage can be interchanged where appropriate so that embodiments of this application can be implemented in orders other than those illustrated or described herein, and the objects distinguished by "first," "second," etc., are generally of the same class and the number of objects is not limited; for example, a first object can be one or more. Furthermore, in the specification and claims, "and / or" indicates at least one of the connected objects, and the character " / " generally indicates that the preceding and following objects are in an "or" relationship.

[0037] The network address acquisition method provided in this application will be described in detail below with reference to the accompanying drawings, through specific embodiments and application scenarios.

[0038] Please see Figure 1 , Figure 1 This is a block diagram of a base station streaming media platform provided in an embodiment of this application. The base station streaming media platform includes a streaming media request unit 101, a network address translation (NAT) server 102, an edge gateway 103, and a streaming media camera 104.

[0039] Among them, the streaming media request unit 101 is the front-end interface of the base station's streaming media platform. Users initiate access requests in the streaming media request unit. The streaming media request unit generally refers to a WEB system, but is not limited to it.

[0040] NAT server 102 is the core unit of the base station's streaming media platform. It performs internal and external network address binding based on the received streaming media requests to complete the network tunnel construction and feeds back the binding results to the streaming media request unit.

[0041] Edge gateway 103 is an intelligent device that connects to the NAT server and manages streaming media camera device 104. It can access the intranet via VPN dial-up. On one hand, the edge gateway is responsible for collecting on-site data and pulling streaming media data captured by the streaming media camera. On the other hand, the edge gateway can aggregate unstructured video data and IoT data sent from various sensing devices in the data center, perform preprocessing, trigger action responses according to predetermined rules, and upload the processing results and related data to the cloud.

[0042] The streaming media camera 104 is a terminal device that provides streaming media data and is deployed in the base station equipment room. Each edge gateway 103 establishes a network connection with at least one streaming media camera 104 through the intranet.

[0043] Please see Figure 2 , Figure 2 This is a flowchart illustrating a network address acquisition method provided in an embodiment of this application. This method is applied to a NAT server in a base station streaming media platform, such as... Figure 2 As shown, it includes the following steps:

[0044] Step 201: Receive an intranet binding request sent by the streaming media request unit in the base station streaming media platform. The intranet binding request carries the intranet IP address of the target edge gateway. The target edge gateway establishes a network connection with at least one streaming media camera through the intranet.

[0045] In this embodiment of the application, when a user needs to view streaming media data in a certain data center, they can retrieve the edge gateway device in the data center on the WEB page, and then click the streaming media view button. At this time, the WEB program will send the internal IP of the edge gateway device to the network binding interface of the NAT server to initiate an internal network binding request.

[0046] Optionally, the aforementioned edge gateway and at least one streaming media camera are connected in a serial networking mode. In this serial networking mode, the streaming media camera is directly connected to the local interface of the edge gateway, or it is aggregated through intermediate devices such as switches and routers and then connected to the edge gateway to realize real-time video monitoring, historical video playback, camera management, intelligent inspection, alarm event management, and AI intelligent analysis.

[0047] Step 202: Allocate an external network port to the streaming media request unit based on the intranet binding request;

[0048] In this embodiment, the external network port is randomly selected by the NAT server from ports 1024-65535 on the local machine and assigned to the aforementioned streaming media request unit.

[0049] Step 203: Bind the internal network IP address to the external network port to obtain the binding result. The binding result includes the port information of the internal network IP address and the external network port.

[0050] Step 204: Send the binding result to the streaming media request unit. The binding result is used by the streaming media request unit to concatenate the intranet IP address and the port information of the external port to form a Uniform Resource Locator (URL), so that the streaming media request unit can obtain the streaming media from the at least one streaming media camera by accessing the URL.

[0051] In this embodiment, an intranet binding request sent by a streaming media request unit in a base station streaming media platform is received. This intranet binding request carries the intranet IP address of a target edge gateway. The target edge gateway establishes a network connection with at least one streaming media camera via the intranet. The NAT server allocates an external network port to the streaming media request unit based on this intranet binding request and binds the intranet IP address with the port information of the external network port to obtain a binding result. After the NAT server sends this binding result to the streaming media request unit, the streaming media request unit parses the binding result to obtain the intranet IP address and the port information of the external network port, concatenates them to form a URL, and accesses the URL to obtain streaming media from at least one streaming media camera. Since the access URL generated when a user has a need to access streaming media is bound in real-time by the intranet IP address of the target edge gateway and the external network port allocated by the NAT server, no dedicated line is required, and no fixed network address is occupied, effectively reducing the resource consumption of the base station streaming media platform when obtaining a network address.

[0052] Optionally, allocating an external network port to the streaming media request unit based on the intranet binding request includes:

[0053] The intranet binding request is parsed to obtain the intranet IP address of the target edge gateway;

[0054] A probe command is periodically sent with the internal network IP address as the destination address. The probe command is used to detect whether the target edge gateway is online.

[0055] Upon receiving a response message from the target edge gateway in response to the probe command, the target edge gateway is determined to be online, and an idle port is randomly allocated from the dynamic ports of the NAT server host as the external network port of the streaming media request unit.

[0056] If no response message is received from the target edge gateway for the probe command within a preset time period, or if the number of repeated transmissions of the probe command exceeds a preset threshold, a prompt message is sent to the streaming media request unit, the prompt message indicating that the target edge gateway is offline.

[0057] In this embodiment of the application, after the NAT server resolves the internal network IP address of the target edge gateway, the curl command is first executed on the Linux system to detect whether the internal network IP address of the target edge gateway is reachable, so as to determine whether the target edge gateway device is offline.

[0058] Specifically, upon receiving a response message from the target edge gateway to the curl command, it is determined that the internal IP address of the edge gateway device is reachable. At this time, an idle port is randomly allocated from ports 1024-65535 of the NAT server host as the external port of the streaming media request unit. However, if no response message from the target edge gateway to the probe command is received within a preset time period, or if the number of repeated transmissions of the probe command exceeds a preset threshold, it is determined that the internal IP address of the edge gateway device is unreachable. In this case, a prompt message is sent to the streaming media request unit, indicating to the user that the target edge gateway is offline and cannot currently access the data of its associated streaming media camera.

[0059] In this way, by detecting whether the target edge gateway is online before binding the internal network IP address to the external network port, and only performing external network port allocation and subsequent binding and URL concatenation operations if it is confirmed to be online, it is possible to avoid the target edge gateway still trying to access when it is offline, thus further saving resource consumption.

[0060] Optionally, upon receiving feedback information from the streaming media request unit, the external network port is released, wherein the feedback information is used to instruct the streaming media request unit to acquire streaming media from the at least one streaming media camera.

[0061] In this embodiment, the NAT server periodically checks whether it receives feedback information from the streaming media request unit. This feedback information indicates whether the streaming media request unit has successfully acquired streaming media data from at least one streaming media camera. If it is confirmed that the streaming media request unit has successfully acquired streaming media data from at least one streaming media camera, the external network port is released, allowing it to be used by other processes, thus avoiding continuous occupation of network resources and further saving network resource consumption.

[0062] Please see Figure 3 , Figure 3 This is a flowchart illustrating another network address acquisition method provided in this application embodiment, applied to the streaming media request unit in a base station streaming media platform, such as... Figure 3 As shown, it includes the following steps:

[0063] Step 301: Determine the target edge gateway;

[0064] Step 302: Send an intranet binding request to the NAT server. The intranet binding request carries the intranet IP address of the target edge gateway. The target edge gateway establishes a network connection with at least one streaming media camera through the intranet.

[0065] Step 303: Receive the binding result sent by the NAT server. The binding result includes the port information of the internal network IP address and the external network port. The external network port is allocated by the NAT server based on the internal network binding request.

[0066] Step 304: Parse the binding result to obtain the intranet IP address and the port information of the external port. Concatenate the intranet IP address and the port information of the external port to form a Uniform Resource Locator (URL). Obtain the streaming media from the at least one streaming media camera by accessing the URL.

[0067] Optionally, the streaming media request unit stores a mapping relationship between at least one streaming media camera and an edge gateway, and the step of determining the target edge gateway includes:

[0068] Identify a first streaming media camera, which is the streaming media camera that the streaming media request unit wants to access;

[0069] Based on the mapping relationship between the at least one streaming media camera and the edge gateway, a target edge gateway is determined, wherein the target edge gateway is the edge gateway corresponding to the first streaming media camera.

[0070] It should be noted that this embodiment is used as... Figure 2 The implementation method of the streaming media request unit corresponding to the illustrated embodiment can be found in the following examples. Figure 2 The embodiments shown herein, and the benefits achieved therein, will not be repeated here to avoid repetition.

[0071] It should be noted that the network address acquisition method provided in this application embodiment can be executed by a network address acquisition device, or by a control module within that network address acquisition device for executing the network address acquisition method. This application embodiment uses the execution of the network address acquisition method by a network address acquisition device as an example to illustrate the network address acquisition device provided in this application embodiment.

[0072] Please see Figure 4 , Figure 4 This is a schematic diagram of the structure of a network address acquisition device provided in an embodiment of this application, as shown below. Figure 4 As shown, the device 400 includes:

[0073] The receiving module 401 is used to receive an intranet binding request sent by the streaming media request unit in the base station streaming media platform. The intranet binding request carries the intranet IP address of the target edge gateway, and the target edge gateway establishes a network connection with at least one streaming media camera through the intranet.

[0074] Allocation module 402 is used to allocate an external network port to the streaming media request unit based on the intranet binding request;

[0075] The binding module 403 is used to bind the internal network IP address to the external network port and obtain a binding result, wherein the binding result includes the port information of the internal network IP address and the external network port;

[0076] The sending module 404 is used to send the binding result to the streaming media request unit. The binding result is used by the streaming media request unit to concatenate the intranet IP address and the port information of the external port to form an access Uniform Resource Locator (URL), so that the streaming media request unit can obtain the streaming media of the at least one streaming media camera by accessing the URL.

[0077] Optionally, the allocation module can be used for:

[0078] The intranet binding request is parsed to obtain the intranet IP address of the target edge gateway;

[0079] A probe command is periodically sent with the internal network IP address as the destination address. The probe command is used to detect whether the target edge gateway is online.

[0080] Upon receiving a response message from the target edge gateway in response to the probe command, the system determines that the target edge gateway is online and randomly allocates an idle port from the dynamic ports of the NAT server host as the external network port of the streaming media request unit.

[0081] Optionally, the above-mentioned device 400 may further include:

[0082] The prompting module is used to send a prompt message to the streaming media request unit when no response message is received from the target edge gateway for the probe command within a preset time period, or when the number of repeated transmissions of the probe command exceeds a preset threshold. The prompt message is used to indicate that the target edge gateway is in an offline state.

[0083] Optionally, the above-mentioned device 400 may further include:

[0084] The release module is used to release the external network port upon receiving feedback information sent by the streaming media request unit, wherein the feedback information is used to instruct the streaming media request unit to obtain streaming media from the at least one streaming media camera.

[0085] It should be noted that the aforementioned device 400 is capable of achieving Figure 2 The various processes implemented by the device in the method embodiment will not be described again here to avoid repetition.

[0086] The apparatus in this embodiment receives an intranet binding request sent by a streaming media request unit in a base station streaming media platform. This intranet binding request carries the intranet IP address of a target edge gateway. The target edge gateway establishes a network connection with at least one streaming media camera via the intranet. A NAT server allocates an external network port to the streaming media request unit based on the intranet binding request and binds the intranet IP address with the port information of the external network port to obtain a binding result. After the NAT server sends the binding result to the streaming media request unit, the streaming media request unit parses the binding result to obtain the intranet IP address and the port information of the external network port, concatenates them to form a URL, and accesses the URL to obtain streaming media from at least one streaming media camera. Since the access URL generated when a user has a need to access streaming media is bound in real-time by the intranet IP address of the target edge gateway and the external network port allocated by the NAT server, no dedicated line is required, and no fixed network address is occupied, effectively reducing the resource consumption of the base station streaming media platform when obtaining a network address.

[0087] Please see Figure 5 , Figure 5 This is a schematic diagram of another network address acquisition device provided in an embodiment of this application, as shown below. Figure 5 As shown, the device 500 includes:

[0088] Module 501 is used to determine the target edge gateway;

[0089] The sending module 502 is used to send an intranet binding request to the Network Address Translation (NAT) server. The intranet binding request carries the intranet IP address of the target edge gateway. The target edge gateway establishes a network connection with at least one streaming media camera through the intranet.

[0090] The receiving module 503 is used to receive the binding result sent by the NAT server. The binding result includes the internal network IP address and the port information of the external network port generated by the NAT server. The external network port is allocated by the NAT server based on the internal network binding request.

[0091] The splicing module 504 is used to parse the binding result to obtain the internal network IP address and the port information of the external network port, splice the internal network IP address and the port information of the external network port to form a Uniform Resource Locator (URL), and obtain the streaming media of the at least one streaming media camera by accessing the URL.

[0092] Optionally, the streaming media request unit stores at least one mapping relationship between a streaming media camera and an edge gateway, and the aforementioned determining module 501 can be used to:

[0093] Identify a first streaming media camera, which is the streaming media camera that the streaming media request unit wants to access;

[0094] Based on the mapping relationship between the at least one streaming media camera and the edge gateway, a target edge gateway is determined, wherein the target edge gateway is the edge gateway corresponding to the first streaming media camera.

[0095] It should be noted that the aforementioned device 500 is capable of achieving... Figure 3 The various processes implemented by the device in the method embodiment will not be described again here to avoid repetition.

[0096] Please see Figure 6 , Figure 6 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application, such as... Figure 6 As shown, the electronic device 600 includes: a processor 601, a memory 602, and a program or instructions stored in the memory 602 and executable on the processor 601.

[0097] It should be noted that the electronic devices described in the embodiments of this application are intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic devices may also represent various forms of mobile devices, such as personal digital processors, cellular phones, smartphones, wearable devices, and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely examples and are not intended to limit the implementation of the present application described and / or claimed herein.

[0098] It is understood that the memory 602 in the embodiments of this application can be volatile memory or non-volatile memory, or may include both volatile and non-volatile memory. The non-volatile memory can be read-only memory (ROM), programmable read-only memory (PROM), erasable programmable read-only memory (EPROM), electrically erasable programmable read-only memory (EEPROM), or flash memory. The volatile memory can be random access memory (RAM), which is used as an external cache. By way of example, but not limitation, many forms of RAM are available, such as Static Random Access Memory (SRAM), Dynamic Random Access Memory (DRAM), Synchronous DRAM (SDRAM), Double Data Rate SDRAM (DDRSDRAM), Enhanced Synchronous DRAM (ESDRAM), Synchlink DRAM (SLDRAM), and Direct Rambus RAM (DRRAM). The memory 602 of the systems and methods described herein is intended to include, but is not limited to, these and any other suitable types of memory.

[0099] In this embodiment of the application, by calling the program or instructions stored in the memory 602, the processor 601 is used to:

[0100] The system receives an intranet binding request sent by the streaming media request unit in the base station streaming media platform. The intranet binding request carries the intranet IP address of the target edge gateway, and the target edge gateway establishes a network connection with at least one streaming media camera through the intranet.

[0101] Based on the intranet binding request, allocate an external network port to the streaming media request unit;

[0102] Bind the internal network IP address to the external network port to obtain a binding result, the binding result including the port information of the internal network IP address and the external network port;

[0103] The binding result is sent to the streaming media request unit. The binding result is used by the streaming media request unit to concatenate the internal network IP address with the port information of the external network port to form an access Uniform Resource Locator (URL), so that the streaming media request unit can obtain the streaming media of the at least one streaming media camera by accessing the URL.

[0104] or,

[0105] In this embodiment of the application, by calling the program or instructions stored in the memory 602, the processor 601 is used to:

[0106] Identify the target edge gateway;

[0107] Send an intranet binding request to the Network Address Translation (NAT) server. The intranet binding request carries the intranet IP address of the target edge gateway. The target edge gateway establishes a network connection with at least one streaming media camera through the intranet.

[0108] Receive the binding result sent by the NAT server, the binding result including the internal network IP address and the external network port information, the external network port being allocated by the NAT server based on the internal network binding request;

[0109] The binding result is parsed to obtain the internal network IP address and the port information of the external network port. The internal network IP address and the port information of the external network port are concatenated to form a Uniform Resource Locator (URL). The streaming media of the at least one streaming media camera is obtained by accessing the URL.

[0110] The methods disclosed in the embodiments of this application can be applied to 601 or implemented by processor 601. Processor 601 may be an integrated circuit chip with signal processing capabilities. In the implementation process, each step of the above method can be completed by the integrated logic circuit of the hardware in processor 601 or by instructions in the form of software. The processor 601 may be a general-purpose processor, a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components. It can implement or execute the methods, steps, and logic block diagrams disclosed in the embodiments of this application. The general-purpose processor may be a microprocessor or any conventional processor. The steps of the methods disclosed in the embodiments of this application can be directly embodied in the execution of a hardware decoding processor, or can be executed by a combination of hardware and software modules in the decoding processor. The software modules may be located in random access memory, flash memory, read-only memory, programmable read-only memory, electrically erasable programmable memory, registers, or other mature storage media in the art. The storage medium is located in memory 602. Processor 601 reads the information in memory 602 and, in conjunction with its hardware, completes the steps of the above method.

[0111] It is understood that the embodiments described herein can be implemented in hardware, software, firmware, middleware, microcode, or a combination thereof. For hardware implementation, the processing unit can be implemented in one or more application-specific integrated circuits (ASICs), digital signal processors (DSPs), digital signal processing devices (DSPDs), programmable logic devices (PLDs), field-programmable gate arrays (FPGAs), general-purpose processors, controllers, microcontrollers, microprocessors, other electronic units for performing the functions described herein, or combinations thereof.

[0112] For software implementation, the techniques described herein can be achieved through modules (e.g., procedures, functions, etc.) that perform the functions described herein. The software code can be stored in memory and executed by a processor. The memory can be implemented within the processor or externally.

[0113] The electronic device 600 can implement the various processes implemented by the device in the foregoing embodiments, and will not be described again here to avoid repetition. The electronic device 600 can effectively reduce the resource consumption of the base station streaming media platform when accessing streaming media data to obtain network addresses.

[0114] This application also provides a readable storage medium storing a program or instructions. When the program or instructions are executed by a processor, they implement the various processes of the above-described multimedia data processing method embodiments and achieve the same technical effects. To avoid repetition, they will not be described again here.

[0115] The processor is the processor in the electronic device described in the above embodiments. The readable storage medium includes computer-readable storage media, such as read-only memory (ROM), random access memory (RAM), magnetic disk, or optical disk.

[0116] It should be noted that, in this document, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitations, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes that element. Furthermore, it should be noted that the scope of the methods and apparatuses in the embodiments of this application is not limited to performing functions in the order discussed, but may also include performing functions substantially simultaneously or in the reverse order, depending on the functions involved. For example, the described methods may be performed in a different order than described, and various steps may be added, omitted, or combined. Additionally, features described with reference to certain examples may be combined in other examples.

[0117] Through the above description of the embodiments, those skilled in the art can clearly understand that the methods of the above embodiments can be implemented by means of software plus necessary general-purpose hardware platforms. Of course, they can also be implemented by hardware, but in many cases the former is a better implementation method. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk) and includes several instructions to cause a terminal (which may be a mobile phone, computer, server, air conditioner, or network device, etc.) to execute the methods described in the various embodiments of this application.

[0118] The embodiments of this application have been described above with reference to the accompanying drawings. However, this application is not limited to the specific embodiments described above. The specific embodiments described above are merely illustrative and not restrictive. Those skilled in the art can make many other forms under the guidance of this application without departing from the spirit and scope of the claims, and all of these forms are within the protection scope of this application.

Claims

1. A method for obtaining a network address, characterized in that, A Network Address Translation (NAT) server applied in a base station streaming media platform; the method includes: The system receives an intranet binding request sent by the streaming media request unit in the base station streaming media platform. The intranet binding request carries the intranet IP address of the target edge gateway, and the target edge gateway establishes a network connection with at least one streaming media camera through the intranet. Based on the intranet binding request, allocate an external network port to the streaming media request unit; Bind the internal network IP address to the external network port to obtain a binding result, the binding result including the port information of the internal network IP address and the external network port; The binding result is sent to the streaming media request unit. The binding result is used by the streaming media request unit to concatenate the internal network IP address with the port information of the external network port to form an access Uniform Resource Locator (URL), so that the streaming media request unit can obtain the streaming media of the at least one streaming media camera by accessing the URL. The step of allocating an external network port to the streaming media request unit based on the intranet binding request includes: The intranet binding request is parsed to obtain the intranet IP address of the target edge gateway; A probe command is periodically sent with the internal network IP address as the destination address. The probe command is used to detect whether the target edge gateway is online. Upon receiving a response message from the target edge gateway in response to the probe command, the system determines that the target edge gateway is online and randomly allocates an idle port from the dynamic ports of the NAT server host as the external network port of the streaming media request unit.

2. The network address acquisition method according to claim 1, characterized in that, The method further includes: If no response message is received from the target edge gateway for the probe command within a preset time period, or if the number of repeated transmissions of the probe command exceeds a preset threshold, a prompt message is sent to the streaming media request unit, the prompt message indicating that the target edge gateway is offline.

3. The network address acquisition method according to claim 1, characterized in that, The method further includes: Upon receiving feedback information from the streaming media request unit, the external network port is released. The feedback information is used to instruct the streaming media request unit to acquire streaming media from the at least one streaming media camera.

4. A method for obtaining a network address, characterized in that, A streaming media request unit applied in a base station streaming media platform; the method includes: Identify the target edge gateway; Send an intranet binding request to the Network Address Translation (NAT) server. The intranet binding request carries the intranet IP address of the target edge gateway. The target edge gateway establishes a network connection with at least one streaming media camera through the intranet. Receive the binding result sent by the NAT server. The binding result includes the port information of the internal network IP address and the external network port. The external network port is an idle port allocated by the NAT server from the dynamic ports of the NAT server host based on the internal network binding request. The binding result is parsed to obtain the internal network IP address and the port information of the external network port. The internal network IP address and the port information of the external network port are concatenated to form a Uniform Resource Locator (URL). The streaming media of the at least one streaming media camera is obtained by accessing the URL.

5. The network address acquisition method according to claim 4, characterized in that, The streaming media request unit stores at least one mapping relationship between a streaming media camera and an edge gateway. The step of determining the target edge gateway includes: Identify a first streaming media camera, which is the streaming media camera that the streaming media request unit wants to access; Based on the mapping relationship between the at least one streaming media camera and the edge gateway, a target edge gateway is determined, wherein the target edge gateway is the edge gateway corresponding to the first streaming media camera.

6. A network address acquisition device, characterized in that, A Network Address Translation (NAT) server applied in a base station streaming media platform; the device includes: The receiving module is used to receive an intranet binding request sent by the streaming media request unit in the base station streaming media platform. The intranet binding request carries the intranet IP address of the target edge gateway, and the target edge gateway establishes a network connection with at least one streaming media camera through the intranet. The allocation module is used to allocate an external network port to the streaming media request unit based on the intranet binding request; A binding module is used to bind the internal network IP address to the external network port and obtain a binding result, wherein the binding result includes port information of the internal network IP address and the external network port; The sending module is used to send the binding result to the streaming media request unit. The binding result is used by the streaming media request unit to concatenate the intranet IP address and the port information of the external port to form a Uniform Resource Locator (URL), so that the streaming media request unit can obtain the streaming media of the at least one streaming media camera by accessing the URL. The allocation module is specifically used for: The intranet binding request is parsed to obtain the intranet IP address of the target edge gateway; A probe command is periodically sent with the internal network IP address as the destination address. The probe command is used to detect whether the target edge gateway is online. Upon receiving a response message from the target edge gateway in response to the probe command, the system determines that the target edge gateway is online and randomly allocates an idle port from the dynamic ports of the NAT server host as the external network port of the streaming media request unit.

7. A network address acquisition device, characterized in that, A streaming media request unit applied in a base station streaming media platform; the device includes: The determination module is used to determine the target edge gateway; The sending module is used to send an intranet binding request to the Network Address Translation (NAT) server. The intranet binding request carries the intranet IP address of the target edge gateway, and the target edge gateway establishes a network connection with at least one streaming media camera through the intranet. The receiving module is used to receive the binding result sent by the NAT server. The binding result includes the internal network IP address and the port information of the external network port generated by the NAT server. The external network port is an idle port allocated by the NAT server from the dynamic ports of the NAT server host based on the internal network binding request. The splicing module is used to parse the binding result to obtain the internal network IP address and the port information of the external network port, splice the internal network IP address and the port information of the external network port to form a Uniform Resource Locator (URL), and obtain the streaming media of the at least one streaming media camera by accessing the URL.

8. An electronic device, characterized in that, include: A memory, a processor, and a program or instructions stored in the memory and executable on the processor, wherein the program or instructions, when executed by the processor, implement the steps of the network address acquisition method as described in any one of claims 1 to 5.

9. A readable storage medium, characterized in that, The readable storage medium stores a program or instructions that, when executed by a processor, implement the steps of the network address acquisition method as described in any one of claims 1 to 5.