CN111416886B - Internet protocol address dynamic modification method and device and electronic equipment - Google Patents

Internet protocol address dynamic modification method and device and electronic equipment Download PDF

Info

Publication number
CN111416886B
CN111416886B CN202010224306.0A CN202010224306A CN111416886B CN 111416886 B CN111416886 B CN 111416886B CN 202010224306 A CN202010224306 A CN 202010224306A CN 111416886 B CN111416886 B CN 111416886B
Authority
CN
China
Prior art keywords
internet protocol
protocol address
data acquisition
acquisition equipment
equipment
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202010224306.0A
Other languages
Chinese (zh)
Other versions
CN111416886A (en
Inventor
朱玉荣
彭泽波
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Anhui Wenxiang Technology Co ltd
Original Assignee
Anhui Wenxiang Technology Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Anhui Wenxiang Technology Co ltd filed Critical Anhui Wenxiang Technology Co ltd
Priority to CN202010224306.0A priority Critical patent/CN111416886B/en
Publication of CN111416886A publication Critical patent/CN111416886A/en
Application granted granted Critical
Publication of CN111416886B publication Critical patent/CN111416886B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L61/00Network arrangements, protocols or services for addressing or naming
    • H04L61/50Address allocation
    • H04L61/5007Internet protocol [IP] addresses

Abstract

The invention discloses a method, a device and electronic equipment for dynamically modifying an internet protocol address, which relate to the technical field of network communication and comprise the following steps: broadcasting a data acquisition instruction to a plurality of data acquisition devices; receiving response data returned by the data acquisition equipment, wherein the response data comprises an internet protocol address corresponding to the data acquisition equipment; when the received response data contain the same internet protocol address, updating the same internet protocol address by using the target internet protocol address, so that different data acquisition equipment corresponds to different internet protocol addresses; and sending the updated internet protocol address to the corresponding data acquisition equipment until receiving the change effective information sent by the data acquisition equipment. The implementation of the method improves the efficiency of modifying the internet protocol address, facilitates the recording and broadcasting equipment to accurately control the data acquisition equipment to transmit the audio and video signals, and ensures the recording and broadcasting effect.

Description

Internet protocol address dynamic modification method and device and electronic equipment
Technical Field
The invention relates to the technical field of network communication, in particular to a method and a device for dynamically modifying an internet protocol address and electronic equipment.
Background
When the existing recording and broadcasting equipment carries out recording and broadcasting operation, the audio and video equipment needs to be accessed, and the recording and broadcasting operation is completed according to audio and video signals collected by the audio and video equipment. Because the audio and video equipment uses the default ip network address when being accessed, and the recording and playing equipment generally needs to be accessed to a plurality of audio and video signal sources, when the audio and video equipment is accessed to a plurality of audio and video equipment, the audio and video equipment with repeated ip addresses possibly exists, so that the recording and playing equipment cannot accurately control the access of the audio and video equipment according to the ip addresses, and the recording and playing effect of the recording and playing equipment is influenced.
In the related technology, the ip address of the accessed audio and video equipment is modified manually, for example, the ip address is manually modified by entering a web interface of a camera or is modified on a menu interface of the camera by using a remote controller or is set by manually dialing a dial switch built in the camera. If the number of the audio and video devices is large, unnecessary troubles are brought to a user by manually modifying the ip address of the audio and video devices, and meanwhile the modification efficiency of the ip address is influenced.
Disclosure of Invention
Therefore, the technical problem to be solved by the present invention is to overcome the defect of low efficiency of the ip address modification method in the related art, so as to provide a method, an apparatus and an electronic device for dynamically modifying an ip address.
According to a first aspect, an embodiment of the present invention discloses a method for dynamically modifying an internet protocol address, which is applied to a recording and broadcasting terminal, and includes: broadcasting a data acquisition instruction to a plurality of data acquisition devices; receiving response data returned by the data acquisition equipment, wherein the response data comprises an internet protocol address corresponding to the data acquisition equipment; when the received response data contain the same internet protocol address, updating the same internet protocol address by using the target internet protocol address, so that different data acquisition equipment corresponds to different internet protocol addresses; and sending the updated internet protocol address to the corresponding data acquisition equipment until receiving the change effective information sent by the data acquisition equipment.
Optionally, the broadcasting a data acquisition instruction to a plurality of data acquisition devices includes: and broadcasting a data acquisition instruction to a plurality of data acquisition devices according to the target interval duration.
Optionally, before the received reply data includes the same internet protocol address and the same internet protocol address is updated by using the target internet protocol address, the method further includes: constructing an internet protocol address statistical table; sequentially recording the received internet protocol addresses returned by the data acquisition equipment in the statistical table; and when the newly added internet protocol address is repeated with the internet protocol address recorded in the statistical table, determining that the received response data contains the same internet protocol address.
Optionally, when the received reply data includes the same internet protocol address, updating the same internet protocol address by using the target internet protocol address includes: and when the received response data contains the same Internet protocol address, obtaining the Internet protocol address of the newly added data acquisition equipment according to the Internet protocol address of the previous data acquisition equipment in the statistical table.
Optionally, the method further includes, after the update-performed internet protocol address is sent to the corresponding data acquisition device until the change-effective information sent by the data acquisition device performing the update of the internet protocol address is received, that: and sending a configuration data modification instruction to any data acquisition equipment, wherein the configuration data modification instruction is used for updating the configuration of the data acquisition equipment.
Optionally, the method further comprises: determining whether the data acquisition device is in the same network as the data acquisition device; when the data acquisition equipment and the data acquisition equipment are in the same network, directly broadcasting a data acquisition instruction to the data acquisition equipment in the same network; and when the data acquisition equipment and the data acquisition equipment are not in the same network, broadcasting a data acquisition instruction to the data acquisition equipment through the network agent equipment.
Optionally, before the received reply data includes the same internet protocol address and the target internet protocol address is used to update the same internet protocol address, so that different data acquisition devices correspond to different internet protocol addresses, the method further includes: and when the received response data returned by the data acquisition equipment are wrong response data, discarding the response data.
According to a second aspect, an embodiment of the present invention discloses a method for dynamically modifying an internet protocol address, which is applied to a data acquisition device, and includes: when a data acquisition instruction sent by recording and broadcasting equipment is received, sending corresponding response data to the recording and broadcasting equipment, wherein the response data comprises an internet protocol address; when receiving an updated internet protocol address sent by the recording and broadcasting equipment, replacing the current internet protocol address by using the updated internet protocol address; and sending the change effective information to the recording and broadcasting equipment.
Optionally, the method further comprises: and when a configuration data modification instruction sent by the recording and broadcasting equipment is received, updating the local configuration according to the configuration data modification instruction.
According to a third aspect, an embodiment of the present invention discloses an internet protocol address dynamic modification apparatus, which is applied to a recording and broadcasting terminal, and includes: the broadcasting module is used for broadcasting a data acquisition instruction to a plurality of data acquisition devices; the receiving module is used for receiving response data returned by the data acquisition equipment, and the response data comprises an Internet protocol address corresponding to the data acquisition equipment; the updating module is used for updating the same internet protocol address by using the target internet protocol address when the received response data contains the same internet protocol address, so that different data acquisition equipment corresponds to different internet protocol addresses; and the execution module is used for sending the updated internet protocol address to the corresponding data acquisition equipment until the change effective information sent by the data acquisition equipment is received.
According to a fourth aspect, an embodiment of the present invention discloses an ip address dynamic modification apparatus, applied to a data acquisition device, including: the first sending module is used for sending corresponding response data to the recording and broadcasting equipment when receiving a data acquisition instruction sent by the recording and broadcasting equipment, wherein the response data comprises an internet protocol address; the replacing module is used for replacing the current internet protocol address by using the updated internet protocol address when the updated internet protocol address sent by the recording and broadcasting equipment is received; and the second sending module is used for sending the change effective information to the recording and broadcasting equipment.
According to a fifth aspect, an embodiment of the present invention discloses an electronic device, including: a processor, a memory and a computer program stored on the memory and executable on the processor, the processor implementing the steps of the method for dynamically modifying an internet protocol address as described in any of the first aspect and the first alternative implementation manner or in any of the second aspect and the second aspect when executing the program.
According to a sixth aspect, an embodiment of the present invention discloses a readable computer storage medium, on which computer instructions are stored, and the computer instructions, when executed by a processor, implement the steps of the method for dynamically modifying an internet protocol address described in any of the first aspect and the first optional implementation manner, or in any of the second aspect and the second optional implementation manner.
The technical scheme provided by the embodiment of the invention has the following advantages:
the method, the device and the electronic equipment for dynamically modifying the internet protocol address, provided by the embodiment of the invention, broadcast a data acquisition instruction to a plurality of data acquisition equipment, receive response data which are returned by the data acquisition equipment and comprise the internet protocol address corresponding to the data acquisition equipment, and when the received response data comprise the same internet protocol address, update the same internet protocol address by using the target internet protocol address, so that different data acquisition equipment correspond to different internet protocol addresses, and send the updated internet protocol address to the corresponding data acquisition equipment until change effective information sent by the data acquisition equipment for updating the internet protocol address is received. The internet protocol address of the data acquisition equipment is acquired through the broadcast data acquisition instruction, the same internet protocol address is dynamically modified, different data acquisition equipment have different internet protocol addresses, compared with a manual modification mode, the efficiency of modifying the internet protocol address is improved by implementing the scheme of the application, meanwhile, the data acquisition equipment with different internet protocol addresses is provided, the recording and broadcasting equipment can accurately control the data acquisition equipment to transmit audio and video signals, and the recording and broadcasting effect is guaranteed.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, and it is obvious that the drawings in the following description are some embodiments of the present invention, and other drawings can be obtained by those skilled in the art without creative efforts.
Fig. 1 is a flowchart of a method for dynamically modifying an ip address according to embodiment 1 of the present invention;
fig. 2 is a flowchart of a method for dynamically modifying an ip address according to embodiment 2 of the present invention;
fig. 3 is a block diagram of an apparatus for dynamically modifying an ip address according to embodiment 3 of the present invention;
fig. 4 is a block diagram of an apparatus for dynamically modifying an ip address according to embodiment 4 of the present invention;
fig. 5 is a schematic structural diagram of an electronic device according to embodiment 5 of the present invention;
fig. 6 is a schematic structural diagram of a storage medium according to embodiment 6 of the present invention.
Detailed Description
The technical solutions of the present invention will be described clearly and completely with reference to the accompanying drawings, and it should be understood that the described embodiments are some, but not all embodiments of the present invention. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
Furthermore, the terms "first," "second," and "third" are used for descriptive purposes only and are not to be construed as indicating or implying relative importance.
In the description of the present invention, it should be noted that, unless otherwise explicitly specified or limited, the terms "mounted," "connected," and "connected" are to be construed broadly, e.g., as meaning either a fixed connection, a removable connection, or an integral connection; can be mechanically or electrically connected; the two elements may be directly connected or indirectly connected through an intermediate medium, or may be communicated with each other inside the two elements, or may be wirelessly connected or wired connected. The specific meanings of the above terms in the present invention can be understood in specific cases to those skilled in the art.
In addition, the technical features involved in the different embodiments of the present invention described below may be combined with each other as long as they do not conflict with each other.
Example 1
The embodiment of the application provides an internet protocol address dynamic modification method, which can be applied to recorded broadcast equipment, wherein the recorded broadcast equipment is connected with data acquisition equipment, recorded broadcast operation is executed according to received data transmitted by the data acquisition equipment, and the data acquisition equipment can be image acquisition equipment and audio acquisition equipment. As shown in fig. 1, the method for dynamically modifying an ip address includes:
step 101, broadcasting a data acquisition instruction to a plurality of data acquisition devices.
For example, the data acquisition instruction may be determined according to a preset protocol format, where the preset protocol format may be a custom protocol format, or may be any one of existing standard protocols. For example, data such as an internet protocol address (i.e., an ip address), a gateway, a mac address, an audio/video pull stream rtsp/rtmp address and the like of the data acquisition device can be acquired through the data acquisition instruction sent by the custom protocol format, the data acquisition device which receives the data acquisition instruction and can analyze the information acquisition instruction successfully pairs with the recording and playing device, and response information can be sent to the recording and playing device according to the data acquisition instruction.
As an optional embodiment of the present application, the method further comprises: determining whether the data acquisition device is in the same network as the data acquisition device; when the data acquisition equipment and the data acquisition equipment are in the same network, directly broadcasting a data acquisition instruction to the data acquisition equipment in the same network; and when the data acquisition equipment and the data acquisition equipment are not in the same network, broadcasting a data acquisition instruction to the data acquisition equipment through the network agent equipment.
Exemplarily, the recording and playing device and the data acquisition device are in the same network in such a way that the recording and playing device starts a wireless hotspot, so that the image acquisition device or the audio acquisition device is accessed to a local area network of the wireless hotspot of the recording and playing device to realize information interaction; or a wireless local area network is arranged in a recording and broadcasting environment where the recording and broadcasting equipment is located, so that the recording and broadcasting equipment, the image acquisition equipment and the audio acquisition equipment realize information interaction in the wireless local area network, and when the recording and broadcasting equipment and the data acquisition equipment are in the same network, the recording and broadcasting equipment directly broadcasts a data acquisition instruction to the data acquisition equipment; when the recording and broadcasting device and the data acquisition device are in different networks, for example, the recording and broadcasting device is in a private network and the data acquisition device is in a public network, or the recording and broadcasting device is in a public network and the data acquisition device is in a private network, or the recording and broadcasting device and the data acquisition device are in different private networks, network proxy devices can be set in different networks, and the data communication between the recording and broadcasting device and the data acquisition device in different network environments can be realized through the network proxy devices.
And 102, receiving response data returned by the data acquisition equipment, wherein the response data comprises an internet protocol address corresponding to the data acquisition equipment.
Illustratively, the data acquisition device analyzes the data acquisition instruction by using a corresponding transmission protocol after receiving the data acquisition instruction sent by the recording and broadcasting device to obtain the data type required to be acquired by the data acquisition instruction, and transmits corresponding response data containing an internet protocol address to the recording and broadcasting device, and the recording and broadcasting device receives response data returned by the data acquisition device and analyzes the response data to obtain the internet protocol address corresponding to the data acquisition device.
And 103, when the received response data contain the same internet protocol address, updating the same internet protocol address by using the target internet protocol address, so that different data acquisition equipment corresponds to different internet protocol addresses.
Illustratively, the internet protocol addresses of different data acquisition devices are obtained through analysis, and when the received internet protocol addresses contain the same internet protocol address, the corresponding internet protocol addresses are modified, so that different data acquisition devices correspond to different internet protocol addresses. The target internet protocol address can be an internet protocol address prestored by the recording and broadcasting equipment, and when the same internet protocol address is received, the internet protocol address of the data acquisition equipment in the target internet protocol address is updated and replaced, so that different data acquisition equipment corresponds to different internet protocol addresses.
And 104, sending the updated internet protocol address to the corresponding data acquisition equipment until the change effective information sent by the data acquisition equipment is received.
Illustratively, the updated internet protocol address is sent to the corresponding data acquisition device, so that the data acquisition device modifies the initial internet protocol address according to the updated internet protocol address, after the modification is completed, change validation information is sent to the recording and broadcasting device, and when the recording and broadcasting device receives the corresponding change validation information, the internet protocol address representing the corresponding data acquisition device is successfully modified, so that the recording and broadcasting device can complete the recording and broadcasting operation according to the updated internet protocol address. Compared with the method for artificially testing the effectiveness of the modified internet protocol address, the method for testing the internet protocol address further improves the testing efficiency of the modified internet protocol address.
The mode of broadcasting the data acquisition instruction to the data acquisition equipment can be that the data acquisition instruction is broadcasted to the data acquisition equipment in real time, and because the data acquisition equipment which performs data transmission with the recording and broadcasting equipment to complete the recording and broadcasting operation cannot change in a short time, the data acquisition instruction can be broadcasted to a plurality of data acquisition equipment according to the target interval duration, and the occupation of the instruction for acquiring the internet protocol address on the network is reduced. The target interval duration may be a minute level or an hour level, the target interval duration is not limited in the embodiment of the present application, and certainly, the target interval duration may also be a duration before each recording and broadcasting is started, where a data acquisition instruction including an internet protocol address acquisition is sent, and when the internet protocol addresses of all the data acquisition devices are acquired and the same internet protocol is modified, the sending of the corresponding data acquisition instruction for acquiring the internet protocol address is stopped.
According to the dynamic modification method for the internet protocol address, the data acquisition instructions are broadcasted to the data acquisition equipment, the response data which are returned by the data acquisition equipment and comprise the internet protocol address corresponding to the data acquisition equipment are received, when the received response data comprise the same internet protocol address, the same internet protocol address is updated by using the target internet protocol address, different data acquisition equipment correspond to different internet protocol addresses, the updated internet protocol address is sent to the corresponding data acquisition equipment, and the change effective information sent by the data acquisition equipment for updating the internet protocol address is received. The internet protocol address of the data acquisition equipment is acquired through the broadcast data acquisition instruction, the same internet protocol address is dynamically modified, different data acquisition equipment have different internet protocol addresses, compared with a manual modification mode, the efficiency of modifying the internet protocol address is improved by implementing the scheme of the application, meanwhile, the data acquisition equipment with different internet protocol addresses is provided, the recording and broadcasting equipment can accurately control the data acquisition equipment to transmit audio and video signals, and the recording and broadcasting effect is guaranteed.
As an alternative embodiment of the present application, as shown in fig. 2, before step 103, the method further includes: constructing an internet protocol address statistical table; sequentially recording the received internet protocol addresses returned by the data acquisition equipment in the statistical table; and when the newly added internet protocol address is repeated with the internet protocol address recorded in the statistical table, determining that the received response data contains the same internet protocol address.
Illustratively, the internet protocol address statistical table may be a key value table of [ mac: ip ], that is, the data acquisition instruction includes an instruction for acquiring a mac address of the data acquisition device and an instruction for acquiring an ip address of the data acquisition device, so that the data acquisition device transmits the mac address and the ip address to the recording and playing device; the internet protocol address statistical table can also be an ip address statistical table numbered according to the sequence. The embodiment of the present application does not limit the construction method of the internet protocol address statistical table including ip addresses, as long as repeated ip addresses can be determined by looking up the table. When the recording and broadcasting equipment receives an internet protocol address of data acquisition equipment, determining whether the internet protocol address exists in an internet protocol address statistical table or not, and if not, adding the internet protocol address into the internet protocol address statistical table; if yes, the received response data is determined to contain the same Internet protocol address.
As an alternative embodiment of the present application, step 103 includes: and when the received response data contains the same Internet protocol address, obtaining the Internet protocol address of the newly added data acquisition equipment according to the Internet protocol address of the previous data acquisition equipment in the statistical table.
Illustratively, when the received response data obtained by querying the internet protocol address statistical table contains the same internet protocol address, adding 1 to the internet protocol address of the previous data acquisition device in the statistical table to serve as the internet protocol address of the newly added data acquisition device; or the ip addresses in the internet protocol address statistical table may be arranged in the order from small to large, the last record is taken out from the current statistical table, and the ip value of the record is added by 1 to be used as the internet protocol address of the newly added data acquisition device and written into the table, so that different data acquisition devices correspond to different internet protocol addresses. According to the embodiment of the application, the received ip addresses are stored in a statistical table form, so that the ip addresses can be classified and inquired intuitively.
As an alternative embodiment of the present application, as shown in fig. 3, after step 104, the method further includes: and sending a configuration data modification instruction to any data acquisition equipment, wherein the configuration data modification instruction is used for updating the configuration of the data acquisition equipment.
For example, after the internet protocol address of the data acquisition device is modified, the recording and playing device may send a configuration data modification instruction to the corresponding data acquisition device through the internet protocol address, so that the data acquisition device updates the corresponding configuration according to the received configuration data modification instruction. The configuration data modification instruction may include a device information configuration modification instruction (e.g., a modification instruction of information such as a device type, a device name, a hardware version number, a software version number, etc.), a wired network configuration modification instruction (e.g., a modification instruction of information such as a subnet mask, a gateway, a mac address, a stream address, etc.), a wireless network configuration modification instruction (e.g., a modification instruction of configuration information such as a wireless subnet mask, a wireless gateway, a wireless mac address, a wireless ssid, a wireless password, a wireless rtsp stream address, a wireless rtmp stream address, etc.), a device PTZ configuration modification instruction, a live streaming configuration modification instruction, etc. The embodiment of the present application does not limit the type of the configuration data modification instruction, and those skilled in the art can determine the type according to actual needs. When the scheme of the application is implemented to modify the ip address of the data acquisition equipment, after different data acquisition equipment have different ip addresses, the recording and broadcasting equipment can modify the configuration information of the data acquisition equipment corresponding to the corresponding ip address according to recording and broadcasting requirements, the convenience of recording and broadcasting operation is improved, and the recording and broadcasting effect is ensured.
As an alternative implementation method of the present application, before step 103, the method further includes: and when the received response data returned by the data acquisition equipment are wrong response data, discarding the response data.
For example, the wrong response data may be response data with missing data, that is, the response data does not meet the requirement of the data acquisition instruction on data acquisition, or response data with data not transmitted according to a set protocol format, so that the recording and broadcasting terminal cannot analyze the response data. The embodiment of the present application does not limit the type of the erroneous response data, and those skilled in the art can determine the type according to actual needs. When wrong response data are received, corresponding response data are discarded to avoid the phenomenon that network data packet storm is caused by occupation of useless data on a network. In order to avoid the erroneous discarding of correct response data, when the response data with the same error is received more than a certain number of times, the corresponding response data is discarded, for example, when the response data with the same error is received more than 3 times, the corresponding response data is discarded.
Example 2
The embodiment of the application also provides an internet protocol address dynamic modification method, which can be applied to data acquisition equipment for providing audio and video data for recording and broadcasting equipment. As shown in fig. 2, the method may include:
step 201, when receiving a data acquisition instruction sent by a recording and broadcasting device, sending corresponding response data to the recording and broadcasting device, where the response data includes an internet protocol address. And when receiving a data acquisition instruction sent by the recording and broadcasting equipment, analyzing the data acquisition instruction according to the transmission protocol, and sending response data containing the Internet protocol address to the recording and broadcasting equipment according to an analysis result. In order to enable the data acquisition equipment to return the internet protocol address, the data acquisition instruction may include an explicit instruction segment for acquiring the internet protocol address, and the data acquisition equipment returns the internet protocol address after analyzing the instruction. For details, reference is made to the above embodiment, which is not described herein again.
Step 202, when receiving the updated internet protocol address sent by the recording and playing device, replacing the current internet protocol address with the updated internet protocol address. For details, reference is made to the above embodiment, which is not described herein again.
Step 203, sending the update effective information to the recording and broadcasting equipment. For details, reference is made to the above embodiment, which is not described herein again.
According to the dynamic modification method for the internet protocol address, when a data acquisition instruction sent by the recording and broadcasting equipment is received, corresponding response data comprising the internet protocol address is sent to the recording and broadcasting equipment, when an updated internet protocol address sent by the recording and broadcasting equipment is received, the current internet protocol address is replaced by the updated internet protocol address, update effective information is sent to the recording and broadcasting equipment, different data acquisition equipment accessed by the recording and broadcasting equipment has different internet protocol addresses through modifying the internet protocol address of the recording and broadcasting equipment, the recording and broadcasting equipment can accurately control the data acquisition equipment to transmit audio and video signals, the recording and broadcasting effect is guaranteed, and compared with a manual modification mode, the efficiency of modifying the internet protocol address is improved.
As an optional embodiment of the present application, the method further comprises: and when a configuration data modification instruction sent by the recording and broadcasting equipment is received, updating the local configuration according to the configuration data modification instruction. For details, reference is made to the above embodiment, which is not described herein again.
Example 3
An embodiment of the present application further provides an apparatus for dynamically modifying an internet protocol address, as shown in fig. 3, including:
a broadcasting module 301, configured to broadcast a data acquisition instruction to multiple data acquisition devices;
a receiving module 302, configured to receive response data returned by a data acquisition device, where the response data includes an internet protocol address corresponding to the data acquisition device;
an updating module 303, configured to update the same internet protocol address with a target internet protocol address when the received response data includes the same internet protocol address, so that different data acquisition devices correspond to different internet protocol addresses;
and the execution module 304 is configured to send the updated internet protocol address to the corresponding data acquisition device until receiving the change validation information sent by the data acquisition device.
The internet protocol address dynamic modification device provided by the embodiment of the application receives response data which are returned by the data acquisition equipment and comprise internet protocol addresses corresponding to the data acquisition equipment through broadcasting data acquisition instructions to the data acquisition equipment, and when the received response data contain the same internet protocol addresses, the same internet protocol addresses are utilized for updating so that different data acquisition equipment correspond to different internet protocol addresses, the updated internet protocol addresses are sent to the corresponding data acquisition equipment until change effective information sent by the data acquisition equipment for updating the internet protocol addresses is received. The internet protocol address of the data acquisition equipment is acquired through the broadcast data acquisition instruction, the same internet protocol address is dynamically modified, different data acquisition equipment have different internet protocol addresses, compared with a manual modification mode, the efficiency of modifying the internet protocol address is improved by implementing the scheme of the application, meanwhile, the data acquisition equipment with different internet protocol addresses is provided, the recording and broadcasting equipment can accurately control the data acquisition equipment to transmit audio and video signals, and the recording and broadcasting effect is guaranteed.
As an optional embodiment of the present application, the broadcasting module 301 is configured to broadcast a data acquisition instruction to a plurality of data acquisition devices according to a target interval duration.
As an optional embodiment of the present application, the updating module 303 is further configured to construct an internet protocol address statistics table; sequentially recording the received internet protocol addresses returned by the data acquisition equipment in the statistical table; and when the newly added internet protocol address is repeated with the internet protocol address recorded in the statistical table, determining that the received response data contains the same internet protocol address.
As an optional implementation manner of this application, the updating module 303 is further configured to, when the received response data includes the same internet protocol address, obtain an internet protocol address of a newly added data acquisition device according to an internet protocol address of a previous data acquisition device in the statistical table.
As an optional embodiment of the present application, the execution module 304 is further configured to send a configuration data modification instruction to any data acquisition device, where the configuration data modification instruction is used to update the configuration of the data acquisition device.
As an optional embodiment of the present application, the method further includes: the determining module is used for determining whether the data acquisition equipment and the data acquisition equipment are in the same network or not; the first broadcast submodule is used for directly broadcasting a data acquisition instruction to the data acquisition equipment in the same network when the first broadcast submodule and the data acquisition equipment are in the same network; and the second broadcasting submodule is used for broadcasting a data acquisition instruction to the data acquisition equipment through the network agent equipment when the second broadcasting submodule is not in the same network with the data acquisition equipment.
As an optional embodiment of the present application, the updating module 303 is further configured to discard the response data when the received response data returned by the data acquisition device is wrong response data.
Example 4
An embodiment of the present application further provides an apparatus for dynamically modifying an internet protocol address, as shown in fig. 4, including:
a first sending module 401, configured to send, when receiving a data acquisition instruction sent by a recording and playing device, corresponding response data to the recording and playing device, where the response data includes an internet protocol address;
a replacing module 402, configured to replace a current internet protocol address with an updated internet protocol address sent by the recording and playing device when the updated internet protocol address is received;
a second sending module 403, configured to send the change validation information to the recording and playing device.
The internet protocol address dynamic modification device provided by the embodiment of the application, when receiving a data acquisition instruction sent by a recording and broadcasting device, sending corresponding response data including an internet protocol address to the recording and broadcasting device, when receiving an updated internet protocol address sent by the recording and broadcasting device, replacing the current internet protocol address by the updated internet protocol address, sending update effective information to the recording and broadcasting device, and through modifying the internet protocol address of the device, enabling different data acquisition devices accessed by the recording and broadcasting device to have different internet protocol addresses, facilitating the recording and broadcasting device to accurately control the data acquisition device to transmit audio and video signals, ensuring the recording and broadcasting effect, and compared with a manual modification mode, implementing the scheme of the application improves the efficiency of modifying the internet protocol address.
As an optional embodiment of the present application, the method further includes: and the updating module is used for updating the local configuration according to the configuration data modification instruction when receiving the configuration data modification instruction sent by the recording and broadcasting equipment.
Example 5
An embodiment of the present application further provides an electronic device, as shown in fig. 5, including: a processor 501 and a memory 502, and a computer program stored in the memory 502 and operable on the processor 501, wherein the processor 501 and the memory 502 may be connected by a bus or other means, and fig. 5 may be taken as an example, when the processor 501 executes the program, the steps of the method for dynamically modifying an internet protocol address according to the above-described embodiment are implemented.
Processor 501 may be a Central Processing Unit (CPU). The Processor 501 may also be other general purpose processors, Digital Signal Processors (DSPs), Application Specific Integrated Circuits (ASICs), Field Programmable Gate Arrays (FPGAs) or other Programmable logic devices, discrete Gate or transistor logic devices, discrete hardware components, or combinations thereof.
The memory 502, which is a non-transitory computer-readable storage medium, may be used to store non-transitory software programs, non-transitory computer-executable programs, and modules, such as program instructions/modules corresponding to the dynamic internet protocol address modification method in the embodiments of the present invention. The processor 501 executes various functional applications and data processing of the processor by running non-transitory software programs, instructions and modules stored in the memory 502, namely, the method for dynamically modifying an internet protocol address in the above method embodiment is implemented.
The memory 502 may include a storage program area and a storage data area, wherein the storage program area may store an operating system, an application program required for at least one function; the storage data area may store data created by the processor 501, and the like. Further, the memory 502 may include high speed random access memory, and may also include non-transitory memory, such as at least one magnetic disk storage device, flash memory device, or other non-transitory solid state storage device. In some embodiments, memory 502 optionally includes memory located remotely from processor 501, which may be connected to processor 501 via a network. Examples of such networks include, but are not limited to, the internet, intranets, local area networks, mobile communication networks, and combinations thereof.
The one or more modules are stored in the memory 502 and when executed by the processor 501, perform the method for dynamically modifying an internet protocol address in the embodiment shown in fig. 1 and 2.
The details of the electronic device may be understood with reference to the corresponding descriptions and effects in the embodiments shown in fig. 1 to fig. 2, and are not described herein again.
Example 6
An embodiment of the present invention further provides a readable computer storage medium, as shown in fig. 6, where the readable computer storage medium stores a computer instruction 601, and the computer instruction 601 may execute the method for dynamically modifying an internet protocol address in any of the above method embodiments. The storage medium may be a magnetic Disk, an optical Disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a Flash Memory (Flash Memory), a Hard Disk (Hard Disk Drive, abbreviated as HDD), a Solid State Drive (SSD), or the like; the storage medium may also comprise a combination of memories of the kind described above.
It should be understood that the above examples are only for clarity of illustration and are not intended to limit the embodiments. Other variations and modifications will be apparent to persons skilled in the art in light of the above description. And are neither required nor exhaustive of all embodiments. And obvious variations or modifications therefrom are within the scope of the invention.

Claims (11)

1. A dynamic modification method for Internet protocol address is applied to a recording and broadcasting terminal, and is characterized by comprising the following steps:
broadcasting a data acquisition instruction to a plurality of data acquisition devices;
receiving response data returned by the data acquisition equipment, wherein the response data comprises an internet protocol address corresponding to the data acquisition equipment;
when the received response data contain the same internet protocol address, updating the same internet protocol address by using the target internet protocol address, so that different data acquisition equipment corresponds to different internet protocol addresses;
sending the updated internet protocol address to the corresponding data acquisition equipment until receiving the change effective information sent by the data acquisition equipment;
before the received reply data contains the same internet protocol address and the same internet protocol address is updated by using the target internet protocol address, the method further includes:
constructing an internet protocol address statistical table;
sequentially recording the received internet protocol addresses returned by the data acquisition equipment in the statistical table;
when the newly added internet protocol address is repeated with the internet protocol address recorded in the statistical table, determining that the received response data contains the same internet protocol address;
when the received reply data contains the same internet protocol address, updating the same internet protocol address by using the target internet protocol address, including:
when the received response data contain the same internet protocol address, adding 1 to the internet protocol address of the previous data acquisition equipment in the statistical table to serve as the internet protocol address of the newly added data acquisition equipment; or the ip addresses in the internet protocol address statistical table are arranged from small to large, the last record is taken out from the current statistical table, the ip value of the record is added by 1 to be used as the internet protocol address of the newly added data acquisition equipment, and the internet protocol address is written into the table, so that different data acquisition equipment corresponds to different internet protocol addresses.
2. The method of claim 1, wherein the broadcasting data acquisition instructions to a plurality of data acquisition devices comprises:
and broadcasting a data acquisition instruction to a plurality of data acquisition devices according to the target interval duration.
3. The method according to claim 1, wherein the sending the updated ip address to the corresponding data acquisition device until receiving the change validation information sent by the data acquisition device, the method further comprising:
and sending a configuration data modification instruction to any data acquisition equipment, wherein the configuration data modification instruction is used for updating the configuration of the data acquisition equipment.
4. The method according to any one of claims 1-3, further comprising:
determining whether the data acquisition device is in the same network as the data acquisition device;
when the data acquisition equipment and the data acquisition equipment are in the same network, directly broadcasting a data acquisition instruction to the data acquisition equipment in the same network;
and when the data acquisition equipment and the data acquisition equipment are not in the same network, broadcasting a data acquisition instruction to the data acquisition equipment through the network agent equipment.
5. The method of claim 1, wherein when the received reply data contains the same internet protocol address, the same internet protocol address is updated by using the target internet protocol address, so that different data acquisition devices correspond to different internet protocol addresses, and before the method further comprises:
and when the received response data returned by the data acquisition equipment are wrong response data, discarding the response data.
6. A dynamic modification method for an internet protocol address is applied to data acquisition equipment and is characterized by comprising the following steps:
when a data acquisition instruction sent by recording and broadcasting equipment is received, sending corresponding response data to the recording and broadcasting equipment, wherein the response data comprises an internet protocol address;
when receiving an updated internet protocol address sent by the recording and broadcasting equipment, replacing the current internet protocol address by using the updated internet protocol address; the updated internet protocol address is obtained by the recording and broadcasting equipment by adopting the following method: when the received response data contain the same internet protocol address, adding 1 to the internet protocol address of the previous data acquisition equipment in the statistical table to serve as the internet protocol address of the newly added data acquisition equipment; or the ip addresses in the internet protocol address statistical table are arranged from small to large, the last record is taken out from the current statistical table, the ip value of the record is added by 1 to be used as the internet protocol address of the newly added data acquisition equipment, and the internet protocol address is written into the table, so that different data acquisition equipment corresponds to different internet protocol addresses;
and sending the change effective information to the recording and broadcasting equipment.
7. The method of claim 6, further comprising:
and when a configuration data modification instruction sent by the recording and broadcasting equipment is received, updating the local configuration according to the configuration data modification instruction.
8. An internet protocol address dynamic modification device is applied to a recording and broadcasting terminal, and is characterized by comprising:
the broadcasting module is used for broadcasting a data acquisition instruction to a plurality of data acquisition devices;
the receiving module is used for receiving response data returned by the data acquisition equipment, and the response data comprises an Internet protocol address corresponding to the data acquisition equipment;
the updating module is used for updating the same internet protocol address by using the target internet protocol address when the received response data contains the same internet protocol address, so that different data acquisition equipment corresponds to different internet protocol addresses;
the execution module is used for sending the updated internet protocol address to the corresponding data acquisition equipment until the change effective information sent by the data acquisition equipment is received;
when the received reply data contains the same internet protocol address, and before the same internet protocol address is updated by using the target internet protocol address, the updating module is further configured to:
constructing an internet protocol address statistical table;
sequentially recording the received internet protocol addresses returned by the data acquisition equipment in the statistical table;
when the newly added internet protocol address is repeated with the internet protocol address recorded in the statistical table, determining that the received response data contains the same internet protocol address;
when the received reply data contains the same internet protocol address, updating the same internet protocol address by using the target internet protocol address, including:
when the received response data contain the same internet protocol address, adding 1 to the internet protocol address of the previous data acquisition equipment in the statistical table to serve as the internet protocol address of the newly added data acquisition equipment; or the ip addresses in the internet protocol address statistical table may be arranged in the order from small to large, the last record is taken out from the current statistical table, and the ip value of the record is added by 1 to be used as the internet protocol address of the newly added data acquisition device and written into the table, so that different data acquisition devices correspond to different internet protocol addresses.
9. An internet protocol address dynamic modification device is applied to data acquisition equipment, and is characterized by comprising:
the first sending module is used for sending corresponding response data to the recording and broadcasting equipment when receiving a data acquisition instruction sent by the recording and broadcasting equipment, wherein the response data comprises an internet protocol address;
the replacing module is used for replacing the current internet protocol address by using the updated internet protocol address when the updated internet protocol address sent by the recording and broadcasting equipment is received; the updated internet protocol address is obtained by the recording and broadcasting equipment by adopting the following method: when the received response data contain the same internet protocol address, adding 1 to the internet protocol address of the previous data acquisition equipment in the statistical table to serve as the internet protocol address of the newly added data acquisition equipment; or the ip addresses in the internet protocol address statistical table are arranged from small to large, the last record is taken out from the current statistical table, the ip value of the record is added by 1 to be used as the internet protocol address of the newly added data acquisition equipment, and the internet protocol address is written into the table, so that different data acquisition equipment corresponds to different internet protocol addresses;
and the second sending module is used for sending the change effective information to the recording and broadcasting equipment.
10. An electronic device, comprising:
processor, memory and computer program stored on the memory and executable on the processor, the processor implementing the steps of the method of dynamic modification of an internet protocol address according to any one of claims 1 to 7 when executing the program.
11. A computer-readable storage medium, having stored thereon computer instructions, which, when executed by a processor, carry out the steps of the method for dynamic modification of an internet protocol address according to any one of claims 1 to 7.
CN202010224306.0A 2020-03-26 2020-03-26 Internet protocol address dynamic modification method and device and electronic equipment Active CN111416886B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010224306.0A CN111416886B (en) 2020-03-26 2020-03-26 Internet protocol address dynamic modification method and device and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010224306.0A CN111416886B (en) 2020-03-26 2020-03-26 Internet protocol address dynamic modification method and device and electronic equipment

Publications (2)

Publication Number Publication Date
CN111416886A CN111416886A (en) 2020-07-14
CN111416886B true CN111416886B (en) 2022-02-11

Family

ID=71494643

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010224306.0A Active CN111416886B (en) 2020-03-26 2020-03-26 Internet protocol address dynamic modification method and device and electronic equipment

Country Status (1)

Country Link
CN (1) CN111416886B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112685682B (en) * 2021-03-16 2021-07-09 连连(杭州)信息技术有限公司 Method, device, equipment and medium for identifying forbidden object of attack event

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104994185A (en) * 2015-06-25 2015-10-21 小米科技有限责任公司 Method and apparatus for processing IP address database
CN107332942A (en) * 2013-02-05 2017-11-07 联发科技股份有限公司 Obtain the method and its mobile communications device of server address

Family Cites Families (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1324852C (en) * 2004-05-15 2007-07-04 中兴通讯股份有限公司 Address conflict detecting method in communcation system
CN101500023B (en) * 2008-02-03 2011-11-16 北京艾德斯科技有限公司 Automatic configuration method for network appliance IP address
CN102053586B (en) * 2009-11-09 2014-04-23 海尔集团公司 Address allocation method for gas water heater
CN102546849B (en) * 2010-12-30 2014-10-08 华为技术有限公司 Detection method for IP (Internet Protocol) address conflict and network equipment
CN104378455B (en) * 2014-11-13 2018-02-09 新华三技术有限公司 IP address distribution method and device
WO2018133051A1 (en) * 2017-01-20 2018-07-26 华为技术有限公司 Address conflict detection method and device
US10681011B2 (en) * 2017-11-30 2020-06-09 International Business Machines Corporation Preemptive determination of reserved IP conflicts on VPNs

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107332942A (en) * 2013-02-05 2017-11-07 联发科技股份有限公司 Obtain the method and its mobile communications device of server address
CN104994185A (en) * 2015-06-25 2015-10-21 小米科技有限责任公司 Method and apparatus for processing IP address database

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
基于DHCP服务发现并检测IP地址冲突;周振海;《信息与电脑(理论版)》;20180715;全文 *
解决局域网IP地址冲突故障;缪振龙;《网络安全和信息化》;20190505;全文 *

Also Published As

Publication number Publication date
CN111416886A (en) 2020-07-14

Similar Documents

Publication Publication Date Title
US9753794B2 (en) Method and apparatus for controlling sending of heartbeat signal
CN110635965B (en) IPv6 network quality monitoring method, equipment and storage medium
US10841271B2 (en) Systems, methods, and media for controlling traffic to Internet of Things devices
US11032122B2 (en) Multicast delay diagnosis method and apparatus
US10693706B2 (en) Method and apparatus of performing simultaneous multi-agent access for command execution through a single client
CN109150741B (en) Message sending method and device, electronic equipment and storage medium
CN110445723B (en) Network data scheduling method and edge node
CN114339719B (en) DPI data acquisition method and related device
CN111416886B (en) Internet protocol address dynamic modification method and device and electronic equipment
CN105323128B (en) method, device and system for accessing front-end equipment to server
CN109672613B (en) Self-adaptive access method and device and electronic equipment
CN113992508A (en) Local area network automatic networking method of intelligent equipment and intelligent equipment
US9319160B2 (en) Method for updating and method for checking an update of at least one data element in a data carousel, and an associated first device, second device, and data flow
CN109617657B (en) Message processing method and device
CN110505075B (en) Device management method and related device
CN108848409B (en) Set top box and wireless routing module parameter setting method thereof
EP4087320A1 (en) Method for channel switching in wireless mesh network, and wireless device
CN111935206B (en) Message processing method, device and network equipment
CN112995766B (en) Method and device for identifying IPTV multi-channel video stream
US9525589B2 (en) Proactive M2M framework using device-level vCard for inventory, identity, and network management
JP2017224975A (en) Relay device, server device, and terminal device
KR102095563B1 (en) Apparatus and method for ethernet network using mac address
CN115842734B (en) Network management method, controller and SDN network
CN114866810A (en) Streaming video downloading method and device, storage medium and electronic device
US20150150064A1 (en) Context managing apparatus and method thereof

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
CB02 Change of applicant information
CB02 Change of applicant information

Address after: 247100 workshop C2, science and Technology Incubation Park, Jiangnan industrial concentration zone, Chizhou City, Anhui Province

Applicant after: Anhui Wenxiang Technology Co.,Ltd.

Address before: Room 1101, 11 / F, building 2, No.15, Ronghua South Road, Daxing Economic and Technological Development Zone, Beijing 100176

Applicant before: BEIJING WENXIANG INFORMATION TECHNOLOGY Co.,Ltd.

GR01 Patent grant
GR01 Patent grant