Cross-network-segment IP configuration method and device for IP network broadcast, and medium

Through the UDP multicast and addressing ID generation mechanism, the automatic cross-segment IP configuration of the IP network broadcast system is realized, which solves the high threshold and high error rate problems of manually setting IP addresses in the existing technology, and improves the configuration efficiency and accuracy. sex.

CN118740805APending Publication Date: 2024-10-01ZHUHAI HIVI TECH
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410964515.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-07-18
Publication Date
2024-10-01

AI Technical Summary

Technical Problem

When the existing IP network broadcast system is configured across network segments, manually filling in fixed static IP addresses results in high technical threshold, low setting efficiency, and high error rate, which affects the use and maintenance of the system.

Method used

The server uses UDP multicast to send self-enumeration command information. The terminal generates feedback information and sets an IP address. The server generates a terminal addressing ID based on the feedback information. The terminal sets the IP address based on the addressing command information to realize automated cross-network segmentation. IP configuration.

Benefits of technology

It improves the setting efficiency of the IP network broadcast system, reduces the error rate, and simplifies the use and maintenance process of the system.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118740805A_ABST
    Figure CN118740805A_ABST
Patent Text Reader

Abstract

The invention discloses a cross-network-segment IP configuration method and device for IP network broadcast and a medium. The method comprises the steps that a server side sends self-enumeration instruction information to a terminal through UDP multicast; the terminal generates feedback information according to the self-enumeration instruction information and sends the feedback information to the server side, and the feedback information represents identity information and network environment information of the terminal; the server side generates a terminal addressing ID according to the feedback information, and sends addressing instruction information to the terminal according to the terminal addressing ID and the feedback information; and the terminal sets a terminal IP address according to the addressing instruction information. The self-enumeration instruction information is sent through UDP multicast, it is guaranteed that terminals of different network segments can receive the self-enumeration instruction information, corresponding addressing instruction information is obtained after communication with a server side, corresponding terminal IP addresses are set, the terminal IP addresses in the IP network broadcast system can be automatically set, the setting efficiency is high, the error rate is low, and the user experience is improved. The IP network broadcast system is convenient to use and maintain and can be widely applied to the technical field of communication.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of communication technology, and in particular to a cross-segment IP configuration method, device and medium for IP network broadcasting. Background Art

[0002] At present, the wired public broadcasting system based on IP network (IP network broadcasting) is generally implemented within the same network segment and cannot be used across network segments. In the existing technology, fixed static IP address related parameters are set for network audio broadcasting equipment at all levels through manual filling in the broadcasting management software, which has high technical threshold requirements for users, low setting efficiency and high error rate, thus affecting the use and maintenance of IP network broadcasting system. Summary of the invention

[0003] In view of this, the purpose of the embodiments of the present invention is to provide a cross-segment IP configuration method, device and medium for IP network broadcasting, which can automatically set the terminal IP address in the IP network broadcasting system, with high setting efficiency and low error rate, and facilitate the use and maintenance of the IP network broadcasting system.

[0004] In a first aspect, an embodiment of the present invention provides a cross-segment IP configuration method for IP network broadcasting, which is applied to an IP network broadcasting system, wherein the IP network broadcasting system includes a server and at least one terminal, and the cross-segment IP configuration method for IP network broadcasting includes:

[0005] The server sends the self-enumeration instruction information to the terminal via UDP multicast;

[0006] The terminal generates feedback information according to the self-enumeration instruction information, and sends the feedback information to the server, wherein the feedback information represents the identity information and network environment information of the terminal;

[0007] The server generates a terminal addressing ID according to the feedback information, and sends addressing instruction information to the terminal according to the terminal addressing ID and the feedback information;

[0008] The terminal sets the terminal IP address according to the addressing instruction information.

[0009] In some optional embodiments, the IP network broadcast system further includes a router, and before the server sends the self-enumeration instruction information to the terminal via UDP multicast, it also includes:

[0010] The router allocates the real IP address of each terminal in the same network segment through the DHCP protocol;

[0011] The terminal communicates with the server via the real IP address of the terminal.

[0012] In some optional embodiments, the server is in the top-level network, the terminals in different network segments all receive the self-enumeration instruction information, and the terminals generate feedback information according to the self-enumeration instruction information, including:

[0013] The terminal parses the server real IP address and server real port of the server end according to the self-enumeration instruction information;

[0014] The terminal generates the feedback information based on the chip unique identification code, the terminal real port and the terminal real IP address, the chip unique identification code represents the identity information, the terminal real port and the terminal real IP address represent the network environment information, wherein the terminal sends the feedback information to the server end having the server real IP address and the server real port via UDP unicast.

[0015] In some optional embodiments, the server generates a terminal addressing ID according to the feedback information, including:

[0016] The server parses the feedback information to obtain the unique identification code of the chip;

[0017] The server converts the unique chip identification code into a character string;

[0018] Comparing the character string with the stored data in the database to obtain a comparison result;

[0019] When the comparison result indicates that the character string does not belong to the stored data, the server generates a first new addressing ID according to the real IP address of the terminal and the unique identification code of the chip, and configures the first new addressing ID as the terminal addressing ID;

[0020] When the comparison result indicates that the character string belongs to the stored data, the server obtains the old addressing ID corresponding to the character string;

[0021] After comparing and calculating the old addressing ID with the real IP address of the terminal and the unique identification code of the chip, it is determined whether the old addressing ID complies with the preset rules. If not, a second new addressing ID is generated and the second new addressing ID is configured as the terminal addressing ID. If it complies, the old addressing ID is configured as the terminal addressing ID.

[0022] In some optional embodiments, the server generates a first new addressing ID according to the real IP address of the terminal and the unique identification code of the chip, including:

[0023] The server determines the initial ID according to the real IP address of the terminal and the unique identification code of the chip;

[0024] The server obtains a first ID value that has not been used within a preset range, and performs a modulus calculation on the first ID value, wherein the modulus calculation indicates that a remainder is obtained by modulo the first ID value and a preset value, and the first ID value is not equal to the initial ID;

[0025] When the remainder is not equal to a preset value, configuring the first ID value as the first new addressing ID;

[0026] When the remainder is equal to a preset value, a second ID value is reselected within the preset range to perform remainder calculation.

[0027] In some optional embodiments, the server side parses the terminal mapping IP address and the terminal mapping port according to the feedback information, and the sending addressing instruction information to the terminal according to the terminal addressing ID and the feedback information includes:

[0028] The server generates the addressing instruction information according to the terminal addressing ID, the server sending port and the chip unique identification code, and the addressing instruction information indicates the terminal addressing ID, the server sending port and the chip unique identification code;

[0029] The server sends the addressing instruction information to the terminal mapping IP address and the terminal mapping port through UDP unicast, so that the terminal receives the addressing instruction information, wherein the server performs UDP unicast through the server sending port.

[0030] In some optional embodiments, the terminal sets the terminal IP address according to the addressing instruction information, including:

[0031] The terminal saves the terminal addressing ID according to the addressing instruction information;

[0032] The terminal reinitializes the network interface;

[0033] The terminal reads the terminal addressing ID;

[0034] The terminals obtain local IP addresses in turn through DHCP;

[0035] The terminal sets the terminal IP address according to the local IP address and the terminal addressing ID.

[0036] In some optional embodiments, after the terminal sets the terminal IP address according to the addressing instruction information, the following steps are included:

[0037] The terminal generates first heartbeat packet information, wherein the first heartbeat packet information includes the terminal IP address;

[0038] The terminal communicates with the server through UDP unicast, and sends the first heartbeat packet information to the server through the real IP address of the server and the real port of the server;

[0039] The server determines whether the terminal is online according to the first heartbeat packet information, and whether to resend the addressing instruction information to the terminal;

[0040] The server generates second heartbeat packet information;

[0041] The server communicates with the terminal via UDP unicast, and sends the second heartbeat packet information to the terminal via the terminal mapping IP address and the terminal mapping port, so that the terminal determines whether the server is online according to the second heartbeat packet information.

[0042] In a second aspect, an embodiment of the present invention provides a computer device, comprising a processor, a memory, and a computer program stored in the memory and executable by the processor, wherein the steps of the above method are implemented when the computer program is executed by the processor.

[0043] In a third aspect, an embodiment of the present invention provides a computer-readable storage medium, in which a program executable by a processor is stored. When the program executable by the processor is executed by the processor, it is used to perform the method as described above.

[0044] The implementation of the embodiment of the present invention includes the following beneficial effects: The embodiment of the present invention provides a cross-segment IP configuration method for IP network broadcasting, including: the server sends self-enumeration instruction information to the terminal through UDP multicast; the terminal generates feedback information based on the self-enumeration instruction information, and sends the feedback information to the server, the feedback information represents the identity information and network environment information of the terminal; the server generates a terminal addressing ID based on the feedback information, and sends the addressing instruction information to the terminal based on the terminal addressing ID and the feedback information; the terminal sets the terminal IP address according to the addressing instruction information. The self-enumeration instruction information is sent through UDP multicast to ensure that terminals in different network segments can receive it, so that the corresponding addressing instruction information is obtained after communicating with the server, and the corresponding terminal IP address is set, which can automatically set the terminal IP address in the IP network broadcasting system, with high setting efficiency and low error rate, and convenient use and maintenance of the IP network broadcasting system. BRIEF DESCRIPTION OF THE DRAWINGS

[0045] Figure 1It is a flow chart of a cross-segment IP configuration method for IP network broadcasting provided by an embodiment of the present invention;

[0046] Figure 2 It is a schematic block diagram of the structure of an IP network broadcasting system provided by an embodiment of the present invention;

[0047] Figure 3 It is a schematic block diagram of the structure of a computer device provided by an embodiment of the present invention. DETAILED DESCRIPTION

[0048] Embodiments of the present invention are described in detail below, and examples of the embodiments are shown in the accompanying drawings, wherein the same or similar reference numerals throughout represent the same or similar elements or elements having the same or similar functions. The embodiments described below with reference to the accompanying drawings are exemplary and are only used to explain the present invention, and cannot be understood as limiting the present invention.

[0049] In the description of the present invention, it should be understood that descriptions involving orientation, such as up, down, front, back, left, right, etc., indicating orientations or positional relationships, are based on the orientations or positional relationships shown in the accompanying drawings, and are only for the convenience of describing the present invention and simplifying the description, and do not indicate or imply that the device or element referred to must have a specific orientation, be constructed and operated in a specific orientation, and therefore should not be understood as a limitation on the present invention.

[0050] In the description of the present invention, "several" means one or more, "more" means more than two, "greater than", "less than", "exceed" etc. are understood as not including the number itself, and "above", "below", "within" etc. are understood as including the number itself. If there is a description of "first" or "second", it is only used for the purpose of distinguishing the technical features, and cannot be understood as indicating or implying the relative importance or implicitly indicating the number of the indicated technical features or implicitly indicating the order of the indicated technical features.

[0051] In the description of the present invention, unless otherwise clearly defined, terms such as setting, installing, connecting, etc. should be understood in a broad sense, and technicians in the relevant technical field can reasonably determine the specific meanings of the above terms in the present invention based on the specific content of the technical solution.

[0052] The cross-segment IP configuration method for IP network broadcasting according to an embodiment of the present invention is further described below.

[0053] Reference Figure 1 , Figure 1 A flowchart of a cross-segment IP configuration method for IP network broadcasting provided by an embodiment of the present invention, the cross-segment IP configuration method for IP network broadcasting includes but is not limited to the following steps:

[0054] S101, the server sends self-enumeration instruction information to the terminal via UDP multicast;

[0055] S102, the terminal generates feedback information according to the self-enumeration instruction information, and sends the feedback information to the server, where the feedback information represents the identity information and network environment information of the terminal;

[0056] S103, the server generates a terminal addressing ID according to the feedback information, and sends addressing instruction information to the terminal according to the terminal addressing ID and the feedback information;

[0057] S104, the terminal sets the terminal IP address according to the addressing instruction information.

[0058] It should be noted that the specific implementation background of the embodiment of the present invention is as follows Figure 2 As shown, the server is connected to router 2, terminal 1 or switch through router 1, terminal 1 can also be connected to terminal 2, and router 2 is connected to terminal 3. The specific number of connections is not limited here. The connection method can be a network cable, wireless or other connection methods, which are not specifically limited. The embodiment of the present invention is based on but not limited to the following physical conditions: (1) The server must be connected to the top network in the local area network, and the terminal has no requirements for the network level; (2) The server itself has wired Ethernet network communication capabilities. The server of the present invention example uses an ordinary commercial computer + WIN10 system / Linux system + IPCAS (IP network broadcast server management software); (3) A router or server that supports DHCP (Dynamic Host Configuration Protocol) is installed with network routing software that supports DHCP protocol; (4) The terminal of IP network broadcast supports DHCP, UDP (User Datagram Protocol) and other wired Ethernet protocol stack capabilities; (5) The processor of the terminal has a unique SN serial number (that is, a chip unique identification code). The present invention example uses the STM32F407 series processor, and the chip comes with a globally unique 96-bit SN serial number when it leaves the factory. Other processors may be used as long as they have a unique SN number or can be set with a unique serial number, and there is no limitation here.

[0059] Specifically, the MAC address of the terminal is often not initialized when it leaves the factory. Multiple terminals will use the same MAC address. Using the DHCP protocol to assign IP addresses will cause IP conflicts. The server uses the terminal's 96-bit chip unique identification code as an identifier to accurately identify each terminal, thereby automatically assigning an IP address to the terminal. The server assigns a fixed terminal addressing ID to each chip unique identification code. The terminal uses this terminal addressing ID number to set its own IP address to meet the demand for static IP addresses.

[0060] In some optional embodiments, Figure 1Before step S101 shown, the steps include but are not limited to: the router allocates the real IP address of each terminal in the same network segment through the DHCP protocol; and the terminal communicates with the server through the real IP address of the terminal.

[0061] Specifically, when initially powered on, since the terminal supports the DHCP protocol, the router uses DHCP to assign the real IP addresses of all online terminals in the same network segment. Different routers assign real IP addresses of terminals in different network segments. The real IP address of the terminal obtained by the terminal at this stage is used as the IP for temporary communication. At this time, there may be IP duplication in the real IP address of the terminal, and the real IP address of the terminal is dynamically assigned and not bound to the terminal. Therefore, the terminal can communicate briefly through the real IP address of the terminal until it receives the addressing instruction information from the server to set the terminal IP address.

[0062] In some optional embodiments, the server is in the top-level network, and terminals in different network segments all receive the enumeration instruction information. Figure 1 The terminal in step 102 shown generates feedback information according to the self-enumeration instruction information, including but not limited to: the terminal parses the server real IP address and the server real port of the server side according to the self-enumeration instruction information; the terminal generates feedback information according to the chip unique identification code, the terminal real port and the terminal real IP address, the chip unique identification code represents identity information, the terminal real port and the terminal real IP address represent network environment information, wherein the terminal sends the feedback information to the server side having the server real IP address and the server real port via UDP unicast.

[0063] Specifically, the server broadcasts the self-enumeration instruction information through UDP multicast packets. The instruction information is broadcast to all terminals in the entire network of the system using UDP (because the server is in the top-level network, the multicast information it sends can be received by terminals in different network segments, and the terminal can identify the source IP of the multicast information, that is, the real IP of the server, and the terminal can directly reply to the source IP), requiring each terminal to return feedback information, which includes the chip unique identification code, the real IP address in its own LAN (the real IP address of the terminal), the real port of the terminal and other useful information. The terminal receives the instruction information and returns the feedback information to the server, which is saved by the server for the next step.

[0064] Table 1 Self-enumeration instruction information format

[0065] Protocol Type Header Target ID Source ID Command Type Data length data Checksum 0x0910 0x5555 0xffff 0x0000 0xff 0x0001 0x01 0xe6

[0066] After receiving the self-enumeration instruction information in the format of Table 1, the terminal sends a feedback message with its own chip unique identification code and its own real IP address in the local area network to the server. The specific feedback message format is:

[0067] Table 2 Feedback information format

[0068] Protocol Type Header Target ID Source ID Command Type Data length Data bits Checksum 0x0910 0x5555 0x0000 0x0000 0xff 0x0022 subcommand 1 byte

[0069] The format of the subcommand is shown in Table 3:

[0070] Table 3 Subcommand format

[0071]

[0072] It can be seen that the server can obtain the chip's unique identification code, the terminal's model version, as well as the terminal's role, function and volume information, real IP address, and real port through sub-commands.

[0073] In some optional embodiments, Figure 1 The server side in step 103 shown generates a terminal addressing ID according to the feedback information, including but not limited to: the server side parses the feedback information to obtain a chip unique identification code; the server side converts the chip unique identification code into a character string; the character string is compared with the stored data in the database to obtain a comparison result; when the comparison result indicates that the character string does not belong to the stored data, the server side generates a first new addressing ID according to the terminal real IP address and the chip unique identification code, and configures the first new addressing ID as the terminal addressing ID; when the comparison result indicates that the character string belongs to the stored data, the server side obtains the old addressing ID corresponding to the character string, compares the old addressing ID with the terminal real IP address and the chip unique identification code, and determines whether the old addressing ID meets the preset rules. If not, a second new addressing ID is generated, and the second new addressing ID is configured as the terminal addressing ID. If it meets, the old addressing ID is configured as the terminal addressing ID.

[0074] Specifically, after receiving the feedback information, the server obtains the terminal's chip unique identification code by parsing the feedback information, and converts the chip unique identification code into a string in Base64 encoding format, and compares the stored data in the database (which stores the terminal's relevant information and the string corresponding to the corresponding chip unique identification code). If the encoded string of the chip unique identification code is not stored in the stored data, it means that the terminal is a new terminal, and a first new addressing ID is assigned to it, and the first new addressing ID avoids the addressing ID corresponding to the terminal's real IP address, and all the terminal information is saved in the database. Finally, the first new addressing ID and the corresponding chip unique identification code form an addressing instruction message and send it to the terminal. When it is found through comparison that the character string belongs to the stored data, it means that the terminal is an old terminal. The server obtains the old addressing ID corresponding to the character string from the database, and first compares and calculates the old addressing ID with the real IP address of the current terminal and the unique identification code of the chip. If it meets the preset rules, there is no need to recalculate the second new addressing ID. If it does not meet the preset rules, the second new addressing ID is recalculated to replace the old addressing ID, and the second new addressing ID is updated and written into the database. Finally, the addressing ID that meets the preset rules (old addressing ID, first new addressing ID or second new addressing ID) and the corresponding unique identification code of the chip are combined into an addressing instruction information and sent to the terminal.

[0075] In some optional embodiments, the server side generates a first new addressing ID based on the real IP address of the terminal and the unique identification code of the chip, including: the server side determines the initial ID based on the real IP address of the terminal and the unique identification code of the chip; the server side obtains a first ID value that has not been used within a preset range, and performs a modulo calculation on the first ID value, the modulo calculation represents the remainder obtained after taking the modulo of the first ID value and the preset value, and the first ID value is not equal to the initial ID; when the remainder is not equal to the preset value, the first ID value is configured as the new addressing ID; when the remainder is equal to the preset value, a second ID value is re-selected within the preset range for the modulo calculation.

[0076] Specifically, the server obtains the initial ID corresponding to the real IP address of the terminal and the unique identification code of the chip according to the conversion relationship between the IP address and the ID; the server obtains the first ID value that has not been used in the preset range, and the first ID value is not equal to the initial ID. The first ID value is modulo calculated to obtain the corresponding remainder. For example, in the embodiment of the present application, the preset range of the first ID value is greater than 0 and less than 65535, and the result of ID%256 is not equal to the integer of the preset value 0, 1, 255 (0, 1, 255 is a special IP address, which is usually avoided as the IP address of the terminal), the first ID value is configured as the first new addressing ID; when the result of ID%256 is equal to the integer of the preset value 0, 1, 255, the first ID value is added by one or a second ID value that has not been used is randomly selected in the preset range, and then the modulo calculation is performed. If the remainder obtained is still equal to the integer of the preset value 0, 1, 255, the ID value is continued to be taken in the preset range until the remainder after the modulo calculation of the second ID value is not equal to the integer of 0, 1, 255.

[0077] In some optional embodiments, in order to adapt to different network segments, the initial value of the first ID value is the third digit of the terminal's real IP address multiplied by 256 and then added to 2, so as to obtain the terminal addressing ID, and the terminal automatically sets the IP according to the terminal addressing ID. Specifically, assuming that the terminal's real IP address for the terminal that has not completed the terminal addressing ID allocation is 192.168.2.100, and the IP address of the server is 192.168.1.102, the terminal is the first device identified by the server, and the first ID value assigned should be 2 (skipping 0, 1, 255), but the network segment value of the terminal is 2, so the final determination is that the first ID value assigned should be 514 (that is, it is adapted to cross-segment).

[0078] In some optional embodiments, the server side parses the terminal mapping IP address and the terminal mapping port according to the feedback information, and sends addressing instruction information to the terminal according to the terminal addressing ID and the feedback information, including: the server side generates addressing instruction information according to the terminal addressing ID, the server side sending port and the chip unique identification code, and the addressing instruction information indicates the terminal addressing ID, the sending port and the chip unique identification code; the server side sends the addressing instruction information to the terminal mapping IP address and the terminal mapping port via UDP unicast, so that the terminal receives the addressing instruction information, wherein the server side performs UDP unicast through the server side sending port.

[0079] Specifically, the server side forms an addressing instruction message with the terminal ID, the server side sending port and the chip unique identification code in the feedback information, and sends it to the terminal; the server side performs UDP unicast through the server side sending port, and sends the addressing instruction message to the terminal corresponding to the terminal mapping IP address and the terminal mapping port. After receiving the addressing instruction message, the terminal confirms whether the chip unique identification code is its own chip unique identification code. If not, the IP address is not set, and feedback information is sent to the server side again. If it is its own chip unique identification code, the local terminal addressing ID is set and the terminal addressing ID is saved and stored in the processor's storage space for subsequent setting of the terminal IP address.

[0080] In some optional embodiments, the terminal sets the terminal IP address according to the addressing instruction information, including: the terminal saves the terminal addressing ID according to the addressing instruction information; the terminal reinitializes the network interface; the terminal reads the terminal addressing ID; the terminal obtains the local IP address in sequence through DHCP; the terminal sets the terminal IP address according to the local IP address and the terminal addressing ID.

[0081] Specifically, the terminal saves the received terminal addressing ID into the storage space of the processor. When initializing the network interface, the terminal first reads out the key data such as the terminal addressing ID from the storage space, and then performs DHCP. When the local IP address is not assigned, it waits in a loop to avoid local IP address conflicts when multiple terminals use DHCP at the same time. After the terminal obtains the local IP address through DHCP, considering that the terminal may have changed the network segment before power failure and cannot connect to the Internet, only the low byte of the assigned terminal addressing ID is filled into the fourth byte of the local IP address, thereby obtaining the terminal IP address, and after the terminal is powered on, the real IP address and real port of the server that have been saved are actively sent to the server, thereby prompting the server to actively update the terminal mapping IP address and terminal mapping port as well as the terminal addressing ID.

[0082] In some optional embodiments, after the terminal sets the terminal IP address according to the addressing instruction information, it includes: the terminal generates a first heartbeat packet information, and the first heartbeat packet information includes the real IP address and real port of the terminal; the terminal communicates with the server side through UDP unicast, and sends the first heartbeat packet information to the server side through the real IP address and real port of the server side; the server side determines whether the terminal is online and whether to resend the addressing instruction information to the terminal according to the first heartbeat packet information; the server side generates a second heartbeat packet information; the server side communicates with the terminal through UDP unicast, and sends the second heartbeat packet information to the terminal through the terminal mapping IP address and the terminal mapping port, so that the terminal determines whether the server side is online according to the second heartbeat packet information.

[0083] Specifically, after the terminal IP address is successfully set, the terminal and the server send each other UDP unicast-based heartbeat packets within 1 second to determine whether both parties are online, keep the server sending port alive (to ensure that information can always be sent to different network segments through the router), and keep the terminal mapping port alive (to ensure that information from different network segments can always be received through the router). When the terminal actively communicates with the server through UDP unicast, the communication destination address port uses the server's real IP address and server's real port. When the server actively communicates with the terminal through UDP unicast, the communication destination address port uses the terminal mapping IP address and terminal mapping port.

[0084] The implementation of the embodiment of the present invention includes the following beneficial effects: The embodiment of the present invention provides a cross-segment IP configuration method for IP network broadcasting, including: the server sends self-enumeration instruction information to the terminal through UDP multicast; the terminal generates feedback information based on the self-enumeration instruction information, and sends the feedback information to the server, the feedback information represents the identity information and network environment information of the terminal; the server generates a terminal addressing ID based on the feedback information, and sends the addressing instruction information to the terminal based on the terminal addressing ID and the feedback information; the terminal sets the terminal IP address according to the addressing instruction information. The self-enumeration instruction information is sent through UDP multicast to ensure that terminals in different network segments can receive it, so that the corresponding addressing instruction information is obtained after communicating with the server, and the corresponding terminal IP address is set, which can automatically set the terminal IP address in the IP network broadcasting system, with high setting efficiency and low error rate, and convenient use and maintenance of the IP network broadcasting system.

[0085] like Figure 3As shown, in the second aspect, an embodiment of the present invention further provides a computer device, which can be a terminal. The computer device includes a processor, a memory, and a network interface connected via a system bus, wherein the memory may include a non-volatile storage medium and an internal memory. The non-volatile storage medium can store an operating system and a computer program. The computer program includes program instruction information, which, when executed, enables the processor to execute any one of the methods for visualizing management of industrial equipment. The processor is used to provide computing and control capabilities to support the operation of the entire computer device. The internal memory provides an environment for the operation of the computer program in the non-volatile storage medium, which, when executed by the processor, enables the processor to execute any one of the methods for visualizing management of industrial equipment. The network interface is used for network communications, such as sending assigned tasks, etc. Those skilled in the art will appreciate that Figure 3 The structure shown in the figure is only a block diagram of a part of the structure related to the solution of the present disclosure, and does not constitute a limitation on the computer device to which the solution of the present disclosure is applied. The specific computer device may include Figure 3 More or less components shown in, or some components are combined, or different component arrangements are provided. It should be understood that the processor can be a central processing unit (CPU), and the processor can also be other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field programmable gate arrays (FPGA) or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components, etc. Among them, the general-purpose processor can be a microprocessor or the processor can also be any conventional processor, etc. Among them, in one embodiment, the above-mentioned processor is used to run a computer program stored in a memory to implement the following steps: the server sends self-enumeration instruction information to the terminal through UDP multicast; the terminal generates feedback information according to the self-enumeration instruction information, and sends the feedback information to the server, and the feedback information represents the identity information and network environment information of the terminal; the server generates a terminal addressing ID according to the feedback information, and sends the addressing instruction information to the terminal according to the terminal addressing ID and the feedback information; the terminal sets the terminal IP address according to the addressing instruction information. By sending self-enumeration command information through UDP multicast, it is ensured that terminals in different network segments can receive it, so as to obtain the corresponding addressing command information after communicating with the server, set the corresponding terminal IP address, and automatically set the terminal IP address in the IP network broadcasting system. The setting efficiency is high and the error rate is low, which facilitates the use and maintenance of the IP network broadcasting system.

[0086] It can be seen that the contents of the above method embodiments are all applicable to the present device embodiments, the functions specifically implemented by the present device embodiments are the same as those of the above method embodiments, and the beneficial effects achieved are also the same as those achieved by the above method embodiments.

[0087] In addition, the embodiment of the present application also discloses a computer program product or a computer program, and the computer program product or the computer program is stored in a computer-readable storage medium. The processor of the computer device can read the computer program from the computer-readable storage medium, and the processor executes the computer program, so that the computer device performs the above method. Similarly, the contents in the above method embodiment are all applicable to the storage medium embodiment, and the functions specifically implemented by the storage medium embodiment are the same as those in the above method embodiment, and the beneficial effects achieved are also the same as those achieved by the above method embodiment.

[0088] It is understood that all or some steps and systems in the disclosed method above can be implemented as software, firmware, hardware and appropriate combinations thereof. Some physical components or all physical components can be implemented as software executed by a processor, such as a central processing unit, a digital information processor or a microprocessor, or implemented as hardware, or implemented as an integrated circuit, such as an application-specific integrated circuit. Such software can be distributed on a computer-readable medium, and the computer-readable medium can include a computer storage medium (or a non-transitory medium) and a communication medium (or a temporary medium). As known to those of ordinary skill in the art, the term computer storage medium includes volatile and non-volatile, removable and non-removable media implemented in any method or technology for storing information (such as computer-readable instruction information, data structures, program modules or other data). Computer storage media include, but are not limited to, RAM, ROM, EEPROM, flash memory or other memory technology, CD-ROM, digital versatile disk (DVD) or other optical disk storage, magnetic cassette, magnetic tape, disk storage or other magnetic storage device, or any other medium that can be used to store desired information and can be accessed by a computer. Furthermore, it is well known to those skilled in the art that communication media generally contain computer-readable instruction information, data structures, program modules, or other data in modulated data information such as carrier waves or other transmission mechanisms, and may include any information delivery media.

[0089] The embodiments of the present invention are described in detail above in conjunction with the accompanying drawings, but the present invention is not limited to the above embodiments, and various changes can be made within the knowledge scope of ordinary technicians in the technical field without departing from the purpose of the present invention.

Claims

1. A cross-segment IP configuration method for IP network broadcasting, characterized in that: Applied to an IP network broadcasting system, the IP network broadcasting system includes a server end and at least one terminal, and the cross-segment IP configuration method of the IP network broadcasting includes: The server sends the self-enumeration instruction information to the terminal via UDP multicast; The terminal generates feedback information according to the self-enumeration instruction information, and sends the feedback information to the server, wherein the feedback information represents the identity information and network environment information of the terminal; The server generates a terminal addressing ID according to the feedback information, and sends addressing instruction information to the terminal according to the terminal addressing ID and the feedback information; The terminal sets the terminal IP address according to the addressing instruction information.

2. The method according to claim 1, characterized in that The IP network broadcast system further includes a router, and before the server sends the self-enumeration instruction information to the terminal via UDP multicast, it also includes: The router allocates the real IP address of each terminal in the same network segment through the DHCP protocol; The terminal communicates with the server via the real IP address of the terminal.

3. The method according to claim 2, characterized in that The server is in the top-level network, and the terminals in different network segments all receive the self-enumeration instruction information, and the terminals generate feedback information according to the self-enumeration instruction information, including: The terminal parses the server real IP address and server real port of the server end according to the self-enumeration instruction information; The terminal generates the feedback information based on the chip unique identification code, the terminal real port and the terminal real IP address, the chip unique identification code represents the identity information, the terminal real port and the terminal real IP address represent the network environment information, wherein the terminal sends the feedback information to the server end having the server real IP address and the server real port via UDP unicast.

4. The method according to claim 3, characterized in that: The server generates a terminal addressing ID according to the feedback information, including: The server parses the feedback information to obtain a unique identification code of the chip; The server converts the unique chip identification code into a character string; Comparing the character string with the stored data in the database to obtain a comparison result; When the comparison result indicates that the character string does not belong to the stored data, the server generates a first new addressing ID according to the real IP address of the terminal and the unique identification code of the chip, and configures the first new addressing ID as the terminal addressing ID; When the comparison result indicates that the character string belongs to the stored data, the server obtains the old addressing ID corresponding to the character string; After comparing and calculating the old addressing ID with the real IP address of the terminal and the unique identification code of the chip, it is determined whether the old addressing ID complies with the preset rules. If not, a second new addressing ID is generated and the second new addressing ID is configured as the terminal addressing ID. If it complies, the old addressing ID is configured as the terminal addressing ID.

5. The method according to claim 4, characterized in that The server generates a first new addressing ID according to the real IP address of the terminal and the unique identification code of the chip, including: The server determines the initial ID according to the real IP address of the terminal and the unique identification code of the chip; The server obtains a first ID value that has not been used within a preset range, and performs a modulus calculation on the first ID value, wherein the modulus calculation indicates that a remainder is obtained by modulo the first ID value and a preset value, and the first ID value is not equal to the initial ID; When the remainder is not equal to a preset value, configuring the first ID value as the first new addressing ID; When the remainder is equal to a preset value, a second ID value is reselected within the preset range to perform remainder calculation.

6. The method according to claim 3, characterized in that The server side parses the terminal mapping IP address and the terminal mapping port according to the feedback information, and sends the addressing instruction information to the terminal according to the terminal addressing ID and the feedback information, including: The server generates the addressing instruction information according to the terminal addressing ID, the server sending port and the chip unique identification code, wherein the addressing instruction information indicates the terminal addressing ID, the sending port and the chip unique identification code; The server sends the addressing instruction information to the terminal mapping IP address and the terminal mapping port through UDP unicast, so that the terminal receives the addressing instruction information, wherein the server performs UDP unicast through the server sending port.

7. The method according to claim 5, characterized in that The terminal sets the terminal IP address according to the addressing instruction information, including: The terminal saves the terminal addressing ID according to the addressing instruction information; The terminal reinitializes the network interface; The terminal reads the terminal addressing ID; The terminals obtain local IP addresses in turn through DHCP; The terminal sets the terminal IP address according to the local IP address and the terminal addressing ID.

8. The method according to claim 6, characterized in that After the terminal sets the terminal IP address according to the addressing instruction information, the method includes: The terminal generates first heartbeat packet information; The terminal communicates with the server through UDP unicast, and sends the first heartbeat packet information to the server through the real IP address of the server and the real port of the server; The server determines whether the terminal is online according to the first heartbeat packet information, and whether to resend the addressing instruction information to the terminal; The server generates second heartbeat packet information; The server communicates with the terminal via UDP unicast, and sends the second heartbeat packet information to the terminal via the terminal mapping IP address and the terminal mapping port, so that the terminal determines whether the server is online according to the second heartbeat packet information.

9. A computer device, wherein: The computer device comprises a processor, a memory, and a computer program stored in the memory and executable by the processor, wherein when the computer program is executed by the processor, the steps of the method according to any one of claims 1 to 8 are implemented.

10. A computer-readable storage medium storing a program executable by a processor, characterized in that: The processor-executable program is used to perform the method according to any one of claims 1 to 8 when executed by the processor.